[Pkg-alsa-devel] Bug#614113: alsa-base: alsa accepts cards names in /usr/share/alsa/alsa.conf but wants only numbers in /etc/asound.conf

sergey sergey_ifeo at rambler.ru
Sat Feb 19 20:34:30 UTC 2011


Package: alsa-base
Version: 1.0.23+dfsg-2
Severity: normal


Excuse me for my bad English :-)

I have a well-known problem: device priorities that alsa sets is unacceptable for me.

$cat /proc/asound/cards
 0 [ICH5           ]: ICH4 - Intel ICH5
                      Intel ICH5 with AD1888 at irq 17
 1 [HDMI           ]: HDA-Intel - HDA ATI HDMI
                      HDA ATI HDMI at 0xff8ec000 irq 17

I have 2 sound devices as you an see. ICH5 is normal sound device, HDMI is problematic.
Now this devices stay in right order, but this changes from boot to boot. 
Sound works/not works from boot to boot.
So I must to set priorities by hands to make sound works always.

I lost many time and found where I can write ICH5 as default device.
This is file /usr/share/alsa/alsa.conf:
....
defaults.ctl.card ICH5
defaults.pcm.card ICH5
....
defaults.hwdep.card ICH5
....
defaults.timer.card ICH5
....

With this settings all work fine.

But it is non-standart way. Standart way is write this settings to /etc/asound.conf AFAIK.
/etc/asound.conf is included from /usr/share/alsa/alsa.conf, so I expect that
i can use same syntax in both files.

I try to use default /usr/share/alsa/alsa.conf with this /etc/asound.conf:
defaults.ctl.card ICH5
defaults.pcm.card ICH5
defaults.timer.card ICH5

Result when starting alsamixer:
$ alsamixer
ALSA lib conf.c:992:(parse_value) card is not a string
ALSA lib conf.c:1661:(snd_config_load1) _toplevel_:8:24:Недопустимый аргумент
ALSA lib conf.c:3441:(snd_config_hook_load) /etc/asound.conf may be old or corrupted: consider to remove or fix it
ALSA lib conf.c:3302:(snd_config_hooks_call) function snd_config_hook_load returned error: Недопустимый аргумент
ALSA lib conf.c:3687:(snd_config_update_r) hooks failed, removing configuration
cannot open mixer: Недопустимый аргумент

I try to use default /usr/share/alsa/alsa.conf with this /etc/asound.conf:
defaults.ctl.card 0
defaults.pcm.card 0
defaults.timer.card 0

Result is: alsamixer starts OK.

So, the bug is: alsa accepts cards names in /usr/share/alsa/alsa.conf but not accepts names in
/etc/asound.conf (only numbers). 
Why this is important? Because numbers can change from boot to boot, names can not change so quickly.

If /etc/asound.conf will accept cards names then we will have simple solution of problem with
cards priorities at list in case of 2 cards.

Regards, Sergey.


-- Package-specific info:
--- Begin additional package status ---
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                               Version                                            Description
+++-==================================================-==================================================-====================================================================================================================
ii  libasound2                                         1.0.23-2.1                                         shared library for ALSA applications
--- End additional package status ---
--- Begin /proc/asound/version ---
Advanced Linux Sound Architecture Driver Version 1.0.20.
--- End /proc/asound/version ---
--- Begin /proc/asound/cards ---
 0 [ICH5           ]: ICH4 - Intel ICH5
                      Intel ICH5 with AD1888 at irq 17
 1 [HDMI           ]: HDA-Intel - HDA ATI HDMI
                      HDA ATI HDMI at 0xff8ec000 irq 17
--- End /proc/asound/cards ---
--- Begin /dev/snd/ listing ---
total 0
drwxr-xr-x  2 root root       80 Feb 19 22:32 by-path
crw-rw----+ 1 root audio 116,  0 Feb 19 22:32 controlC0
crw-rw----+ 1 root audio 116, 32 Feb 19 22:32 controlC1
crw-rw----+ 1 root audio 116, 36 Feb 19 22:32 hwC1D0
crw-rw----+ 1 root audio 116, 24 Feb 19 22:32 pcmC0D0c
crw-rw----+ 1 root audio 116, 16 Feb 19 22:51 pcmC0D0p
crw-rw----+ 1 root audio 116, 25 Feb 19 22:32 pcmC0D1c
crw-rw----+ 1 root audio 116, 26 Feb 19 22:32 pcmC0D2c
crw-rw----+ 1 root audio 116, 27 Feb 19 22:32 pcmC0D3c
crw-rw----+ 1 root audio 116, 20 Feb 19 22:32 pcmC0D4p
crw-rw----+ 1 root audio 116, 51 Feb 19 22:32 pcmC1D3p
crw-rw----+ 1 root audio 116,  1 Feb 19 22:32 seq
crw-rw----+ 1 root audio 116, 33 Feb 19 22:32 timer
--- End /dev/snd/ listing ---

-- System Information:
Debian Release: 6.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-2-686 (SMP w/1 CPU core)
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages alsa-base depends on:
ii  linux-sound-base           1.0.23+dfsg-2 base package for ALSA and OSS soun
ii  lsof                       4.81.dfsg.1-1 List open files
ii  module-init-tools          3.12-1        tools for managing Linux kernel mo
ii  udev                       164-3         /dev/ and hotplug management daemo

Versions of packages alsa-base recommends:
ii  alsa-utils                    1.0.23-3   Utilities for configuring and usin

Versions of packages alsa-base suggests:
ii  alsa-oss                      1.0.17-4   ALSA wrapper for OSS applications
pn  apmd                          <none>     (no description available)
ii  oss-compat                    0.0.4+nmu3 OSS compatibility package

Versions of packages libasound2 depends on:
ii  libc6                         2.11.2-10  Embedded GNU C Library: Shared lib

-- Configuration Files:
/etc/modprobe.d/alsa-base-blacklist.conf changed [not included]

-- no debconf information





More information about the Pkg-alsa-devel mailing list