ASoC: Remove unneeded suspend bias managment from CODEC drivers
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 7 May 2010 19:30:00 +0000 (20:30 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 10 May 2010 09:35:25 +0000 (10:35 +0100)
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: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
21 files changed:
sound/soc/codecs/ak4535.c
sound/soc/codecs/cq93vc.c
sound/soc/codecs/ssm2602.c
sound/soc/codecs/stac9766.c
sound/soc/codecs/tlv320aic23.c
sound/soc/codecs/tlv320aic3x.c
sound/soc/codecs/tlv320dac33.c
sound/soc/codecs/twl4030.c
sound/soc/codecs/twl6040.c
sound/soc/codecs/uda1380.c
sound/soc/codecs/wm8350.c
sound/soc/codecs/wm8510.c
sound/soc/codecs/wm8711.c
sound/soc/codecs/wm8728.c
sound/soc/codecs/wm8731.c
sound/soc/codecs/wm8903.c
sound/soc/codecs/wm8940.c
sound/soc/codecs/wm8960.c
sound/soc/codecs/wm8974.c
sound/soc/codecs/wm9712.c
sound/soc/codecs/wm9713.c

index 2f6221b2ebb5780778f39b191fdf8d67043e71f5..b5917df0d2a8ef1f01f55f421034986232a4bda1 100644 (file)
@@ -445,7 +445,6 @@ static int ak4535_resume(struct platform_device *pdev)
        struct snd_soc_codec *codec = socdev->card->codec;
        ak4535_sync(codec);
        ak4535_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
-       ak4535_set_bias_level(codec, codec->suspend_bias_level);
        return 0;
 }
 
index 8f19b9310645fc9495f5e1331cd27cd8e167d024..a320fb5a0e26afefba683311539584a71c6ade7c 100644 (file)
@@ -153,7 +153,7 @@ static int cq93vc_resume(struct platform_device *pdev)
        struct snd_soc_device *socdev = platform_get_drvdata(pdev);
        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;
 }
index 99ddec7df6140ec04761b2285d38f41f84bc791f..f18c8b2d96d4e96275bb781e3270fde220c4e548 100644 (file)
@@ -559,7 +559,6 @@ static int ssm2602_resume(struct platform_device *pdev)
                codec->hw_write(codec->control_data, data, 2);
        }
        ssm2602_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
-       ssm2602_set_bias_level(codec, codec->suspend_bias_level);
        return 0;
 }
 
index a1c7ca869d0e0a7037509beea1164bd86f3c1f84..e90fe295c655a8d5f1170b2d31ad547ee18d57a9 100644 (file)
@@ -288,9 +288,6 @@ reset:
        }
        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;
 }
 
index da589d8664d0d52ce44d6cc0efc7f57981cfdd69..40bcbbad07ffce729347bffb83be4f96c3259309 100644 (file)
@@ -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, codec->suspend_bias_level);
 
        return 0;
 }
index d57372be7a963b626d76929206f93ccebb17b8e5..eafa164a8f861d542c72cfde9c19653ddcb1e5ea 100644 (file)
@@ -1143,7 +1143,7 @@ static int aic3x_resume(struct platform_device *pdev)
                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;
 }
index ad5e2636c94495f28609e26b8895084cbf22c34b..007fe830be46f5a5d46a82308d259c84932eefd2 100644 (file)
@@ -1386,9 +1386,6 @@ static int dac33_soc_resume(struct platform_device *pdev)
        struct snd_soc_codec *codec = socdev->card->codec;
 
        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;
 }
index b717a03dfacf151ed9ef463a20962e2cc4e0ee47..0fe74d1e2c5fb3082cc836d813d27f37204e1d6d 100644 (file)
@@ -2181,7 +2181,6 @@ static int twl4030_soc_resume(struct platform_device *pdev)
        struct snd_soc_codec *codec = socdev->card->codec;
 
        twl4030_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
-       twl4030_set_bias_level(codec, codec->suspend_bias_level);
        return 0;
 }
 
index ead6d4b43b25f3076eb3ee5008046278654bf78c..2ae442edeb9a7884f494353547b2e8cc788df937 100644 (file)
@@ -996,7 +996,6 @@ static int twl6040_resume(struct platform_device *pdev)
        struct snd_soc_codec *codec = socdev->card->codec;
 
        twl6040_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
-       twl6040_set_bias_level(codec, codec->suspend_bias_level);
 
        return 0;
 }
index ecba686563aa5afc1d9a663a35c1f9f89f0f4e3c..2f925a27dcde2353f35566aa8dd2f057ebe3a971 100644 (file)
@@ -670,7 +670,6 @@ static int uda1380_resume(struct platform_device *pdev)
                codec->hw_write(codec->control_data, data, 2);
        }
        uda1380_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
-       uda1380_set_bias_level(codec, codec->suspend_bias_level);
        return 0;
 }
 
index 145467d370546e8c588d69d124df2cad56c58850..e5a48da65f824a3c333c493a8cab0dc9509c0df0 100644 (file)
@@ -1336,9 +1336,6 @@ static int wm8350_resume(struct platform_device *pdev)
 
        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;
 }
 
index af8cb6995a1f5d053ffda2e348c6cf489270d5f2..d3527001b17808e4e8f0b6e1fe1f24ba68348a0d 100644 (file)
@@ -556,7 +556,7 @@ static int wm8510_resume(struct platform_device *pdev)
                codec->hw_write(codec->control_data, data, 2);
        }
        wm8510_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
-       wm8510_set_bias_level(codec, codec->suspend_bias_level);
+
        return 0;
 }
 
index f350c5ecd0939e36b90ee4f327b81ad59fabb325..5acd35bdfd531907579434f9bc8918c41e8ec8d2 100644 (file)
@@ -375,7 +375,7 @@ static int wm8711_resume(struct platform_device *pdev)
                codec->hw_write(codec->control_data, data, 2);
        }
        wm8711_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
-       wm8711_set_bias_level(codec, codec->suspend_bias_level);
+
        return 0;
 }
 
index 3fb653ba363a1da03ab8d702ab6add9b45e4cb34..bf56a58d0916c38da2e834f3ae108f82d19f3544 100644 (file)
@@ -237,7 +237,7 @@ static int wm8728_resume(struct platform_device *pdev)
        struct snd_soc_device *socdev = platform_get_drvdata(pdev);
        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;
 }
index 63f90c4ad93a8fb7f31d1ee53693877bbb772dab..c4b63538bb773578e35c2d7478ae3f2a554819b3 100644 (file)
@@ -460,7 +460,6 @@ static int wm8731_resume(struct platform_device *pdev)
                codec->hw_write(codec->control_data, data, 2);
        }
        wm8731_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
-       wm8731_set_bias_level(codec, codec->suspend_bias_level);
 
        return 0;
 }
index 5a2510c39c109ceffb114aef33bbe152be02110e..05b28cf0f96f2beb8b6f4e16c999b72a2c3588b7 100644 (file)
@@ -1628,7 +1628,6 @@ static int wm8903_resume(struct platform_device *pdev)
 
        /* 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, codec->suspend_bias_level);
 
        /* Sync back everything else */
        if (tmp_cache) {
index b2f12828630c90649558215e60117388e442e3d5..e313ab5de85afb0cf5de66f543554009d5fd4362 100644 (file)
@@ -691,7 +691,6 @@ static int wm8940_resume(struct platform_device *pdev)
        ret = wm8940_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
        if (ret)
                goto error_ret;
-       ret = wm8940_set_bias_level(codec, codec->suspend_bias_level);
 
 error_ret:
        return ret;
index 50b2376680c15a6dccf6a55c82ac4bad0f56940c..518c84e623abd7bbc95d08a2a369fb05a6192319 100644 (file)
@@ -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, codec->suspend_bias_level);
+
        return 0;
 }
 
index 270eb956294f375879bbeac465fc4a7be7439a6f..44841fec55454fa8c16ae7bfaae8df72eaab4c8f 100644 (file)
@@ -608,7 +608,7 @@ static int wm8974_resume(struct platform_device *pdev)
                codec->hw_write(codec->control_data, data, 2);
        }
        wm8974_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
-       wm8974_set_bias_level(codec, codec->suspend_bias_level);
+
        return 0;
 }
 
index e237bf615129cb7e32799f85762842bd683898a4..dd4b6ce01cebcb59e0550376d77576ad3139dac8 100644 (file)
@@ -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;
 }
 
index d2244c93f5813c7018f0c47455a26a5cb717bb4f..6a30b844a671d6fe3acab3d0d17787707cea64fa 100644 (file)
@@ -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;
 }