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
Quoted 7 lines · On Thu, 11 Jun 2009 10:56:38 +0200 Sedji Gaouaou <[email protected]>…
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.
Signature · 2 lines
Best regards, Hans-Christian Egtvedt
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.osound/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 castsound/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
Quoted 14 lines · Sedji Gaouaou
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
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Quoted 6 lines · On Thu, 11 Jun 2009 14:51:11 +0200 Sedji Gaouaou <[email protected]>…
Sorry to bother you again, but I've tried to compile the
ac97c.cdriver 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>
Quoted 6 lines
But if I use the linux-ketchup it will compile ok.
dw_dma_cyclic_prepis indrivers/dma/dw_dma.con 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?
Signature · 2 lines
Best regards, Hans-Christian Egtvedt
Quoted 3 lines · Sedji Gaouaou
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.
Quoted 9 lines · On Thu, 11 Jun 2009 14:01:17 +0100 Mark Brown…
Quoted 3 lines · Sedji Gaouaou
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.
Signature · 2 lines
Best regards, Hans-Christian Egtvedt
Quoted 9 lines · Hans-Christian Egtvedt
Quoted 3 lines · Mark Brown
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_dmacstuff 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.
Quoted 5 lines · Hans-Christian Egtvedt
I was under the assumption that "linux ketchup" was Linus Torvalds tree? At least the
dw_dmacstuff 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
Quoted 4 lines · Sedji Gaouaou
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.
Quoted 5 lines · Mark Brown
Hrm, looking at the
Kconfigin 2.6.30 thedw_dmaccode 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...
At Thu, 11 Jun 2009 14:58:49 +0200,
Quoted 15 lines · Hans-Christian Egtvedt
Quoted 6 lines · On Thu, 11 Jun 2009 14:51:11 +0200 Sedji Gaouaou <[email protected]>…
Sorry to bother you again, but I've tried to compile the
ac97c.cdriver 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_dmacdriver>Quoted 2 lines
But if I use the linux-ketchup it will compile ok.
Quoted 7 lines
Quoted 4 lines
dw_dma_cyclic_prepis indrivers/dma/dw_dma.con 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.
Quoted 1 line
Try pulling from both trees?
It's better anyway.
Takashi
Quoted 10 lines · On Thu, 11 Jun 2009 15:41:24 +0200 Sedji Gaouaou <[email protected]>…
Quoted 5 lines · Mark Brown
Hrm, looking at the
Kconfigin 2.6.30 thedw_dmaccode 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.
Signature · 6 lines
Best regards, Hans-Christian Egtvedt _______________________________________________ Alsa-devel mailing list [email protected] http://mailman.alsa-project.org/mailman/listinfo/alsa-devel