ASoC: wm8350: Cleanup manual bias level transitions
Subsystems (3)
PATCH 1/32 ASoC: wm8350: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner.
Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe() can also be removed as the core will automatically do this after the CODEC has been probed.
--- sound/soc/codecs/wm8350.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-)
sound/soc/codecs/wm8350.c +1 -20
@@ -1242,19 +1242,6 @@ static int wm8350_set_bias_level(struct snd_soc_codec *codec,return 0 ; } -static int wm8350_suspend (struct snd_soc_codec *codec) -{ -wm8350_set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} - -static int wm8350_resume (struct snd_soc_codec *codec) -{ -wm8350_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); - -return 0 ; -} -static void wm8350_hp_work (struct wm8350_data *priv,struct wm8350_jack_data *jack,u16 mask)
@@ -1565,9 +1552,6 @@ static int wm8350_codec_probe(struct snd_soc_codec *codec)wm8350_register_irq (wm8350,WM8350_IRQ_CODEC_MICD , wm8350_mic_handler,0 ,"Microphone detect" , priv); - -wm8350_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -return 0 ; }
@@ -1596,8 +1580,6 @@ static int wm8350_codec_remove(struct snd_soc_codec *codec)* wait for its completion */ flush_delayed_work (&codec->dapm.delayed_work); -wm8350_set_bias_level (codec,SND_SOC_BIAS_OFF ); -wm8350_clear_bits (wm8350,WM8350_POWER_MGMT_5 ,WM8350_CODEC_ENA );return 0 ;
@@ -1613,10 +1595,9 @@ static struct regmap *wm8350_get_regmap(struct device *dev)static struct snd_soc_codec_driver soc_codec_dev_wm8350 = { .probe = wm8350_codec_probe, .remove = wm8350_codec_remove, - .suspend = wm8350_suspend, - .resume = wm8350_resume, .get_regmap = wm8350_get_regmap, .set_bias_level = wm8350_set_bias_level, + .suspend_bias_off = true, .controls = wm8350_snd_controls, .num_controls =ARRAY_SIZE (wm8350_snd_controls),
Signature · 1 line
1.8.0
PATCH 2/32 ASoC: wm8400: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner.
Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
The manual asynchronous transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe() can also be removed as the core will automatically do this after the CODEC has been probed. Also running this asynchronously has the problem of potential race conditions with the core.
--- sound/soc/codecs/wm8400.c | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-)
sound/soc/codecs/wm8400.c +1 -33
@@ -58,12 +58,10 @@ static struct regulator_bulk_data power[] = {/* codec private data */ struct wm8400_priv { -struct snd_soc_codec *codec;struct wm8400 *wm8400;u16 fake_register;unsigned int sysclk;unsigned int pcmclk; -struct work_struct work;int fll_in, fll_out; };
@@ -1278,30 +1276,6 @@ static struct snd_soc_dai_driver wm8400_dai = { .ops = &wm8400_dai_ops, }; -static int wm8400_suspend (struct snd_soc_codec *codec) -{ -wm8400_set_bias_level (codec,SND_SOC_BIAS_OFF ); - -return 0 ; -} - -static int wm8400_resume (struct snd_soc_codec *codec) -{ -wm8400_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); - -return 0 ; -} - -static void wm8400_probe_deferred (struct work_struct *work) -{ - struct wm8400_priv *priv = container_of(work, struct wm8400_priv, - work); -struct snd_soc_codec *codec = priv->codec; - -/* charge output caps */ -wm8400_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -} -static int wm8400_codec_probe (struct snd_soc_codec *codec) {struct wm8400 *wm8400 =dev_get_platdata (codec->dev);
@@ -1316,7 +1290,6 @@ static int wm8400_codec_probe(struct snd_soc_codec *codec)snd_soc_codec_set_drvdata (codec, priv); priv->wm8400 = wm8400; - priv->codec = codec; ret =devm_regulator_bulk_get (wm8400->dev,ARRAY_SIZE (power), &power[0 ]);
@@ -1325,8 +1298,6 @@ static int wm8400_codec_probe(struct snd_soc_codec *codec)return ret; } -INIT_WORK (&priv->work, wm8400_probe_deferred); -wm8400_codec_reset (codec); reg =snd_soc_read (codec,WM8400_POWER_MANAGEMENT_1 );
@@ -1343,8 +1314,6 @@ static int wm8400_codec_probe(struct snd_soc_codec *codec)snd_soc_write (codec,WM8400_LEFT_OUTPUT_VOLUME ,0x50 | (1 <<8 ));snd_soc_write (codec,WM8400_RIGHT_OUTPUT_VOLUME ,0x50 | (1 <<8 )); -if (!schedule_work (&priv->work)) -return -EINVAL ;return 0 ; }
@@ -1369,10 +1338,9 @@ static struct regmap *wm8400_get_regmap(struct device *dev)static struct snd_soc_codec_driver soc_codec_dev_wm8400 = { .probe = wm8400_codec_probe, .remove = wm8400_codec_remove, - .suspend = wm8400_suspend, - .resume = wm8400_resume, .get_regmap = wm8400_get_regmap, .set_bias_level = wm8400_set_bias_level, + .suspend_bias_off = true, .controls = wm8400_snd_controls, .num_controls =ARRAY_SIZE (wm8400_snd_controls),
Signature · 1 line
1.8.0
Re: [PATCH 02/32] ASoC: wm8400: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Set the CODEC driver's
suspend_bias_offflag rather than manually going toSND_SOC_BIAS_OFFin suspend andSND_SOC_BIAS_STANDBYin resume. This makes the code a bit shorter and cleaner.
Applied, thanks.
PATCH 3/32 ASoC: wm8510: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSet the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner.
Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe() can also be removed as the core will automatically do this after the CODEC has been probed.
--- sound/soc/codecs/wm8510.c | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-)
sound/soc/codecs/wm8510.c +1 -25
@@ -575,41 +575,17 @@ static struct snd_soc_dai_driver wm8510_dai = { .symmetric_rates = 1, }; -static int wm8510_suspend (struct snd_soc_codec *codec) -{ -wm8510_set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} - -static int wm8510_resume (struct snd_soc_codec *codec) -{ -wm8510_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -return 0 ; -} -static int wm8510_probe (struct snd_soc_codec *codec) {wm8510_reset (codec); -/* power on device */ -wm8510_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); - -return 0 ; -} - -/* power down chip */ -static int wm8510_remove (struct snd_soc_codec *codec) -{ -wm8510_set_bias_level (codec,SND_SOC_BIAS_OFF );return 0 ; }static struct snd_soc_codec_driver soc_codec_dev_wm8510 = { .probe = wm8510_probe, - .remove = wm8510_remove, - .suspend = wm8510_suspend, - .resume = wm8510_resume, .set_bias_level = wm8510_set_bias_level, + .suspend_bias_off = true, .controls = wm8510_snd_controls, .num_controls =ARRAY_SIZE (wm8510_snd_controls),
Signature · 1 line
1.8.0
Re: [PATCH 03/32] ASoC: wm8510: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Set the CODEC driver's
suspend_bias_offflag rather than manually going toSND_SOC_BIAS_OFFin suspend andSND_SOC_BIAS_STANDBYin resume. This makes the code a bit shorter and cleaner.
Applied, thanks.
PATCH 4/32 ASoC: wm8523: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSet the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner.
Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe() can also be removed as the core will automatically do this after the CODEC has been probed.
--- sound/soc/codecs/wm8523.c | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-)
sound/soc/codecs/wm8523.c +1 -28
@@ -372,23 +372,6 @@ static struct snd_soc_dai_driver wm8523_dai = { .ops = &wm8523_dai_ops, }; -#ifdef CONFIG_PM -static int wm8523_suspend (struct snd_soc_codec *codec) -{ -wm8523_set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} - -static int wm8523_resume (struct snd_soc_codec *codec) -{ -wm8523_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -return 0 ; -} -#else -#define wm8523_suspend NULL -#define wm8523_resume NULL -#endif -static int wm8523_probe (struct snd_soc_codec *codec) {struct wm8523_priv *wm8523 =snd_soc_codec_get_drvdata (codec);
@@ -402,23 +385,13 @@ static int wm8523_probe(struct snd_soc_codec *codec) WM8523_DACR_VU, WM8523_DACR_VU);snd_soc_update_bits (codec,WM8523_DAC_CTRL3 ,WM8523_ZC ,WM8523_ZC ); -wm8523_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); - -return 0 ; -} - -static int wm8523_remove (struct snd_soc_codec *codec) -{ -wm8523_set_bias_level (codec,SND_SOC_BIAS_OFF );return 0 ; }static struct snd_soc_codec_driver soc_codec_dev_wm8523 = { .probe = wm8523_probe, - .remove = wm8523_remove, - .suspend = wm8523_suspend, - .resume = wm8523_resume, .set_bias_level = wm8523_set_bias_level, + .suspend_bias_off = true, .controls = wm8523_controls, .num_controls =ARRAY_SIZE (wm8523_controls),
Signature · 1 line
1.8.0
Re: [PATCH 04/32] ASoC: wm8523: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Set the CODEC driver's
suspend_bias_offflag rather than manually going toSND_SOC_BIAS_OFFin suspend andSND_SOC_BIAS_STANDBYin resume. This makes the code a bit shorter and cleaner.
Applied, thanks.
PATCH 5/32 ASoC: wm8580: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSince the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe() can also be removed as the core will automatically do this after the CODEC has been probed.
--- sound/soc/codecs/wm8580.c | 4 ---- 1 file changed, 4 deletions(-)
sound/soc/codecs/wm8580.c +0 -4
@@ -882,8 +882,6 @@ static int wm8580_probe(struct snd_soc_codec *codec) goto err_regulator_enable; } -wm8580_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -return 0 ; err_regulator_enable:
@@ -897,8 +895,6 @@ static int wm8580_remove(struct snd_soc_codec *codec) {struct wm8580_priv *wm8580 =snd_soc_codec_get_drvdata (codec); -wm8580_set_bias_level (codec,SND_SOC_BIAS_OFF ); -regulator_bulk_disable (ARRAY_SIZE (wm8580->supplies), wm8580->supplies);return 0 ;
Signature · 1 line
1.8.0
Re: [PATCH 05/32] ASoC: wm8580: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFFwhen removing the CODEC there is no need to do it manually anymore either.
Applied, thanks.
PATCH 6/32 ASoC: wm8711: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSet the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner. Also remove the extra write that sets the WM8711_ACTIVE register to 0x00 in the suspend handler since this write is already done when transitioning to SND_SOC_BIAS_OFF.
Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe() can also be removed as the core will automatically do this after the CODEC has been probed.
--- sound/soc/codecs/wm8711.c | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-)
sound/soc/codecs/wm8711.c +2 -25
@@ -350,19 +350,6 @@ static struct snd_soc_dai_driver wm8711_dai = { .ops = &wm8711_ops, }; -static int wm8711_suspend (struct snd_soc_codec *codec) -{ -snd_soc_write (codec,WM8711_ACTIVE ,0x0 ); -wm8711_set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} - -static int wm8711_resume (struct snd_soc_codec *codec) -{ -wm8711_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -return 0 ; -} -static int wm8711_probe (struct snd_soc_codec *codec) {int ret;
@@ -373,8 +360,6 @@ static int wm8711_probe(struct snd_soc_codec *codec)return ret; } -wm8711_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -/* Latch the update bits */ snd_soc_update_bits (codec,WM8711_LOUT1V ,0x0100 ,0x0100 );snd_soc_update_bits (codec,WM8711_ROUT1V ,0x0100 ,0x0100 );
@@ -383,19 +368,11 @@ static int wm8711_probe(struct snd_soc_codec *codec) } -/* power down chip */ -static int wm8711_remove (struct snd_soc_codec *codec) -{ -wm8711_set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} -static struct snd_soc_codec_driver soc_codec_dev_wm8711 = { .probe = wm8711_probe, - .remove = wm8711_remove, - .suspend = wm8711_suspend, - .resume = wm8711_resume, .set_bias_level = wm8711_set_bias_level, + .suspend_bias_off = true, + .controls = wm8711_snd_controls, .num_controls =ARRAY_SIZE (wm8711_snd_controls), .dapm_widgets = wm8711_dapm_widgets,
Signature · 1 line
1.8.0
Re: [PATCH 06/32] ASoC: wm8711: Cleanup manual bias level transitions
Quoted 5 lines · Lars-Peter Clausen
Set the CODEC driver's
suspend_bias_offflag rather than manually going toSND_SOC_BIAS_OFFin suspend andSND_SOC_BIAS_STANDBYin resume. This makes the code a bit shorter and cleaner. Also remove the extra write that sets theWM8711_ACTIVEregister to0x00in the suspend handler since this write is already done when transitioning toSND_SOC_BIAS_OFF.
Applied, thanks.
PATCH 7/32 ASoC: wm8728: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSet the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner.
Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe() can also be removed as the core will automatically do this after the CODEC has been probed.
--- sound/soc/codecs/wm8728.c | 34 ++-------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-)
sound/soc/codecs/wm8728.c +2 -32
@@ -212,40 +212,10 @@ static struct snd_soc_dai_driver wm8728_dai = { .ops = &wm8728_dai_ops, }; -static int wm8728_suspend (struct snd_soc_codec *codec) -{ -wm8728_set_bias_level (codec,SND_SOC_BIAS_OFF ); - -return 0 ; -} - -static int wm8728_resume (struct snd_soc_codec *codec) -{ -wm8728_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); - -return 0 ; -} - -static int wm8728_probe (struct snd_soc_codec *codec) -{ -/* power on device */ -wm8728_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); - -return 0 ; -} - -static int wm8728_remove (struct snd_soc_codec *codec) -{ -wm8728_set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} -static struct snd_soc_codec_driver soc_codec_dev_wm8728 = { - .probe = wm8728_probe, - .remove = wm8728_remove, - .suspend = wm8728_suspend, - .resume = wm8728_resume, .set_bias_level = wm8728_set_bias_level, + .suspend_bias_off = true, + .controls = wm8728_snd_controls, .num_controls =ARRAY_SIZE (wm8728_snd_controls), .dapm_widgets = wm8728_dapm_widgets,
Signature · 1 line
1.8.0
Re: [PATCH 07/32] ASoC: wm8728: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Set the CODEC driver's
suspend_bias_offflag rather than manually going toSND_SOC_BIAS_OFFin suspend andSND_SOC_BIAS_STANDBYin resume. This makes the code a bit shorter and cleaner.
Applied, thanks.
PATCH 8/32 ASoC: wm8731: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSet the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner.
Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
--- sound/soc/codecs/wm8731.c | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-)
sound/soc/codecs/wm8731.c +2 -23
@@ -562,25 +562,6 @@ static struct snd_soc_dai_driver wm8731_dai = { .symmetric_rates = 1, }; -#ifdef CONFIG_PM -static int wm8731_suspend (struct snd_soc_codec *codec) -{ -wm8731_set_bias_level (codec,SND_SOC_BIAS_OFF ); - -return 0 ; -} - -static int wm8731_resume (struct snd_soc_codec *codec) -{ -wm8731_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); - -return 0 ; -} -#else -#define wm8731_suspend NULL -#define wm8731_resume NULL -#endif -static int wm8731_probe (struct snd_soc_codec *codec) {struct wm8731_priv *wm8731 =snd_soc_codec_get_drvdata (codec);
@@ -636,8 +617,6 @@ static int wm8731_remove(struct snd_soc_codec *codec) {struct wm8731_priv *wm8731 =snd_soc_codec_get_drvdata (codec); -wm8731_set_bias_level (codec,SND_SOC_BIAS_OFF ); -regulator_bulk_disable (ARRAY_SIZE (wm8731->supplies), wm8731->supplies);return 0 ;
@@ -646,9 +625,9 @@ static int wm8731_remove(struct snd_soc_codec *codec)static struct snd_soc_codec_driver soc_codec_dev_wm8731 = { .probe = wm8731_probe, .remove = wm8731_remove, - .suspend = wm8731_suspend, - .resume = wm8731_resume, .set_bias_level = wm8731_set_bias_level, + .suspend_bias_off = true, + .dapm_widgets = wm8731_dapm_widgets, .num_dapm_widgets =ARRAY_SIZE (wm8731_dapm_widgets), .dapm_routes = wm8731_intercon,
Signature · 1 line
1.8.0
Re: [PATCH 08/32] ASoC: wm8731: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Set the CODEC driver's
suspend_bias_offflag rather than manually going toSND_SOC_BIAS_OFFin suspend andSND_SOC_BIAS_STANDBYin resume. This makes the code a bit shorter and cleaner.
Applied, thanks.
PATCH 9/32 ASoC: wm8737: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSet the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner.
Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
--- sound/soc/codecs/wm8737.c | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-)
sound/soc/codecs/wm8737.c +1 -26
@@ -537,23 +537,6 @@ static struct snd_soc_dai_driver wm8737_dai = { .ops = &wm8737_dai_ops, }; -#ifdef CONFIG_PM -static int wm8737_suspend (struct snd_soc_codec *codec) -{ -wm8737_set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} - -static int wm8737_resume (struct snd_soc_codec *codec) -{ -wm8737_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -return 0 ; -} -#else -#define wm8737_suspend NULL -#define wm8737_resume NULL -#endif -static int wm8737_probe (struct snd_soc_codec *codec) {struct wm8737_priv *wm8737 =snd_soc_codec_get_drvdata (codec);
@@ -590,18 +573,10 @@ err_get:return ret; } -static int wm8737_remove (struct snd_soc_codec *codec) -{ -wm8737_set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} -static struct snd_soc_codec_driver soc_codec_dev_wm8737 = { .probe = wm8737_probe, - .remove = wm8737_remove, - .suspend = wm8737_suspend, - .resume = wm8737_resume, .set_bias_level = wm8737_set_bias_level, + .suspend_bias_off = true, .controls = wm8737_snd_controls, .num_controls =ARRAY_SIZE (wm8737_snd_controls),
Signature · 1 line
1.8.0
Re: [PATCH 09/32] ASoC: wm8737: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Set the CODEC driver's
suspend_bias_offflag rather than manually going toSND_SOC_BIAS_OFFin suspend andSND_SOC_BIAS_STANDBYin resume. This makes the code a bit shorter and cleaner.
Applied, thanks.
PATCH 10/32 ASoC: wm8750: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSet the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner.
Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe() can also be removed as the core will automatically do this after the CODEC has been probed.
--- sound/soc/codecs/wm8750.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-)
sound/soc/codecs/wm8750.c +1 -24
@@ -686,18 +686,6 @@ static struct snd_soc_dai_driver wm8750_dai = { .ops = &wm8750_dai_ops, }; -static int wm8750_suspend (struct snd_soc_codec *codec) -{ -wm8750_set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} - -static int wm8750_resume (struct snd_soc_codec *codec) -{ -wm8750_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -return 0 ; -} -static int wm8750_probe (struct snd_soc_codec *codec) {int ret;
@@ -708,9 +696,6 @@ static int wm8750_probe(struct snd_soc_codec *codec)return ret; } -/* charge output caps */ -wm8750_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -/* set the update bits */ snd_soc_update_bits (codec,WM8750_LDAC ,0x0100 ,0x0100 );snd_soc_update_bits (codec,WM8750_RDAC ,0x0100 ,0x0100 );
@@ -724,18 +709,10 @@ static int wm8750_probe(struct snd_soc_codec *codec)return ret; } -static int wm8750_remove (struct snd_soc_codec *codec) -{ -wm8750_set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} -static struct snd_soc_codec_driver soc_codec_dev_wm8750 = { .probe = wm8750_probe, - .remove = wm8750_remove, - .suspend = wm8750_suspend, - .resume = wm8750_resume, .set_bias_level = wm8750_set_bias_level, + .suspend_bias_off = true, .controls = wm8750_snd_controls, .num_controls =ARRAY_SIZE (wm8750_snd_controls),
Signature · 1 line
1.8.0
Re: [PATCH 10/32] ASoC: wm8750: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Set the CODEC driver's
suspend_bias_offflag rather than manually going toSND_SOC_BIAS_OFFin suspend andSND_SOC_BIAS_STANDBYin resume. This makes the code a bit shorter and cleaner.
applied, thanks.
PATCH 11/32 ASoC: wm8776: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSet the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner.
Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe() can also be removed as the core will automatically do this after the CODEC has been probed.
--- sound/soc/codecs/wm8776.c | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-)
sound/soc/codecs/wm8776.c +1 -30
@@ -408,24 +408,6 @@ static struct snd_soc_dai_driver wm8776_dai[] = { }, }; -#ifdef CONFIG_PM -static int wm8776_suspend (struct snd_soc_codec *codec) -{ -wm8776_set_bias_level (codec,SND_SOC_BIAS_OFF ); - -return 0 ; -} - -static int wm8776_resume (struct snd_soc_codec *codec) -{ -wm8776_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -return 0 ; -} -#else -#define wm8776_suspend NULL -#define wm8776_resume NULL -#endif -static int wm8776_probe (struct snd_soc_codec *codec) {int ret =0 ;
@@ -436,8 +418,6 @@ static int wm8776_probe(struct snd_soc_codec *codec)return ret; } -wm8776_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -/* Latch the update bits; right channel only since we always * update both. */ snd_soc_update_bits (codec,WM8776_HPRVOL ,0x100 ,0x100 );
@@ -446,19 +426,10 @@ static int wm8776_probe(struct snd_soc_codec *codec)return ret; } -/* power down chip */ -static int wm8776_remove (struct snd_soc_codec *codec) -{ -wm8776_set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} -static struct snd_soc_codec_driver soc_codec_dev_wm8776 = { .probe = wm8776_probe, - .remove = wm8776_remove, - .suspend = wm8776_suspend, - .resume = wm8776_resume, .set_bias_level = wm8776_set_bias_level, + .suspend_bias_off = true, .controls = wm8776_snd_controls, .num_controls =ARRAY_SIZE (wm8776_snd_controls),
Signature · 1 line
1.8.0
Re: [PATCH 11/32] ASoC: wm8776: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Set the CODEC driver's
suspend_bias_offflag rather than manually going toSND_SOC_BIAS_OFFin suspend andSND_SOC_BIAS_STANDBYin resume. This makes the code a bit shorter and cleaner.
Applied, thanks.
PATCH 12/32 ASoC: wm8804: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSince the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe() can also be removed as the core will automatically do this after the CODEC has been probed.
--- sound/soc/codecs/wm8804.c | 3 --- 1 file changed, 3 deletions(-)
sound/soc/codecs/wm8804.c +0 -3
@@ -524,7 +524,6 @@ static int wm8804_remove(struct snd_soc_codec *codec)int i; wm8804 =snd_soc_codec_get_drvdata (codec); -wm8804_set_bias_level (codec,SND_SOC_BIAS_OFF );for (i =0 ; i <ARRAY_SIZE (wm8804->supplies); ++i) regulator_unregister_notifier(wm8804->supplies[i].consumer,
@@ -606,8 +605,6 @@ static int wm8804_probe(struct snd_soc_codec *codec) goto err_reg_enable; } -wm8804_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -return 0 ; err_reg_enable:
Signature · 1 line
1.8.0
Re: [PATCH 12/32] ASoC: wm8804: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFFwhen removing the CODEC there is no need to do it manually anymore either.
Applied, thanks.
PATCH 13/32 ASoC: wm8900: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSince the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
--- sound/soc/codecs/wm8900.c | 8 -------- 1 file changed, 8 deletions(-)
sound/soc/codecs/wm8900.c +0 -8
@@ -1209,16 +1209,8 @@ static int wm8900_probe(struct snd_soc_codec *codec)return 0 ; } -/* power down chip */ -static int wm8900_remove (struct snd_soc_codec *codec) -{ -wm8900_set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} -static struct snd_soc_codec_driver soc_codec_dev_wm8900 = { .probe = wm8900_probe, - .remove = wm8900_remove, .suspend = wm8900_suspend, .resume = wm8900_resume, .set_bias_level = wm8900_set_bias_level,
Signature · 1 line
1.8.0
Re: [PATCH 13/32] ASoC: wm8900: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFFwhen removing the CODEC there is no need to do it manually anymore either.
Applied, thanks.
PATCH 14/32 ASoC: wm8903: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSet the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner.
Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe() can also be removed as the core will automatically do this after the CODEC has been probed. Also remove the unused codec field from the wm8903_priv struct so we can remove the whole probe callback.
--- sound/soc/codecs/wm8903.c | 35 ++--------------------------------- 1 file changed, 2 insertions(+), 33 deletions(-)
sound/soc/codecs/wm8903.c +2 -33
@@ -118,7 +118,6 @@ static const struct reg_default wm8903_reg_defaults[] = {struct wm8903_priv {struct wm8903_platform_data *pdata;struct device *dev; -struct snd_soc_codec *codec;struct regmap *regmap;int sysclk;
@@ -1759,21 +1758,12 @@ static struct snd_soc_dai_driver wm8903_dai = { .symmetric_rates = 1, }; -static int wm8903_suspend (struct snd_soc_codec *codec) -{ -wm8903_set_bias_level (codec,SND_SOC_BIAS_OFF ); - -return 0 ; -} -static int wm8903_resume (struct snd_soc_codec *codec) {struct wm8903_priv *wm8903 =snd_soc_codec_get_drvdata (codec);regcache_sync (wm8903->regmap); -wm8903_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -return 0 ; }
@@ -1891,33 +1881,12 @@ static void wm8903_free_gpio(struct wm8903_priv *wm8903) }#endif -static int wm8903_probe (struct snd_soc_codec *codec) -{ -struct wm8903_priv *wm8903 =snd_soc_codec_get_drvdata (codec); - - wm8903->codec = codec; - -/* power on device */ -wm8903_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); - -return 0 ; -} - -/* power down chip */ -static int wm8903_remove (struct snd_soc_codec *codec) -{ -wm8903_set_bias_level (codec,SND_SOC_BIAS_OFF ); - -return 0 ; -} -static struct snd_soc_codec_driver soc_codec_dev_wm8903 = { - .probe = wm8903_probe, - .remove = wm8903_remove, - .suspend = wm8903_suspend, .resume = wm8903_resume, .set_bias_level = wm8903_set_bias_level, .seq_notifier = wm8903_seq_notifier, + .suspend_bias_off = true, + .controls = wm8903_snd_controls, .num_controls =ARRAY_SIZE (wm8903_snd_controls), .dapm_widgets = wm8903_dapm_widgets,
Signature · 1 line
1.8.0
Re: [PATCH 14/32] ASoC: wm8903: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Set the CODEC driver's
suspend_bias_offflag rather than manually going toSND_SOC_BIAS_OFFin suspend andSND_SOC_BIAS_STANDBYin resume. This makes the code a bit shorter and cleaner.
Applied, thanks.
PATCH 15/32 ASoC: wm8940: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSet the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner.
Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
--- sound/soc/codecs/wm8940.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-)
sound/soc/codecs/wm8940.c +2 -20
@@ -695,17 +695,6 @@ static struct snd_soc_dai_driver wm8940_dai = { .symmetric_rates = 1, }; -static int wm8940_suspend (struct snd_soc_codec *codec) -{ -return wm8940_set_bias_level (codec,SND_SOC_BIAS_OFF ); -} - -static int wm8940_resume (struct snd_soc_codec *codec) -{ -wm8940_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -return 0 ; -} -static int wm8940_probe (struct snd_soc_codec *codec) {struct wm8940_setup_data *pdata = codec->dev->platform_data;
@@ -736,18 +725,11 @@ static int wm8940_probe(struct snd_soc_codec *codec)return ret; } -static int wm8940_remove (struct snd_soc_codec *codec) -{ -wm8940_set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} -static struct snd_soc_codec_driver soc_codec_dev_wm8940 = { .probe = wm8940_probe, - .remove = wm8940_remove, - .suspend = wm8940_suspend, - .resume = wm8940_resume, .set_bias_level = wm8940_set_bias_level, + .suspend_bias_off = true, + .controls = wm8940_snd_controls, .num_controls =ARRAY_SIZE (wm8940_snd_controls), .dapm_widgets = wm8940_dapm_widgets,
Signature · 1 line
1.8.0
Re: [PATCH 15/32] ASoC: wm8940: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Set the CODEC driver's
suspend_bias_offflag rather than manually going toSND_SOC_BIAS_OFFin suspend andSND_SOC_BIAS_STANDBYin resume. This makes the code a bit shorter and cleaner.
Applied, thanks.
PATCH 16/32 ASoC: wm8955: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSet the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner. Also remove the regcache_mark_dirty() from the suspend handler since this is already done by the ASoC core.
Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
--- sound/soc/codecs/wm8955.c | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-)
sound/soc/codecs/wm8955.c +1 -32
@@ -866,29 +866,6 @@ static struct snd_soc_dai_driver wm8955_dai = { .ops = &wm8955_dai_ops, }; -#ifdef CONFIG_PM -static int wm8955_suspend (struct snd_soc_codec *codec) -{ -struct wm8955_priv *wm8955 =snd_soc_codec_get_drvdata (codec); - -wm8955_set_bias_level (codec,SND_SOC_BIAS_OFF ); - -regcache_mark_dirty (wm8955->regmap); - -return 0 ; -} - -static int wm8955_resume (struct snd_soc_codec *codec) -{ -wm8955_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); - -return 0 ; -} -#else -#define wm8955_suspend NULL -#define wm8955_resume NULL -#endif -static int wm8955_probe (struct snd_soc_codec *codec) {struct wm8955_priv *wm8955 =snd_soc_codec_get_drvdata (codec);
@@ -964,18 +941,10 @@ err_enable:return ret; } -static int wm8955_remove (struct snd_soc_codec *codec) -{ -wm8955_set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} -static struct snd_soc_codec_driver soc_codec_dev_wm8955 = { .probe = wm8955_probe, - .remove = wm8955_remove, - .suspend = wm8955_suspend, - .resume = wm8955_resume, .set_bias_level = wm8955_set_bias_level, + .suspend_bias_off = true, .controls = wm8955_snd_controls, .num_controls =ARRAY_SIZE (wm8955_snd_controls),
Signature · 1 line
1.8.0
Re: [PATCH 16/32] ASoC: wm8955: Cleanup manual bias level transitions
Quoted 4 lines · Lars-Peter Clausen
Set the CODEC driver's
suspend_bias_offflag rather than manually going toSND_SOC_BIAS_OFFin suspend andSND_SOC_BIAS_STANDBYin resume. This makes the code a bit shorter and cleaner. Also remove theregcache_mark_dirty()from the suspend handler since this is already done by the ASoC core.
Applied, thanks.
PATCH 17/32 ASoC: wm8960: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSet the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner.
Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe() can also be removed as the core will automatically do this after the CODEC has been probed.
--- sound/soc/codecs/wm8960.c | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-)
sound/soc/codecs/wm8960.c +1 -30
@@ -943,22 +943,6 @@ static struct snd_soc_dai_driver wm8960_dai = { .symmetric_rates = 1, }; -static int wm8960_suspend (struct snd_soc_codec *codec) -{ -struct wm8960_priv *wm8960 =snd_soc_codec_get_drvdata (codec); - - wm8960->set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} - -static int wm8960_resume (struct snd_soc_codec *codec) -{ -struct wm8960_priv *wm8960 =snd_soc_codec_get_drvdata (codec); - - wm8960->set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -return 0 ; -} -static int wm8960_probe (struct snd_soc_codec *codec) {struct wm8960_priv *wm8960 =snd_soc_codec_get_drvdata (codec);
@@ -976,8 +960,6 @@ static int wm8960_probe(struct snd_soc_codec *codec)return ret; } - wm8960->set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -/* Latch the update bits */ snd_soc_update_bits (codec,WM8960_LINVOL ,0x100 ,0x100 );snd_soc_update_bits (codec,WM8960_RINVOL ,0x100 ,0x100 );
@@ -997,21 +979,10 @@ static int wm8960_probe(struct snd_soc_codec *codec)return 0 ; } -/* power down chip */ -static int wm8960_remove (struct snd_soc_codec *codec) -{ -struct wm8960_priv *wm8960 =snd_soc_codec_get_drvdata (codec); - - wm8960->set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} -static struct snd_soc_codec_driver soc_codec_dev_wm8960 = { .probe = wm8960_probe, - .remove = wm8960_remove, - .suspend = wm8960_suspend, - .resume = wm8960_resume, .set_bias_level = wm8960_set_bias_level, + .suspend_bias_off = true, };static const struct regmap_config wm8960_regmap = {
Signature · 1 line
1.8.0
Re: [PATCH 17/32] ASoC: wm8960: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Set the CODEC driver's
suspend_bias_offflag rather than manually going toSND_SOC_BIAS_OFFin suspend andSND_SOC_BIAS_STANDBYin resume. This makes the code a bit shorter and cleaner.
Applied, thanks.
PATCH 18/32 ASoC: wm8961: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSet the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner.
Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe() can also be removed as the core will automatically do this after the CODEC has been probed.
--- sound/soc/codecs/wm8961.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-)
sound/soc/codecs/wm8961.c +1 -19
@@ -870,44 +870,26 @@ static int wm8961_probe(struct snd_soc_codec *codec) reg &= ~WM8961_MANUAL_MODE ;snd_soc_write (codec,WM8961_CLOCKING_3 , reg); -wm8961_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); - -return 0 ; -} - -static int wm8961_remove (struct snd_soc_codec *codec) -{ -wm8961_set_bias_level (codec,SND_SOC_BIAS_OFF );return 0 ; }#ifdef CONFIG_PM -static int wm8961_suspend (struct snd_soc_codec *codec) -{ -wm8961_set_bias_level (codec,SND_SOC_BIAS_OFF ); - -return 0 ; -}static int wm8961_resume (struct snd_soc_codec *codec) {snd_soc_cache_sync (codec); -wm8961_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -return 0 ; }#else -#define wm8961_suspend NULL#define wm8961_resume NULL#endif static struct snd_soc_codec_driver soc_codec_dev_wm8961 = { .probe = wm8961_probe, - .remove = wm8961_remove, - .suspend = wm8961_suspend, .resume = wm8961_resume, .set_bias_level = wm8961_set_bias_level, + .suspend_bias_off = true, .controls = wm8961_snd_controls, .num_controls =ARRAY_SIZE (wm8961_snd_controls),
Signature · 1 line
1.8.0
Re: [PATCH 18/32] ASoC: wm8961: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Set the CODEC driver's
suspend_bias_offflag rather than manually going toSND_SOC_BIAS_OFFin suspend andSND_SOC_BIAS_STANDBYin resume. This makes the code a bit shorter and cleaner.
Applied, thanks.
PATCH 19/32 ASoC: wm8974: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSet the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner.
Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe() can also be removed as the core will automatically do this after the CODEC has been probed.
--- sound/soc/codecs/wm8974.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-)
sound/soc/codecs/wm8974.c +1 -24
@@ -568,18 +568,6 @@ static struct snd_soc_dai_driver wm8974_dai = { .symmetric_rates = 1, }; -static int wm8974_suspend (struct snd_soc_codec *codec) -{ -wm8974_set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} - -static int wm8974_resume (struct snd_soc_codec *codec) -{ -wm8974_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -return 0 ; -} -static const struct regmap_config wm8974_regmap = { .reg_bits =7 , .val_bits =9 ,
@@ -599,24 +587,13 @@ static int wm8974_probe(struct snd_soc_codec *codec)return ret; } -wm8974_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); - -return ret; -} - -/* power down chip */ -static int wm8974_remove (struct snd_soc_codec *codec) -{ -wm8974_set_bias_level (codec,SND_SOC_BIAS_OFF );return 0 ; }static struct snd_soc_codec_driver soc_codec_dev_wm8974 = { .probe = wm8974_probe, - .remove = wm8974_remove, - .suspend = wm8974_suspend, - .resume = wm8974_resume, .set_bias_level = wm8974_set_bias_level, + .suspend_bias_off = true, .controls = wm8974_snd_controls, .num_controls =ARRAY_SIZE (wm8974_snd_controls),
Signature · 1 line
1.8.0
Re: [PATCH 19/32] ASoC: wm8974: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Set the CODEC driver's
suspend_bias_offflag rather than manually going toSND_SOC_BIAS_OFFin suspend andSND_SOC_BIAS_STANDBYin resume. This makes the code a bit shorter and cleaner.
Applied, thanks.
PATCH 20/32 ASoC: wm8978: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSince the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe() can also be removed as the core will automatically do this after the CODEC has been probed.
--- sound/soc/codecs/wm8978.c | 10 ---------- 1 file changed, 10 deletions(-)
sound/soc/codecs/wm8978.c +0 -10
@@ -991,21 +991,11 @@ static int wm8978_probe(struct snd_soc_codec *codec)for (i =0 ; i <ARRAY_SIZE (update_reg); i++)snd_soc_update_bits (codec, update_reg[i],0x100 ,0x100 ); -wm8978_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); - -return 0 ; -} - -/* power down chip */ -static int wm8978_remove (struct snd_soc_codec *codec) -{ -wm8978_set_bias_level (codec,SND_SOC_BIAS_OFF );return 0 ; }static struct snd_soc_codec_driver soc_codec_dev_wm8978 = { .probe = wm8978_probe, - .remove = wm8978_remove, .suspend = wm8978_suspend, .resume = wm8978_resume, .set_bias_level = wm8978_set_bias_level,
Signature · 1 line
1.8.0
Re: [PATCH 20/32] ASoC: wm8978: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFFwhen removing the CODEC there is no need to do it manually anymore either.
Applied, thanks.
PATCH 21/32 ASoC: wm8983: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSet the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner.
Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
--- sound/soc/codecs/wm8983.c | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-)
sound/soc/codecs/wm8983.c +1 -26
@@ -967,29 +967,6 @@ static int wm8983_set_bias_level(struct snd_soc_codec *codec,return 0 ; } -#ifdef CONFIG_PM -static int wm8983_suspend (struct snd_soc_codec *codec) -{ -wm8983_set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} - -static int wm8983_resume (struct snd_soc_codec *codec) -{ -wm8983_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -return 0 ; -} -#else -#define wm8983_suspend NULL -#define wm8983_resume NULL -#endif - -static int wm8983_remove (struct snd_soc_codec *codec) -{ -wm8983_set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} -static int wm8983_probe (struct snd_soc_codec *codec) {int ret;
@@ -1055,10 +1032,8 @@ static struct snd_soc_dai_driver wm8983_dai = {static struct snd_soc_codec_driver soc_codec_dev_wm8983 = { .probe = wm8983_probe, - .remove = wm8983_remove, - .suspend = wm8983_suspend, - .resume = wm8983_resume, .set_bias_level = wm8983_set_bias_level, + .suspend_bias_off = true, .controls = wm8983_snd_controls, .num_controls =ARRAY_SIZE (wm8983_snd_controls), .dapm_widgets = wm8983_dapm_widgets,
Signature · 1 line
1.8.0
Re: [PATCH 21/32] ASoC: wm8983: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Set the CODEC driver's
suspend_bias_offflag rather than manually going toSND_SOC_BIAS_OFFin suspend andSND_SOC_BIAS_STANDBYin resume. This makes the code a bit shorter and cleaner.
Applied, thanks.
PATCH 22/32 ASoC: wm8985: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSet the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner.
Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe() can also be removed as the core will automatically do this after the CODEC has been probed.
--- sound/soc/codecs/wm8985.c | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-)
sound/soc/codecs/wm8985.c +1 -27
@@ -961,29 +961,6 @@ static int wm8985_set_bias_level(struct snd_soc_codec *codec,return 0 ; } -#ifdef CONFIG_PM -static int wm8985_suspend (struct snd_soc_codec *codec) -{ -wm8985_set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} - -static int wm8985_resume (struct snd_soc_codec *codec) -{ -wm8985_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -return 0 ; -} -#else -#define wm8985_suspend NULL -#define wm8985_resume NULL -#endif - -static int wm8985_remove (struct snd_soc_codec *codec) -{ -wm8985_set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} -static int wm8985_probe (struct snd_soc_codec *codec) {size_t i;
@@ -1023,7 +1000,6 @@ static int wm8985_probe(struct snd_soc_codec *codec)snd_soc_update_bits (codec,WM8985_BIAS_CTRL ,WM8985_BIASCUT ,WM8985_BIASCUT ); -wm8985_set_bias_level (codec,SND_SOC_BIAS_STANDBY );return 0 ; err_reg_enable:
@@ -1064,10 +1040,8 @@ static struct snd_soc_dai_driver wm8985_dai = {static struct snd_soc_codec_driver soc_codec_dev_wm8985 = { .probe = wm8985_probe, - .remove = wm8985_remove, - .suspend = wm8985_suspend, - .resume = wm8985_resume, .set_bias_level = wm8985_set_bias_level, + .suspend_bias_off = true, .controls = wm8985_snd_controls, .num_controls =ARRAY_SIZE (wm8985_snd_controls),
Signature · 1 line
1.8.0
Re: [PATCH 22/32] ASoC: wm8985: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Set the CODEC driver's
suspend_bias_offflag rather than manually going toSND_SOC_BIAS_OFFin suspend andSND_SOC_BIAS_STANDBYin resume. This makes the code a bit shorter and cleaner.
Applied, thanks.
PATCH 23/32 ASoC: wm8988: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSet the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner. Also remove the regcache_mark_dirty() from the suspend handler since it is already called by the ASoC core.
Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe() can also be removed as the core will automatically do this after the CODEC has been probed.
--- sound/soc/codecs/wm8988.c | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-)
sound/soc/codecs/wm8988.c +1 -26
@@ -793,21 +793,6 @@ static struct snd_soc_dai_driver wm8988_dai = { .symmetric_rates = 1, }; -static int wm8988_suspend (struct snd_soc_codec *codec) -{ -struct wm8988_priv *wm8988 =snd_soc_codec_get_drvdata (codec); - -wm8988_set_bias_level (codec,SND_SOC_BIAS_OFF ); -regcache_mark_dirty (wm8988->regmap); -return 0 ; -} - -static int wm8988_resume (struct snd_soc_codec *codec) -{ -wm8988_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -return 0 ; -} -static int wm8988_probe (struct snd_soc_codec *codec) {int ret =0 ;
@@ -825,23 +810,13 @@ static int wm8988_probe(struct snd_soc_codec *codec)snd_soc_update_bits (codec,WM8988_ROUT2V ,0x0100 ,0x0100 );snd_soc_update_bits (codec,WM8988_RINVOL ,0x0100 ,0x0100 ); -wm8988_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); - -return 0 ; -} - -static int wm8988_remove (struct snd_soc_codec *codec) -{ -wm8988_set_bias_level (codec,SND_SOC_BIAS_OFF );return 0 ; }static struct snd_soc_codec_driver soc_codec_dev_wm8988 = { .probe = wm8988_probe, - .remove = wm8988_remove, - .suspend = wm8988_suspend, - .resume = wm8988_resume, .set_bias_level = wm8988_set_bias_level, + .suspend_bias_off = true, .controls = wm8988_snd_controls, .num_controls =ARRAY_SIZE (wm8988_snd_controls),
Signature · 1 line
1.8.0
Re: [PATCH 23/32] ASoC: wm8988: Cleanup manual bias level transitions
Quoted 4 lines · Lars-Peter Clausen
Set the CODEC driver's
suspend_bias_offflag rather than manually going toSND_SOC_BIAS_OFFin suspend andSND_SOC_BIAS_STANDBYin resume. This makes the code a bit shorter and cleaner. Also remove theregcache_mark_dirty()from the suspend handler since it is already called by the ASoC core.
Applied, thanks.
PATCH 24/32 ASoC: wm8990: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSet the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner.
Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
--- sound/soc/codecs/wm8990.c | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-)
sound/soc/codecs/wm8990.c +2 -22
@@ -1271,18 +1271,6 @@ static struct snd_soc_dai_driver wm8990_dai = { .ops = &wm8990_dai_ops, }; -static int wm8990_suspend (struct snd_soc_codec *codec) -{ -wm8990_set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} - -static int wm8990_resume (struct snd_soc_codec *codec) -{ -wm8990_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -return 0 ; -} -/* * initialise the WM8990 driver * register the mixer and dsp interfaces with the kernel
@@ -1309,19 +1297,11 @@ static int wm8990_probe(struct snd_soc_codec *codec)return 0 ; } -/* power down chip */ -static int wm8990_remove (struct snd_soc_codec *codec) -{ -wm8990_set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} -static struct snd_soc_codec_driver soc_codec_dev_wm8990 = { .probe = wm8990_probe, - .remove = wm8990_remove, - .suspend = wm8990_suspend, - .resume = wm8990_resume, .set_bias_level = wm8990_set_bias_level, + .suspend_bias_off = true, + .controls = wm8990_snd_controls, .num_controls =ARRAY_SIZE (wm8990_snd_controls), .dapm_widgets = wm8990_dapm_widgets,
Signature · 1 line
1.8.0
Re: [PATCH 24/32] ASoC: wm8990: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Set the CODEC driver's
suspend_bias_offflag rather than manually going toSND_SOC_BIAS_OFFin suspend andSND_SOC_BIAS_STANDBYin resume. This makes the code a bit shorter and cleaner.
Applied, thanks.
PATCH 25/32 ASoC: wm8991: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSet the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner.
Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe() can also be removed as the core will automatically do this after the CODEC has been probed.
--- sound/soc/codecs/wm8991.c | 32 ++------------------------------ 1 file changed, 2 insertions(+), 30 deletions(-)
sound/soc/codecs/wm8991.c +2 -30
@@ -1227,32 +1227,6 @@ static int wm8991_set_bias_level(struct snd_soc_codec *codec,return 0 ; } -static int wm8991_suspend (struct snd_soc_codec *codec) -{ -wm8991_set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} - -static int wm8991_resume (struct snd_soc_codec *codec) -{ -wm8991_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -return 0 ; -} - -/* power down chip */ -static int wm8991_remove (struct snd_soc_codec *codec) -{ -wm8991_set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} - -static int wm8991_probe (struct snd_soc_codec *codec) -{ -wm8991_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); - -return 0 ; -} -#define WM8991_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE)
@@ -1293,11 +1267,9 @@ static struct snd_soc_dai_driver wm8991_dai = { };static struct snd_soc_codec_driver soc_codec_dev_wm8991 = { - .probe = wm8991_probe, - .remove = wm8991_remove, - .suspend = wm8991_suspend, - .resume = wm8991_resume, .set_bias_level = wm8991_set_bias_level, + .suspend_bias_off = true, + .controls = wm8991_snd_controls, .num_controls =ARRAY_SIZE (wm8991_snd_controls), .dapm_widgets = wm8991_dapm_widgets,
Signature · 1 line
1.8.0
Re: [PATCH 25/32] ASoC: wm8991: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Set the CODEC driver's
suspend_bias_offflag rather than manually going toSND_SOC_BIAS_OFFin suspend andSND_SOC_BIAS_STANDBYin resume. This makes the code a bit shorter and cleaner.
Applied, thanks.
PATCH 26/32 ASoC: wm8993: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSince the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe() can also be removed as the core will automatically do this after the CODEC has been probed.
--- sound/soc/codecs/wm8993.c | 12 ------------ 1 file changed, 12 deletions(-)
sound/soc/codecs/wm8993.c +0 -12
@@ -1486,7 +1486,6 @@ 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; -int ret; wm8993->hubs_data.hp_startup_mode =1 ; wm8993->hubs_data.dcs_codes_l =-2 ;
@@ -1518,10 +1517,6 @@ static int wm8993_probe(struct snd_soc_codec *codec) wm8993->pdata.micbias1_lvl, wm8993->pdata.micbias2_lvl); - ret =wm8993_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -if (ret !=0 ) -return ret; -snd_soc_add_codec_controls (codec, wm8993_snd_controls,ARRAY_SIZE (wm8993_snd_controls));if (wm8993->pdata.num_retune_configs !=0 ) {
@@ -1550,12 +1545,6 @@ static int wm8993_probe(struct snd_soc_codec *codec) } -static int wm8993_remove (struct snd_soc_codec *codec) -{ -wm8993_set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} -#ifdef CONFIG_PM static int wm8993_suspend (struct snd_soc_codec *codec) {
@@ -1629,7 +1618,6 @@ static const struct regmap_config wm8993_regmap = {static struct snd_soc_codec_driver soc_codec_dev_wm8993 = { .probe = wm8993_probe, - .remove = wm8993_remove, .suspend = wm8993_suspend, .resume = wm8993_resume, .set_bias_level = wm8993_set_bias_level,
Signature · 1 line
1.8.0
Re: [PATCH 26/32] ASoC: wm8993: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFFwhen removing the CODEC there is no need to do it manually anymore either.
Applied, thanks.
PATCH 27/32 ASoC: wm8994: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSince the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
--- sound/soc/codecs/wm8994.c | 2 -- 1 file changed, 2 deletions(-)
sound/soc/codecs/wm8994.c +0 -2
@@ -4391,8 +4391,6 @@ static int wm8994_codec_remove(struct snd_soc_codec *codec)struct wm8994 *control = wm8994->wm8994;int i; -wm8994_set_bias_level (codec,SND_SOC_BIAS_OFF ); -for (i =0 ; i <ARRAY_SIZE (wm8994->fll_locked); i++)wm8994_free_irq (wm8994->wm8994,WM8994_IRQ_FLL1_LOCK + i, &wm8994->fll_locked[i]);
Signature · 1 line
1.8.0
Re: [PATCH 27/32] ASoC: wm8994: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFFwhen removing the CODEC there is no need to do it manually anymore either.
Applied, thanks.
PATCH 28/32 ASoC: wm8995: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSince the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe() can also be removed as the core will automatically do this after the CODEC has been probed.
--- sound/soc/codecs/wm8995.c | 3 --- 1 file changed, 3 deletions(-)
sound/soc/codecs/wm8995.c +0 -3
@@ -2004,7 +2004,6 @@ static int wm8995_remove(struct snd_soc_codec *codec)int i; wm8995 =snd_soc_codec_get_drvdata (codec); -wm8995_set_bias_level (codec,SND_SOC_BIAS_OFF );for (i =0 ; i <ARRAY_SIZE (wm8995->supplies); ++i) regulator_unregister_notifier(wm8995->supplies[i].consumer,
@@ -2078,8 +2077,6 @@ static int wm8995_probe(struct snd_soc_codec *codec) goto err_reg_enable; } -wm8995_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -/* Latch volume updates (right only; we always do left then right). */ snd_soc_update_bits (codec,WM8995_AIF1_DAC1_RIGHT_VOLUME ,WM8995_AIF1DAC1_VU_MASK ,WM8995_AIF1DAC1_VU );
Signature · 1 line
1.8.0
Re: [PATCH 28/32] ASoC: wm8995: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFFwhen removing the CODEC there is no need to do it manually anymore either.
Applied, thanks.
PATCH 29/32 ASoC: wm9081: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSince the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
--- sound/soc/codecs/wm9081.c | 7 ------- 1 file changed, 7 deletions(-)
sound/soc/codecs/wm9081.c +0 -7
@@ -1277,15 +1277,8 @@ static int wm9081_probe(struct snd_soc_codec *codec)return 0 ; } -static int wm9081_remove (struct snd_soc_codec *codec) -{ -wm9081_set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} -static struct snd_soc_codec_driver soc_codec_dev_wm9081 = { .probe = wm9081_probe, - .remove = wm9081_remove, .set_sysclk = wm9081_set_sysclk, .set_bias_level = wm9081_set_bias_level,
Signature · 1 line
1.8.0
Re: [PATCH 29/32] ASoC: wm9081: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFFwhen removing the CODEC there is no need to do it manually anymore either.
Applied, thanks.
PATCH 30/32 ASoC: wm9090: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSet the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner.
Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either.
The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe() can also be removed as the core will automatically do this after the CODEC has been probed.
--- sound/soc/codecs/wm9090.c | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-)
sound/soc/codecs/wm9090.c +1 -31
@@ -550,45 +550,15 @@ static int wm9090_probe(struct snd_soc_codec *codec)snd_soc_update_bits (codec,WM9090_CLOCKING_1 ,WM9090_TOCLK_ENA ,WM9090_TOCLK_ENA ); -wm9090_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -wm9090_add_controls (codec);return 0 ; } -#ifdef CONFIG_PM -static int wm9090_suspend (struct snd_soc_codec *codec) -{ -wm9090_set_bias_level (codec,SND_SOC_BIAS_OFF ); - -return 0 ; -} - -static int wm9090_resume (struct snd_soc_codec *codec) -{ -wm9090_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); - -return 0 ; -} -#else -#define wm9090_suspend NULL -#define wm9090_resume NULL -#endif - -static int wm9090_remove (struct snd_soc_codec *codec) -{ -wm9090_set_bias_level (codec,SND_SOC_BIAS_OFF ); - -return 0 ; -} -static struct snd_soc_codec_driver soc_codec_dev_wm9090 = { .probe = wm9090_probe, - .remove = wm9090_remove, - .suspend = wm9090_suspend, - .resume = wm9090_resume, .set_bias_level = wm9090_set_bias_level, + .suspend_bias_off = true, };static const struct regmap_config wm9090_regmap = {
Signature · 1 line
1.8.0
Re: [PATCH 30/32] ASoC: wm9090: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
Set the CODEC driver's
suspend_bias_offflag rather than manually going toSND_SOC_BIAS_OFFin suspend andSND_SOC_BIAS_STANDBYin resume. This makes the code a bit shorter and cleaner.
Applied, thanks.
PATCH 31/32 ASoC: wm9712: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenSet the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend. This makes the code a bit shorter and cleaner.
The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe() can also be removed as the core will automatically do this after the CODEC has been probed.
--- sound/soc/codecs/wm9712.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)
sound/soc/codecs/wm9712.c +1 -9
@@ -636,12 +636,6 @@ err:return -EIO ; } -static int wm9712_soc_suspend (struct snd_soc_codec *codec) -{ -wm9712_set_bias_level (codec,SND_SOC_BIAS_OFF ); -return 0 ; -} -static int wm9712_soc_resume (struct snd_soc_codec *codec) {struct wm9712_priv *wm9712 =snd_soc_codec_get_drvdata (codec);
@@ -686,8 +680,6 @@ static int wm9712_soc_probe(struct snd_soc_codec *codec)/* set alc mux to none */ ac97_write (codec,AC97_VIDEO ,ac97_read (codec,AC97_VIDEO ) |0x3000 ); -wm9712_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -return 0 ; reset_err:
@@ -706,11 +698,11 @@ static int wm9712_soc_remove(struct snd_soc_codec *codec)static struct snd_soc_codec_driver soc_codec_dev_wm9712 = { .probe = wm9712_soc_probe, .remove = wm9712_soc_remove, - .suspend = wm9712_soc_suspend, .resume = wm9712_soc_resume, .read = ac97_read, .write = ac97_write, .set_bias_level = wm9712_set_bias_level, + .suspend_bias_off = true, .reg_cache_size =ARRAY_SIZE (wm9712_reg), .reg_word_size =sizeof (u16), .reg_cache_step =2 ,
Signature · 1 line
1.8.0
Re: [PATCH 31/32] ASoC: wm9712: Cleanup manual bias level transitions
Quoted 2 lines · Lars-Peter Clausen
Set the CODEC driver's
suspend_bias_offflag rather than manually going toSND_SOC_BIAS_OFFin suspend. This makes the code a bit shorter and cleaner.
Applied, thanks.
PATCH 32/32 ASoC: wm9713: Cleanup manual bias level transitions
In reply to Lars-Peter ClausenThe manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe() can also be removed as the core will automatically do this after the CODEC has been probed.
--- sound/soc/codecs/wm9713.c | 2 -- 1 file changed, 2 deletions(-)
sound/soc/codecs/wm9713.c +0 -2
@@ -1236,8 +1236,6 @@ static int wm9713_soc_probe(struct snd_soc_codec *codec)if (ret <0 ) goto reset_err; -wm9713_set_bias_level (codec,SND_SOC_BIAS_STANDBY ); -/* unmute the adc - move to kcontrol */ reg =ac97_read (codec,AC97_CD ) &0x7fff ;ac97_write (codec,AC97_CD , reg);
Signature · 1 line
1.8.0
Re: [PATCH 32/32] ASoC: wm9713: Cleanup manual bias level transitions
Quoted 3 lines · Lars-Peter Clausen
The manual transition to
SND_SOC_BIAS_STANDBYat the end of CODECprobe()can also be removed as the core will automatically do this after the CODEC has been probed.
Applied, thanks.
Quoted 8 lines · Lars-Peter Clausen
Set the CODEC driver's
suspend_bias_offflag rather than manually going toSND_SOC_BIAS_OFFin suspend andSND_SOC_BIAS_STANDBYin resume. This makes the code a bit shorter and cleaner.Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFFwhen removing the CODEC there is no need to do it manually anymore either.
Quoted 6 lines
The manual transition to
SND_SOC_BIAS_STANDBYat the end of CODECprobe()can also be removed as the core will automatically do this after the CODEC has been probed.Signed-off-by Lars-Peter Clausen <[email protected]>---
Whole series looks good to me:
Thanks,
Charles
Quoted 3 lines · Lars-Peter Clausen
Set the CODEC driver's
suspend_bias_offflag rather than manually going toSND_SOC_BIAS_OFFin suspend andSND_SOC_BIAS_STANDBYin resume. This makes the code a bit shorter and cleaner.
Applied, thanks.