Skip to contentSkip to conversation

Can't link multiple streams

DISCUSSION Robert Brückmann 3 participants 3 messages Nov 10, 2003

lore
Share & tools
lore
#0 lore raw

I have 3 capture and 3 playback devices (all sample-synced via wordclock) which I want to sync via snd_pcm_link(). So I do the following calls:

snd_pcm_link(playback1,playback2);
snd_pcm_link(playback2,playback3);
snd_pcm_link(capture1,capture2);
snd_pcm_link(capture2,capture3);
snd_pcm_link(playback1,capture1);

This worked in an older version of ALSA without problems (I used 0.9.0beta12), but since I upgraded to 0.9.7a, I can't link, the last link operation gives an error:

ALSA lib pcm.c:1148:(snd_pcm_link) SNDRV_PCM_IOCTL_LINK failed: Operation already in progress

How can I do the linking in current Alsa versions?

Thanks,
Robert

-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/

#1 lore raw

At Mon, 10 Nov 2003 17:09:40 +0100,

Quoted 11 lines · Robert Brückmann

I have 3 capture and 3 playback devices (all sample-synced via wordclock) which I want to sync via snd_pcm_link(). So I do the following calls:

snd_pcm_link(playback1,playback2);
snd_pcm_link(playback2,playback3);
snd_pcm_link(capture1,capture2);
snd_pcm_link(capture2,capture3);
snd_pcm_link(playback1,capture1);

Quoted 6 lines

This worked in an older version of ALSA without problems (I used 0.9.0beta12), but since I upgraded to 0.9.7a, I can't link, the last link operation gives an error:

ALSA lib pcm.c:1148:(snd_pcm_link) SNDRV_PCM_IOCTL_LINK failed:
Operation already in progress

which link in the above do you have this error?

Takashi

-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/

#2 lore raw
In reply to Robert Brückmann
Quoted 10 lines · On Mon, 10 Nov 2003, [ISO-8859-1] Robert Brückmann wrote:

I have 3 capture and 3 playback devices (all sample-synced via wordclock) which I want to sync via snd_pcm_link(). So I do the following calls:

snd_pcm_link(playback1,playback2);
snd_pcm_link(playback2,playback3);
snd_pcm_link(capture1,capture2);
snd_pcm_link(capture2,capture3);
snd_pcm_link(playback1,capture1);

Quoted 8 lines

This worked in an older version of ALSA without problems (I used 0.9.0beta12), but since I upgraded to 0.9.7a, I can't link, the last link operation gives an error:

ALSA lib pcm.c:1148:(snd_pcm_link) SNDRV_PCM_IOCTL_LINK failed:
Operation already in progress

How can I do the linking in current Alsa versions?

This is wrong sequence. Try:

snd_pcm_link(playback1,playback2);
snd_pcm_link(playback2,playback3);
snd_pcm_link(playback3,capture1);
snd_pcm_link(capture1,capture2);
snd_pcm_link(capture2,capture3);

or:

snd_pcm_link(playback1,playback2);
snd_pcm_link(playback1,playback3);
snd_pcm_link(playback1,capture1);
snd_pcm_link(playback1,capture2);
snd_pcm_link(playback1,capture3);

It's true that semantics changed a bit. The stream being added shouldn't be linked.

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs

-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/