[alsa-devel] where to get snd_pcm_hardware info when usb audio device plug in?
hi all: is it possible to get snd_pcm_hardware information in /proc, /sys or anywhere when usb audio device plug in?
if no, is there api I can take in usermode to get snd_pcm_hardware of this usb audio device?
loody wrote:
is it possible to get snd_pcm_hardware information in /proc, /sys or anywhere when usb audio device plug in?
if no, is there api I can take in usermode to get snd_pcm_hardware of this usb audio device?
Something like this? http://download.atmark-techno.com/misc/demos/usb-audio-a500-howto/hw_params....
Regards, Clemens
hi clements:
2013/8/28 Clemens Ladisch clemens@ladisch.de:
loody wrote:
is it possible to get snd_pcm_hardware information in /proc, /sys or anywhere when usb audio device plug in?
if no, is there api I can take in usermode to get snd_pcm_hardware of this usb audio device?
Something like this? http://download.atmark-techno.com/misc/demos/usb-audio-a500-howto/hw_params....
I download the file and 1. cross-compile it with alsa-lib-1.0.23
but I get below message # ./hw_params no soundcards found...no soundcards found...
but in my /proc/asound/cards, there seems a card exist.
# cat /proc/asound/cards 0 [default ]: USB-Audio - Microsoft LifeChat LX-3000 Microsoft LifeChat LX-3000 at usb-1, full speed
Did I miss anything need to pay attention?
thanks for your kind help,
Regards, Clemens
hi Clements and all:
2013/8/29 loody miloody@gmail.com:
hi clements:
2013/8/28 Clemens Ladisch clemens@ladisch.de:
loody wrote:
is it possible to get snd_pcm_hardware information in /proc, /sys or anywhere when usb audio device plug in?
if no, is there api I can take in usermode to get snd_pcm_hardware of this usb audio device?
Something like this? http://download.atmark-techno.com/misc/demos/usb-audio-a500-howto/hw_params....
I download the file and
- cross-compile it with alsa-lib-1.0.23
but I get below message # ./hw_params no soundcards found...no soundcards found...
Sorry, it is my fault :) I didn't create /dev/snd/xxxx nodes for hw_params to access.
after creating /dev/snd/xxx nodes, I get another problem. hw_params will try to access alsa.conf, which is located my host machine.
# ./hw_params PLAYBACK ALSA lib conf.c:3601:(snd_config_update_r) Cannot access file /media/sdb1/software/linux.sound/alsa-lib-1.0.23.mips.clibc/build/share/alsa/alsa.conf ALSA lib control.c:902:(snd_ctl_open_noupdate) Invalid CTL hw:0 control open (0): No such file or directoryCAPTURE ALSA lib conf.c:3601:(snd_config_update_r) Cannot access file /media/sdb1/software/linux.sound/alsa-lib-1.0.23.mips.clibc/build/share/alsa/alsa.conf ALSA lib control.c:902:(snd_ctl_open_noupdate) Invalid CTL hw:0 control open (0): No such file or directory/ #
Except create the same location on target board, is there any compile option I can use to change the path of alsa.conf for hw_params to look for?
appreciate your help,
loody wrote:
ALSA lib conf.c:3601:(snd_config_update_r) Cannot access file /media/sdb1/software/linux.sound/alsa-lib-1.0.23.mips.clibc/build/share/alsa/alsa.conf
How exactly did you compile and install alsa-lib?
Regards, Clemens
hi Clements:
2013/9/8 Clemens Ladisch clemens@ladisch.de:
loody wrote:
ALSA lib conf.c:3601:(snd_config_update_r) Cannot access file /media/sdb1/software/linux.sound/alsa-lib-1.0.23.mips.clibc/build/share/alsa/alsa.conf
How exactly did you compile and install alsa-lib?
Attach my config.log for your reference. (after configure successfully, I just type "make" and "make install"
Thanks for your kind help,
loody wrote:
How exactly did you compile and install alsa-lib?
$ ./configure --prefix=/media/sdb1/software/linux.sound/alsa-lib-1.0.23.mips.clibc/build --host=mipsel-linux CC=mipsel-linux-gnu-gcc --disable-python
The --prefix option specifies where the files are on the target system. You must not use it.
Regards, Clemens
participants (2)
-
Clemens Ladisch
-
loody