[alsa-devel] namehint: Evaluate more possibilities for hw devices
Hi Jaroslav.
I updated the alsa-lib from git, and "aplay -L" no longer shows some PCMs it used to list before. I tracked this down to this commit: --- commit 97d25c0766405453d3c298bd51dd4916121a4f6a Author: Jaroslav Kysela perex@perex.cz Date: Fri Aug 20 10:31:17 2010 +0200
namehint: Evaluate more possibilities for hw devices ---
Attached are the outputs before and after the commit. So why some devices are now missing?
2010/10/1 Stas Sergeev stsp@aknet.ru
Hi Jaroslav.
I updated the alsa-lib from git, and "aplay -L" no longer shows some PCMs it used to list before. I tracked this down to this commit:
commit 97d25c0766405453d3c298bd51dd4916121a4f6a Author: Jaroslav Kysela perex@perex.cz Date: Fri Aug 20 10:31:17 2010 +0200
namehint: Evaluate more possibilities for hw devices
Attached are the outputs before and after the commit. So why some devices are now missing?
it seem that only occur when card with one playback device or one capture device
(e.g. snd-dummy also has this problem but snd-aloop does not )
On Thu, 30 Sep 2010, Stas Sergeev wrote:
Hi Jaroslav.
I updated the alsa-lib from git, and "aplay -L" no longer shows some PCMs it used to list before. I tracked this down to this commit:
I tried to fix this issue in this commit:
http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff;h=0244370be695372a0...
Could you confirm?
Thanks, Jaroslav
----- Jaroslav Kysela perex@perex.cz Linux Kernel Sound Maintainer ALSA Project, Red Hat, Inc.
01.10.2010 15:32, Jaroslav Kysela wrote:
I tried to fix this issue in this commit:
http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff;h=0244370be695372a0...
Could you confirm?
No, not confirming the fix. Still the same. Is there anything I can do to help with debugging?
On Fri, 1 Oct 2010, Stas Sergeev wrote:
01.10.2010 15:32, Jaroslav Kysela wrote:
I tried to fix this issue in this commit:
http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff;h=0244370be695372a0...
Could you confirm?
No, not confirming the fix. Still the same. Is there anything I can do to help with debugging?
This patch should definitely fix it:
http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff;h=c049d48407ff0459f...
Jaroslav
----- Jaroslav Kysela perex@perex.cz Linux Kernel Sound Maintainer ALSA Project, Red Hat, Inc.
01.10.2010 16:08, Jaroslav Kysela wrote:
This patch should definitely fix it:
http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff;h=c049d48407ff0459f...
Much better now, thanks! I still have an issue though. If the device registers only the playback substreams and no record substreams, it is still not listed. To reproduce, set the "/capture_count" param of /*snd_pcm_new() *to 0 in dummy.c, and then it disappears from the list, as follows: --- aplay -l **** List of PLAYBACK Hardware Devices **** card 0: Dummy [Dummy], device 0: Dummy PCM [Dummy PCM] Subdevices: 8/8 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 Subdevice #2: subdevice #2 Subdevice #3: subdevice #3 Subdevice #4: subdevice #4 Subdevice #5: subdevice #5 Subdevice #6: subdevice #6 Subdevice #7: subdevice #7 card 2: STx7109 [STx7109 audio subsystem], device 0: [PCM player #0 (HDMI)] Subdevices: 1/1 Subdevice #0: subdevice #0 card 2: STx7109 [STx7109 audio subsystem], device 1: [PCM player #1] Subdevices: 1/1 Subdevice #0: subdevice #0 card 2: STx7109 [STx7109 audio subsystem], device 2: [SPDIF player (HDMI)] Subdevices: 1/1 Subdevice #0: subdevice #0
$ aplay -L null Discard all samples (playback) or generate zero samples (capture) ---
Here you can see also the STx7109 driver, which is not yet in an alsa tree, having the same problem. Could you please fix also this?
On Fri, 1 Oct 2010, Stas Sergeev wrote:
01.10.2010 16:08, Jaroslav Kysela wrote: This patch should definitely fix it:
http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff;h=c049d48407ff0459 ff15e466edeeee6ecff67fcd
Much better now, thanks! I still have an issue though. If the device registers only the playback substreams and no record substreams, it is still not listed. To reproduce, set the "capture_count" param of snd_pcm_new() to 0 in dummy.c, and then it disappears from the list, as follows:
Try upgrade alsa-utils (aplay). Appearenly, the bug is there (at least on my system the latest aplay lists devices correctly, but aplay 1.0.18 is buggy).
Jaroslav
----- Jaroslav Kysela perex@perex.cz Linux Kernel Sound Maintainer ALSA Project, Red Hat, Inc.
01.10.2010 17:14, Jaroslav Kysela wrote:
Try upgrade alsa-utils (aplay). Appearenly, the bug is there (at least on my system the latest aplay lists devices correctly, but aplay 1.0.18 is buggy).
Many thanks, now it works! One thing to note is that previously also VirMIDI device was listed, and not any more. But I guess this is intentional, as it is not a PCM device. I needed the attached patch to compile alsa-utils. I am cross-compiling, and without this change, the configure would pick up the host's ncurses-config.
Thanks for your help.
Sorry for bothering you again, but I think even now it is not all that good. :)
--- $ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: Dummy [Dummy], device 0: Dummy PCM [Dummy PCM] Subdevices: 8/8 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 Subdevice #2: subdevice #2 Subdevice #3: subdevice #3 Subdevice #4: subdevice #4 Subdevice #5: subdevice #5 Subdevice #6: subdevice #6 Subdevice #7: subdevice #7 card 2: STx7100 [STx7109 audio subsystem], device 0: [PCM player #0 (HDMI)] Subdevices: 1/1 Subdevice #0: subdevice #0 card 2: STx7100 [STx7109 audio subsystem], device 1: [PCM player #1] Subdevices: 1/1 Subdevice #0: subdevice #0 card 2: STx7100 [STx7109 audio subsystem], device 2: [SPDIF player (HDMI)] Subdevices: 1/1 Subdevice #0: subdevice #0
$ aplay -L null Discard all samples (playback) or generate zero samples (capture) default:CARD=Dummy Dummy, Dummy PCM Default Audio Device default:CARD=STx7100 STx7109 audio subsystem, PCM player #0 (HDMI) Default Audio Device ---
My question is: why it only lists player 0? There are also 1 and 2. Is this still a bug, or am I missing something?
On Fri, 1 Oct 2010, Stas Sergeev wrote:
Sorry for bothering you again, but I think even now it is not all that good. :)
$ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: Dummy [Dummy], device 0: Dummy PCM [Dummy PCM] Subdevices: 8/8 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 Subdevice #2: subdevice #2 Subdevice #3: subdevice #3 Subdevice #4: subdevice #4 Subdevice #5: subdevice #5 Subdevice #6: subdevice #6 Subdevice #7: subdevice #7 card 2: STx7100 [STx7109 audio subsystem], device 0: [PCM player #0 (HDMI)] Subdevices: 1/1 Subdevice #0: subdevice #0 card 2: STx7100 [STx7109 audio subsystem], device 1: [PCM player #1] Subdevices: 1/1 Subdevice #0: subdevice #0 card 2: STx7100 [STx7109 audio subsystem], device 2: [SPDIF player (HDMI)] Subdevices: 1/1 Subdevice #0: subdevice #0
$ aplay -L null Discard all samples (playback) or generate zero samples (capture) default:CARD=Dummy Dummy, Dummy PCM Default Audio Device default:CARD=STx7100 STx7109 audio subsystem, PCM player #0 (HDMI) Default Audio Device
The Dummy and STx7109 devices does not have appropriate configuration files in /usr/share/alsa/cards tree and namehint does not list hw: like devices by default. Use "defaults.namehint.showall=1" in your configuration file (~/.asoundrc).
Jaroslav
----- Jaroslav Kysela perex@perex.cz Linux Kernel Sound Maintainer ALSA Project, Red Hat, Inc.
01.10.2010 19:04, Jaroslav Kysela wrote:
The Dummy and STx7109 devices does not have appropriate configuration files in /usr/share/alsa/cards tree and namehint does not list hw: like devices by default. Use "defaults.namehint.showall=1" in your configuration file (~/.asoundrc).
defaults.namehint.showall=1 didn't make a difference, but defaults.namehint.extended=1 did. Thanks again!
participants (3)
-
Jaroslav Kysela
-
Raymond Yau
-
Stas Sergeev