Skip to contentSkip to conversation

snd_pcm_open device names

DISCUSSION Reiner 3 participants 4 messages Mar 5, 2008 – Mar 6, 2008

lore
Share & tools
lore

Reiner

author
#0 lore raw

with
snd_pcm_open (handle, "default", SND_PCM_STREAM_PLAYBACK, 0) I can open a device twice
with
snd_pcm_open (handle, "plughw:0,0", SND_PCM_STREAM_PLAYBACK, 0) the 2. call fails with error -16.

The docu says:
The default device is equal to plug plugin with hw plugin as slave.

????
Reiner

#1 lore raw
Quoted 9 lines · On Thursday 06 March 2008 12:33:54 Reiner wrote:

with
snd_pcm_open (handle, "default", SND_PCM_STREAM_PLAYBACK, 0) I can open a device twice
with
snd_pcm_open (handle, "plughw:0,0", SND_PCM_STREAM_PLAYBACK, 0) the 2. call fails with error -16.

The docu says:
The default device is equal to plug plugin with hw plugin as slave.

Probably the doc is in error. The default device these days is usually asym (dmix+dsnoop) which allows the multiple opens.

--
Eliot
www.audioscience.com

author
#2 lore raw

Thanks! But if I try "asym" open fails, where can I see what "default" is? There is no ~/.asoundrc and in /etc there is only asound.state. By the way I'am looking for a function to adjust the volume of the stream, any idea

Thanks
Reiner

Quoted 22 lines · Eliot Blennerhassett
Quoted 9 lines · On Thursday 06 March 2008 12:33:54 Reiner wrote:

with
snd_pcm_open (handle, "default", SND_PCM_STREAM_PLAYBACK, 0) I can open a device twice
with
snd_pcm_open (handle, "plughw:0,0", SND_PCM_STREAM_PLAYBACK, 0) the 2. call fails with error -16.

The docu says:
The default device is equal to plug plugin with hw plugin as slave.

Probably the doc is in error. The default device these days is usually asym (dmix+dsnoop) which allows the multiple opens.

--
Eliot
www.audioscience.com
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#3 lore raw
Quoted 4 lines · Reiner

Thanks! But if I try "asym" open fails, where can I see what "default"
is? There is no ~/.asoundrc and in /etc there is only asound.state. By the way I'am looking for a function to adjust the volume of the stream, any idea

There is no per stream volume control in ALSA. This should be handled by the application, or a sound server like Pulseaudio.

Lee