Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: cs42l51: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
@ 2014-11-20 20:05 Lars-Peter Clausen
  2014-11-20 20:05 ` [PATCH 2/2] ASoC: cs42l73: " Lars-Peter Clausen
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Lars-Peter Clausen @ 2014-11-20 20:05 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Brian Austin, Lars-Peter Clausen, alsa-devel, Paul Handrigan

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/cs42l51.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/cs42l51.c b/sound/soc/codecs/cs42l51.c
index 669c38f..b395152 100644
--- a/sound/soc/codecs/cs42l51.c
+++ b/sound/soc/codecs/cs42l51.c
@@ -153,15 +153,17 @@ static const struct snd_kcontrol_new cs42l51_snd_controls[] = {
 static int cs42l51_pdn_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);
+
 	switch (event) {
 	case SND_SOC_DAPM_PRE_PMD:
-		snd_soc_update_bits(w->codec, CS42L51_POWER_CTL1,
+		snd_soc_update_bits(codec, CS42L51_POWER_CTL1,
 				    CS42L51_POWER_CTL1_PDN,
 				    CS42L51_POWER_CTL1_PDN);
 		break;
 	default:
 	case SND_SOC_DAPM_POST_PMD:
-		snd_soc_update_bits(w->codec, CS42L51_POWER_CTL1,
+		snd_soc_update_bits(codec, CS42L51_POWER_CTL1,
 				    CS42L51_POWER_CTL1_PDN, 0);
 		break;
 	}
-- 
1.8.0

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

* [PATCH 2/2] ASoC: cs42l73: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2014-11-20 20:05 [PATCH 1/2] ASoC: cs42l51: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
@ 2014-11-20 20:05 ` Lars-Peter Clausen
  2014-11-21 18:21   ` Mark Brown
  2014-11-21  1:38 ` [PATCH 1/2] ASoC: cs42l51: " Austin, Brian
  2014-11-21 18:20 ` Mark Brown
  2 siblings, 1 reply; 5+ messages in thread
From: Lars-Peter Clausen @ 2014-11-20 20:05 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Brian Austin, Lars-Peter Clausen, alsa-devel, Paul Handrigan

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/cs42l73.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c
index 2f8b946..7c55537 100644
--- a/sound/soc/codecs/cs42l73.c
+++ b/sound/soc/codecs/cs42l73.c
@@ -584,7 +584,7 @@ static const struct snd_kcontrol_new cs42l73_snd_controls[] = {
 static int cs42l73_spklo_spk_amp_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);
 	struct cs42l73_private *priv = snd_soc_codec_get_drvdata(codec);
 	switch (event) {
 	case SND_SOC_DAPM_POST_PMD:
@@ -600,7 +600,7 @@ static int cs42l73_spklo_spk_amp_event(struct snd_soc_dapm_widget *w,
 static int cs42l73_ear_amp_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);
 	struct cs42l73_private *priv = snd_soc_codec_get_drvdata(codec);
 	switch (event) {
 	case SND_SOC_DAPM_POST_PMD:
@@ -618,7 +618,7 @@ static int cs42l73_ear_amp_event(struct snd_soc_dapm_widget *w,
 static int cs42l73_hp_amp_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);
 	struct cs42l73_private *priv = snd_soc_codec_get_drvdata(codec);
 	switch (event) {
 	case SND_SOC_DAPM_POST_PMD:
-- 
1.8.0

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

* Re: [PATCH 1/2] ASoC: cs42l51: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2014-11-20 20:05 [PATCH 1/2] ASoC: cs42l51: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
  2014-11-20 20:05 ` [PATCH 2/2] ASoC: cs42l73: " Lars-Peter Clausen
@ 2014-11-21  1:38 ` Austin, Brian
  2014-11-21 18:20 ` Mark Brown
  2 siblings, 0 replies; 5+ messages in thread
From: Austin, Brian @ 2014-11-21  1:38 UTC (permalink / raw)
  To: Lars-Peter Clausen
  Cc: alsa-devel@alsa-project.org, Mark Brown, Liam Girdwood,
	Handrigan, Paul


> On Nov 21, 2014, at 05:05, Lars-Peter Clausen <lars@metafoo.de> 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>
> ---
For both
Acked-by: Brian Austin <brian.austin@cirrus.com>

Thanks 

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

* Re: [PATCH 1/2] ASoC: cs42l51: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2014-11-20 20:05 [PATCH 1/2] ASoC: cs42l51: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
  2014-11-20 20:05 ` [PATCH 2/2] ASoC: cs42l73: " Lars-Peter Clausen
  2014-11-21  1:38 ` [PATCH 1/2] ASoC: cs42l51: " Austin, Brian
@ 2014-11-21 18:20 ` Mark Brown
  2 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2014-11-21 18:20 UTC (permalink / raw)
  To: Lars-Peter Clausen
  Cc: Brian Austin, alsa-devel, Liam Girdwood, Paul Handrigan


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

On Thu, Nov 20, 2014 at 09:05:38PM +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, 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] 5+ messages in thread

* Re: [PATCH 2/2] ASoC: cs42l73: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2014-11-20 20:05 ` [PATCH 2/2] ASoC: cs42l73: " Lars-Peter Clausen
@ 2014-11-21 18:21   ` Mark Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2014-11-21 18:21 UTC (permalink / raw)
  To: Lars-Peter Clausen
  Cc: Brian Austin, alsa-devel, Liam Girdwood, Paul Handrigan


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

On Thu, Nov 20, 2014 at 09:05:39PM +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, 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] 5+ messages in thread

end of thread, other threads:[~2014-11-21 18:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-20 20:05 [PATCH 1/2] ASoC: cs42l51: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
2014-11-20 20:05 ` [PATCH 2/2] ASoC: cs42l73: " Lars-Peter Clausen
2014-11-21 18:21   ` Mark Brown
2014-11-21  1:38 ` [PATCH 1/2] ASoC: cs42l51: " Austin, Brian
2014-11-21 18:20 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox