Commit 29e189c2 authored by Mark Brown's avatar Mark Brown

ASoC: Remove unneeded suspend bias managment from CODEC drivers

The core will ensure that the device is in either STANDBY or OFF bias
before suspending, restoring the bias in the driver is unneeded. Some
drivers doing slightly more roundabout things have been left alone
for now.
Tested-by: default avatarPeter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent d0bbc24d
...@@ -445,7 +445,6 @@ static int ak4535_resume(struct platform_device *pdev) ...@@ -445,7 +445,6 @@ static int ak4535_resume(struct platform_device *pdev)
struct snd_soc_codec *codec = socdev->card->codec; struct snd_soc_codec *codec = socdev->card->codec;
ak4535_sync(codec); ak4535_sync(codec);
ak4535_set_bias_level(codec, SND_SOC_BIAS_STANDBY); ak4535_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
ak4535_set_bias_level(codec, codec->suspend_bias_level);
return 0; return 0;
} }
......
...@@ -153,7 +153,7 @@ static int cq93vc_resume(struct platform_device *pdev) ...@@ -153,7 +153,7 @@ static int cq93vc_resume(struct platform_device *pdev)
struct snd_soc_device *socdev = platform_get_drvdata(pdev); struct snd_soc_device *socdev = platform_get_drvdata(pdev);
struct snd_soc_codec *codec = socdev->card->codec; struct snd_soc_codec *codec = socdev->card->codec;
cq93vc_set_bias_level(codec, codec->suspend_bias_level); cq93vc_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
return 0; return 0;
} }
......
...@@ -559,7 +559,6 @@ static int ssm2602_resume(struct platform_device *pdev) ...@@ -559,7 +559,6 @@ static int ssm2602_resume(struct platform_device *pdev)
codec->hw_write(codec->control_data, data, 2); codec->hw_write(codec->control_data, data, 2);
} }
ssm2602_set_bias_level(codec, SND_SOC_BIAS_STANDBY); ssm2602_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
ssm2602_set_bias_level(codec, codec->suspend_bias_level);
return 0; return 0;
} }
......
...@@ -288,9 +288,6 @@ static int stac9766_codec_resume(struct platform_device *pdev) ...@@ -288,9 +288,6 @@ static int stac9766_codec_resume(struct platform_device *pdev)
} }
stac9766_set_bias_level(codec, SND_SOC_BIAS_STANDBY); stac9766_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
if (codec->suspend_bias_level == SND_SOC_BIAS_ON)
stac9766_set_bias_level(codec, SND_SOC_BIAS_ON);
return 0; return 0;
} }
......
...@@ -633,7 +633,6 @@ static int tlv320aic23_resume(struct platform_device *pdev) ...@@ -633,7 +633,6 @@ static int tlv320aic23_resume(struct platform_device *pdev)
} }
tlv320aic23_set_bias_level(codec, SND_SOC_BIAS_STANDBY); tlv320aic23_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
tlv320aic23_set_bias_level(codec, codec->suspend_bias_level);
return 0; return 0;
} }
......
...@@ -1143,7 +1143,7 @@ static int aic3x_resume(struct platform_device *pdev) ...@@ -1143,7 +1143,7 @@ static int aic3x_resume(struct platform_device *pdev)
codec->hw_write(codec->control_data, data, 2); codec->hw_write(codec->control_data, data, 2);
} }
aic3x_set_bias_level(codec, codec->suspend_bias_level); aic3x_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
return 0; return 0;
} }
......
...@@ -1386,9 +1386,6 @@ static int dac33_soc_resume(struct platform_device *pdev) ...@@ -1386,9 +1386,6 @@ static int dac33_soc_resume(struct platform_device *pdev)
struct snd_soc_codec *codec = socdev->card->codec; struct snd_soc_codec *codec = socdev->card->codec;
dac33_set_bias_level(codec, SND_SOC_BIAS_STANDBY); dac33_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
if (codec->suspend_bias_level == SND_SOC_BIAS_ON)
dac33_set_bias_level(codec, SND_SOC_BIAS_PREPARE);
dac33_set_bias_level(codec, codec->suspend_bias_level);
return 0; return 0;
} }
......
...@@ -2181,7 +2181,6 @@ static int twl4030_soc_resume(struct platform_device *pdev) ...@@ -2181,7 +2181,6 @@ static int twl4030_soc_resume(struct platform_device *pdev)
struct snd_soc_codec *codec = socdev->card->codec; struct snd_soc_codec *codec = socdev->card->codec;
twl4030_set_bias_level(codec, SND_SOC_BIAS_STANDBY); twl4030_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
twl4030_set_bias_level(codec, codec->suspend_bias_level);
return 0; return 0;
} }
......
...@@ -996,7 +996,6 @@ static int twl6040_resume(struct platform_device *pdev) ...@@ -996,7 +996,6 @@ static int twl6040_resume(struct platform_device *pdev)
struct snd_soc_codec *codec = socdev->card->codec; struct snd_soc_codec *codec = socdev->card->codec;
twl6040_set_bias_level(codec, SND_SOC_BIAS_STANDBY); twl6040_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
twl6040_set_bias_level(codec, codec->suspend_bias_level);
return 0; return 0;
} }
......
...@@ -670,7 +670,6 @@ static int uda1380_resume(struct platform_device *pdev) ...@@ -670,7 +670,6 @@ static int uda1380_resume(struct platform_device *pdev)
codec->hw_write(codec->control_data, data, 2); codec->hw_write(codec->control_data, data, 2);
} }
uda1380_set_bias_level(codec, SND_SOC_BIAS_STANDBY); uda1380_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
uda1380_set_bias_level(codec, codec->suspend_bias_level);
return 0; return 0;
} }
......
...@@ -1336,9 +1336,6 @@ static int wm8350_resume(struct platform_device *pdev) ...@@ -1336,9 +1336,6 @@ static int wm8350_resume(struct platform_device *pdev)
wm8350_set_bias_level(codec, SND_SOC_BIAS_STANDBY); wm8350_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
if (codec->suspend_bias_level == SND_SOC_BIAS_ON)
wm8350_set_bias_level(codec, SND_SOC_BIAS_ON);
return 0; return 0;
} }
......
...@@ -556,7 +556,7 @@ static int wm8510_resume(struct platform_device *pdev) ...@@ -556,7 +556,7 @@ static int wm8510_resume(struct platform_device *pdev)
codec->hw_write(codec->control_data, data, 2); codec->hw_write(codec->control_data, data, 2);
} }
wm8510_set_bias_level(codec, SND_SOC_BIAS_STANDBY); wm8510_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
wm8510_set_bias_level(codec, codec->suspend_bias_level);
return 0; return 0;
} }
......
...@@ -375,7 +375,7 @@ static int wm8711_resume(struct platform_device *pdev) ...@@ -375,7 +375,7 @@ static int wm8711_resume(struct platform_device *pdev)
codec->hw_write(codec->control_data, data, 2); codec->hw_write(codec->control_data, data, 2);
} }
wm8711_set_bias_level(codec, SND_SOC_BIAS_STANDBY); wm8711_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
wm8711_set_bias_level(codec, codec->suspend_bias_level);
return 0; return 0;
} }
......
...@@ -237,7 +237,7 @@ static int wm8728_resume(struct platform_device *pdev) ...@@ -237,7 +237,7 @@ static int wm8728_resume(struct platform_device *pdev)
struct snd_soc_device *socdev = platform_get_drvdata(pdev); struct snd_soc_device *socdev = platform_get_drvdata(pdev);
struct snd_soc_codec *codec = socdev->card->codec; struct snd_soc_codec *codec = socdev->card->codec;
wm8728_set_bias_level(codec, codec->suspend_bias_level); wm8728_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
return 0; return 0;
} }
......
...@@ -460,7 +460,6 @@ static int wm8731_resume(struct platform_device *pdev) ...@@ -460,7 +460,6 @@ static int wm8731_resume(struct platform_device *pdev)
codec->hw_write(codec->control_data, data, 2); codec->hw_write(codec->control_data, data, 2);
} }
wm8731_set_bias_level(codec, SND_SOC_BIAS_STANDBY); wm8731_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
wm8731_set_bias_level(codec, codec->suspend_bias_level);
return 0; return 0;
} }
......
...@@ -1628,7 +1628,6 @@ static int wm8903_resume(struct platform_device *pdev) ...@@ -1628,7 +1628,6 @@ static int wm8903_resume(struct platform_device *pdev)
/* Bring the codec back up to standby first to minimise pop/clicks */ /* Bring the codec back up to standby first to minimise pop/clicks */
wm8903_set_bias_level(codec, SND_SOC_BIAS_STANDBY); wm8903_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
wm8903_set_bias_level(codec, codec->suspend_bias_level);
/* Sync back everything else */ /* Sync back everything else */
if (tmp_cache) { if (tmp_cache) {
......
...@@ -691,7 +691,6 @@ static int wm8940_resume(struct platform_device *pdev) ...@@ -691,7 +691,6 @@ static int wm8940_resume(struct platform_device *pdev)
ret = wm8940_set_bias_level(codec, SND_SOC_BIAS_STANDBY); ret = wm8940_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
if (ret) if (ret)
goto error_ret; goto error_ret;
ret = wm8940_set_bias_level(codec, codec->suspend_bias_level);
error_ret: error_ret:
return ret; return ret;
......
...@@ -823,7 +823,7 @@ static int wm8960_resume(struct platform_device *pdev) ...@@ -823,7 +823,7 @@ static int wm8960_resume(struct platform_device *pdev)
} }
codec->set_bias_level(codec, SND_SOC_BIAS_STANDBY); codec->set_bias_level(codec, SND_SOC_BIAS_STANDBY);
codec->set_bias_level(codec, codec->suspend_bias_level);
return 0; return 0;
} }
......
...@@ -608,7 +608,7 @@ static int wm8974_resume(struct platform_device *pdev) ...@@ -608,7 +608,7 @@ static int wm8974_resume(struct platform_device *pdev)
codec->hw_write(codec->control_data, data, 2); codec->hw_write(codec->control_data, data, 2);
} }
wm8974_set_bias_level(codec, SND_SOC_BIAS_STANDBY); wm8974_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
wm8974_set_bias_level(codec, codec->suspend_bias_level);
return 0; return 0;
} }
......
...@@ -631,9 +631,6 @@ static int wm9712_soc_resume(struct platform_device *pdev) ...@@ -631,9 +631,6 @@ static int wm9712_soc_resume(struct platform_device *pdev)
} }
} }
if (codec->suspend_bias_level == SND_SOC_BIAS_ON)
wm9712_set_bias_level(codec, SND_SOC_BIAS_ON);
return ret; return ret;
} }
......
...@@ -1200,9 +1200,6 @@ static int wm9713_soc_resume(struct platform_device *pdev) ...@@ -1200,9 +1200,6 @@ static int wm9713_soc_resume(struct platform_device *pdev)
} }
} }
if (codec->suspend_bias_level == SND_SOC_BIAS_ON)
wm9713_set_bias_level(codec, SND_SOC_BIAS_ON);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment