Skip to contentSkip to conversation

Sound programming confusion

DISCUSSION Ken Bass 2 participants 3 messages Feb 25, 2004 – Feb 26, 2004

lore
Share & tools
lore

Ken Bass

author
#0 lore raw

I'm trying to accomplish a programming task and am pretty confused about the capabilities of the sound drivers and how I would accomplish this in an application. I've been through the HOWTO and tutorial as well as attempted to read the PCM interface parts of the also-lib docs. But I've got more questions than answers. The SB-Live-mixer.txt was not helpful.

I've got an SB Live! 5.1 (EMU10K1) device that is my target using analog outputs.

High Level:

1) I've got 3 separate PCM 'mono' streams of data that I want to send to 3 different outputs.

a) How many PCM inputs do these cards/drivers support? Under OSS,
there were 2, /dev/dsp and /dev/dsp1. Ideally I would like each input stream to have a seperate sample rate. In practice, 2 of them will be 25kHz, and one will be 22050Hz.

2) I want to reconfigure the 'routing' on the fly. How do I do this? I've seen documentation (which wasn't clear) about .asoundrc files and such, but I need to change this programmaticaly.
Input 1- 25 kHz PCM stream
Input 2- 25 kHz PCM stream
Input 3- 22050Hz PCM stream
Output 1 - Front L
Output 2 - Front R
Output 3 - Rear L

I want to route (on the fly) any of those inputs to any of those
outputs (being careful to erase all routes and recreate them each time I reconfigure).

3) I'm totally confused about the capabilities of this card. Is this described at a high level somewhere or can someone explain this?

4) I'm not clear how to control these routes, what 'hw' device names to use, etc. I've seen references to ld10k1,

5) In the SB-Live-mixer.txt, section 3, PCM stream related controls -- I'm lost. What is a PCM Send Routing, what are A, B, C, D destinations, why is there a distinction between mono and left/right, and how are these controlled?

6) I see references to 'surround40' or 'surround51'. I'm not sure if that is what I want because they cannot be changed on the fly.

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

author
#1 lore raw

Here is another questions (to make it easier):

7) How do I do accomplish this using an asoundrc file? I can't even figure that out. I've got an SB Live! 5.1 (EMU10K1).
How do I 'simply' setup 2 'streams' (not sure I'm using the correct terminology).
The first stereo 'stream' would output to the front L/R speakers at
25kHz. This first stream would only require an input 'wav' file of 2 channels (stereo).
The second 'stream' would output to the rear L speaker at 22050Hz.
This second would only require an inpt 'wav' file of 1 channel (mono).

I mean under OSS this is so simple! Open /dev/dsp at 25kHz and open
/dev/dsp1 at 22050Hz. Unfortunately, I cannot get the routing to work reliably under OSS which is why I'm attempting the world of ALSA.

Quoted 50 lines · Ken Bass

I'm trying to accomplish a programming task and am pretty confused about the capabilities of the sound drivers and how I would accomplish this in an application. I've been through the HOWTO and tutorial as well as attempted to read the PCM interface parts of the also-lib docs. But I've got more questions than answers. The SB-Live-mixer.txt was not helpful.

I've got an SB Live! 5.1 (EMU10K1) device that is my target using analog outputs.

High Level:

1) I've got 3 separate PCM 'mono' streams of data that I want to send to 3 different outputs.

a) How many PCM inputs do these cards/drivers support? Under OSS,
there were 2, /dev/dsp and /dev/dsp1. Ideally I would like each input stream to have a seperate sample rate. In practice, 2 of them will be 25kHz, and one will be 22050Hz.

2) I want to reconfigure the 'routing' on the fly. How do I do this? I've seen documentation (which wasn't clear) about .asoundrc files and such, but I need to change this programmaticaly.
Input 1- 25 kHz PCM stream
Input 2- 25 kHz PCM stream
Input 3- 22050Hz PCM stream
Output 1 - Front L
Output 2 - Front R
Output 3 - Rear L

I want to route (on the fly) any of those inputs to any of those
outputs (being careful to erase all routes and recreate them each time I reconfigure).

3) I'm totally confused about the capabilities of this card. Is this described at a high level somewhere or can someone explain this?

4) I'm not clear how to control these routes, what 'hw' device names to use, etc. I've seen references to ld10k1,

5) In the SB-Live-mixer.txt, section 3, PCM stream related controls -- I'm lost. What is a PCM Send Routing, what are A, B, C, D destinations, why is there a distinction between mono and left/right, and how are these controlled?

6) I see references to 'surround40' or 'surround51'. I'm not sure if that is what I want because they cannot be changed on the fly.

Quoted 9 lines

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Alsa-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

#2 lore raw
Quoted 12 lines · Ken Bass

Here is another questions (to make it easier):

7) How do I do accomplish this using an asoundrc file? I can't even figure that out. I've got an SB Live! 5.1 (EMU10K1).
How do I 'simply' setup 2 'streams' (not sure I'm using the correct terminology).
The first stereo 'stream' would output to the front L/R speakers at
25kHz. This first stream would only require an input 'wav' file of 2 channels (stereo).
The second 'stream' would output to the rear L speaker at 22050Hz.
This second would only require an inpt 'wav' file of 1 channel (mono).

Quoted 4 lines

I mean under OSS this is so simple! Open /dev/dsp at 25kHz and open
/dev/dsp1 at 22050Hz. Unfortunately, I cannot get the routing to work reliably under OSS which is why I'm attempting the world of ALSA.

use:

	hw:0,0

hw:0,1

They should be seperate subdevices for that card.

Signature · 22 lines
Patrick Shirkey - Boost Hardware Ltd.
Http://www.boosthardware.com
Http://www.djcj.org/LAU/guide/ - The Linux Audio Users guide
Http://www.djcj.org/gigs/ - Gigs guide Korea
========================================


Apparently upon the beginning of the barrage, the donkey broke discipline and panicked, toppling the cart. At that point, the rockets disconnected from the timer, leaving them strewn around the street. Tethered to the now toppled cart, the donkey was unable to escape before the arrival of U.S. troops.

United Press International
Rockets on donkeys hit major Baghdad sites

By P. MITCHELL PROTHERO
Published 11/21/2003 11:13 AM



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click