ASoC: cs42l52: Replace direct snd_soc_codec dapm field access
Subsystems (4)
PATCH 1/47 ASoC: cs42l52: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all other manual access to codec->dapm with snd_soc_codec_get_dapm().
---
Series depends on topic/dapm
--- sound/soc/codecs/cs42l52.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/cs42l52.c +2 -2
@@ -897,7 +897,7 @@ static int cs42l52_set_bias_level(struct snd_soc_codec *codec, CS42L52_PWRCTL1_PDN_CODEC, 0);break ;case SND_SOC_BIAS_STANDBY : -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) {regcache_cache_only (cs42l52->regmap, false);regcache_sync (cs42l52->regmap); }
@@ -955,7 +955,7 @@ static void cs42l52_beep_work(struct work_struct *work)struct cs42l52_private *cs42l52 = container_of(work, struct cs42l52_private, beep_work);struct snd_soc_codec *codec = cs42l52->codec; -struct snd_soc_dapm_context *dapm = &codec->dapm; +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec);int i;int val =0 ;int best =0 ;
Signature · 1 line
2.1.4
PATCH 2/47 ASoC: cs42l56: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all other manual access to codec->dapm with snd_soc_codec_get_dapm().
--- sound/soc/codecs/cs42l56.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/cs42l56.c +2 -2
@@ -953,7 +953,7 @@ static int cs42l56_set_bias_level(struct snd_soc_codec *codec, CS42L56_PDN_ALL_MASK, 0);break ;case SND_SOC_BIAS_STANDBY : -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) {regcache_cache_only (cs42l56->regmap, false);regcache_sync (cs42l56->regmap); ret = regulator_bulk_enable(ARRAY_SIZE(cs42l56->supplies),
@@ -1025,7 +1025,7 @@ static void cs42l56_beep_work(struct work_struct *work)struct cs42l56_private *cs42l56 = container_of(work, struct cs42l56_private, beep_work);struct snd_soc_codec *codec = cs42l56->codec; -struct snd_soc_dapm_context *dapm = &codec->dapm; +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec);int i;int val =0 ;int best =0 ;
Signature · 1 line
2.1.4
PATCH 3/47 ASoC: cs42l73: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level().
--- sound/soc/codecs/cs42l73.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/cs42l73.c +1 -1
@@ -1208,7 +1208,7 @@ static int cs42l73_set_bias_level(struct snd_soc_codec *codec,break ;case SND_SOC_BIAS_STANDBY : -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) {regcache_cache_only (cs42l73->regmap, false);regcache_sync (cs42l73->regmap); }
Signature · 1 line
2.1.4
Re: [PATCH 03/47] ASoC: cs42l73: Replace direct snd_soc_codec dapm field access
Quoted 5 lines · Lars-Peter Clausen
The dapm field of the
snd_soc_codecstruct is eventually going to be removed, in preparation for this replace all manual access tocodec->dapm.bias_levelwithsnd_soc_codec_get_bias_level().Signed-off-by Lars-Peter Clausen <[email protected]>
For the Cirrus Ones...
Thanks,
PATCH 4/47 ASoC: cs42xx8: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm with snd_soc_codec_get_dapm().
--- sound/soc/codecs/cs42xx8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/cs42xx8.c +1 -1
@@ -380,7 +380,7 @@ EXPORT_SYMBOL_GPL(cs42xx8_regmap_config);static int cs42xx8_codec_probe (struct snd_soc_codec *codec) {struct cs42xx8_priv *cs42xx8 =snd_soc_codec_get_drvdata (codec); -struct snd_soc_dapm_context *dapm = &codec->dapm; +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec);switch (cs42xx8->drvdata->num_adcs) {case 3 :
Signature · 1 line
2.1.4
PATCH 5/47 ASoC: arizona: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm with snd_soc_codec_get_dapm().
--- sound/soc/codecs/arizona.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-)
sound/soc/codecs/arizona.c +14 -13
@@ -208,11 +208,12 @@ static const struct snd_soc_dapm_widget arizona_spkr =int arizona_init_spk (struct snd_soc_codec *codec) { +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec);struct arizona_priv *priv =snd_soc_codec_get_drvdata (codec);struct arizona *arizona = priv->arizona;int ret; - ret =snd_soc_dapm_new_controls (&codec->dapm, &arizona_spkl,1 ); + ret =snd_soc_dapm_new_controls (dapm, &arizona_spkl,1 );if (ret !=0 )return ret;
@@ -220,8 +221,7 @@ int arizona_init_spk(struct snd_soc_codec *codec)case WM8997 :break ;default : - ret =snd_soc_dapm_new_controls (&codec->dapm, - &arizona_spkr,1 ); + ret =snd_soc_dapm_new_controls (dapm, &arizona_spkr,1 );if (ret !=0 )return ret;break ;
@@ -258,13 +258,14 @@ static const struct snd_soc_dapm_route arizona_mono_routes[] = {int arizona_init_mono (struct snd_soc_codec *codec) { +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec);struct arizona_priv *priv =snd_soc_codec_get_drvdata (codec);struct arizona *arizona = priv->arizona;int i;for (i =0 ; i <ARIZONA_MAX_OUTPUT ; ++i) {if (arizona->pdata.out_mono[i]) -snd_soc_dapm_add_routes (&codec->dapm, +snd_soc_dapm_add_routes (dapm, &arizona_mono_routes[i],1 ); }
@@ -274,6 +275,7 @@ EXPORT_SYMBOL_GPL(arizona_init_mono);int arizona_init_gpio (struct snd_soc_codec *codec) { +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec);struct arizona_priv *priv =snd_soc_codec_get_drvdata (codec);struct arizona *arizona = priv->arizona;int i;
@@ -281,23 +283,21 @@ int arizona_init_gpio(struct snd_soc_codec *codec)switch (arizona->type) {case WM5110 :case WM8280 : -snd_soc_dapm_disable_pin (&codec->dapm,"DRC2 Signal Activity" ); +snd_soc_dapm_disable_pin (dapm,"DRC2 Signal Activity" );break ;default :break ; } -snd_soc_dapm_disable_pin (&codec->dapm,"DRC1 Signal Activity" ); +snd_soc_dapm_disable_pin (dapm,"DRC1 Signal Activity" );for (i =0 ; i <ARRAY_SIZE (arizona->pdata.gpio_defaults); i++) {switch (arizona->pdata.gpio_defaults[i] &ARIZONA_GPN_FN_MASK ) {case ARIZONA_GP_FN_DRC1_SIGNAL_DETECT : -snd_soc_dapm_enable_pin (&codec->dapm, -"DRC1 Signal Activity" ); +snd_soc_dapm_enable_pin (dapm,"DRC1 Signal Activity" );break ;case ARIZONA_GP_FN_DRC2_SIGNAL_DETECT : -snd_soc_dapm_enable_pin (&codec->dapm, -"DRC2 Signal Activity" ); +snd_soc_dapm_enable_pin (dapm,"DRC2 Signal Activity" );break ;default :break ;
@@ -1474,6 +1474,7 @@ static int arizona_dai_set_sysclk(struct snd_soc_dai *dai, int clk_id, unsigned int freq, int dir) { struct snd_soc_codec *codec = dai->codec; +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec);struct arizona_priv *priv =snd_soc_codec_get_drvdata (codec);struct arizona_dai_priv *dai_priv = &priv->dai[dai->id -1 ];struct snd_soc_dapm_route routes[2 ];
@@ -1504,15 +1505,15 @@ static int arizona_dai_set_sysclk(struct snd_soc_dai *dai, routes[0 ].source =arizona_dai_clk_str (dai_priv->clk); routes[1 ].source =arizona_dai_clk_str (dai_priv->clk); -snd_soc_dapm_del_routes (&codec->dapm, routes,ARRAY_SIZE (routes)); +snd_soc_dapm_del_routes (dapm, routes,ARRAY_SIZE (routes)); routes[0 ].source =arizona_dai_clk_str (clk_id); routes[1 ].source =arizona_dai_clk_str (clk_id); -snd_soc_dapm_add_routes (&codec->dapm, routes,ARRAY_SIZE (routes)); +snd_soc_dapm_add_routes (dapm, routes,ARRAY_SIZE (routes)); dai_priv->clk = clk_id; -return snd_soc_dapm_sync (&codec->dapm); +return snd_soc_dapm_sync (dapm); }static int arizona_set_tristate (struct snd_soc_dai *dai,int tristate)
Signature · 1 line
2.1.4
PATCH 6/47 ASoC: wm0010: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level().
--- sound/soc/codecs/wm0010.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/wm0010.c +2 -2
@@ -751,13 +751,13 @@ static int wm0010_set_bias_level(struct snd_soc_codec *codec,switch (level) {case SND_SOC_BIAS_ON : -if (codec->dapm.bias_level ==SND_SOC_BIAS_PREPARE ) +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_PREPARE )wm0010_boot (codec);break ;case SND_SOC_BIAS_PREPARE :break ;case SND_SOC_BIAS_STANDBY : -if (codec->dapm.bias_level ==SND_SOC_BIAS_PREPARE ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_PREPARE ) {mutex_lock (&wm0010->lock);wm0010_halt (codec);mutex_unlock (&wm0010->lock);
Signature · 1 line
2.1.4
PATCH 7/47 ASoC: wm5100: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm with snd_soc_codec_get_dapm().
--- sound/soc/codecs/wm5100.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
sound/soc/codecs/wm5100.c +3 -3
@@ -2101,7 +2101,7 @@ static void wm5100_micd_irq(struct wm5100_priv *wm5100)int wm5100_detect (struct snd_soc_codec *codec,struct snd_soc_jack *jack) {struct wm5100_priv *wm5100 =snd_soc_codec_get_drvdata (codec); -struct snd_soc_dapm_context *dapm = &codec->dapm; +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec);if (jack) { wm5100->jack = jack;
@@ -2336,6 +2336,7 @@ static void wm5100_free_gpio(struct i2c_client *i2c)static int wm5100_probe (struct snd_soc_codec *codec) { +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec);struct i2c_client *i2c =to_i2c_client (codec->dev);struct wm5100_priv *wm5100 =snd_soc_codec_get_drvdata (codec);int ret, i;
@@ -2353,8 +2354,7 @@ static int wm5100_probe(struct snd_soc_codec *codec)/* TODO: check if we're symmetric */ if (i2c->irq) -snd_soc_dapm_new_controls (&codec->dapm, - wm5100_dapm_widgets_noirq, +snd_soc_dapm_new_controls (dapm, wm5100_dapm_widgets_noirq,ARRAY_SIZE (wm5100_dapm_widgets_noirq));if (wm5100->pdata.hp_pol) {
Signature · 1 line
2.1.4
PATCH 8/47 ASoC: wm5102: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm with snd_soc_codec_get_dapm().
--- sound/soc/codecs/wm5102.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
sound/soc/codecs/wm5102.c +3 -2
@@ -1827,6 +1827,7 @@ static struct snd_soc_dai_driver wm5102_dai[] = {static int wm5102_codec_probe (struct snd_soc_codec *codec) { +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec);struct wm5102_priv *priv =snd_soc_codec_get_drvdata (codec);int ret;
@@ -1837,9 +1838,9 @@ static int wm5102_codec_probe(struct snd_soc_codec *codec)arizona_init_spk (codec);arizona_init_gpio (codec); -snd_soc_dapm_disable_pin (&codec->dapm,"HAPTICS" ); +snd_soc_dapm_disable_pin (dapm,"HAPTICS" ); - priv->core.arizona->dapm = &codec->dapm; + priv->core.arizona->dapm = dapm;return 0 ; }
Signature · 1 line
2.1.4
PATCH 9/47 ASoC: wm5110: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm with snd_soc_codec_get_dapm().
While we are at it also remove the duplicated initialization of priv->core.arizona->dapm.
--- sound/soc/codecs/wm5110.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/wm5110.c +3 -4
@@ -1598,10 +1598,11 @@ static struct snd_soc_dai_driver wm5110_dai[] = {static int wm5110_codec_probe (struct snd_soc_codec *codec) { +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec);struct wm5110_priv *priv =snd_soc_codec_get_drvdata (codec);int ret; - priv->core.arizona->dapm = &codec->dapm; + priv->core.arizona->dapm = dapm;arizona_init_spk (codec);arizona_init_gpio (codec);
@@ -1611,9 +1612,7 @@ static int wm5110_codec_probe(struct snd_soc_codec *codec)if (ret !=0 )return ret; -snd_soc_dapm_disable_pin (&codec->dapm,"HAPTICS" ); - - priv->core.arizona->dapm = &codec->dapm; +snd_soc_dapm_disable_pin (dapm,"HAPTICS" );return 0 ; }
Signature · 1 line
2.1.4
PATCH 10/47 ASoC: wm8350: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level().
--- sound/soc/codecs/wm8350.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wm8350.c +1 -1
@@ -1102,7 +1102,7 @@ static int wm8350_set_bias_level(struct snd_soc_codec *codec,break ;case SND_SOC_BIAS_STANDBY : -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) { ret =regulator_bulk_enable (ARRAY_SIZE (priv->supplies), priv->supplies);if (ret !=0 )
Signature · 1 line
2.1.4
PATCH 11/47 ASoC: wm8400: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level().
--- sound/soc/codecs/wm8400.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wm8400.c +1 -1
@@ -1145,7 +1145,7 @@ static int wm8400_set_bias_level(struct snd_soc_codec *codec,break ;case SND_SOC_BIAS_STANDBY : -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) { ret =regulator_bulk_enable (ARRAY_SIZE (power), &power[0 ]);if (ret !=0 ) {
Signature · 1 line
2.1.4
PATCH 12/47 ASoC: wm8510: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level().
--- sound/soc/codecs/wm8510.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wm8510.c +1 -1
@@ -519,7 +519,7 @@ static int wm8510_set_bias_level(struct snd_soc_codec *codec,case SND_SOC_BIAS_STANDBY : power1 |=WM8510_POWER1_BIASEN |WM8510_POWER1_BUFIOEN ; -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) {regcache_sync (wm8510->regmap);/* Initial cap charge at VMID 5k */
Signature · 1 line
2.1.4
PATCH 13/47 ASoC: wm8523: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level().
--- sound/soc/codecs/wm8523.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wm8523.c +1 -1
@@ -308,7 +308,7 @@ static int wm8523_set_bias_level(struct snd_soc_codec *codec,break ;case SND_SOC_BIAS_STANDBY : -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) { ret =regulator_bulk_enable (ARRAY_SIZE (wm8523->supplies), wm8523->supplies);if (ret !=0 ) {
Signature · 1 line
2.1.4
PATCH 14/47 ASoC: wm8580: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level().
--- sound/soc/codecs/wm8580.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wm8580.c +1 -1
@@ -795,7 +795,7 @@ static int wm8580_set_bias_level(struct snd_soc_codec *codec,break ;case SND_SOC_BIAS_STANDBY : -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) {/* Power up and get individual control of the DACs */ snd_soc_update_bits(codec, WM8580_PWRDN1, WM8580_PWRDN1_PWDN |
Signature · 1 line
2.1.4
PATCH 15/47 ASoC: wm8711: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level().
--- sound/soc/codecs/wm8711.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wm8711.c +1 -1
@@ -310,7 +310,7 @@ static int wm8711_set_bias_level(struct snd_soc_codec *codec,case SND_SOC_BIAS_PREPARE :break ;case SND_SOC_BIAS_STANDBY : -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF )regcache_sync (wm8711->regmap);snd_soc_write (codec,WM8711_PWR , reg |0x0040 );
Signature · 1 line
2.1.4
PATCH 16/47 ASoC: wm8728: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level().
--- sound/soc/codecs/wm8728.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wm8728.c +1 -1
@@ -170,7 +170,7 @@ static int wm8728_set_bias_level(struct snd_soc_codec *codec,case SND_SOC_BIAS_ON :case SND_SOC_BIAS_PREPARE :case SND_SOC_BIAS_STANDBY : -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) {/* Power everything up... */ reg =snd_soc_read (codec,WM8728_DACCTL );snd_soc_write (codec,WM8728_DACCTL , reg & ~0x4 );
Signature · 1 line
2.1.4
PATCH 17/47 ASoC: wm8731: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all other manual access to codec->dapm with snd_soc_codec_get_dapm().
--- sound/soc/codecs/wm8731.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
sound/soc/codecs/wm8731.c +3 -2
@@ -387,6 +387,7 @@ static int wm8731_set_dai_sysclk(struct snd_soc_dai *codec_dai, int clk_id, unsigned int freq, int dir) { struct snd_soc_codec *codec = codec_dai->codec; +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec);struct wm8731_priv *wm8731 =snd_soc_codec_get_drvdata (codec);switch (clk_id) {
@@ -421,7 +422,7 @@ static int wm8731_set_dai_sysclk(struct snd_soc_dai *codec_dai, wm8731->sysclk = freq; -snd_soc_dapm_sync (&codec->dapm); +snd_soc_dapm_sync (dapm);return 0 ; }
@@ -501,7 +502,7 @@ static int wm8731_set_bias_level(struct snd_soc_codec *codec,case SND_SOC_BIAS_PREPARE :break ;case SND_SOC_BIAS_STANDBY : -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) { ret =regulator_bulk_enable (ARRAY_SIZE (wm8731->supplies), wm8731->supplies);if (ret !=0 )
Signature · 1 line
2.1.4
PATCH 18/47 ASoC: wm8737: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level().
--- sound/soc/codecs/wm8737.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wm8737.c +1 -1
@@ -469,7 +469,7 @@ static int wm8737_set_bias_level(struct snd_soc_codec *codec,break ;case SND_SOC_BIAS_STANDBY : -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) { ret =regulator_bulk_enable (ARRAY_SIZE (wm8737->supplies), wm8737->supplies);if (ret !=0 ) {
Signature · 1 line
2.1.4
PATCH 19/47 ASoC: wm8750: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level().
--- sound/soc/codecs/wm8750.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wm8750.c +1 -1
@@ -634,7 +634,7 @@ static int wm8750_set_bias_level(struct snd_soc_codec *codec,case SND_SOC_BIAS_PREPARE :break ;case SND_SOC_BIAS_STANDBY : -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) {snd_soc_cache_sync (codec);/* Set VMID to 5k */
Signature · 1 line
2.1.4
PATCH 20/47 ASoC: wm8753: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level().
--- sound/soc/codecs/wm8753.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wm8753.c +1 -1
@@ -1352,7 +1352,7 @@ static int wm8753_set_bias_level(struct snd_soc_codec *codec,flush_delayed_work (&wm8753->charge_work);break ;case SND_SOC_BIAS_STANDBY : -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) {/* set vmid to 5k for quick power up */ snd_soc_write (codec,WM8753_PWR1 , pwr_reg |0x01c1 ); schedule_delayed_work(&wm8753->charge_work,
Signature · 1 line
2.1.4
PATCH 21/47 ASoC: wm8770: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level().
--- sound/soc/codecs/wm8770.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wm8770.c +1 -1
@@ -510,7 +510,7 @@ static int wm8770_set_bias_level(struct snd_soc_codec *codec,case SND_SOC_BIAS_PREPARE :break ;case SND_SOC_BIAS_STANDBY : -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) { ret =regulator_bulk_enable (ARRAY_SIZE (wm8770->supplies), wm8770->supplies);if (ret) {
Signature · 1 line
2.1.4
PATCH 22/47 ASoC: wm8776: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level().
--- sound/soc/codecs/wm8776.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wm8776.c +1 -1
@@ -344,7 +344,7 @@ static int wm8776_set_bias_level(struct snd_soc_codec *codec,case SND_SOC_BIAS_PREPARE :break ;case SND_SOC_BIAS_STANDBY : -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) {regcache_sync (wm8776->regmap);/* Disable the global powerdown; DAPM does the rest */
Signature · 1 line
2.1.4
PATCH 23/47 ASoC: wm8804: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm with snd_soc_codec_get_dapm().
--- sound/soc/codecs/wm8804.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wm8804.c +1 -1
@@ -162,7 +162,7 @@ static int txsrc_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) {struct snd_soc_codec *codec =snd_soc_dapm_kcontrol_codec (kcontrol); -struct snd_soc_dapm_context *dapm = &codec->dapm; +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec);struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;unsigned int val = ucontrol->value.enumerated.item[0 ] << e->shift_l;unsigned int mask =1 << e->shift_l;
Signature · 1 line
2.1.4
PATCH 24/47 ASoC: wm8900: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level().
--- sound/soc/codecs/wm8900.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wm8900.c +1 -1
@@ -1049,7 +1049,7 @@ static int wm8900_set_bias_level(struct snd_soc_codec *codec,case SND_SOC_BIAS_STANDBY :/* Charge capacitors if initial power up */ -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) {/* STARTUP_BIAS_ENA on */ snd_soc_write (codec,WM8900_REG_POWER1 ,WM8900_REG_POWER1_STARTUP_BIAS_ENA );
Signature · 1 line
2.1.4
PATCH 25/47 ASoC: wm8903: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level().
--- sound/soc/codecs/wm8903.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wm8903.c +1 -1
@@ -1105,7 +1105,7 @@ static int wm8903_set_bias_level(struct snd_soc_codec *codec,break ;case SND_SOC_BIAS_STANDBY : -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) { snd_soc_update_bits(codec, WM8903_BIAS_CONTROL_0, WM8903_POBCTRL | WM8903_ISEL_MASK | WM8903_STARTUP_BIAS_ENA |
Signature · 1 line
2.1.4
PATCH 26/47 ASoC: wm8904: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all other manual access to codec->dapm with snd_soc_codec_get_dapm().
--- sound/soc/codecs/wm8904.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/wm8904.c +2 -2
@@ -1168,7 +1168,7 @@ static const struct snd_soc_dapm_route wm8912_intercon[] = {static int wm8904_add_widgets (struct snd_soc_codec *codec) {struct wm8904_priv *wm8904 =snd_soc_codec_get_drvdata (codec); -struct snd_soc_dapm_context *dapm = &codec->dapm; +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec);snd_soc_dapm_new_controls (dapm, wm8904_core_dapm_widgets,ARRAY_SIZE (wm8904_core_dapm_widgets));
@@ -1852,7 +1852,7 @@ static int wm8904_set_bias_level(struct snd_soc_codec *codec,break ;case SND_SOC_BIAS_STANDBY : -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) { ret =regulator_bulk_enable (ARRAY_SIZE (wm8904->supplies), wm8904->supplies);if (ret !=0 ) {
Signature · 1 line
2.1.4
PATCH 27/47 ASoC: wm8940: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level().
--- sound/soc/codecs/wm8940.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wm8940.c +1 -1
@@ -492,7 +492,7 @@ static int wm8940_set_bias_level(struct snd_soc_codec *codec, ret =snd_soc_write (codec,WM8940_POWER1 , pwr_reg |0x1 );break ;case SND_SOC_BIAS_STANDBY : -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) { ret =regcache_sync (wm8940->regmap);if (ret <0 ) {dev_err (codec->dev,"Failed to sync cache: %d\n" , ret);
Signature · 1 line
2.1.4
PATCH 28/47 ASoC: wm8955: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level().
--- sound/soc/codecs/wm8955.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wm8955.c +1 -1
@@ -785,7 +785,7 @@ static int wm8955_set_bias_level(struct snd_soc_codec *codec,break ;case SND_SOC_BIAS_STANDBY : -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) { ret =regulator_bulk_enable (ARRAY_SIZE (wm8955->supplies), wm8955->supplies);if (ret !=0 ) {
Signature · 1 line
2.1.4
PATCH 29/47 ASoC: wm8960: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all other manual access to codec->dapm with snd_soc_codec_get_dapm().
--- sound/soc/codecs/wm8960.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
sound/soc/codecs/wm8960.c +6 -6
@@ -445,7 +445,7 @@ static int wm8960_add_widgets(struct snd_soc_codec *codec) {struct wm8960_priv *wm8960 =snd_soc_codec_get_drvdata (codec);struct wm8960_data *pdata = &wm8960->pdata; -struct snd_soc_dapm_context *dapm = &codec->dapm; +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec);struct snd_soc_dapm_widget *w; snd_soc_dapm_new_controls(dapm, wm8960_dapm_widgets,
@@ -476,7 +476,7 @@ static int wm8960_add_widgets(struct snd_soc_codec *codec)* and save the result. */ list_for_each_entry (w, &codec->component.card->widgets, list) { -if (w->dapm != &codec->dapm) +if (w->dapm != dapm)continue ;if (strcmp (w->name,"LOUT1 PGA" ) ==0 ) wm8960->lout1 = w;
@@ -627,7 +627,7 @@ static int wm8960_set_bias_level_out3(struct snd_soc_codec *codec,break ;case SND_SOC_BIAS_PREPARE : -switch (codec->dapm.bias_level) { +switch (snd_soc_codec_get_bias_level (codec)) {case SND_SOC_BIAS_STANDBY :if (!IS_ERR (wm8960->mclk)) { ret =clk_prepare_enable (wm8960->mclk);
@@ -655,7 +655,7 @@ static int wm8960_set_bias_level_out3(struct snd_soc_codec *codec,break ;case SND_SOC_BIAS_STANDBY : -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) {regcache_sync (wm8960->regmap);/* Enable anti-pop features */
@@ -705,7 +705,7 @@ static int wm8960_set_bias_level_capless(struct snd_soc_codec *codec,break ;case SND_SOC_BIAS_PREPARE : -switch (codec->dapm.bias_level) { +switch (snd_soc_codec_get_bias_level (codec)) {case SND_SOC_BIAS_STANDBY :/* Enable anti pop mode */ snd_soc_update_bits(codec, WM8960_APOP1,
@@ -776,7 +776,7 @@ static int wm8960_set_bias_level_capless(struct snd_soc_codec *codec,break ;case SND_SOC_BIAS_STANDBY : -switch (codec->dapm.bias_level) { +switch (snd_soc_codec_get_bias_level (codec)) {case SND_SOC_BIAS_PREPARE :/* Disable HP discharge */ snd_soc_update_bits(codec, WM8960_APOP2,
Signature · 1 line
2.1.4
PATCH 30/47 ASoC: wm8961: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level().
--- sound/soc/codecs/wm8961.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/wm8961.c +2 -2
@@ -758,7 +758,7 @@ static int wm8961_set_bias_level(struct snd_soc_codec *codec,break ;case SND_SOC_BIAS_PREPARE : -if (codec->dapm.bias_level ==SND_SOC_BIAS_STANDBY ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_STANDBY ) {/* Enable bias generation */ reg =snd_soc_read (codec,WM8961_ANTI_POP ); reg |=WM8961_BUFIOEN |WM8961_BUFDCOPEN ;
@@ -773,7 +773,7 @@ static int wm8961_set_bias_level(struct snd_soc_codec *codec,break ;case SND_SOC_BIAS_STANDBY : -if (codec->dapm.bias_level ==SND_SOC_BIAS_PREPARE ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_PREPARE ) {/* VREF off */ reg =snd_soc_read (codec,WM8961_PWR_MGMT_1 ); reg &= ~WM8961_VREF ;
Signature · 1 line
2.1.4
PATCH 31/47 ASoC: wm8962: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all other manual access to codec->dapm with snd_soc_codec_get_dapm().
Also drop the unnecessary comparison in the set_bias_level() callback that checks if the device is already at the target level. The core already takes care of this and will not call the callback if the device is already at the target level.
--- sound/soc/codecs/wm8962.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-)
sound/soc/codecs/wm8962.c +9 -11
@@ -2361,7 +2361,7 @@ static int wm8962_add_widgets(struct snd_soc_codec *codec) {struct wm8962_priv *wm8962 =snd_soc_codec_get_drvdata (codec);struct wm8962_pdata *pdata = &wm8962->pdata; -struct snd_soc_dapm_context *dapm = &codec->dapm; +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec);snd_soc_add_codec_controls (codec, wm8962_snd_controls,ARRAY_SIZE (wm8962_snd_controls));
@@ -2446,13 +2446,13 @@ static void wm8962_configure_bclk(struct snd_soc_codec *codec)* So we here provisionally enable it and then disable it afterward * if current bias_level hasn't reached SND_SOC_BIAS_ON. */ -if (codec->dapm.bias_level !=SND_SOC_BIAS_ON ) +if (snd_soc_codec_get_bias_level (codec) !=SND_SOC_BIAS_ON )snd_soc_update_bits (codec,WM8962_CLOCKING2 ,WM8962_SYSCLK_ENA_MASK ,WM8962_SYSCLK_ENA ); dspclk =snd_soc_read (codec,WM8962_CLOCKING1 ); -if (codec->dapm.bias_level !=SND_SOC_BIAS_ON ) +if (snd_soc_codec_get_bias_level (codec) !=SND_SOC_BIAS_ON )snd_soc_update_bits (codec,WM8962_CLOCKING2 ,WM8962_SYSCLK_ENA_MASK ,0 );
@@ -2510,9 +2510,6 @@ static void wm8962_configure_bclk(struct snd_soc_codec *codec)static int wm8962_set_bias_level (struct snd_soc_codec *codec,enum snd_soc_bias_level level) { -if (level == codec->dapm.bias_level) -return 0 ; -switch (level) {case SND_SOC_BIAS_ON :break ;
@@ -2530,7 +2527,7 @@ static int wm8962_set_bias_level(struct snd_soc_codec *codec,snd_soc_update_bits (codec,WM8962_PWR_MGMT_1 ,WM8962_VMID_SEL_MASK ,0x100 ); -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF )msleep (100 );break ;
@@ -2613,7 +2610,7 @@ static int wm8962_hw_params(struct snd_pcm_substream *substream,dev_dbg (codec->dev,"hw_params set BCLK %dHz LRCLK %dHz\n" , wm8962->bclk, wm8962->lrclk); -if (codec->dapm.bias_level ==SND_SOC_BIAS_ON ) +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_ON )wm8962_configure_bclk (codec);return 0 ;
@@ -3117,7 +3114,7 @@ static irqreturn_t wm8962_irq(int irq, void *data)int wm8962_mic_detect (struct snd_soc_codec *codec,struct snd_soc_jack *jack) {struct wm8962_priv *wm8962 =snd_soc_codec_get_drvdata (codec); -struct snd_soc_dapm_context *dapm = &codec->dapm; +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec);int irq_mask, enable; wm8962->jack = jack;
@@ -3163,7 +3160,7 @@ static void wm8962_beep_work(struct work_struct *work)struct wm8962_priv *wm8962 = container_of(work, struct wm8962_priv, beep_work);struct snd_soc_codec *codec = wm8962->codec; -struct snd_soc_dapm_context *dapm = &codec->dapm; +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec);int i;int reg =0 ;int best =0 ;
@@ -3414,6 +3411,7 @@ static void wm8962_free_gpio(struct snd_soc_codec *codec)static int wm8962_probe (struct snd_soc_codec *codec) { +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec);int ret;struct wm8962_priv *wm8962 =snd_soc_codec_get_drvdata (codec);int i;
@@ -3461,7 +3459,7 @@ static int wm8962_probe(struct snd_soc_codec *codec) }if (!dmicclk || !dmicdat) {dev_dbg (codec->dev,"DMIC not in use, disabling\n" ); -snd_soc_dapm_nc_pin (&codec->dapm,"DMICDAT" ); +snd_soc_dapm_nc_pin (dapm,"DMICDAT" ); }if (dmicclk != dmicdat)dev_warn (codec->dev,"DMIC GPIOs partially configured\n" );
Signature · 1 line
2.1.4
PATCH 32/47 ASoC: wm8971: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level().
--- sound/soc/codecs/wm8971.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wm8971.c +1 -1
@@ -577,7 +577,7 @@ static int wm8971_set_bias_level(struct snd_soc_codec *codec,flush_delayed_work (&wm8971->charge_work);break ;case SND_SOC_BIAS_STANDBY : -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) {snd_soc_cache_sync (codec);/* charge output caps - set vmid to 5k for quick power up */ snd_soc_write (codec,WM8971_PWR1 , pwr_reg |0x01c0 );
Signature · 1 line
2.1.4
PATCH 33/47 ASoC: wm8974: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level().
--- sound/soc/codecs/wm8974.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wm8974.c +1 -1
@@ -514,7 +514,7 @@ static int wm8974_set_bias_level(struct snd_soc_codec *codec,case SND_SOC_BIAS_STANDBY : power1 |=WM8974_POWER1_BIASEN |WM8974_POWER1_BUFIOEN ; -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) {regcache_sync (dev_get_regmap (codec->dev,NULL ));/* Initial cap charge at VMID 5k */
Signature · 1 line
2.1.4
PATCH 34/47 ASoC: wm8978: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level().
--- sound/soc/codecs/wm8978.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wm8978.c +1 -1
@@ -868,7 +868,7 @@ static int wm8978_set_bias_level(struct snd_soc_codec *codec,/* bit 3: enable bias, bit 2: enable I/O tie off buffer */ power1 |=0xc ; -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) {/* Initial cap charge at VMID 5k */ snd_soc_write (codec,WM8978_POWER_MANAGEMENT_1 , power1 |0x3 );
Signature · 1 line
2.1.4
PATCH 35/47 ASoC: wm8983: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level().
--- sound/soc/codecs/wm8983.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wm8983.c +1 -1
@@ -915,7 +915,7 @@ static int wm8983_set_bias_level(struct snd_soc_codec *codec, 1 << WM8983_VMIDSEL_SHIFT);break ;case SND_SOC_BIAS_STANDBY : -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) { ret =regcache_sync (wm8983->regmap);if (ret <0 ) {dev_err (codec->dev,"Failed to sync cache: %d\n" , ret);
Signature · 1 line
2.1.4
PATCH 36/47 ASoC: wm8985: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level().
--- sound/soc/codecs/wm8985.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wm8985.c +1 -1
@@ -897,7 +897,7 @@ static int wm8985_set_bias_level(struct snd_soc_codec *codec, 1 << WM8985_VMIDSEL_SHIFT);break ;case SND_SOC_BIAS_STANDBY : -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) { ret =regulator_bulk_enable (ARRAY_SIZE (wm8985->supplies), wm8985->supplies);if (ret) {
Signature · 1 line
2.1.4
PATCH 37/47 ASoC: wm8988: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level().
--- sound/soc/codecs/wm8988.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wm8988.c +1 -1
@@ -738,7 +738,7 @@ static int wm8988_set_bias_level(struct snd_soc_codec *codec,break ;case SND_SOC_BIAS_STANDBY : -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) {regcache_sync (wm8988->regmap);/* VREF, VMID=2x5k */
Signature · 1 line
2.1.4
PATCH 38/47 ASoC: wm8990: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level().
--- sound/soc/codecs/wm8990.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wm8990.c +1 -1
@@ -1124,7 +1124,7 @@ static int wm8990_set_bias_level(struct snd_soc_codec *codec,break ;case SND_SOC_BIAS_STANDBY : -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) { ret =regcache_sync (wm8990->regmap);if (ret <0 ) {dev_err (codec->dev,"Failed to sync cache: %d\n" , ret);
Signature · 1 line
2.1.4
PATCH 39/47 ASoC: wm8991: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level().
--- sound/soc/codecs/wm8991.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wm8991.c +1 -1
@@ -1131,7 +1131,7 @@ static int wm8991_set_bias_level(struct snd_soc_codec *codec,break ;case SND_SOC_BIAS_STANDBY : -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) {regcache_sync (wm8991->regmap);/* Enable all output discharge bits */ snd_soc_write(codec, WM8991_ANTIPOP1, WM8991_DIS_LLINE |
Signature · 1 line
2.1.4
PATCH 40/47 ASoC: wm8993: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all other manual access to codec->dapm with snd_soc_codec_get_dapm().
--- sound/soc/codecs/wm8993.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
sound/soc/codecs/wm8993.c +3 -3
@@ -992,7 +992,7 @@ static int wm8993_set_bias_level(struct snd_soc_codec *codec,break ;case SND_SOC_BIAS_STANDBY : -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) { ret =regulator_bulk_enable (ARRAY_SIZE (wm8993->supplies), wm8993->supplies);if (ret !=0 )
@@ -1483,7 +1483,7 @@ static struct snd_soc_dai_driver wm8993_dai = {static int wm8993_probe (struct snd_soc_codec *codec) {struct wm8993_priv *wm8993 =snd_soc_codec_get_drvdata (codec); -struct snd_soc_dapm_context *dapm = &codec->dapm; +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec); wm8993->hubs_data.hp_startup_mode =1 ; wm8993->hubs_data.dcs_codes_l =-2 ;
@@ -1537,7 +1537,7 @@ static int wm8993_probe(struct snd_soc_codec *codec)* VMID as an output and can disable it. */ if (wm8993->pdata.lineout1_diff && wm8993->pdata.lineout2_diff) - codec->dapm.idle_bias_off =1 ; + dapm->idle_bias_off =1 ;return 0 ;
Signature · 1 line
2.1.4
PATCH 41/47 ASoC: wm8994: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all other manual access to codec->dapm with snd_soc_codec_get_dapm().
--- sound/soc/codecs/wm8994.c | 58 +++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 29 deletions(-)
sound/soc/codecs/wm8994.c +29 -29
@@ -212,6 +212,7 @@ static int configure_aif_clock(struct snd_soc_codec *codec, int aif)static int configure_clock (struct snd_soc_codec *codec) { +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec);struct wm8994_priv *wm8994 =snd_soc_codec_get_drvdata (codec);int change, new;
@@ -239,7 +240,7 @@ static int configure_clock(struct snd_soc_codec *codec) change =snd_soc_update_bits (codec,WM8994_CLOCKING_1 ,WM8994_SYSCLK_SRC , new);if (change) -snd_soc_dapm_sync (&codec->dapm); +snd_soc_dapm_sync (dapm);wm8958_micd_set_rate (codec);
@@ -2492,12 +2493,12 @@ static int wm8994_set_bias_level(struct snd_soc_codec *codec,break ; } -if (codec->dapm.bias_level ==SND_SOC_BIAS_STANDBY ) +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_STANDBY )active_reference (codec);break ;case SND_SOC_BIAS_STANDBY : -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) {switch (control->type) {case WM8958 :if (control->revision ==0 ) {
@@ -2521,7 +2522,7 @@ static int wm8994_set_bias_level(struct snd_soc_codec *codec, WM8994_LINEOUT2_DISCH); } -if (codec->dapm.bias_level ==SND_SOC_BIAS_PREPARE ) +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_PREPARE )active_dereference (codec);/* MICBIAS into bypass mode on newer devices */
@@ -2541,7 +2542,7 @@ static int wm8994_set_bias_level(struct snd_soc_codec *codec,break ;case SND_SOC_BIAS_OFF : -if (codec->dapm.bias_level ==SND_SOC_BIAS_STANDBY ) +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_STANDBY ) wm8994->cur_fw =NULL ;break ; }
@@ -2552,7 +2553,7 @@ static int wm8994_set_bias_level(struct snd_soc_codec *codec,int wm8994_vmid_mode (struct snd_soc_codec *codec,enum wm8994_vmid_mode mode) {struct wm8994_priv *wm8994 =snd_soc_codec_get_drvdata (codec); -struct snd_soc_dapm_context *dapm = &codec->dapm; +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec);switch (mode) {case WM8994_VMID_NORMAL :
@@ -3354,6 +3355,7 @@ static void wm8994_handle_pdata(struct wm8994_priv *wm8994)int wm8994_mic_detect (struct snd_soc_codec *codec,struct snd_soc_jack *jack,int micbias) { +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec);struct wm8994_priv *wm8994 =snd_soc_codec_get_drvdata (codec);struct wm8994_micdet *micdet;struct wm8994 *control = wm8994->wm8994;
@@ -3368,20 +3370,16 @@ int wm8994_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack,case 1 : micdet = &wm8994->micdet[0 ];if (jack) - ret =snd_soc_dapm_force_enable_pin (&codec->dapm, -"MICBIAS1" ); + ret =snd_soc_dapm_force_enable_pin (dapm,"MICBIAS1" );else - ret =snd_soc_dapm_disable_pin (&codec->dapm, -"MICBIAS1" ); + ret =snd_soc_dapm_disable_pin (dapm,"MICBIAS1" );break ;case 2 : micdet = &wm8994->micdet[1 ];if (jack) - ret =snd_soc_dapm_force_enable_pin (&codec->dapm, -"MICBIAS1" ); + ret =snd_soc_dapm_force_enable_pin (dapm,"MICBIAS1" );else - ret =snd_soc_dapm_disable_pin (&codec->dapm, -"MICBIAS1" ); + ret =snd_soc_dapm_disable_pin (dapm,"MICBIAS1" );break ;default :dev_warn (codec->dev,"Invalid MICBIAS %d\n" , micbias);
@@ -3413,7 +3411,7 @@ int wm8994_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack,WM8994_MIC2_DET_DB_MASK |WM8994_MIC2_SHRT_DB_MASK , WM8994_MIC1_DET_DB | WM8994_MIC1_SHRT_DB); -snd_soc_dapm_sync (&codec->dapm); +snd_soc_dapm_sync (dapm);return 0 ; }
@@ -3503,6 +3501,7 @@ static irqreturn_t wm8994_mic_irq(int irq, void *data)/* Should be called with accdet_lock held */ static void wm1811_micd_stop (struct snd_soc_codec *codec) { +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec);struct wm8994_priv *wm8994 =snd_soc_codec_get_drvdata (codec);if (!wm8994->jackdet)
@@ -3513,8 +3512,7 @@ static void wm1811_micd_stop(struct snd_soc_codec *codec)wm1811_jackdet_set_mode (codec,WM1811_JACKDET_MODE_JACK );if (wm8994->wm8994->pdata.jd_ext_cap) -snd_soc_dapm_disable_pin (&codec->dapm, -"MICBIAS2" ); +snd_soc_dapm_disable_pin (dapm,"MICBIAS2" ); }static void wm8958_button_det (struct snd_soc_codec *codec,u16 status)
@@ -3623,14 +3621,14 @@ static void wm1811_mic_work(struct work_struct *work) mic_work.work);struct wm8994 *control = wm8994->wm8994;struct snd_soc_codec *codec = wm8994->hubs.codec; +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec);pm_runtime_get_sync (codec->dev);/* If required for an external cap force MICBIAS on */ if (control->pdata.jd_ext_cap) { -snd_soc_dapm_force_enable_pin (&codec->dapm, -"MICBIAS2" ); -snd_soc_dapm_sync (&codec->dapm); +snd_soc_dapm_force_enable_pin (dapm,"MICBIAS2" ); +snd_soc_dapm_sync (dapm); }mutex_lock (&wm8994->accdet_lock);
@@ -3662,6 +3660,7 @@ static irqreturn_t wm1811_jackdet_irq(int irq, void *data)struct wm8994_priv *wm8994 = data;struct wm8994 *control = wm8994->wm8994;struct snd_soc_codec *codec = wm8994->hubs.codec; +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec);int reg, delay;bool present;
@@ -3722,7 +3721,7 @@ static irqreturn_t wm1811_jackdet_irq(int irq, void *data)/* Turn off MICBIAS if it was on for an external cap */ if (control->pdata.jd_ext_cap && !present) -snd_soc_dapm_disable_pin (&codec->dapm,"MICBIAS2" ); +snd_soc_dapm_disable_pin (dapm,"MICBIAS2" );if (present) snd_soc_jack_report(wm8994->micdet[0].jack,
@@ -3768,6 +3767,7 @@ int wm8958_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack, wm1811_micdet_cb det_cb, void *det_cb_data, wm1811_mic_id_cb id_cb, void *id_cb_data) { + struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);struct wm8994_priv *wm8994 =snd_soc_codec_get_drvdata (codec);struct wm8994 *control = wm8994->wm8994;u16 micd_lvl_sel;
@@ -3781,8 +3781,8 @@ int wm8958_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack, }if (jack) { -snd_soc_dapm_force_enable_pin (&codec->dapm,"CLK_SYS" ); -snd_soc_dapm_sync (&codec->dapm); +snd_soc_dapm_force_enable_pin (dapm,"CLK_SYS" ); +snd_soc_dapm_sync (dapm); wm8994->micdet[0 ].jack = jack;
@@ -3817,7 +3817,7 @@ int wm8958_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack,snd_soc_update_bits (codec,WM8958_MIC_DETECT_2 ,WM8958_MICD_LVL_SEL_MASK , micd_lvl_sel); -WARN_ON (codec->dapm.bias_level >SND_SOC_BIAS_STANDBY ); +WARN_ON (snd_soc_codec_get_bias_level (codec) >SND_SOC_BIAS_STANDBY );/* * If we can use jack detection start off with that,
@@ -3844,8 +3844,8 @@ int wm8958_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack,snd_soc_update_bits (codec,WM8958_MIC_DETECT_1 ,WM8958_MICD_ENA ,0 );wm1811_jackdet_set_mode (codec,WM1811_JACKDET_MODE_NONE ); -snd_soc_dapm_disable_pin (&codec->dapm,"CLK_SYS" ); -snd_soc_dapm_sync (&codec->dapm); +snd_soc_dapm_disable_pin (dapm,"CLK_SYS" ); +snd_soc_dapm_sync (dapm); }return 0 ;
@@ -3983,9 +3983,9 @@ static irqreturn_t wm8994_temp_shut(int irq, void *data)static int wm8994_codec_probe (struct snd_soc_codec *codec) { +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec);struct wm8994 *control =dev_get_drvdata (codec->dev->parent);struct wm8994_priv *wm8994 =snd_soc_codec_get_drvdata (codec); -struct snd_soc_dapm_context *dapm = &codec->dapm;unsigned int reg;int ret, i;
@@ -4016,7 +4016,7 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec) wm8994->micdet_irq = control->pdata.micdet_irq;/* By default use idle_bias_off, will override for WM8994 */ - codec->dapm.idle_bias_off =1 ; + dapm->idle_bias_off =1 ;/* Set revision-specific configuration */ switch (control->type) {
@@ -4024,7 +4024,7 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec)/* Single ended line outputs should have VMID on. */ if (!control->pdata.lineout1_diff || !control->pdata.lineout2_diff) - codec->dapm.idle_bias_off =0 ; + dapm->idle_bias_off =0 ;switch (control->revision) {case 2 :
Signature · 1 line
2.1.4
PATCH 42/47 ASoC: wm8995: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all other manual access to codec->dapm with snd_soc_codec_get_dapm().
--- sound/soc/codecs/wm8995.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
sound/soc/codecs/wm8995.c +3 -2
@@ -721,6 +721,7 @@ static int configure_aif_clock(struct snd_soc_codec *codec, int aif)static int configure_clock (struct snd_soc_codec *codec) { +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec);struct wm8995_priv *wm8995;int change, new;
@@ -751,7 +752,7 @@ static int configure_clock(struct snd_soc_codec *codec)if (!change)return 0 ; -snd_soc_dapm_sync (&codec->dapm); +snd_soc_dapm_sync (dapm);return 0 ; }
@@ -1965,7 +1966,7 @@ static int wm8995_set_bias_level(struct snd_soc_codec *codec,case SND_SOC_BIAS_PREPARE :break ;case SND_SOC_BIAS_STANDBY : -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) { ret =regulator_bulk_enable (ARRAY_SIZE (wm8995->supplies), wm8995->supplies);if (ret)
Signature · 1 line
2.1.4
PATCH 43/47 ASoC: wm8996: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all other manual access to codec->dapm with snd_soc_codec_get_dapm().
--- sound/soc/codecs/wm8996.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
sound/soc/codecs/wm8996.c +9 -6
@@ -1590,7 +1590,7 @@ static int wm8996_set_bias_level(struct snd_soc_codec *codec,break ;case SND_SOC_BIAS_STANDBY : -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) { ret =regulator_bulk_enable (ARRAY_SIZE (wm8996->supplies), wm8996->supplies);if (ret !=0 ) {
@@ -2245,7 +2245,7 @@ int wm8996_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack, wm8996_polarity_fn polarity_cb) {struct wm8996_priv *wm8996 =snd_soc_codec_get_drvdata (codec); -struct snd_soc_dapm_context *dapm = &codec->dapm; +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec); wm8996->jack = jack; wm8996->detecting = true;
@@ -2290,6 +2290,7 @@ EXPORT_SYMBOL_GPL(wm8996_detect);static void wm8996_hpdet_irq (struct snd_soc_codec *codec) { +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec);struct wm8996_priv *wm8996 =snd_soc_codec_get_drvdata (codec);int val, reg, report;
@@ -2343,12 +2344,14 @@ out:snd_soc_update_bits (codec,WM8996_MIC_DETECT_1 ,WM8996_MICD_ENA ,WM8996_MICD_ENA ); -snd_soc_dapm_disable_pin (&codec->dapm,"Bandgap" ); -snd_soc_dapm_sync (&codec->dapm); +snd_soc_dapm_disable_pin (dapm,"Bandgap" ); +snd_soc_dapm_sync (dapm); }static void wm8996_hpdet_start (struct snd_soc_codec *codec) { +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec); +/* Unclamp the output, we can't measure while we're shorting it */ snd_soc_update_bits(codec, WM8996_ANALOGUE_HP_1, WM8996_HPOUT1L_RMV_SHORT |
@@ -2357,8 +2360,8 @@ static void wm8996_hpdet_start(struct snd_soc_codec *codec) WM8996_HPOUT1R_RMV_SHORT);/* We need bandgap for HPDET */ -snd_soc_dapm_force_enable_pin (&codec->dapm,"Bandgap" ); -snd_soc_dapm_sync (&codec->dapm); +snd_soc_dapm_force_enable_pin (dapm,"Bandgap" ); +snd_soc_dapm_sync (dapm);/* Go into headphone detect left mode */ snd_soc_update_bits (codec,WM8996_MIC_DETECT_1 ,WM8996_MICD_ENA ,0 );
Signature · 1 line
2.1.4
PATCH 44/47 ASoC: wm8997: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm with snd_soc_codec_get_dapm().
--- sound/soc/codecs/wm8997.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
sound/soc/codecs/wm8997.c +3 -2
@@ -1055,13 +1055,14 @@ static struct snd_soc_dai_driver wm8997_dai[] = {static int wm8997_codec_probe (struct snd_soc_codec *codec) { +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec);struct wm8997_priv *priv =snd_soc_codec_get_drvdata (codec);arizona_init_spk (codec); -snd_soc_dapm_disable_pin (&codec->dapm,"HAPTICS" ); +snd_soc_dapm_disable_pin (dapm,"HAPTICS" ); - priv->core.arizona->dapm = &codec->dapm; + priv->core.arizona->dapm = dapm;return 0 ; }
Signature · 1 line
2.1.4
PATCH 45/47 ASoC: wm9081: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level().
--- sound/soc/codecs/wm9081.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wm9081.c +1 -1
@@ -838,7 +838,7 @@ static int wm9081_set_bias_level(struct snd_soc_codec *codec,case SND_SOC_BIAS_STANDBY :/* Initial cold start */ -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) {regcache_cache_only (wm9081->regmap, false);regcache_sync (wm9081->regmap);
Signature · 1 line
2.1.4
PATCH 46/47 ASoC: wm9090: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all other manual access to codec->dapm with snd_soc_codec_get_dapm().
--- sound/soc/codecs/wm9090.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/wm9090.c +2 -2
@@ -425,7 +425,7 @@ static const struct snd_soc_dapm_route audio_map_in2_diff[] = {static int wm9090_add_controls (struct snd_soc_codec *codec) {struct wm9090_priv *wm9090 =snd_soc_codec_get_drvdata (codec); -struct snd_soc_dapm_context *dapm = &codec->dapm; +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec);int i; snd_soc_dapm_new_controls(dapm, wm9090_dapm_widgets,
@@ -496,7 +496,7 @@ static int wm9090_set_bias_level(struct snd_soc_codec *codec,break ;case SND_SOC_BIAS_STANDBY : -if (codec->dapm.bias_level ==SND_SOC_BIAS_OFF ) { +if (snd_soc_codec_get_bias_level (codec) ==SND_SOC_BIAS_OFF ) {/* Restore the register cache */ regcache_sync (wm9090->regmap); }
Signature · 1 line
2.1.4
PATCH 47/47 ASoC: wm_hubs: Replace direct snd_soc_codec dapm field access
In reply to Lars-Peter ClausenThe dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm with snd_soc_codec_get_dapm().
--- sound/soc/codecs/wm_hubs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/wm_hubs.c +2 -2
@@ -1116,7 +1116,7 @@ static const struct snd_soc_dapm_route lineout2_se_routes[] = {int wm_hubs_add_analogue_controls (struct snd_soc_codec *codec) { -struct snd_soc_dapm_context *dapm = &codec->dapm; +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec);/* Latch volume update bits & default ZC on */ snd_soc_update_bits(codec, WM8993_LEFT_LINE_INPUT_1_2_VOLUME,
@@ -1160,7 +1160,7 @@ int wm_hubs_add_analogue_routes(struct snd_soc_codec *codec, int lineout1_diff, int lineout2_diff) {struct wm_hubs_data *hubs =snd_soc_codec_get_drvdata (codec); -struct snd_soc_dapm_context *dapm = &codec->dapm; +struct snd_soc_dapm_context *dapm =snd_soc_codec_get_dapm (codec); hubs->codec = codec;
Signature · 1 line
2.1.4
Re: [PATCH 47/47] ASoC: wm_hubs: Replace direct snd_soc_codec dapm field access
Quoted 6 lines · Lars-Peter Clausen
The dapm field of the
snd_soc_codecstruct is eventually going to be removed, in preparation for this replace all manual access tocodec->dapmwithsnd_soc_codec_get_dapm().Signed-off-by Lars-Peter Clausen <[email protected]>---
For all the Wolfson bits:
Thanks,
Charles
Quoted 4 lines · Lars-Peter Clausen
The dapm field of the
snd_soc_codecstruct is eventually going to be removed, in preparation for this replace all manual access tocodec->dapm.bias_levelwithsnd_soc_codec_get_bias_level()and replace all other manual access tocodec->dapmwithsnd_soc_codec_get_dapm().
Applied all, thanks.