[alsa-devel] Device name hints and the value of DEV

Anssi Hannula anssi.hannula at iki.fi
Tue Aug 3 17:56:30 CEST 2010


Hi all!

I was confused as to why on one of my boxes "aplay -L" says
hdmi:CARD=NVidia,DEV=0
and on another it says
hdmi:CARD=NVidia

I looked into it, and saw that namehint.c:add_card() loops through the pcm 
device numbers using snd_ctl_pcm_next_device(), and then proceeds in 
try_config() to append ',DEV=device_number' to the device name.

However, in reality DEV does not match the device number, as e.g. DEV=0 may 
mean the '0' in HDA-Intel.pcm.hdmi.0, and the slave pcm of that is device 3, 
not device 0.

If there is no device 0 on the NVidia card, the 'hdmi:CARD=NVidia,DEV=0' entry 
is never added (instead the one without ",DEV=0" is), even though these are 
not really related..


Now, I don't have a good understanding of all the code in namehint.c, but 
surely the occupied device numbers should not have any side-effects like this?

-- 
Anssi Hannula


More information about the Alsa-devel mailing list