Re: [Alsa-user] (snd_ctl_open_noupdate) Invalid CTL hw:0

2006-11-16 Thread Clemens Ladisch
Chuck Harrison wrote:
 I was being led astray by 
 http://www.alsa-project.org/alsa-doc/doc-php/asoundrc.php ,
 which begins in no uncertain terms:
 Neither of the .asoundrc or alsa.conf files are required for
  ALSA to work properly.
 Maybe someone should update that! ;-)

Done.
 
 Clemens Ladisch wrote:
  This is not a valid alsa.conf file.  Use the one from alsa-lib, i.e.,
  make sure that this one and the other config files are installed
  correctly.
 
 Is there something that needs to be in the other config files
 for a basic installation like mine?

With the other config files, I meant the other files below
/usr/share/alsa/.  Those files are required, too.


HTH
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.phpp=sourceforgeCID=DEVDEV
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] (snd_ctl_open_noupdate) Invalid CTL hw:0

2006-11-15 Thread Clemens Ladisch
Chuck Harrison wrote:
 It looks to me that /dev/snd/controlC0 was opened successfully but
 sound_ctl_nopdate disliked something about what it saw.
 
 [EMAIL PROTECTED]:~# 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.phpp=sourceforgeCID=DEVDEV
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] (snd_ctl_open_noupdate) Invalid CTL hw:0

2006-11-15 Thread Chuck Harrison
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

[EMAIL PROTECTED]:~# cat /usr/share/alsa/alsa.conf
pcm.card0 {
type hw
card 0
}
ctl.card0 {
type hw
card 0
}

and here is the strace:

[EMAIL PROTECTED]:~# 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, [EMAIL PROTECTED]...,
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\\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 {\ntype hw\ncard..., 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.
 
  [EMAIL PROTECTED]:~# 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.phpp=sourceforgeCID=DEVDEV
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] (snd_ctl_open_noupdate) Invalid CTL hw:0

2006-11-15 Thread Clemens Ladisch
Chuck Harrison wrote:
 Contrary to what you expect, /dev/snd/controlC0 *does* get opened
 before alsa.conf gets stat'ed or opened.

This is actually OK, that device file is also used to make sure that
the sound card driver is loaded, and this happens before the control
device is opened.

 I added a simple alsa.conf file
 
 pcm.card0 {
 type hw
 card 0
 }
 ctl.card0 {
 type hw
 card 0
 }

This is not a valid alsa.conf file.  Use the one from alsa-lib, i.e.,
make sure that this one and the other config files are installed
correctly.

 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.

There is _some_ documentation; read the four links at the bottom of
http://www.alsa-project.org/alsa-doc/alsa-lib/.


HTH
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.phpp=sourceforgeCID=DEVDEV
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] (snd_ctl_open_noupdate) Invalid CTL hw:0

2006-11-15 Thread Chuck Harrison
Thanks, Clemens!

[EMAIL PROTECTED]:~# aplay -l
 List of PLAYBACK Hardware Devices 
card 0: default [C-Media USB Headphone Set  ], device 0: USB Audio
[USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
[EMAIL PROTECTED]:~# aplay -D plughw:0,0  /usr/share/sounds/alsa/Noise.wav
Playing WAVE '/usr/share/sounds/alsa/Noise.wav' : Signed 16 bit Little
Endian, Rate 48000 Hz, Mono

I was being led astray by 
http://www.alsa-project.org/alsa-doc/doc-php/asoundrc.php ,
which begins in no uncertain terms:
Neither of the .asoundrc or alsa.conf files are required for
 ALSA to work properly.
Maybe someone should update that! ;-)

My cross-build Makefile really should have installed
/usr/share/alsa/alsa.conf for me but I'll fix that now.

Clemens Ladisch wrote:
 
[...]
 
 This is not a valid alsa.conf file.  Use the one from alsa-lib, i.e.,
 make sure that this one and the other config files are installed
 correctly.

Is there something that needs to be in the other config files
for a basic installation like mine? E.g. should the text I
erroneously copied from the The default plugin section of
http://www.alsa-project.org/alsa-doc/doc-php/asoundrc.php
go into .asoundrc? aplay seems to be working for me, anyway.

I didn't find a .asoundrc in my distribution:
[EMAIL PROTECTED]:/home/trunk$ find build_mipsel/alsa-lib-1.0.13 -name
'.asoundrc' -print
[EMAIL PROTECTED]:/home/trunk$

Sorry to be such a dodo-head here, but I'm lost in the docs.

Much obliged,
  Chuck

-
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.phpp=sourceforgeCID=DEVDEV
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] (snd_ctl_open_noupdate) Invalid CTL hw:0

2006-11-14 Thread Lee Revell
On Tue, 2006-11-14 at 14:53 -0800, Chuck Harrison wrote:
 Alsa n00b here starting to bring up alsa on an embedded platform:
 openWRT for the Broadcom mips processor used in wireless routers,
 I have a Netgear WGT634U. http://www.openwrt.org 

Probably a build error that causes aplay to look in the build host path
rather than the target path.  I recently had a similar problem bringing
up ALSA on an embedded PPC system.

Install strace on your target (it's very easy) and strace the failing
aplay process to see which open() call fails.

Lee


-
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.phpp=sourceforgeCID=DEVDEV
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] (snd_ctl_open_noupdate) Invalid CTL hw:0

2006-11-14 Thread Chuck Harrison
Thanks, Lee,

Trace below.

It looks to me that /dev/snd/controlC0 was opened successfully but
sound_ctl_nopdate disliked something about what it saw.

Still puzzled,
  Chuck

Lee Revell wrote:
 
 On Tue, 2006-11-14 at 14:53 -0800, Chuck Harrison wrote:
  Alsa n00b here starting to bring up alsa on an embedded platform:
  openWRT for the Broadcom mips processor used in wireless routers,
  I have a Netgear WGT634U. http://www.openwrt.org
 
 Probably a build error that causes aplay to look in the build host path
 rather than the target path.  I recently had a similar problem bringing
 up ALSA on an embedded PPC system.
 
 Install strace on your target (it's very easy) and strace the failing
 aplay process to see which open() call fails.
 
 Lee

[EMAIL PROTECTED]:~# strace -eopen aplay -l
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) = 3
open(/lib/libm.so.0, O_RDONLY)= 3
open(/lib/libdl.so.0, O_RDONLY)   = 3
open(/lib/libpthread.so.0, O_RDONLY)  = 3
open(/lib/libgcc_s.so.1, O_RDONLY)= 3
open(/lib/libc.so.0, O_RDONLY)= 3
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
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)
open(/dev/snd/controlC2, O_RDONLY)= -1 ENOENT (No such file or
directory)
open(/dev/aloadC2, O_RDONLY)  = -1 ENOENT (No such file or
directory)
[...]

-
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.phpp=sourceforgeCID=DEVDEV
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user