[Pkg-alsa-devel] Bug#399623: asoundconf: wrong /proc/asound/cards parsing

Elimar Riesebieter riesebie at lxtec.de
Wed Nov 22 18:42:31 UTC 2006


On Mon, 20 Nov 2006 the mental interface of
Andreas Mohr told:

> 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...

Martin, should we tweak the script like above? It works for my cards
as well, but I don't know for what a ~/.asoundrc.asoundconf is good
for? isn't the .asoundrc enough nowadays?

Elimar


-- 
  Alles was viel bedacht wird ist bedenklich!;-)
         Friedrich Nietzsche



More information about the Pkg-alsa-devel mailing list