diff mbox

[07/26] davinci: dm646x: Adds McASP clock

Message ID 87eiskh6k9.fsf@deeprootsystems.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Kevin Hilman July 13, 2009, 4:49 p.m. UTC
Kevin Hilman <khilman@deeprootsystems.com> writes:

> "Narnakaje, Snehaprabha" <nsnehaprabha@ti.com> writes:
>
>> Did you happen to test Audio on DM6446 with the latest on linux-davinci tree?
>>
>> For the same clock name issue Arun is running into on DM355, the codecs are not getting detected on DM6446.
>>
>> Advanced Linux Sound Architecture Driver Version 1.0.20.
>> No device for DAI tlv320aic3x
>> No device for DAI davinci-i2s
>> ALSA device list:
>>   No soundcards found.
>>
>> I am thinking we are seeing these issues due to the way dm355 (or dm6446) clocks are defined on linux-davinci tree and the mach-davinci on kernel.org.
>>
>>>From arch/arm/mach-davinci/dm355.c of kernel.org
>> CLK("soc-audio.0", NULL, &asp0_clk),
>> CLK("soc-audio.1", NULL, &asp1_clk),
>>
>> And from arch/arm/mach-davinci/dm355.c of linux-davinci tree
>> CLK(NULL, "asp0", &asp0_clk),
>> CLK(NULL, "asp1", &asp1_clk),
>>
>> Kevin, any comments?
>
> Yes, ASoC drivers are headed upstream and there's currently a mismatch
> between the patches that are going upstream via linux-davinci and those
> going upstream via the ASoC tree.
>
> linux-davinci is missing some of the changes that are queued up in
> Mark Brown's for-2.6.32 branch, namely the change that addes
> the name argument to clk_get().
>
> On linux-davinci, if you switch back to this form of CLK definition:
>
> CLK("soc-audio.0", NULL, &asp0_clk),
> CLK("soc-audio.1", NULL, &asp1_clk),
>
> does it work for you again?

OK, I confirmed that this proposed change results in working audio
on dm6446.

So I tried to merge Mark's for-2.6.32 branch with davinci master, and
it doesn't compile using 'davinci_all_defconfig' because the spdif
codec doesn't support drivers built as modules, nor does it build as
as a module.  To support drivers built as modules, I needed patch[1]
below, and to get the spdif codec to work as a module it needs
a GPL licence so it can get to platform_[un]register_driver()[2]

With these two patches, Mark's for-2.6.32 branch merged into DaVinci
git master is working for me on dm6446.

I've pushed this to the branch 'temp/asoc' of DaVinci git for
others to test on other platforms.

Kevin

[1]
commit 1c3d901bd47f4a55b79280ee64aa738ff1718263
Author: Kevin Hilman <khilman@deeprootsystems.com>
Date:   Mon Jul 13 09:33:11 2009 -0700

    ASoC: spdif codec: enable use by modules

Comments

Kevin Hilman July 13, 2009, 5:13 p.m. UTC | #1
Mark Brown <broonie@opensource.wolfsonmicro.com> writes:

> On Mon, Jul 13, 2009 at 09:49:10AM -0700, Kevin Hilman wrote:
>> Kevin Hilman <khilman@deeprootsystems.com> writes:
>
>> @@ -34,6 +34,7 @@ struct snd_soc_dai dit_stub_dai = {
>>  		.formats	= STUB_FORMATS,
>>  	},
>>  };
>> +EXPORT_SYMBOL(dit_stub_dai);
>
> ASoC APIs are all EXPORT_SYMBOL_GPL.

ok

>> commit 2d62a2f3db0e86f830adb68ab49b01c2c5979556
>> Author: Kevin Hilman <khilman@deeprootsystems.com>
>> Date:   Mon Jul 13 09:40:56 2009 -0700
>> 
>>     temp: hack
>> 
>> diff --git a/sound/soc/codecs/spdif_transciever.c b/sound/soc/codecs/spdif_transciever.c
>> index 9b18fbf..c4431a9 100644
>> --- a/sound/soc/codecs/spdif_transciever.c
>> +++ b/sound/soc/codecs/spdif_transciever.c
>> @@ -21,6 +21,8 @@
>>  
>>  #include "spdif_transciever.h"
>>  
>> +MODULE_LICENSE("GPL");
>> +
>
> Doesn't look like a hack?  The kernel is GPLed...

since I didn't write the code, I didn't want to enforce a module
licence, so I marked it has a hack just to get it to build/load for
me.

Feel free to fix both of these as appropriate in your tree.

Kevin
nsnehaprabha@ti.com July 13, 2009, 10:04 p.m. UTC | #2
Kevin,

> -----Original Message-----
> From: Kevin Hilman [mailto:khilman@deeprootsystems.com]
> Sent: Monday, July 13, 2009 12:49 PM
> To: Narnakaje, Snehaprabha
> Cc: Mani, Arun; Troy Kisky; davinci-linux-open-
> source@linux.davincidsp.com; Mark Brown; linux-arm-
> kernel@lists.arm.linux.org.uk; Medisetty, Naresh
> Subject: Re: [PATCH 07/26] davinci: dm646x: Adds McASP clock
> 
> Kevin Hilman <khilman@deeprootsystems.com> writes:
> 
> > "Narnakaje, Snehaprabha" <nsnehaprabha@ti.com> writes:
> >
> >> Did you happen to test Audio on DM6446 with the latest on linux-davinci
> tree?
> >>
> >> For the same clock name issue Arun is running into on DM355, the codecs
> are not getting detected on DM6446.
> >>
> >> Advanced Linux Sound Architecture Driver Version 1.0.20.
> >> No device for DAI tlv320aic3x
> >> No device for DAI davinci-i2s
> >> ALSA device list:
> >>   No soundcards found.
> >>
> >> I am thinking we are seeing these issues due to the way dm355 (or
> dm6446) clocks are defined on linux-davinci tree and the mach-davinci on
> kernel.org.
> >>
> >>>From arch/arm/mach-davinci/dm355.c of kernel.org
> >> CLK("soc-audio.0", NULL, &asp0_clk),
> >> CLK("soc-audio.1", NULL, &asp1_clk),
> >>
> >> And from arch/arm/mach-davinci/dm355.c of linux-davinci tree
> >> CLK(NULL, "asp0", &asp0_clk),
> >> CLK(NULL, "asp1", &asp1_clk),
> >>
> >> Kevin, any comments?
> >
> > Yes, ASoC drivers are headed upstream and there's currently a mismatch
> > between the patches that are going upstream via linux-davinci and those
> > going upstream via the ASoC tree.
> >
> > linux-davinci is missing some of the changes that are queued up in
> > Mark Brown's for-2.6.32 branch, namely the change that addes
> > the name argument to clk_get().
> >
> > On linux-davinci, if you switch back to this form of CLK definition:
> >
> > CLK("soc-audio.0", NULL, &asp0_clk),
> > CLK("soc-audio.1", NULL, &asp1_clk),
> >
> > does it work for you again?
> 
> OK, I confirmed that this proposed change results in working audio
> on dm6446.
> 
> So I tried to merge Mark's for-2.6.32 branch with davinci master, and
> it doesn't compile using 'davinci_all_defconfig' because the spdif
> codec doesn't support drivers built as modules, nor does it build as
> as a module.  To support drivers built as modules, I needed patch[1]
> below, and to get the spdif codec to work as a module it needs
> a GPL licence so it can get to platform_[un]register_driver()[2]
> 
> With these two patches, Mark's for-2.6.32 branch merged into DaVinci
> git master is working for me on dm6446.
> 
> I've pushed this to the branch 'temp/asoc' of DaVinci git for
> others to test on other platforms.

I tried to build from temp/asoc, using davinci_all_defconfig and the module build (for audio) is still giving the errors -

ERROR: "davinci_mcasp_dai" [sound/soc/davinci/snd-soc-evm.ko] undefined!
ERROR: "dit_stub_dai" [sound/soc/davinci/snd-soc-evm.ko] undefined!

Similar errors are coming, if the sound drivers are built in static.

Thanks
Sneha

> 
> Kevin
> 
> [1]
> commit 1c3d901bd47f4a55b79280ee64aa738ff1718263
> Author: Kevin Hilman <khilman@deeprootsystems.com>
> Date:   Mon Jul 13 09:33:11 2009 -0700
> 
>     ASoC: spdif codec: enable use by modules
> 
> diff --git a/sound/soc/codecs/spdif_transciever.c
> b/sound/soc/codecs/spdif_transciever.c
> index 218b33a..9b18fbf 100644
> --- a/sound/soc/codecs/spdif_transciever.c
> +++ b/sound/soc/codecs/spdif_transciever.c
> @@ -34,6 +34,7 @@ struct snd_soc_dai dit_stub_dai = {
>  		.formats	= STUB_FORMATS,
>  	},
>  };
> +EXPORT_SYMBOL(dit_stub_dai);
> 
>  static int spdif_dit_probe(struct platform_device *pdev)
>  {
> 
> 
> [2]
> commit 2d62a2f3db0e86f830adb68ab49b01c2c5979556
> Author: Kevin Hilman <khilman@deeprootsystems.com>
> Date:   Mon Jul 13 09:40:56 2009 -0700
> 
>     temp: hack
> 
> diff --git a/sound/soc/codecs/spdif_transciever.c
> b/sound/soc/codecs/spdif_transciever.c
> index 9b18fbf..c4431a9 100644
> --- a/sound/soc/codecs/spdif_transciever.c
> +++ b/sound/soc/codecs/spdif_transciever.c
> @@ -21,6 +21,8 @@
> 
>  #include "spdif_transciever.h"
> 
> +MODULE_LICENSE("GPL");
> +
>  #define STUB_RATES	SNDRV_PCM_RATE_8000_96000
>  #define STUB_FORMATS	SNDRV_PCM_FMTBIT_S16_LE
>
diff mbox

Patch

diff --git a/sound/soc/codecs/spdif_transciever.c b/sound/soc/codecs/spdif_transciever.c
index 218b33a..9b18fbf 100644
--- a/sound/soc/codecs/spdif_transciever.c
+++ b/sound/soc/codecs/spdif_transciever.c
@@ -34,6 +34,7 @@  struct snd_soc_dai dit_stub_dai = {
 		.formats	= STUB_FORMATS,
 	},
 };
+EXPORT_SYMBOL(dit_stub_dai);
 
 static int spdif_dit_probe(struct platform_device *pdev)
 {


[2]
commit 2d62a2f3db0e86f830adb68ab49b01c2c5979556
Author: Kevin Hilman <khilman@deeprootsystems.com>
Date:   Mon Jul 13 09:40:56 2009 -0700

    temp: hack

diff --git a/sound/soc/codecs/spdif_transciever.c b/sound/soc/codecs/spdif_transciever.c
index 9b18fbf..c4431a9 100644
--- a/sound/soc/codecs/spdif_transciever.c
+++ b/sound/soc/codecs/spdif_transciever.c
@@ -21,6 +21,8 @@ 
 
 #include "spdif_transciever.h"
 
+MODULE_LICENSE("GPL");
+
 #define STUB_RATES	SNDRV_PCM_RATE_8000_96000
 #define STUB_FORMATS	SNDRV_PCM_FMTBIT_S16_LE