All of lore.kernel.org
 help / color / mirror / Atom feed
* emu10k1, how to setup DMA for 24bit playback?
@ 2008-02-20 23:09 Ctirad Fertr
  2008-02-23  1:05 ` Lee Revell
  0 siblings, 1 reply; 3+ messages in thread
From: Ctirad Fertr @ 2008-02-20 23:09 UTC (permalink / raw)
  To: alsa-devel

Hello, 

I'm trying to add 24bit playback for E-mu cards into emu10k driver. These 
cards use an FPGA, which is 32bit internally and it is feeded via 10k2 EMU32 
BUSes.  Unfortunatelly, the emu10k DMA cannot handle more than 16bit samples, 
so kind of tricky stuff is needed. The already working 24bit multichannel 
capture uses an DSP code, which splits an 32 bit sample into two halfs, sent 
it over two DMA channels and then alsa lib (???) joins it back into S32_LE 
sample. 

I'm trying to use same technique in reverse way using a pair of A_FXBUSes for 
one playback chanel, but I'm not able to set the DMA the way I need. Can 
someone with emu10k knowledge help me?   

----
Ctirad    

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: emu10k1, how to setup DMA for 24bit playback?
  2008-02-20 23:09 emu10k1, how to setup DMA for 24bit playback? Ctirad Fertr
@ 2008-02-23  1:05 ` Lee Revell
  2008-02-23 13:46   ` Ctirad Fertr
  0 siblings, 1 reply; 3+ messages in thread
From: Lee Revell @ 2008-02-23  1:05 UTC (permalink / raw)
  To: Ctirad Fertr; +Cc: alsa-devel

On Wed, Feb 20, 2008 at 6:09 PM, Ctirad Fertr <c.fertr@gmail.com> wrote:
> Hello,
>
>  I'm trying to add 24bit playback for E-mu cards into emu10k driver. These
>  cards use an FPGA, which is 32bit internally and it is feeded via 10k2 EMU32
>  BUSes.  Unfortunatelly, the emu10k DMA cannot handle more than 16bit samples,
>  so kind of tricky stuff is needed. The already working 24bit multichannel
>  capture uses an DSP code, which splits an 32 bit sample into two halfs, sent
>  it over two DMA channels and then alsa lib (???) joins it back into S32_LE
>  sample.
>
>  I'm trying to use same technique in reverse way using a pair of A_FXBUSes for
>  one playback chanel, but I'm not able to set the DMA the way I need. Can
>  someone with emu10k knowledge help me?

I did quite a bit of work on this driver a few years back, among other
things I implemented the multichannel playback support (the hw:0,3
device).

Do you have a web page with details on your work, or can you explain
exactly what you've done so far and how it fails?  Preferably in patch
form...

How are you getting your hardware info?  I mostly used the kX drivers
and guesswork.

Lee

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: emu10k1, how to setup DMA for 24bit playback?
  2008-02-23  1:05 ` Lee Revell
@ 2008-02-23 13:46   ` Ctirad Fertr
  0 siblings, 0 replies; 3+ messages in thread
From: Ctirad Fertr @ 2008-02-23 13:46 UTC (permalink / raw)
  To: alsa-devel

Saturday 23 of February 2008 02:05:34 Lee Revell napsal(a):

Hello Lee,

thanks for your reply.

> I did quite a bit of work on this driver a few years back, among other
> things I implemented the multichannel playback support (the hw:0,3
> device).

Yes, I know. This code works well with e-mu cards as well, although it is 
limited to 16bit/48kHz. I'd like to improve this as well, but first I have to 
finish basic stereo 24bit playback via hw:0,0. 

> Do you have a web page with details on your work, or can you explain
> exactly what you've done so far and how it fails?  Preferably in patch
> form...

Well, if you look at emufx.c around line 1566, you will see how the 24 bit 
capture works. The data path (for newer e-mu cards as 1616(M) or 1212M V2) is 
following:

physical inputs (24bit) -> FPGA (internal routing) -> emu10k via A3_EMU32IN() 
(still 24bit padded to 32bit ) -> DSP code converts 32bit sample to 2 16bit 
via snd_emu10k1_audigy_dsp_convert_32_to_2x16() and feeds A_FXBUS2(x) and 
A_FXBUS(x+1) with the resulting halfs -> DMA -> PC side joins these two 16bit 
halfs into one S32_LE sample and voila, we have 24bit capture.

The driver, however, still lacks 24bit playback, and I'm trying to change 
that.  I have working DSP routine which converts two 16bit values from 
A_FXBUS(x) and A_FXBUS(x+1) into 32bit value for  A3_EMU32OUT(), where the 
FPGA and physical output are connected. 

So all I need is to send 32bit sample divided to two 16bit halfs via two 
A_FXBUS() into emu10k DSP. Unfortunatelly, simple changing the sample format 
to S32_LE did not the trick :( Any ideas? 

> How are you getting your hardware info? 

Just from the alsa emu10k source code and some hit and miss experiments. 
Unfortunatelly, there are no emu10k datasheets available :(

Ctirad

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-02-23 13:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-20 23:09 emu10k1, how to setup DMA for 24bit playback? Ctirad Fertr
2008-02-23  1:05 ` Lee Revell
2008-02-23 13:46   ` Ctirad Fertr

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.