[Pkg-alsa-devel] Bug#399623: asoundconf: wrong /proc/asound/cards
parsing
Andreas Mohr
andi at rhlx01.fht-esslingen.de
Mon Nov 20 22:27:31 UTC 2006
Package: alsa-utils
Version: 1.0.13-1
Hello,
in the python script alsa-utils/debian/asoundconf, there's a line
cardline = re.compile('^\d+\s*\[')
and
card_lines.append(re.sub(r'^\d+\s*\[(\w+)\s*\].+','\\1',l))
However, my /proc/asound/cards says:
# cat /proc/asound/cards
0 [PCI168 ]: AZF3328 - Aztech AZF3328 (PCI168)
Aztech AZF3328 (PCI168) at 0xb000, irq 22
1 [au8830 ]: au8830 - Aureal Vortex au8830
Aureal Vortex au8830 at 0xdb100000 irq 19
3 [V8235 ]: VIA8233 - VIA 8235
VIA 8235 with ALC650D at 0xe800, irq 23
thus causing the regex above to fail catastrophically
(completely empty output).
Tweaking those lines to
cardline = re.compile('^ \d+\s*\[')
and
card_lines.append(re.sub(r'^ \d+\s*\[(\w+)\s*\].+','\\1',l))
to include the leading space makes the output appear properly:
Names of available sound cards:
PCI168
au8830
V8235
(format change in recent versions??)
My tweak most likely isn't fully flexible yet, though...
Linux 2.6.19-rc5-mm1
ii alsa-base 1.0.13-1 ALSA driver configuration files
ii alsa-utils 1.0.13-1 ALSA utilities
ii libasound2 1.0.13-1 ALSA library
I have to admit that I'm still having a MUCH harder time with ALSA config
than it should be the case
(yes, I've been adding/improving several ALSA drivers already in recent years,
and this was supposed to become yet another improvement,
but so far I'm *STUCK*, terribly...).
Andreas Mohr
More information about the Pkg-alsa-devel
mailing list