All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] ASoC: tlv320aic26: Fix keyclick feature
@ 2013-08-06 11:39 Lars-Peter Clausen
  2013-08-06 11:39 ` [PATCH 2/3] ASoC: twl4030: Remove embedded snd_soc_codec structs from private data structs Lars-Peter Clausen
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Lars-Peter Clausen @ 2013-08-06 11:39 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood; +Cc: Grant Likely, alsa-devel, Lars-Peter Clausen

The tlv320aic26 contains a embedded snd_soc_codec struct which is referenced in
the keyclick code. That struct is never initialized though, replace the embedded
struct with a pointer and use that in the keyclick code.

Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/codecs/tlv320aic26.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/tlv320aic26.c b/sound/soc/codecs/tlv320aic26.c
index b1f6982..b192cd4 100644
--- a/sound/soc/codecs/tlv320aic26.c
+++ b/sound/soc/codecs/tlv320aic26.c
@@ -29,7 +29,7 @@ MODULE_LICENSE("GPL");
 /* AIC26 driver private data */
 struct aic26 {
 	struct spi_device *spi;
-	struct snd_soc_codec codec;
+	struct snd_soc_codec *codec;
 	int master;
 	int datfm;
 	int mclk;
@@ -330,7 +330,7 @@ static ssize_t aic26_keyclick_show(struct device *dev,
 	struct aic26 *aic26 = dev_get_drvdata(dev);
 	int val, amp, freq, len;
 
-	val = aic26_reg_read_cache(&aic26->codec, AIC26_REG_AUDIO_CTRL2);
+	val = aic26_reg_read_cache(aic26->codec, AIC26_REG_AUDIO_CTRL2);
 	amp = (val >> 12) & 0x7;
 	freq = (125 << ((val >> 8) & 0x7)) >> 1;
 	len = 2 * (1 + ((val >> 4) & 0xf));
@@ -346,9 +346,9 @@ static ssize_t aic26_keyclick_set(struct device *dev,
 	struct aic26 *aic26 = dev_get_drvdata(dev);
 	int val;
 
-	val = aic26_reg_read_cache(&aic26->codec, AIC26_REG_AUDIO_CTRL2);
+	val = aic26_reg_read_cache(aic26->codec, AIC26_REG_AUDIO_CTRL2);
 	val |= 0x8000;
-	aic26_reg_write(&aic26->codec, AIC26_REG_AUDIO_CTRL2, val);
+	aic26_reg_write(aic26->codec, AIC26_REG_AUDIO_CTRL2, val);
 
 	return count;
 }
@@ -360,8 +360,11 @@ static DEVICE_ATTR(keyclick, 0644, aic26_keyclick_show, aic26_keyclick_set);
  */
 static int aic26_probe(struct snd_soc_codec *codec)
 {
+	struct aic26 *aic26 = dev_get_drvdata(codec->dev);
 	int ret, err, i, reg;
 
+	aic26->codec = codec;
+
 	dev_info(codec->dev, "Probing AIC26 SoC CODEC driver\n");
 
 	/* Reset the codec to power on defaults */
-- 
1.8.0

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

* [PATCH 2/3] ASoC: twl4030: Remove embedded snd_soc_codec structs from private data structs
  2013-08-06 11:39 [PATCH 1/3] ASoC: tlv320aic26: Fix keyclick feature Lars-Peter Clausen
@ 2013-08-06 11:39 ` Lars-Peter Clausen
  2013-08-06 13:20   ` Peter Ujfalusi
  2013-08-06 16:42   ` Mark Brown
  2013-08-06 11:39 ` [PATCH 3/3] ASoC: mc13783: " Lars-Peter Clausen
  2013-08-06 11:42 ` [PATCH 1/3] ASoC: tlv320aic26: Fix keyclick feature Mark Brown
  2 siblings, 2 replies; 7+ messages in thread
From: Lars-Peter Clausen @ 2013-08-06 11:39 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood; +Cc: Peter Ujfalusi, alsa-devel, Lars-Peter Clausen

It is unused and a leftover of the pre multi-component era.

Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/codecs/twl4030.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
index 8e6e5b0..1e3884d 100644
--- a/sound/soc/codecs/twl4030.c
+++ b/sound/soc/codecs/twl4030.c
@@ -137,8 +137,6 @@ static const u8 twl4030_reg[TWL4030_CACHEREGNUM] = {
 
 /* codec private data */
 struct twl4030_priv {
-	struct snd_soc_codec codec;
-
 	unsigned int codec_powered;
 
 	/* reference counts of AIF/APLL users */
-- 
1.8.0

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

* [PATCH 3/3] ASoC: mc13783: Remove embedded snd_soc_codec structs from private data structs
  2013-08-06 11:39 [PATCH 1/3] ASoC: tlv320aic26: Fix keyclick feature Lars-Peter Clausen
  2013-08-06 11:39 ` [PATCH 2/3] ASoC: twl4030: Remove embedded snd_soc_codec structs from private data structs Lars-Peter Clausen
@ 2013-08-06 11:39 ` Lars-Peter Clausen
  2013-08-06 11:42   ` Mark Brown
  2013-08-06 11:42 ` [PATCH 1/3] ASoC: tlv320aic26: Fix keyclick feature Mark Brown
  2 siblings, 1 reply; 7+ messages in thread
From: Lars-Peter Clausen @ 2013-08-06 11:39 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Philippe Rétornaz, alsa-devel, Lars-Peter Clausen

It is unused and a leftover of the pre multi-component era.

Cc: Philippe Rétornaz <philippe.retornaz@epfl.ch>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/codecs/mc13783.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/soc/codecs/mc13783.c b/sound/soc/codecs/mc13783.c
index 5402dfb..4d3c8fd 100644
--- a/sound/soc/codecs/mc13783.c
+++ b/sound/soc/codecs/mc13783.c
@@ -94,7 +94,6 @@
 #define AUDIO_DAC_CFS_DLY_B		(1 << 10)
 
 struct mc13783_priv {
-	struct snd_soc_codec codec;
 	struct mc13xxx *mc13xxx;
 
 	enum mc13783_ssi_port adc_ssi_port;
-- 
1.8.0

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: [PATCH 1/3] ASoC: tlv320aic26: Fix keyclick feature
  2013-08-06 11:39 [PATCH 1/3] ASoC: tlv320aic26: Fix keyclick feature Lars-Peter Clausen
  2013-08-06 11:39 ` [PATCH 2/3] ASoC: twl4030: Remove embedded snd_soc_codec structs from private data structs Lars-Peter Clausen
  2013-08-06 11:39 ` [PATCH 3/3] ASoC: mc13783: " Lars-Peter Clausen
@ 2013-08-06 11:42 ` Mark Brown
  2 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2013-08-06 11:42 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: Grant Likely, alsa-devel, Liam Girdwood


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

On Tue, Aug 06, 2013 at 01:39:29PM +0200, Lars-Peter Clausen wrote:
> The tlv320aic26 contains a embedded snd_soc_codec struct which is referenced in
> the keyclick code. That struct is never initialized though, replace the embedded
> struct with a pointer and use that in the keyclick code.

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 3/3] ASoC: mc13783: Remove embedded snd_soc_codec structs from private data structs
  2013-08-06 11:39 ` [PATCH 3/3] ASoC: mc13783: " Lars-Peter Clausen
@ 2013-08-06 11:42   ` Mark Brown
  0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2013-08-06 11:42 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: Philippe Rétornaz, alsa-devel, Liam Girdwood


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

On Tue, Aug 06, 2013 at 01:39:31PM +0200, Lars-Peter Clausen wrote:
> It is unused and a leftover of the pre multi-component era.

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/3] ASoC: twl4030: Remove embedded snd_soc_codec structs from private data structs
  2013-08-06 11:39 ` [PATCH 2/3] ASoC: twl4030: Remove embedded snd_soc_codec structs from private data structs Lars-Peter Clausen
@ 2013-08-06 13:20   ` Peter Ujfalusi
  2013-08-06 16:42   ` Mark Brown
  1 sibling, 0 replies; 7+ messages in thread
From: Peter Ujfalusi @ 2013-08-06 13:20 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: alsa-devel, Mark Brown, Liam Girdwood

On 08/06/2013 02:39 PM, Lars-Peter Clausen wrote:
> It is unused and a leftover of the pre multi-component era.
> 
> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>

Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

> ---
>  sound/soc/codecs/twl4030.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
> index 8e6e5b0..1e3884d 100644
> --- a/sound/soc/codecs/twl4030.c
> +++ b/sound/soc/codecs/twl4030.c
> @@ -137,8 +137,6 @@ static const u8 twl4030_reg[TWL4030_CACHEREGNUM] = {
>  
>  /* codec private data */
>  struct twl4030_priv {
> -	struct snd_soc_codec codec;
> -
>  	unsigned int codec_powered;
>  
>  	/* reference counts of AIF/APLL users */
> 


-- 
Péter

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

* Re: [PATCH 2/3] ASoC: twl4030: Remove embedded snd_soc_codec structs from private data structs
  2013-08-06 11:39 ` [PATCH 2/3] ASoC: twl4030: Remove embedded snd_soc_codec structs from private data structs Lars-Peter Clausen
  2013-08-06 13:20   ` Peter Ujfalusi
@ 2013-08-06 16:42   ` Mark Brown
  1 sibling, 0 replies; 7+ messages in thread
From: Mark Brown @ 2013-08-06 16:42 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: Peter Ujfalusi, alsa-devel, Liam Girdwood


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

On Tue, Aug 06, 2013 at 01:39:30PM +0200, Lars-Peter Clausen wrote:
> It is unused and a leftover of the pre multi-component era.

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

end of thread, other threads:[~2013-08-06 16:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-06 11:39 [PATCH 1/3] ASoC: tlv320aic26: Fix keyclick feature Lars-Peter Clausen
2013-08-06 11:39 ` [PATCH 2/3] ASoC: twl4030: Remove embedded snd_soc_codec structs from private data structs Lars-Peter Clausen
2013-08-06 13:20   ` Peter Ujfalusi
2013-08-06 16:42   ` Mark Brown
2013-08-06 11:39 ` [PATCH 3/3] ASoC: mc13783: " Lars-Peter Clausen
2013-08-06 11:42   ` Mark Brown
2013-08-06 11:42 ` [PATCH 1/3] ASoC: tlv320aic26: Fix keyclick feature Mark Brown

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.