From a6b3db2c837a2db359bf7f846346680883dbb032 Mon Sep 17 00:00:00 2001 From: Vaishali Thakkar Date: Thu, 8 Jan 2015 08:59:39 +0530 Subject: ASoC: wm5102: Use put_unaligned_be16 This patch introduces the use of function put_unaligned_be16. This is done using Coccinelle and semantic patch used is as follows: @a@ typedef u16, __be16, uint16_t; {u16,__be16,uint16_t} e16; identifier tmp; expression ptr; expression y,e; type T; @@ - tmp = cpu_to_be16(y); <+... when != tmp ( - memcpy(ptr, (T)&tmp, \(2\|sizeof(u16)\|sizeof(__be16)\|sizeof(uint16_t)\|sizeof(e16)\)); + put_unaligned_be16(y,ptr); | - memcpy(ptr, (T)&tmp, ...); + put_unaligned_be16(y,ptr); ) ...+> ? tmp = e @@ type T; identifier a.tmp; @@ - T tmp; ...when != tmp Signed-off-by: Vaishali Thakkar Acked-by: Charles Keepax -- Changes Since v2: Make the patch compatible for current code sound/soc/codecs/wm5102.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Signed-off-by: Mark Brown --- sound/soc/codecs/wm5102.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c index f439ae052128..7dbac8a98f6d 100644 --- a/sound/soc/codecs/wm5102.c +++ b/sound/soc/codecs/wm5102.c @@ -28,6 +28,7 @@ #include #include +#include #include "arizona.h" #include "wm5102.h" @@ -617,11 +618,10 @@ static int wm5102_out_comp_coeff_get(struct snd_kcontrol *kcontrol, { struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); struct arizona *arizona = dev_get_drvdata(codec->dev->parent); - uint16_t data; mutex_lock(&arizona->dac_comp_lock); - data = cpu_to_be16(arizona->dac_comp_coeff); - memcpy(ucontrol->value.bytes.data, &data, sizeof(data)); + put_unaligned_be16(arizona->dac_comp_coeff, + ucontrol->value.bytes.data); mutex_unlock(&arizona->dac_comp_lock); return 0; -- cgit v1.2.3 From 277880a356c10adcb43604f6ab9ec9b2d64db8b2 Mon Sep 17 00:00:00 2001 From: Oder Chiou Date: Thu, 8 Jan 2015 10:31:06 +0800 Subject: ASoC: rt5677: Add the MICBIAS VDD setting in the platform data The patch adds the MICBIAS VDD setting in the platform data. It can be set to 1V8 or 3V3 in the MICBIAS VDD. Signed-off-by: Oder Chiou Signed-off-by: Mark Brown --- sound/soc/codecs/rt5677.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sound') diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c index cf39fe6d0601..3b32c3ecbe05 100644 --- a/sound/soc/codecs/rt5677.c +++ b/sound/soc/codecs/rt5677.c @@ -4912,6 +4912,11 @@ static int rt5677_i2c_probe(struct i2c_client *i2c, RT5677_GPIO5_DIR_OUT); } + if (rt5677->pdata.micbias1_vdd_3v3) + regmap_update_bits(rt5677->regmap, RT5677_MICBIAS, + RT5677_MICBIAS1_CTRL_VDD_MASK, + RT5677_MICBIAS1_CTRL_VDD_3_3V); + rt5677_init_gpio(i2c); rt5677_init_irq(i2c); -- cgit v1.2.3 From e4b7e6a89955a27ccd608fce895b1b645c08deec Mon Sep 17 00:00:00 2001 From: Oder Chiou Date: Tue, 13 Jan 2015 11:13:14 +0800 Subject: ASoC: rt5677: Use the regmap functions instead of the snd_soc functions The patch uses the regmap functions instead of the snd_soc functions in some cases. Signed-off-by: Oder Chiou Signed-off-by: Mark Brown --- sound/soc/codecs/rt5677.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'sound') diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c index 3b32c3ecbe05..f6affba734c3 100644 --- a/sound/soc/codecs/rt5677.c +++ b/sound/soc/codecs/rt5677.c @@ -924,6 +924,8 @@ static int is_sys_clk_from_pll(struct snd_soc_dapm_widget *source, static int is_using_asrc(struct snd_soc_dapm_widget *source, struct snd_soc_dapm_widget *sink) { + struct snd_soc_codec *codec = source->codec; + struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); unsigned int reg, shift, val; if (source->reg == RT5677_ASRC_1) { @@ -990,7 +992,9 @@ static int is_using_asrc(struct snd_soc_dapm_widget *source, } } - val = (snd_soc_read(source->codec, reg) >> shift) & 0xf; + regmap_read(rt5677->regmap, reg, &val); + val = (val >> shift) & 0xf; + switch (val) { case 1 ... 6: return 1; @@ -4087,6 +4091,7 @@ static int rt5677_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask, unsigned int rx_mask, int slots, int slot_width) { struct snd_soc_codec *codec = dai->codec; + struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); unsigned int val = 0; if (rx_mask || tx_mask) @@ -4124,10 +4129,12 @@ static int rt5677_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask, switch (dai->id) { case RT5677_AIF1: - snd_soc_update_bits(codec, RT5677_TDM1_CTRL1, 0x1f00, val); + regmap_update_bits(rt5677->regmap, RT5677_TDM1_CTRL1, 0x1f00, + val); break; case RT5677_AIF2: - snd_soc_update_bits(codec, RT5677_TDM2_CTRL1, 0x1f00, val); + regmap_update_bits(rt5677->regmap, RT5677_TDM2_CTRL1, 0x1f00, + val); break; default: break; -- cgit v1.2.3 From 9913b9f549330e9b72945ec94cb9c7fe57d78cce Mon Sep 17 00:00:00 2001 From: Oder Chiou Date: Tue, 13 Jan 2015 11:13:15 +0800 Subject: ASoC: rt5677: Add the slot_width "25" support in the TDM mode Add the slot_width "25" support in the TDM mode for the Intel platform. Signed-off-by: Oder Chiou Signed-off-by: Mark Brown --- sound/soc/codecs/rt5677.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c index f6affba734c3..88de759fb7fc 100644 --- a/sound/soc/codecs/rt5677.c +++ b/sound/soc/codecs/rt5677.c @@ -4092,7 +4092,7 @@ static int rt5677_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask, { struct snd_soc_codec *codec = dai->codec; struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); - unsigned int val = 0; + unsigned int val = 0, slot_width_25 = 0; if (rx_mask || tx_mask) val |= (1 << 12); @@ -4116,6 +4116,8 @@ static int rt5677_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask, case 20: val |= (1 << 8); break; + case 25: + slot_width_25 = 0x8080; case 24: val |= (2 << 8); break; @@ -4131,10 +4133,14 @@ static int rt5677_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask, case RT5677_AIF1: regmap_update_bits(rt5677->regmap, RT5677_TDM1_CTRL1, 0x1f00, val); + regmap_update_bits(rt5677->regmap, RT5677_DIG_MISC, 0x8000, + slot_width_25); break; case RT5677_AIF2: regmap_update_bits(rt5677->regmap, RT5677_TDM2_CTRL1, 0x1f00, val); + regmap_update_bits(rt5677->regmap, RT5677_DIG_MISC, 0x80, + slot_width_25); break; default: break; -- cgit v1.2.3 From bbc8aa7371bbc3df2a6db08dec6815973f7a7982 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Sat, 10 Jan 2015 15:44:04 +0100 Subject: ASoC: 88pm860x: Replace w->codec snd_soc_dapm_to_codec(w->dapm) 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 Signed-off-by: Mark Brown --- sound/soc/codecs/88pm860x-codec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound') diff --git a/sound/soc/codecs/88pm860x-codec.c b/sound/soc/codecs/88pm860x-codec.c index a2bf27f4baab..a0f265327fdf 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; -- cgit v1.2.3 From 08ca560aa0a0aa634f3d946a9a713473d5d2cda4 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Sat, 10 Jan 2015 15:44:05 +0100 Subject: ASoC: ak4671: Replace w->codec snd_soc_dapm_to_codec(w->dapm) 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 Signed-off-by: Mark Brown --- sound/soc/codecs/ak4671.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/codecs/ak4671.c b/sound/soc/codecs/ak4671.c index 686cacb0e835..632e89f793a7 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: -- cgit v1.2.3 From 76f5537f4dd246b31ed85434144506f50b9cbb70 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Sat, 10 Jan 2015 15:44:06 +0100 Subject: ASoC: da732x: Replace w->codec snd_soc_dapm_to_codec(w->dapm) 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 Acked-by: Adam Thomson Signed-off-by: Mark Brown --- sound/soc/codecs/da732x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound') diff --git a/sound/soc/codecs/da732x.c b/sound/soc/codecs/da732x.c index 61b2f9a2eef1..ffe96175a8a5 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: -- cgit v1.2.3 From 73bffd17785488197b55c05c02f0d2d2798fce03 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Sat, 10 Jan 2015 15:44:07 +0100 Subject: ASoC: sgtl5000: Replace w->codec snd_soc_dapm_to_codec(w->dapm) 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 Signed-off-by: Mark Brown --- sound/soc/codecs/sgtl5000.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'sound') diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index 29cf7ce610f4..6d6ba3a1d25a 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); } -- cgit v1.2.3 From 278a202620131c1b83f2776d31b67a287c38df87 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Sat, 10 Jan 2015 15:44:08 +0100 Subject: ASoC: sn95031: Replace w->codec snd_soc_dapm_to_codec(w->dapm) 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 Acked-by: Vinod Koul Signed-off-by: Mark Brown --- sound/soc/codecs/sn95031.c | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) (limited to 'sound') diff --git a/sound/soc/codecs/sn95031.c b/sound/soc/codecs/sn95031.c index 1f451a1946eb..47b257e41809 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; } -- cgit v1.2.3 From 043123fd5b2efac325c796b51797946df2b6bfb0 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 13 Jan 2015 10:27:07 +0100 Subject: ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm) 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 Acked-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/arizona.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'sound') diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c index 9550d7433ad0..65977bc0db19 100644 --- a/sound/soc/codecs/arizona.c +++ b/sound/soc/codecs/arizona.c @@ -84,7 +84,7 @@ static int arizona_spk_ev(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 arizona *arizona = dev_get_drvdata(codec->dev->parent); struct arizona_priv *priv = snd_soc_codec_get_drvdata(codec); bool manual_ena = false; @@ -692,7 +692,8 @@ static void arizona_in_set_vu(struct snd_soc_codec *codec, int ena) int arizona_in_ev(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { - struct arizona_priv *priv = snd_soc_codec_get_drvdata(w->codec); + struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); + struct arizona_priv *priv = snd_soc_codec_get_drvdata(codec); unsigned int reg; if (w->shift % 2) @@ -705,25 +706,25 @@ int arizona_in_ev(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, priv->in_pending++; break; case SND_SOC_DAPM_POST_PMU: - snd_soc_update_bits(w->codec, reg, ARIZONA_IN1L_MUTE, 0); + snd_soc_update_bits(codec, reg, ARIZONA_IN1L_MUTE, 0); /* If this is the last input pending then allow VU */ priv->in_pending--; if (priv->in_pending == 0) { msleep(1); - arizona_in_set_vu(w->codec, 1); + arizona_in_set_vu(codec, 1); } break; case SND_SOC_DAPM_PRE_PMD: - snd_soc_update_bits(w->codec, reg, + snd_soc_update_bits(codec, reg, ARIZONA_IN1L_MUTE | ARIZONA_IN_VU, ARIZONA_IN1L_MUTE | ARIZONA_IN_VU); break; case SND_SOC_DAPM_POST_PMD: /* Disable volume updates if no inputs are enabled */ - reg = snd_soc_read(w->codec, ARIZONA_INPUT_ENABLES); + reg = snd_soc_read(codec, ARIZONA_INPUT_ENABLES); if (reg == 0) - arizona_in_set_vu(w->codec, 0); + arizona_in_set_vu(codec, 0); } return 0; @@ -760,7 +761,8 @@ int arizona_hp_ev(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { - struct arizona_priv *priv = snd_soc_codec_get_drvdata(w->codec); + struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); + struct arizona_priv *priv = snd_soc_codec_get_drvdata(codec); struct arizona *arizona = priv->arizona; unsigned int mask = 1 << w->shift; unsigned int val; -- cgit v1.2.3 From b96aef71e3bb1b4719325c94a95ddff20583417f Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 13 Jan 2015 10:27:08 +0100 Subject: ASoC: wm2000: Replace w->codec snd_soc_dapm_to_codec(w->dapm) 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 Acked-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/wm2000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm2000.c b/sound/soc/codecs/wm2000.c index 34ef65c52a7d..8d9de49a5052 100644 --- a/sound/soc/codecs/wm2000.c +++ b/sound/soc/codecs/wm2000.c @@ -683,7 +683,7 @@ static const struct snd_kcontrol_new wm2000_controls[] = { static int wm2000_anc_power_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 wm2000_priv *wm2000 = dev_get_drvdata(codec->dev); int ret; -- cgit v1.2.3 From 3196048ee6543e53d32b848660284a8d0ef09fbf Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 13 Jan 2015 10:27:09 +0100 Subject: ASoC: wm5102: Replace w->codec snd_soc_dapm_to_codec(w->dapm) 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 Acked-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/wm5100.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c index b80970dc2d2f..ea09db585aa1 100644 --- a/sound/soc/codecs/wm5100.c +++ b/sound/soc/codecs/wm5100.c @@ -775,7 +775,8 @@ static int wm5100_out_ev(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { - struct wm5100_priv *wm5100 = snd_soc_codec_get_drvdata(w->codec); + struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); + struct wm5100_priv *wm5100 = snd_soc_codec_get_drvdata(codec); switch (w->reg) { case WM5100_CHANNEL_ENABLES_1: @@ -839,7 +840,7 @@ static int wm5100_post_ev(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 wm5100_priv *wm5100 = snd_soc_codec_get_drvdata(codec); int ret; -- cgit v1.2.3 From 42b7a197915b14503a15247c34c619aa15a170b7 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 13 Jan 2015 10:27:10 +0100 Subject: ASoC: wm5102: Replace w->codec snd_soc_dapm_to_codec(w->dapm) 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 Acked-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/wm5102.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c index f439ae052128..f57235be8b0a 100644 --- a/sound/soc/codecs/wm5102.c +++ b/sound/soc/codecs/wm5102.c @@ -580,7 +580,7 @@ static const struct reg_default wm5102_sysclk_revb_patch[] = { static int wm5102_sysclk_ev(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 arizona *arizona = dev_get_drvdata(codec->dev->parent); struct regmap *regmap = arizona->regmap; const struct reg_default *patch = NULL; -- cgit v1.2.3 From cf53380c88c0193107113932975ef4adf518a58b Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 13 Jan 2015 10:27:11 +0100 Subject: ASoC: wm5110: Replace w->codec snd_soc_dapm_to_codec(w->dapm) 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 Acked-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/wm5110.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c index 4456b38a3ef5..7cb02e9d3b53 100644 --- a/sound/soc/codecs/wm5110.c +++ b/sound/soc/codecs/wm5110.c @@ -134,7 +134,7 @@ static const struct reg_default wm5110_sysclk_revd_patch[] = { static int wm5110_sysclk_ev(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 arizona *arizona = dev_get_drvdata(codec->dev->parent); struct regmap *regmap = arizona->regmap; const struct reg_default *patch = NULL; -- cgit v1.2.3 From 83f132c5e3c18db61965fe49c827bd7ec04e78c0 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 13 Jan 2015 10:27:12 +0100 Subject: ASoC: wm8350: Replace w->codec snd_soc_dapm_to_codec(w->dapm) 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 Acked-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/wm8350.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c index 574579b98872..c81a9eab3e3e 100644 --- a/sound/soc/codecs/wm8350.c +++ b/sound/soc/codecs/wm8350.c @@ -259,7 +259,7 @@ static void wm8350_pga_work(struct work_struct *work) static int 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); struct wm8350_data *wm8350_data = snd_soc_codec_get_drvdata(codec); struct wm8350_output *out; -- cgit v1.2.3 From a8c696f13ba79a6e60517d43110038a24862e286 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 13 Jan 2015 10:27:13 +0100 Subject: ASoC: wm8400: Replace w->codec snd_soc_dapm_to_codec(w->dapm) 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 Acked-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/wm8400.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm8400.c b/sound/soc/codecs/wm8400.c index 8ee446987aa9..b0d84e552fca 100644 --- a/sound/soc/codecs/wm8400.c +++ b/sound/soc/codecs/wm8400.c @@ -324,6 +324,7 @@ SOC_SINGLE("RIN34 Mute Switch", WM8400_RIGHT_LINE_INPUT_3_4_VOLUME, static int outmixer_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); struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value; u32 reg_shift = mc->shift; @@ -332,7 +333,7 @@ static int outmixer_event (struct snd_soc_dapm_widget *w, switch (reg_shift) { case WM8400_SPEAKER_MIXER | (WM8400_LDSPK << 8) : - reg = snd_soc_read(w->codec, WM8400_OUTPUT_MIXER1); + reg = snd_soc_read(codec, WM8400_OUTPUT_MIXER1); if (reg & WM8400_LDLO) { printk(KERN_WARNING "Cannot set as Output Mixer 1 LDLO Set\n"); @@ -340,7 +341,7 @@ static int outmixer_event (struct snd_soc_dapm_widget *w, } break; case WM8400_SPEAKER_MIXER | (WM8400_RDSPK << 8): - reg = snd_soc_read(w->codec, WM8400_OUTPUT_MIXER2); + reg = snd_soc_read(codec, WM8400_OUTPUT_MIXER2); if (reg & WM8400_RDRO) { printk(KERN_WARNING "Cannot set as Output Mixer 2 RDRO Set\n"); @@ -348,7 +349,7 @@ static int outmixer_event (struct snd_soc_dapm_widget *w, } break; case WM8400_OUTPUT_MIXER1 | (WM8400_LDLO << 8): - reg = snd_soc_read(w->codec, WM8400_SPEAKER_MIXER); + reg = snd_soc_read(codec, WM8400_SPEAKER_MIXER); if (reg & WM8400_LDSPK) { printk(KERN_WARNING "Cannot set as Speaker Mixer LDSPK Set\n"); @@ -356,7 +357,7 @@ static int outmixer_event (struct snd_soc_dapm_widget *w, } break; case WM8400_OUTPUT_MIXER2 | (WM8400_RDRO << 8): - reg = snd_soc_read(w->codec, WM8400_SPEAKER_MIXER); + reg = snd_soc_read(codec, WM8400_SPEAKER_MIXER); if (reg & WM8400_RDSPK) { printk(KERN_WARNING "Cannot set as Speaker Mixer RDSPK Set\n"); -- cgit v1.2.3 From d286b805e74a95390bc917b1b0ab508e27eda7d7 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 13 Jan 2015 10:27:14 +0100 Subject: ASoC: wm8731: Replace w->codec snd_soc_dapm_to_codec(w->dapm) 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 Acked-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/wm8731.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c index b9211b42f6e9..e129c81ad219 100644 --- a/sound/soc/codecs/wm8731.c +++ b/sound/soc/codecs/wm8731.c @@ -217,7 +217,8 @@ SND_SOC_DAPM_INPUT("LLINEIN"), static int wm8731_check_osc(struct snd_soc_dapm_widget *source, struct snd_soc_dapm_widget *sink) { - struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(source->codec); + struct snd_soc_codec *codec = snd_soc_dapm_to_codec(source->dapm); + struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); return wm8731->sysclk_type == WM8731_SYSCLK_XTAL; } -- cgit v1.2.3 From c3495aea5de1ad14e0ffdb8ade4d263afd73babb Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 13 Jan 2015 10:27:15 +0100 Subject: ASoC: wm8770: Replace w->codec snd_soc_dapm_to_codec(w->dapm) 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 Acked-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/wm8770.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm8770.c b/sound/soc/codecs/wm8770.c index 180e7a098726..53e977da2f86 100644 --- a/sound/soc/codecs/wm8770.c +++ b/sound/soc/codecs/wm8770.c @@ -308,9 +308,7 @@ static const struct snd_soc_dapm_route wm8770_intercon[] = { static int vout12supply_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { - struct snd_soc_codec *codec; - - codec = w->codec; + struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); switch (event) { case SND_SOC_DAPM_PRE_PMU: @@ -327,9 +325,7 @@ static int vout12supply_event(struct snd_soc_dapm_widget *w, static int vout34supply_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { - struct snd_soc_codec *codec; - - codec = w->codec; + struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); switch (event) { case SND_SOC_DAPM_PRE_PMU: -- cgit v1.2.3 From 2de4d649252bf9a0c6660eeb0a4615160a709b6f Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 13 Jan 2015 10:27:16 +0100 Subject: ASoC: wm8900: Replace w->codec snd_soc_dapm_to_codec(w->dapm) 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 Acked-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/wm8900.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm8900.c b/sound/soc/codecs/wm8900.c index 3a0d4b7d692f..2eb986c19b88 100644 --- a/sound/soc/codecs/wm8900.c +++ b/sound/soc/codecs/wm8900.c @@ -224,7 +224,7 @@ static void wm8900_reset(struct snd_soc_codec *codec) static int wm8900_hp_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); u16 hpctl1 = snd_soc_read(codec, WM8900_REG_HPCTL1); switch (event) { -- cgit v1.2.3 From 2ea7a3f354a91410d95d1dcf43df4ba46522e2c5 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 13 Jan 2015 10:27:17 +0100 Subject: ASoC: wm8903: Replace w->codec snd_soc_dapm_to_codec(w->dapm) 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 Acked-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/wm8903.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c index cc6b0ef98a34..dde462c082be 100644 --- a/sound/soc/codecs/wm8903.c +++ b/sound/soc/codecs/wm8903.c @@ -260,7 +260,7 @@ static int wm8903_cp_event(struct snd_soc_dapm_widget *w, static int wm8903_dcs_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 wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec); switch (event) { -- cgit v1.2.3 From 8f13bd4e6cfed02e107ab916e14cee5675933e5f Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 13 Jan 2015 10:27:18 +0100 Subject: ASoC: wm8904: Replace w->codec snd_soc_dapm_to_codec(w->dapm) 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 Acked-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/wm8904.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c index 4d2d2b1380d5..a0f8a6263660 100644 --- a/sound/soc/codecs/wm8904.c +++ b/sound/soc/codecs/wm8904.c @@ -673,7 +673,7 @@ static int cp_event(struct snd_soc_dapm_widget *w, static int sysclk_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 wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec); switch (event) { @@ -711,7 +711,7 @@ static int sysclk_event(struct snd_soc_dapm_widget *w, static int 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); struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec); int reg, val; int dcs_mask; -- cgit v1.2.3 From 11e5e79af8eb1ace533d49495f9da9e6f8718545 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 13 Jan 2015 10:27:19 +0100 Subject: ASoC: wm8955: Replace w->codec snd_soc_dapm_to_codec(w->dapm) 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 Acked-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/wm8955.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm8955.c b/sound/soc/codecs/wm8955.c index 1173f7fef5a7..1ab2d462afad 100644 --- a/sound/soc/codecs/wm8955.c +++ b/sound/soc/codecs/wm8955.c @@ -333,7 +333,7 @@ static int wm8955_configure_clocking(struct snd_soc_codec *codec) static int wm8955_sysclk(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); int ret = 0; /* Always disable the clocks - if we're doing reconfiguration this -- cgit v1.2.3 From 32a4b446c5ecebd7d92526364ea26ed73fafd0b8 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 13 Jan 2015 10:27:20 +0100 Subject: ASoC: wm8961: Replace w->codec snd_soc_dapm_to_codec(w->dapm) 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 Acked-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/wm8958-dsp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm8958-dsp2.c b/sound/soc/codecs/wm8958-dsp2.c index 3cbc82b33292..c799cca5abeb 100644 --- a/sound/soc/codecs/wm8958-dsp2.c +++ b/sound/soc/codecs/wm8958-dsp2.c @@ -418,7 +418,7 @@ static void wm8958_dsp_apply(struct snd_soc_codec *codec, int path, int start) int wm8958_aif_ev(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); int i; switch (event) { -- cgit v1.2.3 From 0e13064d91414bc49e98a916d9a4ded041404868 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 13 Jan 2015 10:27:21 +0100 Subject: ASoC: wm8961: Replace w->codec snd_soc_dapm_to_codec(w->dapm) 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 Acked-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/wm8961.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm8961.c b/sound/soc/codecs/wm8961.c index eeffd05384b4..95e2c1bfc809 100644 --- a/sound/soc/codecs/wm8961.c +++ b/sound/soc/codecs/wm8961.c @@ -194,7 +194,7 @@ static bool wm8961_readable(struct device *dev, unsigned int reg) static int wm8961_hp_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); u16 hp_reg = snd_soc_read(codec, WM8961_ANALOGUE_HP_0); u16 cp_reg = snd_soc_read(codec, WM8961_CHARGE_PUMP_1); u16 pwr_reg = snd_soc_read(codec, WM8961_PWR_MGMT_2); @@ -286,7 +286,7 @@ static int wm8961_hp_event(struct snd_soc_dapm_widget *w, static int wm8961_spk_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); u16 pwr_reg = snd_soc_read(codec, WM8961_PWR_MGMT_2); u16 spk_reg = snd_soc_read(codec, WM8961_CLASS_D_CONTROL_1); -- cgit v1.2.3 From 6374b19de61ce023878d485b990cece1f146a754 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 13 Jan 2015 10:27:22 +0100 Subject: ASoC: wm8962: Replace w->codec snd_soc_dapm_to_codec(w->dapm) 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 Acked-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/wm8962.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index d32d554f5b34..118b0034ba23 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c @@ -1866,7 +1866,7 @@ static int cp_event(struct snd_soc_dapm_widget *w, static int hp_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); int timeout; int reg; int expected = (WM8962_DCS_STARTUP_DONE_HP1L | @@ -1960,7 +1960,7 @@ static int hp_event(struct snd_soc_dapm_widget *w, static int 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); int reg; switch (w->shift) { @@ -1993,7 +1993,7 @@ static int out_pga_event(struct snd_soc_dapm_widget *w, static int dsp2_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 wm8962_priv *wm8962 = snd_soc_codec_get_drvdata(codec); switch (event) { -- cgit v1.2.3 From 8b39dd9f08a824f1d855f69a69855c962579619d Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 13 Jan 2015 10:27:23 +0100 Subject: ASoC: wm8988: Replace w->codec snd_soc_dapm_to_codec(w->dapm) 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 Acked-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/wm8988.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm8988.c b/sound/soc/codecs/wm8988.c index e418199155a8..baff2cc222a6 100644 --- a/sound/soc/codecs/wm8988.c +++ b/sound/soc/codecs/wm8988.c @@ -244,7 +244,7 @@ SOC_DOUBLE_R_TLV("Output 2 Playback Volume", WM8988_LOUT2V, WM8988_ROUT2V, static int wm8988_lrc_control(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); u16 adctl2 = snd_soc_read(codec, WM8988_ADCTL2); /* Use the DAC to gate LRC if active, otherwise use ADC */ -- cgit v1.2.3 From 68ca2f682e8b7ab9223f833877f29970e4e10003 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 13 Jan 2015 10:27:24 +0100 Subject: ASoC: wm8990: Replace w->codec snd_soc_dapm_to_codec(w->dapm) 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 Acked-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/wm8990.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c index 8a584229310a..c93bffcb3cfb 100644 --- a/sound/soc/codecs/wm8990.c +++ b/sound/soc/codecs/wm8990.c @@ -374,13 +374,14 @@ SOC_SINGLE("RIN34 Mute Switch", WM8990_RIGHT_LINE_INPUT_3_4_VOLUME, static int outmixer_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); u32 reg_shift = kcontrol->private_value & 0xfff; int ret = 0; u16 reg; switch (reg_shift) { case WM8990_SPEAKER_MIXER | (WM8990_LDSPK_BIT << 8) : - reg = snd_soc_read(w->codec, WM8990_OUTPUT_MIXER1); + reg = snd_soc_read(codec, WM8990_OUTPUT_MIXER1); if (reg & WM8990_LDLO) { printk(KERN_WARNING "Cannot set as Output Mixer 1 LDLO Set\n"); @@ -388,7 +389,7 @@ static int outmixer_event(struct snd_soc_dapm_widget *w, } break; case WM8990_SPEAKER_MIXER | (WM8990_RDSPK_BIT << 8): - reg = snd_soc_read(w->codec, WM8990_OUTPUT_MIXER2); + reg = snd_soc_read(codec, WM8990_OUTPUT_MIXER2); if (reg & WM8990_RDRO) { printk(KERN_WARNING "Cannot set as Output Mixer 2 RDRO Set\n"); @@ -396,7 +397,7 @@ static int outmixer_event(struct snd_soc_dapm_widget *w, } break; case WM8990_OUTPUT_MIXER1 | (WM8990_LDLO_BIT << 8): - reg = snd_soc_read(w->codec, WM8990_SPEAKER_MIXER); + reg = snd_soc_read(codec, WM8990_SPEAKER_MIXER); if (reg & WM8990_LDSPK) { printk(KERN_WARNING "Cannot set as Speaker Mixer LDSPK Set\n"); @@ -404,7 +405,7 @@ static int outmixer_event(struct snd_soc_dapm_widget *w, } break; case WM8990_OUTPUT_MIXER2 | (WM8990_RDRO_BIT << 8): - reg = snd_soc_read(w->codec, WM8990_SPEAKER_MIXER); + reg = snd_soc_read(codec, WM8990_SPEAKER_MIXER); if (reg & WM8990_RDSPK) { printk(KERN_WARNING "Cannot set as Speaker Mixer RDSPK Set\n"); -- cgit v1.2.3 From f3b4d68fc21cc536f4f6b4b539864e33eca00bc0 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 13 Jan 2015 10:27:25 +0100 Subject: ASoC: wm8991: Replace w->codec snd_soc_dapm_to_codec(w->dapm) 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 Acked-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/wm8991.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm8991.c b/sound/soc/codecs/wm8991.c index b0ac2c3e31b9..49df0dc607e6 100644 --- a/sound/soc/codecs/wm8991.c +++ b/sound/soc/codecs/wm8991.c @@ -382,13 +382,14 @@ static const struct snd_kcontrol_new wm8991_snd_controls[] = { static int outmixer_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); u32 reg_shift = kcontrol->private_value & 0xfff; int ret = 0; u16 reg; switch (reg_shift) { case WM8991_SPEAKER_MIXER | (WM8991_LDSPK_BIT << 8): - reg = snd_soc_read(w->codec, WM8991_OUTPUT_MIXER1); + reg = snd_soc_read(codec, WM8991_OUTPUT_MIXER1); if (reg & WM8991_LDLO) { printk(KERN_WARNING "Cannot set as Output Mixer 1 LDLO Set\n"); @@ -397,7 +398,7 @@ static int outmixer_event(struct snd_soc_dapm_widget *w, break; case WM8991_SPEAKER_MIXER | (WM8991_RDSPK_BIT << 8): - reg = snd_soc_read(w->codec, WM8991_OUTPUT_MIXER2); + reg = snd_soc_read(codec, WM8991_OUTPUT_MIXER2); if (reg & WM8991_RDRO) { printk(KERN_WARNING "Cannot set as Output Mixer 2 RDRO Set\n"); @@ -406,7 +407,7 @@ static int outmixer_event(struct snd_soc_dapm_widget *w, break; case WM8991_OUTPUT_MIXER1 | (WM8991_LDLO_BIT << 8): - reg = snd_soc_read(w->codec, WM8991_SPEAKER_MIXER); + reg = snd_soc_read(codec, WM8991_SPEAKER_MIXER); if (reg & WM8991_LDSPK) { printk(KERN_WARNING "Cannot set as Speaker Mixer LDSPK Set\n"); @@ -415,7 +416,7 @@ static int outmixer_event(struct snd_soc_dapm_widget *w, break; case WM8991_OUTPUT_MIXER2 | (WM8991_RDRO_BIT << 8): - reg = snd_soc_read(w->codec, WM8991_SPEAKER_MIXER); + reg = snd_soc_read(codec, WM8991_SPEAKER_MIXER); if (reg & WM8991_RDSPK) { printk(KERN_WARNING "Cannot set as Speaker Mixer RDSPK Set\n"); -- cgit v1.2.3 From 07276572e639793565333baac16de48e4c55ed7f Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 13 Jan 2015 10:27:26 +0100 Subject: ASoC: wm8993: Replace w->codec snd_soc_dapm_to_codec(w->dapm) 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 Acked-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/wm8993.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm8993.c b/sound/soc/codecs/wm8993.c index 53c6fe359496..2e70a270eb28 100644 --- a/sound/soc/codecs/wm8993.c +++ b/sound/soc/codecs/wm8993.c @@ -810,7 +810,7 @@ SOC_SINGLE_TLV("EQ5 Volume", WM8993_EQ6, 0, 24, 0, eq_tlv), static int clk_sys_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_PRE_PMU: -- cgit v1.2.3 From 12e3080c4fd849d7da139b536844fa3378188a58 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 13 Jan 2015 10:27:27 +0100 Subject: ASoC: wm8995: Replace w->codec snd_soc_dapm_to_codec(w->dapm) 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 Acked-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/wm8994.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 1b97de2e4e67..4fbc7689339a 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c @@ -249,7 +249,8 @@ static int configure_clock(struct snd_soc_codec *codec) static int check_clk_sys(struct snd_soc_dapm_widget *source, struct snd_soc_dapm_widget *sink) { - int reg = snd_soc_read(source->codec, WM8994_CLOCKING_1); + struct snd_soc_codec *codec = snd_soc_dapm_to_codec(source->dapm); + int reg = snd_soc_read(codec, WM8994_CLOCKING_1); const char *clk; /* Check what we're currently using for CLK_SYS */ @@ -806,7 +807,7 @@ static void active_dereference(struct snd_soc_codec *codec) static int clk_sys_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 wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); switch (event) { @@ -981,7 +982,7 @@ static void vmid_dereference(struct snd_soc_codec *codec) static int vmid_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_PRE_PMU: @@ -1037,7 +1038,7 @@ static bool wm8994_check_class_w_digital(struct snd_soc_codec *codec) static int aif1clk_ev(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 wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); struct wm8994 *control = wm8994->wm8994; int mask = WM8994_AIF1DAC1L_ENA | WM8994_AIF1DAC1R_ENA; @@ -1135,7 +1136,7 @@ static int aif1clk_ev(struct snd_soc_dapm_widget *w, static int aif2clk_ev(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); int i; int dac; int adc; @@ -1220,7 +1221,7 @@ static int aif2clk_ev(struct snd_soc_dapm_widget *w, static int aif1clk_late_ev(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 wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); switch (event) { @@ -1238,7 +1239,7 @@ static int aif1clk_late_ev(struct snd_soc_dapm_widget *w, static int aif2clk_late_ev(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 wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); switch (event) { @@ -1256,7 +1257,7 @@ static int aif2clk_late_ev(struct snd_soc_dapm_widget *w, static int late_enable_ev(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 wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); switch (event) { @@ -1289,7 +1290,7 @@ static int late_enable_ev(struct snd_soc_dapm_widget *w, static int late_disable_ev(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 wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); switch (event) { @@ -1331,7 +1332,7 @@ static int micbias_ev(struct snd_soc_dapm_widget *w, static int dac_ev(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 mask = 1 << w->shift; snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, @@ -1372,7 +1373,7 @@ SOC_DAPM_SINGLE("DAC1 Switch", WM8994_SPEAKER_MIXER, 0, 1, 0), static int post_ev(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); dev_dbg(codec->dev, "SRC status: %x\n", snd_soc_read(codec, WM8994_RATE_STATUS)); -- cgit v1.2.3 From 9887adf1d00456f7988e8c425309181adac06a06 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 13 Jan 2015 10:27:28 +0100 Subject: ASoC: wm8995: Replace w->codec snd_soc_dapm_to_codec(w->dapm) 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 Acked-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/wm8995.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm8995.c b/sound/soc/codecs/wm8995.c index c280f0a3a424..79e1aead5131 100644 --- a/sound/soc/codecs/wm8995.c +++ b/sound/soc/codecs/wm8995.c @@ -534,10 +534,11 @@ static void wm8995_update_class_w(struct snd_soc_codec *codec) static int check_clk_sys(struct snd_soc_dapm_widget *source, struct snd_soc_dapm_widget *sink) { + struct snd_soc_codec *codec = snd_soc_dapm_to_codec(source->dapm); unsigned int reg; const char *clk; - reg = snd_soc_read(source->codec, WM8995_CLOCKING_1); + reg = snd_soc_read(codec, WM8995_CLOCKING_1); /* Check what we're currently using for CLK_SYS */ if (reg & WM8995_SYSCLK_SRC) clk = "AIF2CLK"; @@ -560,9 +561,7 @@ static int wm8995_put_class_w(struct snd_kcontrol *kcontrol, static int hp_supply_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { - struct snd_soc_codec *codec; - - codec = w->codec; + struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); switch (event) { case SND_SOC_DAPM_PRE_PMU: @@ -611,10 +610,9 @@ static void dc_servo_cmd(struct snd_soc_codec *codec, static int hp_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { - struct snd_soc_codec *codec; + struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); unsigned int reg; - codec = w->codec; reg = snd_soc_read(codec, WM8995_ANALOGUE_HP_1); switch (event) { @@ -761,9 +759,7 @@ static int configure_clock(struct snd_soc_codec *codec) static int clk_sys_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { - struct snd_soc_codec *codec; - - codec = w->codec; + struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); switch (event) { case SND_SOC_DAPM_PRE_PMU: -- cgit v1.2.3 From 00748490f7ada5117bb18a4ed5df6b9a9ab50881 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 13 Jan 2015 10:27:29 +0100 Subject: ASoC: wm8996: Replace w->codec snd_soc_dapm_to_codec(w->dapm) 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 Acked-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/wm8996.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c index b1dcc11c1b23..dc92d5e4e942 100644 --- a/sound/soc/codecs/wm8996.c +++ b/sound/soc/codecs/wm8996.c @@ -599,7 +599,7 @@ static void wm8996_bg_disable(struct snd_soc_codec *codec) static int bg_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); int ret = 0; switch (event) { @@ -634,7 +634,8 @@ static int cp_event(struct snd_soc_dapm_widget *w, static int rmv_short_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { - struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(w->codec); + struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); + struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec); /* Record which outputs we enabled */ switch (event) { @@ -758,7 +759,8 @@ static void wm8996_seq_notifier(struct snd_soc_dapm_context *dapm, static int dcs_start(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { - struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(w->codec); + struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); + struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec); switch (event) { case SND_SOC_DAPM_POST_PMU: -- cgit v1.2.3 From 8643707fb87a9801307d2c64b6a10a71a5294936 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 13 Jan 2015 10:27:30 +0100 Subject: ASoC: wm8997: Replace w->codec snd_soc_dapm_to_codec(w->dapm) 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 Acked-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/wm8997.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm8997.c b/sound/soc/codecs/wm8997.c index 7e8bfe27566b..0760ede0a6e5 100644 --- a/sound/soc/codecs/wm8997.c +++ b/sound/soc/codecs/wm8997.c @@ -84,7 +84,7 @@ static const struct reg_default wm8997_sysclk_reva_patch[] = { static int wm8997_sysclk_ev(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 arizona *arizona = dev_get_drvdata(codec->dev->parent); struct regmap *regmap = arizona->regmap; const struct reg_default *patch = NULL; -- cgit v1.2.3 From 8a8a84e6b9d83c03126e01e372c95f2d37ba5b80 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 13 Jan 2015 10:27:31 +0100 Subject: ASoC: wm9081: Replace w->codec snd_soc_dapm_to_codec(w->dapm) 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 Acked-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/wm9081.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c index b1d946facd57..13a3f335ea5b 100644 --- a/sound/soc/codecs/wm9081.c +++ b/sound/soc/codecs/wm9081.c @@ -734,7 +734,7 @@ static int configure_clock(struct snd_soc_codec *codec) static int clk_sys_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 wm9081_priv *wm9081 = snd_soc_codec_get_drvdata(codec); /* This should be done on init() for bypass paths */ -- cgit v1.2.3 From 0a3042d7835bb37d8a5ed318d1ec3bd66224eaf7 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 13 Jan 2015 10:27:32 +0100 Subject: ASoC: wm9090: Replace w->codec snd_soc_dapm_to_codec(w->dapm) 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 Acked-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/wm9090.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm9090.c b/sound/soc/codecs/wm9090.c index 6ffe8dc4f3fa..60d243c904f5 100644 --- a/sound/soc/codecs/wm9090.c +++ b/sound/soc/codecs/wm9090.c @@ -254,7 +254,7 @@ SOC_SINGLE_TLV("MIXOUTR IN2B Volume", WM9090_OUTPUT_MIXER4, 0, 3, 1, static int hp_ev(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 reg = snd_soc_read(codec, WM9090_ANALOGUE_HP_0); switch (event) { -- cgit v1.2.3 From ff70508a8a795111b4bcc5de540f6e8073a05f14 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 13 Jan 2015 10:27:33 +0100 Subject: ASoC: wm9713: Replace w->codec snd_soc_dapm_to_codec(w->dapm) 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 Acked-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/wm9713.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c index 71b9d5b0734d..e5807de796cd 100644 --- a/sound/soc/codecs/wm9713.c +++ b/sound/soc/codecs/wm9713.c @@ -217,7 +217,7 @@ SOC_SINGLE("3D Depth", AC97_REC_GAIN_MIC, 0, 15, 1), static int wm9713_voice_shutdown(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); u16 status, rate; if (WARN_ON(event != SND_SOC_DAPM_PRE_PMD)) -- cgit v1.2.3 From 72718517b46fea686d93483ff0f5d4fa05d4de2e Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 13 Jan 2015 10:27:34 +0100 Subject: ASoC: wm_adsp: Replace w->codec snd_soc_dapm_to_codec(w->dapm) The codec field of the snd_soc_widg