Skip to contentSkip to conversation

Syncronous start and stop

DISCUSSION Giuliano Pochini 2 participants 4 messages Nov 15, 2003 – Nov 18, 2003

lore
Share & tools
lore
#0 lore raw

My hardware can start/stop multiple indipendent substreams at the same time. Does the ALSA driver API support that feature ?

--
Giuliano.

-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl

#1 lore raw
Quoted 2 lines · Giuliano Pochini

My hardware can start/stop multiple indipendent substreams at the same time. Does the ALSA driver API support that feature ?

Yes, use snd_pcm_set_sync() function in open() callback and add necessary code to the trigger() callback. See to alsa-kernel/pci/ens1370.c code for more details (this hardware has three streams which can be controlled simultaneously) as a good example.

Jaroslav

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

-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl

#2 lore raw
Quoted 9 lines · On 15-Nov-2003 Jaroslav Kysela wrote:
Quoted 2 lines · Giuliano Pochini

My hardware can start/stop multiple indipendent substreams at the same time. Does the ALSA driver API support that feature ?

Yes, use snd_pcm_set_sync() function in open() callback and add necessary code to the trigger() callback. See to alsa-kernel/pci/ens1370.c code for more details (this hardware has three streams which can be controlled simultaneously) as a good example.

Fine.
Is that feature used by the upper ALSA driver to create multichannel substreams when the hw hasn't this capability ? Older Echoaudio soundcards can only do mono and stereo operation, while newer series can manage mono and any even number of channels. Since all cards can run any number of substreams at the same time, I can emulate large substream on older cards by starting several mono substream simultaneously (MMAP_NONINTERLEAVED in this case). If the upper layer already has this feature, I can avoid wasteing my time :)

--
Giuliano.

-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl

#3 lore raw
Quoted 7 lines · Giuliano Pochini
Quoted 5 lines · On 15-Nov-2003 Jaroslav Kysela wrote:
Quoted 2 lines · Giuliano Pochini

My hardware can start/stop multiple indipendent substreams at the same time. Does the ALSA driver API support that feature ?

Quoted 8 lines
Quoted 4 lines

Yes, use snd_pcm_set_sync() function in open() callback and add necessary code to the trigger() callback. See to alsa-kernel/pci/ens1370.c code for more details (this hardware has three streams which can be controlled simultaneously) as a good example.

Fine.
Is that feature used by the upper ALSA driver to create multichannel substreams when the hw hasn't this capability ?

It can be used in alsa-lib (for example in multi plugin which does exactly what you want).

Quoted 7 lines

Older Echoaudio
soundcards can only do mono and stereo operation, while newer series can manage mono and any even number of channels. Since all cards can run any number of substreams at the same time, I can emulate large substream on older cards by starting several mono substream simultaneously (MMAP_NONINTERLEAVED in this case). If the upper layer already has this feature, I can avoid wasteing my time :)

Don't do this. Our goal is describe hardware in the driver not create another abstraction layer.

Jaroslav

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

-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl