* AC97 atmel
@ 2009-06-11 8:56 Sedji Gaouaou
2009-06-11 9:27 ` Hans-Christian Egtvedt
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Sedji Gaouaou @ 2009-06-11 8:56 UTC (permalink / raw)
To: alsa-devel, Takashi Iwai, Hans-Christian Egtvedt
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: AC97 atmel
2009-06-11 8:56 AC97 atmel Sedji Gaouaou
@ 2009-06-11 9:27 ` Hans-Christian Egtvedt
2009-06-11 12:51 ` Sedji Gaouaou
2009-06-11 13:01 ` Mark Brown
2 siblings, 0 replies; 12+ messages in thread
From: Hans-Christian Egtvedt @ 2009-06-11 9:27 UTC (permalink / raw)
To: Sedji Gaouaou; +Cc: Takashi Iwai, alsa-devel
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.
--
Best regards,
Hans-Christian Egtvedt
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: AC97 atmel
2009-06-11 8:56 AC97 atmel Sedji Gaouaou
2009-06-11 9:27 ` Hans-Christian Egtvedt
@ 2009-06-11 12:51 ` Sedji Gaouaou
2009-06-11 12:58 ` Hans-Christian Egtvedt
2009-06-11 13:01 ` Mark Brown
2 siblings, 1 reply; 12+ messages in thread
From: Sedji Gaouaou @ 2009-06-11 12:51 UTC (permalink / raw)
To: Sedji Gaouaou; +Cc: Takashi Iwai, alsa-devel, 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.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
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: AC97 atmel
2009-06-11 12:51 ` Sedji Gaouaou
@ 2009-06-11 12:58 ` Hans-Christian Egtvedt
2009-06-11 13:43 ` Takashi Iwai
0 siblings, 1 reply; 12+ messages in thread
From: Hans-Christian Egtvedt @ 2009-06-11 12:58 UTC (permalink / raw)
Cc: Takashi Iwai, Sedji Gaouaou, 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?
--
Best regards,
Hans-Christian Egtvedt
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: AC97 atmel
2009-06-11 8:56 AC97 atmel Sedji Gaouaou
2009-06-11 9:27 ` Hans-Christian Egtvedt
2009-06-11 12:51 ` Sedji Gaouaou
@ 2009-06-11 13:01 ` Mark Brown
2009-06-11 13:11 ` Hans-Christian Egtvedt
2 siblings, 1 reply; 12+ messages in thread
From: Mark Brown @ 2009-06-11 13:01 UTC (permalink / raw)
To: Sedji Gaouaou; +Cc: Takashi Iwai, alsa-devel, Hans-Christian Egtvedt
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: AC97 atmel
2009-06-11 13:01 ` Mark Brown
@ 2009-06-11 13:11 ` Hans-Christian Egtvedt
2009-06-11 13:23 ` Sedji Gaouaou
2009-06-11 13:23 ` Mark Brown
0 siblings, 2 replies; 12+ messages in thread
From: Hans-Christian Egtvedt @ 2009-06-11 13:11 UTC (permalink / raw)
To: Mark Brown; +Cc: Takashi Iwai, Sedji Gaouaou, alsa-devel
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.
--
Best regards,
Hans-Christian Egtvedt
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: AC97 atmel
2009-06-11 13:11 ` Hans-Christian Egtvedt
@ 2009-06-11 13:23 ` Sedji Gaouaou
2009-06-11 13:29 ` Mark Brown
2009-06-11 13:23 ` Mark Brown
1 sibling, 1 reply; 12+ messages in thread
From: Sedji Gaouaou @ 2009-06-11 13:23 UTC (permalink / raw)
To: Hans-Christian Egtvedt; +Cc: Takashi Iwai, alsa-devel, Mark Brown
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: AC97 atmel
2009-06-11 13:11 ` Hans-Christian Egtvedt
2009-06-11 13:23 ` Sedji Gaouaou
@ 2009-06-11 13:23 ` Mark Brown
2009-06-11 13:41 ` Sedji Gaouaou
1 sibling, 1 reply; 12+ messages in thread
From: Mark Brown @ 2009-06-11 13:23 UTC (permalink / raw)
To: Hans-Christian Egtvedt; +Cc: Takashi Iwai, Sedji Gaouaou, alsa-devel
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: AC97 atmel
2009-06-11 13:23 ` Sedji Gaouaou
@ 2009-06-11 13:29 ` Mark Brown
0 siblings, 0 replies; 12+ messages in thread
From: Mark Brown @ 2009-06-11 13:29 UTC (permalink / raw)
To: Sedji Gaouaou; +Cc: Takashi Iwai, alsa-devel, Hans-Christian Egtvedt
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: AC97 atmel
2009-06-11 13:23 ` Mark Brown
@ 2009-06-11 13:41 ` Sedji Gaouaou
2009-06-11 13:58 ` Hans-Christian Egtvedt
0 siblings, 1 reply; 12+ messages in thread
From: Sedji Gaouaou @ 2009-06-11 13:41 UTC (permalink / raw)
To: Mark Brown; +Cc: Takashi Iwai, alsa-devel, Hans-Christian Egtvedt
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...
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: AC97 atmel
2009-06-11 12:58 ` Hans-Christian Egtvedt
@ 2009-06-11 13:43 ` Takashi Iwai
0 siblings, 0 replies; 12+ messages in thread
From: Takashi Iwai @ 2009-06-11 13:43 UTC (permalink / raw)
To: Hans-Christian Egtvedt; +Cc: Sedji Gaouaou, alsa-devel
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: AC97 atmel
2009-06-11 13:41 ` Sedji Gaouaou
@ 2009-06-11 13:58 ` Hans-Christian Egtvedt
0 siblings, 0 replies; 12+ messages in thread
From: Hans-Christian Egtvedt @ 2009-06-11 13:58 UTC (permalink / raw)
To: Sedji Gaouaou; +Cc: Takashi Iwai, alsa-devel, Mark Brown
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.
--
Best regards,
Hans-Christian Egtvedt
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2009-06-11 13:58 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-11 8:56 AC97 atmel Sedji Gaouaou
2009-06-11 9:27 ` Hans-Christian Egtvedt
2009-06-11 12:51 ` Sedji Gaouaou
2009-06-11 12:58 ` Hans-Christian Egtvedt
2009-06-11 13:43 ` Takashi Iwai
2009-06-11 13:01 ` Mark Brown
2009-06-11 13:11 ` Hans-Christian Egtvedt
2009-06-11 13:23 ` Sedji Gaouaou
2009-06-11 13:29 ` Mark Brown
2009-06-11 13:23 ` Mark Brown
2009-06-11 13:41 ` Sedji Gaouaou
2009-06-11 13:58 ` Hans-Christian Egtvedt
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.