[alsa-devel] AC97 atmel
hans-christian.egtvedt at atmel.com
Thu Jun 11 15:58:39 CEST 2009
On Thu, 11 Jun 2009 15:41:24 +0200
Sedji Gaouaou <sedji.gaouaou at atmel.com> wrote:
> Mark Brown a écrit :
> > Hrm, looking at the Kconfig in 2.6.30 the dw_dmac code has a hard
> > dependency on AVR32 which is probably what's causing the trouble - I
> > guess a patch will also be needed for that to enable AT91 support.
> Yes indeed! On AT91 we don't have a specific dma which is called pdc.
> So basically I have put all the dma functions into if(cpu_is_ap7000()).
> But I am not sure this is the proper way of doing it...
Ah, right, you need to implement a different DMA layer in the AC97C
driver, take a look at the atmel-mci driver for an example of how to do
I.e. you'll need some big #ifdef/ifndef stuff to switch between dw_dmac
and the pdc way of doing DMA.
In the sound/atmel/Kconfig add a depend which triggers the selected DMA
engine depending on architecture. Or you could make the DMA engine
selectable in the menu. Although, this is hard wired in each device, so
I would go for something like:
depends on AT91
and then use CONFIG_SOUND_ATMEL_AC97C_PDC in the sound/atmel/ac97c.c
file to switch between the two DMA engines.
Did I make sense? I actually had something similar in the driver long
ago in 2.6.18 or earlier. But ripped it out since the AP7 devices has
it own DMA controller from DesignWare (in addition to PDC) and my main
focus was getting the driver to work. Adding AT91 support should now be
More information about the Alsa-devel