alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: sirf-audio-codec: Remove snd_soc_codec_set_cache_io() call
@ 2014-03-14  8:26 Lars-Peter Clausen
  2014-03-14  8:26 ` [PATCH 2/2] ASoC: sirf-audio-codec: Add missing Makefile entry Lars-Peter Clausen
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Lars-Peter Clausen @ 2014-03-14  8:26 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Rongjun Ying, Barry Song, Lars-Peter Clausen, alsa-devel

There was a overlap between the snd_soc_codec_set_cache_io() cleanup and the
addition of the sirf-audio-codec resulting in the sirf-audio-codec driver still
using the old signature of snd_soc_codec_set_cache_io(), which will cause a
compile error. Since the core is able to automatically setup IO for this driver
we can just remove both the snd_soc_set_cache_io() call and the control_data
assignment.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/codecs/sirf-audio-codec.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/sound/soc/codecs/sirf-audio-codec.c b/sound/soc/codecs/sirf-audio-codec.c
index 90e3a22..58e7c1f 100644
--- a/sound/soc/codecs/sirf-audio-codec.c
+++ b/sound/soc/codecs/sirf-audio-codec.c
@@ -337,18 +337,9 @@ struct snd_soc_dai_driver sirf_audio_codec_dai = {
 
 static int sirf_audio_codec_probe(struct snd_soc_codec *codec)
 {
-	int ret;
 	struct snd_soc_dapm_context *dapm = &codec->dapm;
-	struct sirf_audio_codec *sirf_audio_codec = snd_soc_codec_get_drvdata(codec);
 
 	pm_runtime_enable(codec->dev);
-	codec->control_data = sirf_audio_codec->regmap;
-
-	ret = snd_soc_codec_set_cache_io(codec, 0, 0, SND_SOC_REGMAP);
-	if (ret != 0) {
-		dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-		return ret;
-	}
 
 	if (of_device_is_compatible(codec->dev->of_node, "sirf,prima2-audio-codec")) {
 		snd_soc_dapm_new_controls(dapm,
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] ASoC: sirf-audio-codec: Add missing Makefile entry
  2014-03-14  8:26 [PATCH 1/2] ASoC: sirf-audio-codec: Remove snd_soc_codec_set_cache_io() call Lars-Peter Clausen
@ 2014-03-14  8:26 ` Lars-Peter Clausen
  2014-03-17 17:00   ` Mark Brown
  2014-03-14 10:16 ` [PATCH 1/2] ASoC: sirf-audio-codec: Remove snd_soc_codec_set_cache_io() call Rongjun Ying
  2014-03-17 16:53 ` Mark Brown
  2 siblings, 1 reply; 7+ messages in thread
From: Lars-Peter Clausen @ 2014-03-14  8:26 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Rongjun Ying, Barry Song, Lars-Peter Clausen, alsa-devel

Without this the driver can't be built.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/codecs/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile
index 73df822..94ef89e 100644
--- a/sound/soc/codecs/Makefile
+++ b/sound/soc/codecs/Makefile
@@ -210,6 +210,7 @@ obj-$(CONFIG_SND_SOC_RT5640)	+= snd-soc-rt5640.o
 obj-$(CONFIG_SND_SOC_SGTL5000)  += snd-soc-sgtl5000.o
 obj-$(CONFIG_SND_SOC_SIGMADSP)	+= snd-soc-sigmadsp.o
 obj-$(CONFIG_SND_SOC_SI476X)	+= snd-soc-si476x.o
+obj-$(CONFIG_SND_SOC_SIRF_AUDIO_CODEC) += snd-soc-sirf-audio-codec.o
 obj-$(CONFIG_SND_SOC_SN95031)	+=snd-soc-sn95031.o
 obj-$(CONFIG_SND_SOC_SPDIF)	+= snd-soc-spdif-rx.o snd-soc-spdif-tx.o
 obj-$(CONFIG_SND_SOC_SSM2518)	+= snd-soc-ssm2518.o
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] ASoC: sirf-audio-codec: Remove snd_soc_codec_set_cache_io() call
  2014-03-14  8:26 [PATCH 1/2] ASoC: sirf-audio-codec: Remove snd_soc_codec_set_cache_io() call Lars-Peter Clausen
  2014-03-14  8:26 ` [PATCH 2/2] ASoC: sirf-audio-codec: Add missing Makefile entry Lars-Peter Clausen
@ 2014-03-14 10:16 ` Rongjun Ying
  2014-03-14 10:21   ` Lars-Peter Clausen
  2014-03-17 16:53 ` Mark Brown
  2 siblings, 1 reply; 7+ messages in thread
From: Rongjun Ying @ 2014-03-14 10:16 UTC (permalink / raw)
  To: Lars-Peter Clausen, Mark Brown, Liam Girdwood; +Cc: Barry Song, alsa-devel



> -----Original Message-----
> From: Lars-Peter Clausen [mailto:lars@metafoo.de]
> Sent: Friday, March 14, 2014 4:26 PM
> To: Mark Brown; Liam Girdwood
> Cc: Rongjun Ying; Barry Song; alsa-devel@alsa-project.org; Lars-Peter
> Clausen
> Subject: [PATCH 1/2] ASoC: sirf-audio-codec: Remove
> snd_soc_codec_set_cache_io() call
> 
> There was a overlap between the snd_soc_codec_set_cache_io() cleanup
> and the addition of the sirf-audio-codec resulting in the sirf-audio-
> codec driver still using the old signature of
> snd_soc_codec_set_cache_io(), which will cause a compile error. Since
> the core is able to automatically setup IO for this driver we can just
> remove both the snd_soc_set_cache_io() call and the control_data
> assignment.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
>  sound/soc/codecs/sirf-audio-codec.c | 9 ---------
>  1 file changed, 9 deletions(-)
> 
> diff --git a/sound/soc/codecs/sirf-audio-codec.c
> b/sound/soc/codecs/sirf-audio-codec.c
> index 90e3a22..58e7c1f 100644
> --- a/sound/soc/codecs/sirf-audio-codec.c
> +++ b/sound/soc/codecs/sirf-audio-codec.c
> @@ -337,18 +337,9 @@ struct snd_soc_dai_driver sirf_audio_codec_dai = {
> 
>  static int sirf_audio_codec_probe(struct snd_soc_codec *codec)  {
> -	int ret;
>  	struct snd_soc_dapm_context *dapm = &codec->dapm;
> -	struct sirf_audio_codec *sirf_audio_codec =
> snd_soc_codec_get_drvdata(codec);
> 
>  	pm_runtime_enable(codec->dev);
> -	codec->control_data = sirf_audio_codec->regmap;
> -
> -	ret = snd_soc_codec_set_cache_io(codec, 0, 0, SND_SOC_REGMAP);
> -	if (ret != 0) {
> -		dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
> -		return ret;
> -	}
> 

May be need invoke snd_soc_codec_set_cache_io(codec, sirf_audio_codec->regmap)?

>  	if (of_device_is_compatible(codec->dev->of_node, "sirf,prima2-
> audio-codec")) {
>  		snd_soc_dapm_new_controls(dapm,
> --
> 1.8.0
> 
> 
> 
>  To report this email as spam click
> https://www.mailcontrol.com/sr/MZbqvYs5QwJvpeaetUwhCQ==
> 7ZVumiOHvh5meKBFThUi75+9byUhoVPh5vdkxH4nYzTQYQ== .

Thanks
RongJun Ying


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Keep up to date with CSR on our technical blog, www.csr.com/blog, CSR people blog, www.csr.com/people, YouTube, www.youtube.com/user/CSRplc, Facebook, www.facebook.com/pages/CSR/191038434253534, or follow us on Twitter at www.twitter.com/CSR_plc.
New for 2014, you can now access the wide range of products powered by aptX at www.aptx.com.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] ASoC: sirf-audio-codec: Remove snd_soc_codec_set_cache_io() call
  2014-03-14 10:16 ` [PATCH 1/2] ASoC: sirf-audio-codec: Remove snd_soc_codec_set_cache_io() call Rongjun Ying
@ 2014-03-14 10:21   ` Lars-Peter Clausen
  0 siblings, 0 replies; 7+ messages in thread
From: Lars-Peter Clausen @ 2014-03-14 10:21 UTC (permalink / raw)
  To: Rongjun Ying; +Cc: Barry Song, Mark Brown, Liam Girdwood, alsa-devel

On 03/14/2014 11:16 AM, Rongjun Ying wrote:
>
>
>> -----Original Message-----
>> From: Lars-Peter Clausen [mailto:lars@metafoo.de]
>> Sent: Friday, March 14, 2014 4:26 PM
>> To: Mark Brown; Liam Girdwood
>> Cc: Rongjun Ying; Barry Song; alsa-devel@alsa-project.org; Lars-Peter
>> Clausen
>> Subject: [PATCH 1/2] ASoC: sirf-audio-codec: Remove
>> snd_soc_codec_set_cache_io() call
>>
>> There was a overlap between the snd_soc_codec_set_cache_io() cleanup
>> and the addition of the sirf-audio-codec resulting in the sirf-audio-
>> codec driver still using the old signature of
>> snd_soc_codec_set_cache_io(), which will cause a compile error. Since
>> the core is able to automatically setup IO for this driver we can just
>> remove both the snd_soc_set_cache_io() call and the control_data
>> assignment.
>>
>> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
>> ---
>>   sound/soc/codecs/sirf-audio-codec.c | 9 ---------
>>   1 file changed, 9 deletions(-)
>>
>> diff --git a/sound/soc/codecs/sirf-audio-codec.c
>> b/sound/soc/codecs/sirf-audio-codec.c
>> index 90e3a22..58e7c1f 100644
>> --- a/sound/soc/codecs/sirf-audio-codec.c
>> +++ b/sound/soc/codecs/sirf-audio-codec.c
>> @@ -337,18 +337,9 @@ struct snd_soc_dai_driver sirf_audio_codec_dai = {
>>
>>   static int sirf_audio_codec_probe(struct snd_soc_codec *codec)  {
>> -	int ret;
>>   	struct snd_soc_dapm_context *dapm = &codec->dapm;
>> -	struct sirf_audio_codec *sirf_audio_codec =
>> snd_soc_codec_get_drvdata(codec);
>>
>>   	pm_runtime_enable(codec->dev);
>> -	codec->control_data = sirf_audio_codec->regmap;
>> -
>> -	ret = snd_soc_codec_set_cache_io(codec, 0, 0, SND_SOC_REGMAP);
>> -	if (ret != 0) {
>> -		dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
>> -		return ret;
>> -	}
>>
>
> May be need invoke snd_soc_codec_set_cache_io(codec, sirf_audio_codec->regmap)?

No, this is done automatically by the ASoC core.

>
>>   	if (of_device_is_compatible(codec->dev->of_node, "sirf,prima2-
>> audio-codec")) {
>>   		snd_soc_dapm_new_controls(dapm,
>> --
>> 1.8.0
>>
>>
>>
>>   To report this email as spam click
>> https://www.mailcontrol.com/sr/MZbqvYs5QwJvpeaetUwhCQ==
>> 7ZVumiOHvh5meKBFThUi75+9byUhoVPh5vdkxH4nYzTQYQ== .
>
> Thanks
> RongJun Ying
>
>
> Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
> More information can be found at www.csr.com. Keep up to date with CSR on our technical blog, www.csr.com/blog, CSR people blog, www.csr.com/people, YouTube, www.youtube.com/user/CSRplc, Facebook, www.facebook.com/pages/CSR/191038434253534, or follow us on Twitter at www.twitter.com/CSR_plc.
> New for 2014, you can now access the wide range of products powered by aptX at www.aptx.com.
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] ASoC: sirf-audio-codec: Remove snd_soc_codec_set_cache_io() call
  2014-03-14  8:26 [PATCH 1/2] ASoC: sirf-audio-codec: Remove snd_soc_codec_set_cache_io() call Lars-Peter Clausen
  2014-03-14  8:26 ` [PATCH 2/2] ASoC: sirf-audio-codec: Add missing Makefile entry Lars-Peter Clausen
  2014-03-14 10:16 ` [PATCH 1/2] ASoC: sirf-audio-codec: Remove snd_soc_codec_set_cache_io() call Rongjun Ying
@ 2014-03-17 16:53 ` Mark Brown
  2 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2014-03-17 16:53 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: Rongjun Ying, Barry Song, Liam Girdwood, alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 500 bytes --]

On Fri, Mar 14, 2014 at 09:26:11AM +0100, Lars-Peter Clausen wrote:
> There was a overlap between the snd_soc_codec_set_cache_io() cleanup and the
> addition of the sirf-audio-codec resulting in the sirf-audio-codec driver still
> using the old signature of snd_soc_codec_set_cache_io(), which will cause a
> compile error. Since the core is able to automatically setup IO for this driver
> we can just remove both the snd_soc_set_cache_io() call and the control_data
> assignment.

Applied, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] ASoC: sirf-audio-codec: Add missing Makefile entry
  2014-03-14  8:26 ` [PATCH 2/2] ASoC: sirf-audio-codec: Add missing Makefile entry Lars-Peter Clausen
@ 2014-03-17 17:00   ` Mark Brown
  2014-03-18  2:04     ` Rongjun Ying
  0 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2014-03-17 17:00 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: Rongjun Ying, Barry Song, Liam Girdwood, alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 328 bytes --]

On Fri, Mar 14, 2014 at 09:26:12AM +0100, Lars-Peter Clausen wrote:
> Without this the driver can't be built.

Yeah.  On the other hand until the issue with sharing the registers
between the CODEC and DAI drivers is resolved I'm not sure this is a bad
thing.  There were some patches for that which I didn't look at yet
though.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] ASoC: sirf-audio-codec: Add missing Makefile entry
  2014-03-17 17:00   ` Mark Brown
@ 2014-03-18  2:04     ` Rongjun Ying
  0 siblings, 0 replies; 7+ messages in thread
From: Rongjun Ying @ 2014-03-18  2:04 UTC (permalink / raw)
  To: Mark Brown, Lars-Peter Clausen; +Cc: Barry Song, Liam Girdwood, alsa-devel



> -----Original Message-----
> From: Mark Brown [mailto:broonie@kernel.org]
> Sent: Tuesday, March 18, 2014 1:01 AM
> To: Lars-Peter Clausen
> Cc: Liam Girdwood; Rongjun Ying; Barry Song; alsa-devel@alsa-
> project.org
> Subject: Re: [PATCH 2/2] ASoC: sirf-audio-codec: Add missing Makefile
> entry
> 
> On Fri, Mar 14, 2014 at 09:26:12AM +0100, Lars-Peter Clausen wrote:
> > Without this the driver can't be built.
> 
> Yeah.  On the other hand until the issue with sharing the registers
> between the CODEC and DAI drivers is resolved I'm not sure this is a
> bad thing.  There were some patches for that which I didn't look at yet
> though.

Hi Mark:
I have implemented audio hub driver to sharing the register for internal codec, port and I2S controller.
Please help to review it.

Thanks.
RongJun Ying 


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Keep up to date with CSR on our technical blog, www.csr.com/blog, CSR people blog, www.csr.com/people, YouTube, www.youtube.com/user/CSRplc, Facebook, www.facebook.com/pages/CSR/191038434253534, or follow us on Twitter at www.twitter.com/CSR_plc.
New for 2014, you can now access the wide range of products powered by aptX at www.aptx.com.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-03-18  2:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-14  8:26 [PATCH 1/2] ASoC: sirf-audio-codec: Remove snd_soc_codec_set_cache_io() call Lars-Peter Clausen
2014-03-14  8:26 ` [PATCH 2/2] ASoC: sirf-audio-codec: Add missing Makefile entry Lars-Peter Clausen
2014-03-17 17:00   ` Mark Brown
2014-03-18  2:04     ` Rongjun Ying
2014-03-14 10:16 ` [PATCH 1/2] ASoC: sirf-audio-codec: Remove snd_soc_codec_set_cache_io() call Rongjun Ying
2014-03-14 10:21   ` Lars-Peter Clausen
2014-03-17 16:53 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).