All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] ASoC: 88pm860x: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
@ 2015-01-10 14:44 Lars-Peter Clausen
  2015-01-10 14:44 ` [PATCH 2/5] ASoC: ak4671: " Lars-Peter Clausen
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Lars-Peter Clausen @ 2015-01-10 14:44 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Fabio Estevam, Vinod Koul, alsa-devel, Lars-Peter Clausen,
	Support Opensource

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/codecs/88pm860x-codec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/88pm860x-codec.c b/sound/soc/codecs/88pm860x-codec.c
index a2bf27f..a0f2653 100644
--- a/sound/soc/codecs/88pm860x-codec.c
+++ b/sound/soc/codecs/88pm860x-codec.c
@@ -386,7 +386,7 @@ static int snd_soc_put_volsw_2r_out(struct snd_kcontrol *kcontrol,
 static int pm860x_rsync_event(struct snd_soc_dapm_widget *w,
 			      struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 
 	/*
 	 * In order to avoid current on the load, mute power-on and power-off
@@ -403,7 +403,7 @@ static int pm860x_rsync_event(struct snd_soc_dapm_widget *w,
 static int pm860x_dac_event(struct snd_soc_dapm_widget *w,
 			    struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	unsigned int dac = 0;
 	int data;
 
-- 
1.8.0

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

* [PATCH 2/5] ASoC: ak4671: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-10 14:44 [PATCH 1/5] ASoC: 88pm860x: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
@ 2015-01-10 14:44 ` Lars-Peter Clausen
  2015-01-10 14:44 ` [PATCH 3/5] ASoC: da732x: " Lars-Peter Clausen
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Lars-Peter Clausen @ 2015-01-10 14:44 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Fabio Estevam, Vinod Koul, alsa-devel, Lars-Peter Clausen,
	Support Opensource

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

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

diff --git a/sound/soc/codecs/ak4671.c b/sound/soc/codecs/ak4671.c
index 686cacb..632e89f 100644
--- a/sound/soc/codecs/ak4671.c
+++ b/sound/soc/codecs/ak4671.c
@@ -163,7 +163,7 @@ static const struct snd_kcontrol_new ak4671_snd_controls[] = {
 static int ak4671_out2_event(struct snd_soc_dapm_widget *w,
 		struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 
 	switch (event) {
 	case SND_SOC_DAPM_POST_PMU:
-- 
1.8.0

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

* [PATCH 3/5] ASoC: da732x: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-10 14:44 [PATCH 1/5] ASoC: 88pm860x: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
  2015-01-10 14:44 ` [PATCH 2/5] ASoC: ak4671: " Lars-Peter Clausen
@ 2015-01-10 14:44 ` Lars-Peter Clausen
  2015-01-13 15:39   ` Opensource [Adam Thomson]
  2015-01-10 14:44 ` [PATCH 4/5] ASoC: sgtl5000: " Lars-Peter Clausen
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 8+ messages in thread
From: Lars-Peter Clausen @ 2015-01-10 14:44 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Fabio Estevam, Vinod Koul, alsa-devel, Lars-Peter Clausen,
	Support Opensource

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/codecs/da732x.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/da732x.c b/sound/soc/codecs/da732x.c
index 61b2f9a..ffe9617 100644
--- a/sound/soc/codecs/da732x.c
+++ b/sound/soc/codecs/da732x.c
@@ -609,7 +609,7 @@ static const struct snd_kcontrol_new da732x_snd_controls[] = {
 static int da732x_adc_event(struct snd_soc_dapm_widget *w,
 			    struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 
 	switch (event) {
 	case SND_SOC_DAPM_POST_PMU:
@@ -663,7 +663,7 @@ static int da732x_adc_event(struct snd_soc_dapm_widget *w,
 static int da732x_out_pga_event(struct snd_soc_dapm_widget *w,
 				struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 
 	switch (event) {
 	case SND_SOC_DAPM_POST_PMU:
-- 
1.8.0

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

* [PATCH 4/5] ASoC: sgtl5000: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-10 14:44 [PATCH 1/5] ASoC: 88pm860x: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
  2015-01-10 14:44 ` [PATCH 2/5] ASoC: ak4671: " Lars-Peter Clausen
  2015-01-10 14:44 ` [PATCH 3/5] ASoC: da732x: " Lars-Peter Clausen
@ 2015-01-10 14:44 ` Lars-Peter Clausen
  2015-01-10 14:44 ` [PATCH 5/5] ASoC: sn95031: " Lars-Peter Clausen
  2015-01-14 19:51 ` [PATCH 1/5] ASoC: 88pm860x: " Mark Brown
  4 siblings, 0 replies; 8+ messages in thread
From: Lars-Peter Clausen @ 2015-01-10 14:44 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Fabio Estevam, Vinod Koul, alsa-devel, Lars-Peter Clausen,
	Support Opensource

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/codecs/sgtl5000.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index 29cf7ce..6d6ba3a 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -155,18 +155,19 @@ struct sgtl5000_priv {
 static int mic_bias_event(struct snd_soc_dapm_widget *w,
 	struct snd_kcontrol *kcontrol, int event)
 {
-	struct sgtl5000_priv *sgtl5000 = snd_soc_codec_get_drvdata(w->codec);
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
+	struct sgtl5000_priv *sgtl5000 = snd_soc_codec_get_drvdata(codec);
 
 	switch (event) {
 	case SND_SOC_DAPM_POST_PMU:
 		/* change mic bias resistor */
-		snd_soc_update_bits(w->codec, SGTL5000_CHIP_MIC_CTRL,
+		snd_soc_update_bits(codec, SGTL5000_CHIP_MIC_CTRL,
 			SGTL5000_BIAS_R_MASK,
 			sgtl5000->micbias_resistor << SGTL5000_BIAS_R_SHIFT);
 		break;
 
 	case SND_SOC_DAPM_PRE_PMD:
-		snd_soc_update_bits(w->codec, SGTL5000_CHIP_MIC_CTRL,
+		snd_soc_update_bits(codec, SGTL5000_CHIP_MIC_CTRL,
 				SGTL5000_BIAS_R_MASK, 0);
 		break;
 	}
@@ -181,11 +182,12 @@ static int mic_bias_event(struct snd_soc_dapm_widget *w,
 static int power_vag_event(struct snd_soc_dapm_widget *w,
 	struct snd_kcontrol *kcontrol, int event)
 {
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	const u32 mask = SGTL5000_DAC_POWERUP | SGTL5000_ADC_POWERUP;
 
 	switch (event) {
 	case SND_SOC_DAPM_POST_PMU:
-		snd_soc_update_bits(w->codec, SGTL5000_CHIP_ANA_POWER,
+		snd_soc_update_bits(codec, SGTL5000_CHIP_ANA_POWER,
 			SGTL5000_VAG_POWERUP, SGTL5000_VAG_POWERUP);
 		break;
 
@@ -195,9 +197,9 @@ static int power_vag_event(struct snd_soc_dapm_widget *w,
 		 * operational to prevent inadvertently starving the
 		 * other one of them.
 		 */
-		if ((snd_soc_read(w->codec, SGTL5000_CHIP_ANA_POWER) &
+		if ((snd_soc_read(codec, SGTL5000_CHIP_ANA_POWER) &
 				mask) != mask) {
-			snd_soc_update_bits(w->codec, SGTL5000_CHIP_ANA_POWER,
+			snd_soc_update_bits(codec, SGTL5000_CHIP_ANA_POWER,
 				SGTL5000_VAG_POWERUP, 0);
 			msleep(400);
 		}
-- 
1.8.0

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

* [PATCH 5/5] ASoC: sn95031: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-10 14:44 [PATCH 1/5] ASoC: 88pm860x: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
                   ` (2 preceding siblings ...)
  2015-01-10 14:44 ` [PATCH 4/5] ASoC: sgtl5000: " Lars-Peter Clausen
@ 2015-01-10 14:44 ` Lars-Peter Clausen
  2015-01-13 15:14   ` Vinod Koul
  2015-01-14 19:51 ` [PATCH 1/5] ASoC: 88pm860x: " Mark Brown
  4 siblings, 1 reply; 8+ messages in thread
From: Lars-Peter Clausen @ 2015-01-10 14:44 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Fabio Estevam, Vinod Koul, alsa-devel, Lars-Peter Clausen,
	Support Opensource

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/codecs/sn95031.c | 33 ++++++++++++++++++++-------------
 1 file changed, 20 insertions(+), 13 deletions(-)

diff --git a/sound/soc/codecs/sn95031.c b/sound/soc/codecs/sn95031.c
index 1f451a1..47b257e 100644
--- a/sound/soc/codecs/sn95031.c
+++ b/sound/soc/codecs/sn95031.c
@@ -233,16 +233,18 @@ static int sn95031_set_vaud_bias(struct snd_soc_codec *codec,
 static int sn95031_vhs_event(struct snd_soc_dapm_widget *w,
 		    struct snd_kcontrol *kcontrol, int event)
 {
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
+
 	if (SND_SOC_DAPM_EVENT_ON(event)) {
 		pr_debug("VHS SND_SOC_DAPM_EVENT_ON doing rail startup now\n");
 		/* power up the rail */
-		snd_soc_write(w->codec, SN95031_VHSP, 0x3D);
-		snd_soc_write(w->codec, SN95031_VHSN, 0x3F);
+		snd_soc_write(codec, SN95031_VHSP, 0x3D);
+		snd_soc_write(codec, SN95031_VHSN, 0x3F);
 		msleep(1);
 	} else if (SND_SOC_DAPM_EVENT_OFF(event)) {
 		pr_debug("VHS SND_SOC_DAPM_EVENT_OFF doing rail shutdown\n");
-		snd_soc_write(w->codec, SN95031_VHSP, 0xC4);
-		snd_soc_write(w->codec, SN95031_VHSN, 0x04);
+		snd_soc_write(codec, SN95031_VHSP, 0xC4);
+		snd_soc_write(codec, SN95031_VHSN, 0x04);
 	}
 	return 0;
 }
@@ -250,14 +252,16 @@ static int sn95031_vhs_event(struct snd_soc_dapm_widget *w,
 static int sn95031_vihf_event(struct snd_soc_dapm_widget *w,
 		    struct snd_kcontrol *kcontrol, int event)
 {
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
+
 	if (SND_SOC_DAPM_EVENT_ON(event)) {
 		pr_debug("VIHF SND_SOC_DAPM_EVENT_ON doing rail startup now\n");
 		/* power up the rail */
-		snd_soc_write(w->codec, SN95031_VIHF, 0x27);
+		snd_soc_write(codec, SN95031_VIHF, 0x27);
 		msleep(1);
 	} else if (SND_SOC_DAPM_EVENT_OFF(event)) {
 		pr_debug("VIHF SND_SOC_DAPM_EVENT_OFF doing rail shutdown\n");
-		snd_soc_write(w->codec, SN95031_VIHF, 0x24);
+		snd_soc_write(codec, SN95031_VIHF, 0x24);
 	}
 	return 0;
 }
@@ -265,6 +269,7 @@ static int sn95031_vihf_event(struct snd_soc_dapm_widget *w,
 static int sn95031_dmic12_event(struct snd_soc_dapm_widget *w,
 			struct snd_kcontrol *k, int event)
 {
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	unsigned int ldo = 0, clk_dir = 0, data_dir = 0;
 
 	if (SND_SOC_DAPM_EVENT_ON(event)) {
@@ -273,15 +278,16 @@ static int sn95031_dmic12_event(struct snd_soc_dapm_widget *w,
 		data_dir = BIT(7);
 	}
 	/* program DMIC LDO, clock and set clock */
-	snd_soc_update_bits(w->codec, SN95031_MICBIAS, BIT(5)|BIT(4), ldo);
-	snd_soc_update_bits(w->codec, SN95031_DMICBUF0123, BIT(0), clk_dir);
-	snd_soc_update_bits(w->codec, SN95031_DMICBUF0123, BIT(7), data_dir);
+	snd_soc_update_bits(codec, SN95031_MICBIAS, BIT(5)|BIT(4), ldo);
+	snd_soc_update_bits(codec, SN95031_DMICBUF0123, BIT(0), clk_dir);
+	snd_soc_update_bits(codec, SN95031_DMICBUF0123, BIT(7), data_dir);
 	return 0;
 }
 
 static int sn95031_dmic34_event(struct snd_soc_dapm_widget *w,
 			struct snd_kcontrol *k, int event)
 {
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	unsigned int ldo = 0, clk_dir = 0, data_dir = 0;
 
 	if (SND_SOC_DAPM_EVENT_ON(event)) {
@@ -290,22 +296,23 @@ static int sn95031_dmic34_event(struct snd_soc_dapm_widget *w,
 		data_dir = BIT(1);
 	}
 	/* program DMIC LDO, clock and set clock */
-	snd_soc_update_bits(w->codec, SN95031_MICBIAS, BIT(5)|BIT(4), ldo);
-	snd_soc_update_bits(w->codec, SN95031_DMICBUF0123, BIT(2), clk_dir);
-	snd_soc_update_bits(w->codec, SN95031_DMICBUF45, BIT(1), data_dir);
+	snd_soc_update_bits(codec, SN95031_MICBIAS, BIT(5)|BIT(4), ldo);
+	snd_soc_update_bits(codec, SN95031_DMICBUF0123, BIT(2), clk_dir);
+	snd_soc_update_bits(codec, SN95031_DMICBUF45, BIT(1), data_dir);
 	return 0;
 }
 
 static int sn95031_dmic56_event(struct snd_soc_dapm_widget *w,
 			struct snd_kcontrol *k, int event)
 {
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	unsigned int ldo = 0;
 
 	if (SND_SOC_DAPM_EVENT_ON(event))
 		ldo = BIT(7)|BIT(6);
 
 	/* program DMIC LDO */
-	snd_soc_update_bits(w->codec, SN95031_MICBIAS, BIT(7)|BIT(6), ldo);
+	snd_soc_update_bits(codec, SN95031_MICBIAS, BIT(7)|BIT(6), ldo);
 	return 0;
 }
 
-- 
1.8.0

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

* Re: [PATCH 5/5] ASoC: sn95031: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-10 14:44 ` [PATCH 5/5] ASoC: sn95031: " Lars-Peter Clausen
@ 2015-01-13 15:14   ` Vinod Koul
  0 siblings, 0 replies; 8+ messages in thread
From: Vinod Koul @ 2015-01-13 15:14 UTC (permalink / raw)
  To: Lars-Peter Clausen
  Cc: Fabio Estevam, alsa-devel, Mark Brown, Liam Girdwood, Support Opensource

On Sat, Jan 10, 2015 at 03:44:08PM +0100, Lars-Peter Clausen wrote:
> The codec field of the snd_soc_widget struct is eventually going to be
> removed, use snd_soc_dapm_to_codec(w->dapm) instead.
> 
Acked-by: Vinod Koul <vinod.koul@intel.com>

-- 
~Vinod

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

* Re: [PATCH 3/5] ASoC: da732x: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-10 14:44 ` [PATCH 3/5] ASoC: da732x: " Lars-Peter Clausen
@ 2015-01-13 15:39   ` Opensource [Adam Thomson]
  0 siblings, 0 replies; 8+ messages in thread
From: Opensource [Adam Thomson] @ 2015-01-13 15:39 UTC (permalink / raw)
  To: Lars-Peter Clausen, Mark Brown, Liam Girdwood
  Cc: Fabio Estevam, Vinod Koul, alsa-devel, Support Opensource

On January 10, 2015 14:44, Lars-Peter Clausen wrote:

> The codec field of the snd_soc_widget struct is eventually going to be
> removed, use snd_soc_dapm_to_codec(w->dapm) instead.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>

Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>

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

* Re: [PATCH 1/5] ASoC: 88pm860x: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-10 14:44 [PATCH 1/5] ASoC: 88pm860x: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
                   ` (3 preceding siblings ...)
  2015-01-10 14:44 ` [PATCH 5/5] ASoC: sn95031: " Lars-Peter Clausen
@ 2015-01-14 19:51 ` Mark Brown
  4 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2015-01-14 19:51 UTC (permalink / raw)
  To: Lars-Peter Clausen
  Cc: Fabio Estevam, Vinod Koul, alsa-devel, Liam Girdwood, Support Opensource


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

On Sat, Jan 10, 2015 at 03:44:04PM +0100, Lars-Peter Clausen wrote:
> The codec field of the snd_soc_widget struct is eventually going to be
> removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Applied all, thanks.

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

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



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

end of thread, other threads:[~2015-01-14 19:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-10 14:44 [PATCH 1/5] ASoC: 88pm860x: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
2015-01-10 14:44 ` [PATCH 2/5] ASoC: ak4671: " Lars-Peter Clausen
2015-01-10 14:44 ` [PATCH 3/5] ASoC: da732x: " Lars-Peter Clausen
2015-01-13 15:39   ` Opensource [Adam Thomson]
2015-01-10 14:44 ` [PATCH 4/5] ASoC: sgtl5000: " Lars-Peter Clausen
2015-01-10 14:44 ` [PATCH 5/5] ASoC: sn95031: " Lars-Peter Clausen
2015-01-13 15:14   ` Vinod Koul
2015-01-14 19:51 ` [PATCH 1/5] ASoC: 88pm860x: " 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.