Skip to contentSkip to conversation

namehint: Evaluate more possibilities for hw devices

DISCUSSION Stas Sergeev 3 participants 11 messages Sep 30, 2010 – Oct 1, 2010

lore
Share & tools
lore
#0 lore raw

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 <[email protected]>
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?

default
Default
front:CARD=NVidia,DEV=0
HDA NVidia, ALC887 Analog
Front speakers
surround40:CARD=NVidia,DEV=0
HDA NVidia, ALC887 Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=NVidia,DEV=0
HDA NVidia, ALC887 Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=NVidia,DEV=0
HDA NVidia, ALC887 Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=NVidia,DEV=0
HDA NVidia, ALC887 Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=NVidia,DEV=0
HDA NVidia, ALC887 Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=NVidia,DEV=0
HDA NVidia, ALC887 Digital
IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=HDMI
HDA ATI HDMI, ATI HDMI
HDMI Audio Output
front:CARD=pcsp,DEV=0
pcsp, pcsp
Front speakers
front:CARD=Dummy,DEV=0
Dummy, Dummy PCM
Front speakers

default
Default
front:CARD=NVidia,DEV=0
HDA NVidia, ALC887 Analog
Front speakers
surround40:CARD=NVidia,DEV=0
HDA NVidia, ALC887 Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=NVidia,DEV=0
HDA NVidia, ALC887 Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=NVidia,DEV=0
HDA NVidia, ALC887 Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=NVidia,DEV=0
HDA NVidia, ALC887 Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=NVidia,DEV=0
HDA NVidia, ALC887 Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=NVidia,DEV=0
HDA NVidia, ALC887 Digital
IEC958 (S/PDIF) Digital Audio Output

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#1 lore raw

2010/10/1 Stas Sergeev <[email protected]>

Quoted 7 lines

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

Quoted 10 lines
Author: Jaroslav Kysela <[email protected]>
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 )

#2 lore raw
In reply to Stas Sergeev
Quoted 5 lines · Stas Sergeev

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=0244370be695372a05344ac760d624e0b40ec9ea

Could you confirm?

Thanks,
Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.

#4 lore raw
Quoted 8 lines · Stas Sergeev
Quoted 5 lines · Jaroslav Kysela

I tried to fix this issue in this commit:

http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff;h=0244370be695372a05344ac760d624e0b40ec9ea

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=c049d48407ff0459ff15e466edeeee6ecff67fcd

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.

#5 lore raw
Quoted 4 lines · Jaroslav Kysela

This patch should definitely fix it:

http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff;h=c049d48407ff0459ff15e466edeeee6ecff67fcd

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?

#6 lore raw
Quoted 6 lines · Stas Sergeev

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
Quoted 8 lines

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 <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.

#7 lore raw
Quoted 1 line · Jaroslav Kysela

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.

configure.in +5 -3
index 8bae007..2f47ef6 100644
@@ -108,7 +108,8 @@ if test x$alsamixer = xtrue; then
   CURSESLIBDIR=""
   NCURSESLIBSUFFIX=""
   CURSES_NLS="no"
-  if test "$curseslib" = "ncursesw" -o \( "$curseslib" = "auto" -a "$USE_NLS" = "yes" \); then
+  if test "$cross_compiling" != "yes"; then
+   if test "$curseslib" = "ncursesw" -o \( "$curseslib" = "auto" -a "$USE_NLS" = "yes" \); then
     AC_CHECK_PROG([ncursesw5_config], [ncursesw5-config], [yes])
     if test "$ncursesw5_config" = "yes"; then
       CURSESINC="<ncurses.h>"
@@ -124,8 +125,8 @@ if test x$alsamixer = xtrue; then
       NCURSESLIBSUFFIX="w"
       CURSES_NLS="yes"
     fi
-  fi
-  if test "$curseslib" = "ncurses" -o "$curseslib" = "auto"; then
+   fi
+   if test "$curseslib" = "ncurses" -o "$curseslib" = "auto"; then
     AC_CHECK_PROG([ncurses5_config], [ncurses5-config], [yes])
     if test "$ncurses5_config" = "yes"; then
       CURSESINC="<ncurses.h>"
@@ -137,6 +138,7 @@ if test x$alsamixer = xtrue; then
       AC_CHECK_LIB(ncurses, initscr, 
                  [ CURSESINC='<ncurses.h>'; CURSESLIB='-lncurses'; curseslib="ncurses"])
     fi
+   fi
   fi
   if test "$curseslib" = "curses" -o "$curseslib" = "auto"; then
     AC_CHECK_LIB(curses, initscr, 

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#8 lore raw
In reply to Jaroslav Kysela

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?

#9 lore raw
Quoted 26 lines · Stas Sergeev

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
Quoted 9 lines
$ 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 <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.

#10 lore raw
Quoted 4 lines · Jaroslav Kysela

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!