Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Khadas Tone Board
#21
(02-06-2020, 12:26 PM)Tim Curtis Wrote: Thie message "Formats: Unable to determine formats" is coming from also-capabilities command that's being run by moodeutl.

I'm not sure why it's not able to detect the audio formats for your USB device. Try also-capabilities --help.

alsa-capabilities --help give just the help of the command

Code:
pi@moode-pt:~ $ alsa-capabilities -h                                                                                                                  
                                                                                                                                                     
Usage:                                                                                                                                                
alsa-capabilities [ -l a|d|u ]  [ -c <filter> ] [-a <hwaddress>] [-s] [ -q ]                                                                          
                                                                                                                                                     
Displays a list of each alsa audio output with its details                                                                                            
including its hardware address (eg. `hw:x,y').                                                                                                        
                                                                                                                                                     
The list may be limited by applying one or more options with                                                                                          
arguments, for the type of output (`-l' or `--limit'), the name of                                                                                    
the card and/or output (`-c' or `--customfilter'), and/or the                                                                                        
hardware address (`-a\ or `--address').                                                                                                              
                                                                                                                                                     
The `-s' or `--samplerates' switch turns on the detection and                                                                                        
display of the supported samplerates per encoding format for each                                                                                    
output.                                                                                                                                              
                                                                                                                                                     
 -l TYPEFILTER, --limit TYPEFILTER                                                                                                                  
                    Limit the interfaces to TYPEFILTER. Can be one of                                                                                
                    `a' (or `analog'), `d' (or `digital'), `u'                                                                                      
                    (or `usb'), the latter for USB Audio Class (UAC1                                                                                
                    or UAC2) devices.                                                                                                                
 -c REGEXP, --customlimit REGEXP                                                                                                                    
                    Limit the available interfaces further to match                                                                                  
                    `REGEXP'.                                                                                                                        
 -a HWADDRESS, --address HWADDRESS                                                                                                                  
                    Limit the returned interface further to the one                                                                                  
                    specified with HWADDRESS, eg. `hw:0,1'                                                                                          
 -s, --samplerates  Adds a listing of the supported sample rates for                                                                                
                    each format an interface supports.                                                                                              
 -q, --quiet        Surpress listing each interface with its details,                                                                                
                    ie. only store the details of each card in the                                                                                  
                    appropriate arrays.                                                                                                              
 -j, --json         Surpress normal output but create json formatted                                                                                
                    output instead.                                                                                                                  
 -n, --nocolor      Supresses colorized output.                                                                                                      
 -h, --help         Show this help message                                                                                                          
                                                                                                                                                     
Version 2.0.1. For more information see:                                                                                                              
https://lacocina.nl/detect-alsa-output-capabilities                                                                                                  
https://gitlab.com/sonida/alsa-capabilities/  


this is the output of alsa-capabilities -s

Code:
pi@moode-pt:~ $ alsa-capabilities -s
1: `bcm2835 ALSA' Analog audio output on device bcm2835 ALSA
   -hardware address:               hw:0,0  (or hw:ALSA,0)
   -device label:                   bcm2835 ALSA
   -sample rates per format:        U8: 384000, 352800, 192000, 176400, 96000, 88200, 48000, 44100
                                    S16_LE: 384000, 352800, 192000, 176400, 96000, 88200, 48000, 44100                                              
   -usb audio class:                (n/a)
   -streamfile:                     (n/a)
   -character device:               /dev/snd/pcmC0D0p
   -monitor file:                   /proc/asound/card0/pcm0p/sub0/hw_params
2: `bcm2835 IEC958/HDMI' Digital non-UAC audio output on device bcm2835 ALSA
   -hardware address:               hw:0,1  (or hw:ALSA,1)
   -device label:                   bcm2835 ALSA
   -sample rates per format:        S16_LE: 384000, 352800, 192000, 176400, 96000, 88200, 48000, 44100
   -usb audio class:                (n/a)
   -streamfile:                     (n/a)
   -character device:               /dev/snd/pcmC0D1p
   -monitor file:                   /proc/asound/card0/pcm1p/sub0/hw_params
3: `bcm2835 IEC958/HDMI1' Digital non-UAC audio output on device bcm2835 ALSA
   -hardware address:               hw:0,2  (or hw:ALSA,2)
   -device label:                   bcm2835 ALSA
   -sample rates per format:        S16_LE: 384000, 352800, 192000, 176400, 96000, 88200, 48000, 44100
   -usb audio class:                (n/a)
   -streamfile:                     (n/a)
   -character device:               /dev/snd/pcmC0D2p
   -monitor file:                   /proc/asound/card0/pcm2p/sub0/hw_params
4: `USB Audio' Digital USB Audio Class audio output on device Khadas Tone Control
   -hardware address:               hw:1,0  (or hw:Control,0)
   -device label:                   Khadas Tone Control
   -sample rates per format:        (n/a)
   -usb audio class:                UAC2 (isochronous asynchronous)
   -streamfile:                     /proc/asound/card1/stream0
   -character device:               /dev/snd/pcmC1D0p
   -monitor file:                   /proc/asound/card1/pcm0p/sub0/hw_params
Reply
#22
You might want to post the -s output in the maintainers Git repo or project site to see if he can look into it. There are some links at the end if the --help.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#23
(02-06-2020, 03:48 PM)Tim Curtis Wrote: You might want to post the -s output in the maintainers Git repo or project site to see if he can look into it. There are some links at the end if the --help.


... not actually a great support for this problem... other sw can retrieve this information, Gentooplayer for example

Thanks for your effort
Reply
#24
(02-06-2020, 04:06 PM)stefano_mbp Wrote:
(02-06-2020, 03:48 PM)Tim Curtis Wrote: You might want to post the -s output in the maintainers Git repo or project site to see if he can look into it. There are some links at the end if the --help.


... not actually a great support for this problem... other sw can retrieve this information, Gentooplayer for example

Thanks for your effort

Let's review the bidding.

  1. You note an anomaly regarding missing information
  2. Tim tells you how to check the third-party software component that's supposed to supply the information.
  3. Your check confirms the third-party software component is not returning the information.
  4. Rather than report this problem to the maintainer of the third-party software component as Tim suggested, you throw shade at Tim.
Isn't that special.
Reply
#25
(02-06-2020, 08:14 PM)TheOldPresbyope Wrote:
(02-06-2020, 04:06 PM)stefano_mbp Wrote:
(02-06-2020, 03:48 PM)Tim Curtis Wrote: You might want to post the -s output in the maintainers Git repo or project site to see if he can look into it. There are some links at the end if the --help.


... not actually a great support for this problem... other sw can retrieve this information, Gentooplayer for example

Thanks for your effort

Let's review the bidding.

  1. You note an anomaly regarding missing information
  2. Tim tells you how to check the third-party software component that's supposed to supply the information.
  3. Your check confirms the third-party software component is not returning the information.
  4. Rather than report this problem to the maintainer of the third-party software component as Tim suggested, you throw shade at Tim.
Isn't that special
my dear old friend, it would be a better approach to assume that you made some mistakes instead of suggesting the solution of the reported problem to be postponed to third parties

here you can find what GentooPlayer can get from the Khadas Tone Board dac itself, so maybe not a problem to be attributed to ALSA
Code:
*** Scanning for playback devices ***
Card 0, ID `Control', name `Khadas Tone Control'
 Device 0, ID `USB Audio', name `USB Audio', 1 subdevices (1 available)
   2 channels, sampling rate 44100..768000 Hz
   Sample formats: S16_LE, S32_LE, SPECIAL, DSD_U32_BE
   Buffer size range from 16 to 262144
   Period size range from 8 to 131072
Best regards
Reply
#26
What Linux command generated that output?
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#27
(02-07-2020, 05:07 PM)Tim Curtis Wrote: What Linux command generated that output?

possibly alsacap ?

# alsacap
*** Scanning for playback devices ***
Card 0, ID `P80i', name `Perreaux Audiant 80i'
  Device 0, ID `USB Audio', name `USB Audio', 1 subdevices (1 available)
    2 channels, sampling rate 44100..96000 Hz
    Sample formats: S32_LE
      Subdevice 0, name `subdevice #0'

https://www.volkerschatz.com/noise/alsacap.html
https://www.volkerschatz.com/noise/alsa.html
The last has a link to the source code... license seems fine Smile

Seems to install and work ok on my Linux desktop... needed to install 'libasound2-dev' for it to compile.
Code:
alsacap
*** Scanning for playback devices ***
Card 0, ID `Intel', name `HDA Intel'
 Device 0, ID `AD1984 Analog', name `AD1984 Analog', 1 subdevices (1 available)
   2 channels, sampling rate 8000..192000 Hz
   Sample formats: S16_LE, S32_LE
     Subdevice 0, name `subdevice #0'
 Device 2, ID `AD1984 Alt Analog', name `AD1984 Alt Analog', 1 subdevices (1 available)
Error opening sound device for card 0, device 2: Device or resource busy.  Skipping.



Will try on MoOde and report.
----------
bob
Reply
#28
Cool, thanks Bob :-)

I'll have a look.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#29
Hmmm... my limited linux skills hit a snag...
compiled but cannot run...

errors...

Code:
sudo make install
install -D -m 755 alsacap /usr/local/bin/alsacap
install -D -m 644 alsacap.1 /usr/local/share/man/man1/alsacap.1
$ alsacap
-bash: /usr/local/bin/alsacap: cannot execute binary file: Exec format error
The error seems to refer to an x86 binary being run on arm ???
----------
bob
Reply
#30
No worries.

The procedure below worked perfectly for me

Code:
wget https://github.com/bubbapizza/alsacap/archive/master.zip
sudo unzip -q ./master.zip
sudo rm ./master.zip
cd ./alsacap-master

sudo ./bootstrap
sudo ./configure
sudp make
sudo make dist

///////////////////////////////

sudo cp alsacap-1.0.tar.gz ~/
cd ~/
sudo tar xfz ./alsacap-1.0.tar.gz
cd alsacap-1.0

sudo ./configure
sudo make

I didn't run make install cos no need for the man page. The binary is ./alsacap-1.0/src/alsacap

This can be copied to /usr/local/bin and given +x permission

It was trivial to replace alsa-capabilities with alsacap in moOde. Now we get formats for USB Audio devices :-)

Thx again Bob!
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Forum Jump: