[alsa-devel] AC97 atmel
Hi,
I have a patch which adds support for ATMEL AT91. I would like to know on which branch should I base my patch (linux ketchup or http://www.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git).
Regards, Sedji
On Thu, 11 Jun 2009 10:56:38 +0200 Sedji Gaouaou sedji.gaouaou@atmel.com wrote:
Hi,
I have a patch which adds support for ATMEL AT91. I would like to know on which branch should I base my patch (linux ketchup or http://www.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git).
ALSA stuff should be based on the latest stuff in Takashi Iwai's tree.
Sorry to bother you again, but I've tried to compile the ac97c.c driver based on http://www.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git and doing so I've got some errors:
CC sound/atmel/ac97c.o sound/atmel/ac97c.c: In function 'atmel_ac97c_prepare_dma': sound/atmel/ac97c.c:127: error: implicit declaration of function 'dw_dma_cyclic_prep' sound/atmel/ac97c.c:128: warning: assignment makes pointer from integer without a cast sound/atmel/ac97c.c:135: error: dereferencing pointer to incomplete type sound/atmel/ac97c.c:138: error: dereferencing pointer to incomplete type sound/atmel/ac97c.c:142: error: dereferencing pointer to incomplete type sound/atmel/ac97c.c: In function 'atmel_ac97c_playback_hw_params': sound/atmel/ac97c.c:257: error: implicit declaration of function 'dw_dma_cyclic_free' sound/atmel/ac97c.c: In function 'atmel_ac97c_playback_trigger': sound/atmel/ac97c.c:477: error: implicit declaration of function 'dw_dma_cyclic_start' sound/atmel/ac97c.c:489: error: implicit declaration of function 'dw_dma_cyclic_stop' sound/atmel/ac97c.c: In function 'atmel_ac97c_playback_pointer': sound/atmel/ac97c.c:564: error: implicit declaration of function 'dw_dma_get_src_addr' sound/atmel/ac97c.c: In function 'atmel_ac97c_capture_pointer': sound/atmel/ac97c.c:585: error: implicit declaration of function 'dw_dma_get_dst_addr' sound/atmel/ac97c.c: In function 'filter': sound/atmel/ac97c.c:851: error: 'struct dma_chan' has no member named 'private' make[2]: *** [sound/atmel/ac97c.o] Error 1 make[1]: *** [sound/atmel] Error 2 make: *** [sound] Error 2
But if I use the linux-ketchup it will compile ok.
dw_dma_cyclic_prep is in drivers/dma/dw_dma.c on the linux-kecthup, but I can't find it on the git tree... Am I missing something?
Regards, Sedji Sedji Gaouaou a écrit :
Hi,
I have a patch which adds support for ATMEL AT91. I would like to know on which branch should I base my patch (linux ketchup or http://www.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git).
Regards, Sedji _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
On Thu, 11 Jun 2009 14:51:11 +0200 Sedji Gaouaou sedji.gaouaou@atmel.com wrote:
Sorry to bother you again, but I've tried to compile the ac97c.c driver based on http://www.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git and doing so I've got some errors:
CC sound/atmel/ac97c.o
<snipp missing references to dw_dmac driver>
But if I use the linux-ketchup it will compile ok.
dw_dma_cyclic_prep is in drivers/dma/dw_dma.c on the linux-kecthup, but I can't find it on the git tree... Am I missing something?
Takashi Iwai has probably not updated his tree after Linus release the new kernel. Try pulling from both trees?
At Thu, 11 Jun 2009 14:58:49 +0200, Hans-Christian Egtvedt wrote:
On Thu, 11 Jun 2009 14:51:11 +0200 Sedji Gaouaou sedji.gaouaou@atmel.com wrote:
Sorry to bother you again, but I've tried to compile the ac97c.c driver based on http://www.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git and doing so I've got some errors:
CC sound/atmel/ac97c.o
<snipp missing references to dw_dmac driver>
But if I use the linux-ketchup it will compile ok.
dw_dma_cyclic_prep is in drivers/dma/dw_dma.c on the linux-kecthup, but I can't find it on the git tree... Am I missing something?
Takashi Iwai has probably not updated his tree after Linus release the new kernel.
It should be already on 2.6.30-final.
Try pulling from both trees?
It's better anyway.
Takashi
On Thu, Jun 11, 2009 at 10:56:38AM +0200, Sedji Gaouaou wrote:
I would like to know on which branch should I base my patch (linux ketchup or http://www.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git).
What is "linux ketchup"? I'm guessing it's an Ateml tree but the main thing google is turning up is a script for automatically updating patch sets.
On Thu, 11 Jun 2009 14:01:17 +0100 Mark Brown broonie@opensource.wolfsonmicro.com wrote:
On Thu, Jun 11, 2009 at 10:56:38AM +0200, Sedji Gaouaou wrote:
I would like to know on which branch should I base my patch (linux ketchup or http://www.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git).
What is "linux ketchup"? I'm guessing it's an Ateml tree but the main thing google is turning up is a script for automatically updating patch sets.
I was under the assumption that "linux ketchup" was Linus Torvalds tree? At least the dw_dmac stuff went into that tree for the 2.6.30 release.
Hans-Christian Egtvedt a écrit :
I was under the assumption that "linux ketchup" was Linus Torvalds tree? At least the dw_dmac stuff went into that tree for the 2.6.30 release.
Yes "linux-ketchup" is 2.6.30 :) But there are differences between takashi tree and linus tree...Anyway I will base my patch on 2.6.30 so I can compile and test it. The if it needs modifications I will re-work it.
regards, Sedji
On Thu, Jun 11, 2009 at 03:23:05PM +0200, Sedji Gaouaou wrote:
Yes "linux-ketchup" is 2.6.30 :) But there are differences between takashi tree and linus tree...Anyway I will base my patch on 2.6.30 so I can compile and test it. The if it needs modifications I will re-work it.
Linus' tree will be merged into Takashi's - probably just after -rc1 - so if you run into problems you can always wait until that's happened.
On Thu, Jun 11, 2009 at 03:11:25PM +0200, Hans-Christian Egtvedt wrote:
Mark Brown broonie@opensource.wolfsonmicro.com wrote:
What is "linux ketchup"? I'm guessing it's an Ateml tree but the main thing google is turning up is a script for automatically updating patch sets.
I was under the assumption that "linux ketchup" was Linus Torvalds tree? At least the dw_dmac stuff went into that tree for the 2.6.30 release.
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.
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...
On Thu, 11 Jun 2009 15:41:24 +0200 Sedji Gaouaou sedji.gaouaou@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 this.
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:
config SOUND_ATMEL_AC97C_PDC bool 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 quite smooth.
participants (4)
-
Hans-Christian Egtvedt
-
Mark Brown
-
Sedji Gaouaou
-
Takashi Iwai