Re: (snd_ctl_open_noupdate) Invalid CTL hw:0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Clemens,

Contrary to what you expect, /dev/snd/controlC0 *does* get opened
before alsa.conf gets stat'ed or opened. I added a simple alsa.conf
file

root@OpenWrt:~# cat /usr/share/alsa/alsa.conf
pcm.card0 {
    type hw
    card 0
}
ctl.card0 {
    type hw
    card 0
}

and here is the strace:

root@OpenWrt:~# strace -estat,open,close,read aplay -l
stat("/etc/ld.so.cache", 0x7fd52b28)    = -1 ENOENT (No such file or
directory)
open("/lib/libasound.so.2", O_RDONLY)   = -1 ENOENT (No such file or
directory)
open("/lib/libasound.so.2", O_RDONLY)   = -1 ENOENT (No such file or
directory)
open("/usr/lib/libasound.so.2", O_RDONLY) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0@\270\1"...,
4096) = 4096
close(4)                                = 0
open("/lib/libm.so.0", O_RDONLY)        = 4
read(4,
"\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0P\f\0\000"..., 4096)
= 4096
close(4)                                = 0
open("/lib/libdl.so.0", O_RDONLY)       = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0P\10\0"...,
4096) = 4096
close(4)                                = 0
open("/lib/libpthread.so.0", O_RDONLY)  = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\3004\0"...,
4096) = 4096
close(4)                                = 0
open("/lib/libgcc_s.so.1", O_RDONLY)    = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0000\30"...,
4096) = 4096
close(4)                                = 0
open("/lib/libc.so.0", O_RDONLY)        = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\20\271"...,
4096) = 4096
close(4)                                = 0
open("/dev/snd/controlC0", O_RDONLY)    = 4
close(4)                                = 0
**** List of PLAYBACK Hardware Devices ****
stat("/usr/share/alsa/alsa.conf", {st_mode=S_IFREG|0644, st_size=74,
...}) = 0
open("/usr/share/alsa/alsa.conf", O_RDONLY) = 4
read(4, "pcm.card0 {\n    type hw\n    card"..., 4096) = 74
read(4, "", 4096)                       = 0
close(4)                                = 0
ALSA lib control.c:910:(snd_ctl_open_noupdate) Invalid CTL hw:0
aplay: device_list:231: control open (0): No such file or directory
open("/dev/snd/controlC1", O_RDONLY)    = -1 ENOENT (No such file or
directory)
open("/dev/aloadC1", O_RDONLY)          = -1 ENOENT (No such file or
directory)

I have tried to find my way through the conf.c and related source
code but it is pretty slow going for me. I wonder if anyone has
written an overview of what it is doing. I.e. "Initially we read
the alsa.conf file and build a configuration tree. A configuration
tree is made up of entries like XXX in a structure YYY. If there
is no alsa.conf then a default configuration ZZZ is used." Or
something like that.

Cheers,
  Chuck


Clemens Ladisch wrote:
> 
> Chuck Harrison wrote:
> > It looks to me that /dev/snd/controlC0 was opened successfully but
> > sound_ctl_nopdate disliked something about what it saw.
> >
> > root@OpenWrt:~# strace -eopen aplay -l
> > ...
> > open("/dev/snd/controlC0", O_RDONLY)    = 3
> > **** List of PLAYBACK Hardware Devices ****
> > ALSA lib control.c:910:(snd_ctl_open_noupdate) Invalid CTL hw:0
> > aplay: device_list:231: control open (0): No such file or directory
> 
> It shouldn't open /dev/snd/controlC0 before reading alsa.conf.
> Does alsa.conf appear anywhere in the strace output?
> 
> Regards,
> Clemens

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user

[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux