Skip to contentSkip to conversation

Enumerating PCM devices

DISCUSSION Bankim Bhavsar 2 participants 2 messages Jan 26, 2009 – Feb 2, 2009

lore
Share & tools
lore
#0 lore raw

Hi Alsa developers/users,

For some reason my message got truncated earlier. So here I go again.

I'm using snd_device_name_hint("pcm"..) and then snd_device_name_get_hint(.."NAME") to get the NAME parameter of pcm devices.
Is it true that all sound cards that support Alsa will *always* have "default" pcm device? I'm more inclined towards using "default:CARD=<vendor>" as the parameter to snd_pcm_open(). This way if the program configures
hardware params for any number of channels then the appropriate PCM device will be selected on the sound card, correct?

Thanks,
Bankim.

#1 lore raw

At Sun, 25 Jan 2009 19:57:23 -0800,

Quoted 10 lines · Bankim Bhavsar

Hi Alsa developers/users,

For some reason my message got truncated earlier. So here I go again.

I'm using snd_device_name_hint("pcm"..) and then snd_device_name_get_hint(.."NAME") to get the NAME parameter of pcm devices.
Is it true that all sound cards that support Alsa will *always* have "default" pcm device?

At least for the sound instances from the kernel drivers, yes. Not always true for sound devices implemented via plugin (e.g. bluez), though.

Quoted 5 lines

I'm more inclined towards using
"default:CARD=<vendor>" as the parameter to snd_pcm_open(). This way if the program configures
hardware params for any number of channels then the appropriate PCM device will be selected on the sound card, correct?

Yes.

Takashi