Skip to contentSkip to conversation

Patchmix-style application for EMU cards

DISCUSSION Camilo Polymeris 3 participants 7 messages Apr 15, 2008 – Aug 30, 2010 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hello
I am working on a graphical mixing/routing application for the Emu10k series of semi-pro soundcards, but I am having trouble figuring out the routing mechanism of the driver, specially the "Multichannel PCM" part. Is there any technical documentation on this card I could read (I haven't found any), or maybe the driver developer can help me out?

Thanks,
Camilo.

#1 lore raw

Dne Tuesday 15 of April 2008 10:26:06 Camilo Polymeris napsal(a):

Hello

Quoted 2 lines

I am working on a graphical mixing/routing application for the Emu10k series of semi-pro soundcards,

That is great! I planned to try to write one, but never have enough time to do that.

Quoted 4 lines

but I am having trouble figuring out the
routing mechanism of the driver, specially the "Multichannel PCM" part. Is there any technical documentation on this card I could read (I haven't found any),

I'm afraid there is no documentation at all. The emu10k1.h and emumixer.c are quite self explanatory, though. Especially the first one.

The basic idea is that we have two chips. One is custom FPGA, where all the physical inputs and outpusts are connected. The second chip is the emu10k which is conected to FPGA by a bunch of 32bit buses. There are 32 buses from emu10k to FPGA called DSP0 to DSP31 used for playback and 21 buses in other direction called DSP0 to DSP15 (hexa numbering!) used for capture. 1 bus = one audio channel except for higher sample rates (e.g. 96kHz and 192kHz), where multiple buses are used to transfer one channel. The FPGA can assign any physical input (or playback DSP channel) to any capture DSP channel and same for outputs (see alsamixer). The multichannel capture on hw:0,2 captures the first 16 channels (DSP0 to DSPD). The multichannel playback on hw:0,3 is routed to DSP0 to DSP15.
I hope it helps.

Quoted 1 line

or maybe the driver developer can help me out?

Well, I'm not quite a driver developer, but I think I know E-mu cards well to answer any questions important for mixer appliacation ;) So please ask. I'd like to help you to imporve alsa suport for these excellent cards.

Best Regards,

Ctirad

#2 lore raw

Hello

Quoted 10 lines

The basic idea is that we have two chips. One is custom FPGA, where all the
physical inputs and outpusts are connected. The second chip is the emu10k which is conected to FPGA by a bunch of 32bit buses. There are 32 buses from
emu10k to FPGA called DSP0 to DSP31 used for playback and 21 buses in other
direction called DSP0 to DSP15 (hexa numbering!) used for capture. 1 bus = one audio channel except for higher sample rates (e.g. 96kHz and 192kHz), where multiple buses are used to transfer one channel. The FPGA can assign

Quoted 8 lines

any physical input (or playback DSP channel) to any capture DSP channel and
same for outputs (see alsamixer). The multichannel capture on hw:0,2 captures
the first 16 channels (DSP0 to DSPD). The multichannel playback on hw:0,3 is
routed to DSP0 to DSP15.
I hope it helps.

That is more or less what I had figured out, but it how are playback_1 to _16 channels routed to DSP0-15? It seems that it depends on the setting of Front, Surround, LFE, etc. mixer controls. If they are turned up, I don't understand what happens, sound to playback channels appears on various DSP buses, at different levels.
If I turn the Front/Surround/LFE/etc. faders down, I can mix playback channels to DSP using the "Multichannel PCM Send/Routing/Volume" faders, in a more or less intuitive way, besides that routing values do not map directly to DSP buses (i.e. 14-15 map to DSP0-1, but 2-3 map to DSP2-3). There is also a set of mixer controls called "EMU10k Routing", or similar, which I haven't even looked at.

Quoted 9 lines
Quoted 2 lines

or maybe the driver developer can help me out?

Well, I'm not quite a driver developer, but I think I know E-mu cards well to
answer any questions important for mixer appliacation ;) So please ask. I'd
like to help you to imporve alsa suport for these excellent cards.

Quoted 5 lines

Best Regards,

Ctirad

Thanks for your help, and sorry everyone for double-posting

Camilo

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

Hello

Quoted 9 lines

That is more or less what I had figured out, but it how are playback_1 to

Quoted 1 line

_16 channels routed to DSP0-15? It seems that it depends on the setting

of

Quoted 1 line

Front, Surround, LFE, etc. mixer controls. If they are turned up, I

don't

Quoted 1 line

understand what happens, sound to playback channels appears on various

DSP

Quoted 1 line

buses, at different levels.

Quoted 11 lines

Really? Well, I didn't much experiment with surround mode. In source code, I
can see that there are up to playback 8 channels at hw:0,0 with can be controlled by faders in alsamixer. I tried surround40 and surroun51 on my emu1616m and it worked as expected. The channles were mapped to first couple
of DSP ports in a correct order. In fact this should work the same as audigy
does, except the result is passed to DSP ports instead of physical outputs.

On my card, playback channels 1 & 2 (hw:0,3) appear on all DSP busses associated with surround.
Say you turn up the "Side" fader in alsamixer, channels 1 & 2 will appear at the relevant DSPs (6-7, I think)
Whatever, for now I am just keeping all surround controls down (that is, Front, Surround, Center, Side & LFE).

Quoted 12 lines

Anyway, I think if there is another layer of routing done in audigy DSP, it
shouldn't be used in EMU specific application. Or at least not for now. The
most important thing is to provide all the switches and FPGA routing scheme
for each EMU model. Or, to be precise, three routing schemes for each EMU model, because for "double speed" (e.g. 96kHz) and "quadro speed" (e.g. 192kHz) modes of operation the numebr of both physical and virtual channels
changes.

I think the switches and enums for the card models are rather trivial, one can handle it with a customized version
of qamix (done with a simple XML file), for example. A separate application would not be necessary for only that.

Quoted 6 lines
Quoted 2 lines

If I turn the Front/Surround/LFE/etc. faders down, I can mix playback channels to DSP using the "Multichannel PCM Send/Routing/Volume" faders,

in

Quoted 2 lines

a more or less intuitive way, besides that routing values do not map directly to DSP buses (i.e. 14-15 map to DSP0-1, but 2-3 map to DSP2-3).

Handling of this controls motivated me to write the application in the first place.
No sound at all will appear if I don't set the appropiate controls for each playback channel: Multichannel PCM Volume (full), Multichannel PCM Send (an index of 8 controls, the first 4 select the target DSP) & Multichannel PCM Send Volume (again faders 0-3 of 8)
By the way, only DSP0-7 work in this way. I have no idea how to make DSP8-31 work.

On which card you did tested it? The driver was primary written for the

Quoted 3 lines

1820M/1212M V1, so some things may not work well on other models and need to
be fixed.

I have a 1212m, don't know which version, but I think it's V1-- it does have firewire.
I am using driver version 1.0.16.

Thanks,
Camilo.

#5 lore raw

Hello.

Quoted 6 lines

On my card, playback channels 1 & 2 (hw:0,3) appear on all DSP busses associated with surround.
Say you turn up the "Side" fader in alsamixer, channels 1 & 2 will appear at the relevant DSPs (6-7, I think)
Whatever, for now I am just keeping all surround controls down (that is, Front, Surround, Center, Side & LFE).

I see, you talking hw:0,3. Perhaps this will help:
http://www.mjmwired.net/kernel/Documentation/sound/alsa/Audigy-mixer.txt
http://www.mjmwired.net/kernel/Documentation/sound/alsa/emu10k1-jack.txt

Quoted 4 lines

I think the switches and enums for the card models are rather trivial, one can handle it with a customized version
of qamix (done with a simple XML file), for example. A separate application would not be necessary for only that.

I disagree. With all the switches, routing, sample rates and several models, the EMU is one of the most complex cards. Definitely more complex than Envy24, Echo or perhaps even RME/HDSP. All these cards have their appliactions in alsa tools.

Quoted 2 lines

By the way, only DSP0-7 work in this way. I have no idea how to make DSP8-31 work.

You cannot do that without a driver modification. There is no any EMU specific code for hw:0,3. It somewhat works thanks to DSP code in hw:0,0, which copies data from emu10k registers to DSP0 to DSP7 ports.

Personally, I'd like to have an 8 channel 24bit playback on hw:0,0 with all the fader stuff for consumer playback and then another device (modified hw:0,3 or even a new one) for (at least) 16 channel 24bit playback directly passed onto DSP buses.

Regards,

Ctirad

#6 lore raw

Hello,
for those of you not subscribed to LAD, I finally got to write a mixer application for the EMU 1010 based cards. I tossed out the original ideas of a full-featured app and went the simple way, just basic point-to-point routing, no fancy "Multichannel" features.

It's available here: http://code.google.com/p/emutrix/
Screenshot:
http://www2.udec.cl/~cpolymeris/emutrix/Screenshot-EMutrix-1.png

Be aware that the code is awful, just fast prototyping, but functional. It may also mess with your mixer levels, if you want to try it. please make a backup with 'alsactl store'.

Feedback welcome,
Camilo

Quoted 42 lines · Ctirad Fertr

Hello.

Quoted 6 lines

On my card, playback channels 1 & 2 (hw:0,3) appear on all DSP busses associated with surround.
Say you turn up the "Side" fader in alsamixer, channels 1 & 2 will appear at the relevant DSPs (6-7, I think)
Whatever, for now I am just keeping all surround controls down (that is, Front, Surround, Center, Side & LFE).

I see, you talking hw:0,3. Perhaps this will help:
http://www.mjmwired.net/kernel/Documentation/sound/alsa/Audigy-mixer.txt
http://www.mjmwired.net/kernel/Documentation/sound/alsa/emu10k1-jack.txt

Quoted 4 lines

I think the switches and enums for the card models are rather trivial, one can handle it with a customized version
of qamix (done with a simple XML file), for example. A separate application would not be necessary for only that.

I disagree. With all the switches, routing, sample rates and several models, the EMU is one of the most complex cards. Definitely more complex than Envy24, Echo or perhaps even RME/HDSP. All these cards have their appliactions in alsa tools.

Quoted 2 lines

By the way, only DSP0-7 work in this way. I have no idea how to make DSP8-31 work.

You cannot do that without a driver modification. There is no any EMU specific code for hw:0,3. It somewhat works thanks to DSP code in hw:0,0, which copies data from emu10k registers to DSP0 to DSP7 ports.

Personally, I'd like to have an 8 channel 24bit playback on hw:0,0 with all the fader stuff for consumer playback and then another device (modified hw:0,3 or even a new one) for (at least) 16 channel 24bit playback directly passed onto DSP buses.

Regards,

Ctirad
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#7 lore raw

Re: Mixer application for EMU cards

Quoted 10 lines · Camilo Polymeris

Hello,
for those of you not subscribed to LAD, I finally got to write a mixer application for the EMU 1010 based cards. I tossed out the original ideas of a full-featured app and went the simple way, just basic point-to-point routing, no fancy "Multichannel" features.

It's available here: http://code.google.com/p/emutrix/
Screenshot:
http://www2.udec.cl/~cpolymeris/emutrix/Screenshot-EMutrix-1.png

Quoted 7 lines

Be aware that the code is awful, just fast prototyping, but functional. It may also mess with your mixer levels, if you want to try it. please make a backup with 'alsactl store'.

Feedback welcome,
Camilo

While writing this software I realized that the input and output pads are actually -12dB pads, not -14dB as the driver states. I guess they are thought as +4dBu/-10dBV (= ~12dB) switches.
Also the driver says SPDIF input is on the 0202 daughter card, but at least in my card it's on the 1010 main card.
I have a 1212M V1 card. If anyone has one of these cards, can you confirm that these are true for other/all cards of the series?

Thanks
Camilo