Hi,

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

Should work.

>  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

If you how many PCM streams you may play at one time, then 32.

>25kHz, and one will be 22050Hz.

This should work.

>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

Then you must use control (mixer) interface too.

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

http://people.freenet.de/kxdev/docs/original/emu10k1-overview.pdf
http://people.freenet.de/kxdev/docs/original/fx8010-arch.pdf

>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?

Look at previous docs. 
Alsa uses for pcm playback wavetable synth of emu10k1. Each voice of 
this synth can by connected
up to 4 DSP inputs and "PCM send Routing". DSP has actualy 16 of 
this inputs (FX bus). Then DSP executes 
program and process these inputs and outputs it to DAC. 
For example if you play one PCM stream, one voice of wavetable synth 
is used. Output of this voice
can be send to 4 (this is A, B, C, D) FX bus inputs (this is 
destination - 0 - 15).

Alsa uses these FX busses - they are forwarded to outputs.
FXBUS_PCM_LEFT          0x00 - everything from this goes to Front 
Left speaker
FXBUS_PCM_RIGHT         0x01 - everything from this goes to Front 
Right speaker
FXBUS_PCM_LEFT_REAR     0x02 - everything from this goes to Rear 
Left speaker
FXBUS_PCM_RIGHT_REAR    0x03 - everything from this goes to Rear 
Right speaker
FXBUS_MIDI_LEFT         0x04 - not usefull for you
FXBUS_MIDI_RIGHT        0x05 - not usefull for you
FXBUS_PCM_CENTER        0x06 - everything from this goes to Center 
speaker
FXBUS_PCM_LFE           0x07 - everything from this goes to Subwoffer
FXBUS_PCM_LEFT_FRONT    0x08 - not usefull for you - used on Audigy
FXBUS_PCM_RIGHT_FRONT   0x09 - not usefull for you - used on Audigy

For mono PCM stream 1 voice is used.
For stereo PCM stream 2 voices are used.

For device 0 of sb live there are 32 substreams (0-31).
you can open any of them using hw:x,0,y device name where x is card 
number - for you 0
and y is substream number (0-31). Warning you should use free stream 
(check /proc/asound)

You can control routing using these controls (they control 1 voice 
for mono PCM stream and 2 voices for stereo PCM stream):
EMU10K1 PCM Volume - this controls volume of PCM stream and there 
are 32 of these control with
index 0-31 - this is substream number.
It has three values:
0 - mono, default 0xffff (no attenuation) - this controls volume of 
mono stream
1 - left, default 0xffff (no attenuation) - this controls volume of 
left channel of stream
2 - right, default 0xffff (no attenuation) - this controls volume of 
right channel of stream

When you open mono stream only value 0 is used
When you open stereo stream only values 1,2 are used

EMU10K1 PCM Send Routing - this controls routing (means where to 
send) of PCM stream and there are 32 of these control with
index 0-31 - this is substream number.
It has 12 values:
0 -  mono, A destination (FX-bus 0-15), default 0
1 -  mono, B destination (FX-bus 0-15), default 1
2 -  mono, C destination (FX-bus 0-15), default 2
3 -  mono, D destination (FX-bus 0-15), default 3
4 -  left, A destination (FX-bus 0-15), default 0
5 -  left, B destination (FX-bus 0-15), default 1
6 -  left, C destination (FX-bus 0-15), default 2
7 -  left, D destination (FX-bus 0-15), default 3
8 - right, A destination (FX-bus 0-15), default 0
9 - right, B destination (FX-bus 0-15), default 1
10 - right, C destination (FX-bus 0-15), default 2
11 - right, D destination (FX-bus 0-15), default 3

this means, where you want route this stream.

When you open mono stream only value 0,1,2,3 are used
When you open stereo stream only values 4,5,6,7,8,9,10,11 are used

EMU10K1 PCM Send Volume - this controls routing (means how much to 
send) of PCM stream and there are 32 of these control with
index 0-31 - this is substream number. This is pair with EMU10K1 PCM 
Send Routing
It has 12 values:
0 -  mono, A destination attn, default 255 (no attenuation)
1 -  mono, B destination attn, default 255 (no attenuation)
2 -  mono, C destination attn, default 0 (mute)
3 -  mono, D destination attn, default 0 (mute)
4 -  left, A destination attn, default 255 (no attenuation)
5 -  left, B destination attn, default 0 (mute)
6 -  left, C destination attn, default 0 (mute)
7 -  left, D destination attn, default 0 (mute)
8 - right, A destination attn, default 0 (mute)
9 - right, B destination attn, default 255 (no attenuation)
10 - right, C destination attn, default 0 (mute)
11 - right, D destination attn, default 0 (mute)

When you open mono stream only value 0,1,2,3 are used
When you open stereo stream only values 4,5,6,7,8,9,10,11 are used

For example:
You want play mono stream to front right and rear left speaker
then you should set values like this:
EMU10K1 PCM Send Routing[stream_number][0] = 1 (FXBUS_PCM_RIGHT)
EMU10K1 PCM Send Routing[stream_number][1] = 2 (FXBUS_PCM_LEFT_REAR)
EMU10K1 PCM Send Routing[stream_number][2] = 0 (not used)
EMU10K1 PCM Send Routing[stream_number][3] = 0 (not used)

EMU10K1 PCM Send Volume[stream_number][0] = 255 (FXBUS_PCM_RIGHT)
EMU10K1 PCM Send Volume[stream_number][1] = 255 (FXBUS_PCM_LEFT_REAR)
EMU10K1 PCM Send Volume[stream_number][2] = 0 (not used)
EMU10K1 PCM Send Volume[stream_number][3] = 0 (not used)

You want play stereo stream left channle to front right and rear 
left speaker
then you should set values like this:
EMU10K1 PCM Send Routing[stream_number][4] = 1 (FXBUS_PCM_RIGHT)
EMU10K1 PCM Send Routing[stream_number][5] = 0 (not used)
EMU10K1 PCM Send Routing[stream_number][6] = 0 (not used)
EMU10K1 PCM Send Routing[stream_number][7] = 0 (not used)
EMU10K1 PCM Send Routing[stream_number][8] = 0 (not used)
EMU10K1 PCM Send Routing[stream_number][9] = 2 (FXBUS_PCM_LEFT_REAR)
EMU10K1 PCM Send Routing[stream_number][10] = 0 (not used)
EMU10K1 PCM Send Routing[stream_number][11] = 0 (not used)

EMU10K1 PCM Send Volume[stream_number][4] = 255 (FXBUS_PCM_RIGHT)
EMU10K1 PCM Send Volume[stream_number][5] = 0 (not used)
EMU10K1 PCM Send Volume[stream_number][6] = 0 (not used)
EMU10K1 PCM Send Volume[stream_number][7] = 0 (not used)
EMU10K1 PCM Send Volume[stream_number][8] = 0 (not used)
EMU10K1 PCM Send Volume[stream_number][9] = 255 (FXBUS_PCM_LEFT_REAR)
EMU10K1 PCM Send Volume[stream_number][10] = 0 (not used)
EMU10K1 PCM Send Volume[stream_number][11] = 0 (not used)

This may be not correct (I think that this is how it works). I newer 
tryed this, but I want
know if this works.
Maybe you must (if you can't set controls values) remove "lock true" 
from /usr/share/alsa/conf/cards/emu10k1.conf
under 
name "EMU10K1 PCM Send Volume"
and
name "EMU10K1 PCM Send Routing"
otherways you can change routing on the fly (maybe, I don't know).


>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).
 
Look at /usr/share/alsa/conf/cards/emu10k1.conf (devices front, 
rear, ...)

If you have more questions then ask, I'll try to help if I know 
(latency may be high :-)).

Peter Zubaj



____________________________________
http://www.logofun.pobox.sk - urobte radost svojmu telefonu



-------------------------------------------------------
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_id56&alloc_id438&op=click
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to