aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-05-07 15:30:00 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-05-10 05:35:25 -0400
commit29e189c29d33d273424327ca4c1a74d8cdc04f48 (patch)
tree75c56fbe88d43f2f4ce20849267b8b230970850b
parentd0bbc24d2ab78d9efc61bc80cfc85f59626ba5af (diff)
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: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--sound/soc/codecs/ak4535.c1
-rw-r--r--sound/soc/codecs/cq93vc.c2
-rw-r--r--sound/soc/codecs/ssm2602.c1
-rw-r--r--sound/soc/codecs/stac9766.c3
-rw-r--r--sound/soc/codecs/tlv320aic23.c1
-rw-r--r--sound/soc/codecs/tlv320aic3x.c2
-rw-r--r--sound/soc/codecs/tlv320dac33.c3
-rw-r--r--sound/soc/codecs/twl4030.c1
-rw-r--r--sound/soc/codecs/twl6040.c1
-rw-r--r--sound/soc/codecs/uda1380.c1
-rw-r--r--sound/soc/codecs/wm8350.c3
-rw-r--r--sound/soc/codecs/wm8510.c2
-rw-r--r--sound/soc/codecs/wm8711.c2
-rw-r--r--sound/soc/codecs/wm8728.c2
-rw-r--r--sound/soc/codecs/wm8731.c1
-rw-r--r--sound/soc/codecs/wm8903.c1
-rw-r--r--sound/soc/codecs/wm8940.c1
-rw-r--r--sound/soc/codecs/wm8960.c2
-rw-r--r--sound/soc/codecs/wm8974.c2
-rw-r--r--sound/soc/codecs/wm9712.c3
-rw-r--r--sound/soc/codecs/wm9713.c3
21 files changed, 7 insertions, 31 deletions
diff --git a/sound/soc/codecs/ak4535.c b/sound/soc/codecs/ak4535.c
index 2f6221b2ebb5..b5917df0d2a8 100644
--- a/sound/soc/codecs/ak4535.c
+++ b/sound/soc/codecs/ak4535.c
@@ -445,7 +445,6 @@ static int ak4535_resume(struct platform_device *pdev)
445 struct snd_soc_codec *codec = socdev->card->codec; 445 struct snd_soc_codec *codec = socdev->card->codec;
446 ak4535_sync(codec); 446 ak4535_sync(codec);
447 ak4535_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 447 ak4535_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
448 ak4535_set_bias_level(codec, codec->suspend_bias_level);
449 return 0; 448 return 0;
450} 449}
451 450
diff --git a/sound/soc/codecs/cq93vc.c b/sound/soc/codecs/cq93vc.c
index 8f19b9310645..a320fb5a0e26 100644
--- a/sound/soc/codecs/cq93vc.c
+++ b/sound/soc/codecs/cq93vc.c
@@ -153,7 +153,7 @@ static int cq93vc_resume(struct platform_device *pdev)
153 struct snd_soc_device *socdev = platform_get_drvdata(pdev); 153 struct snd_soc_device *socdev = platform_get_drvdata(pdev);
154 struct snd_soc_codec *codec = socdev->card->codec; 154 struct snd_soc_codec *codec = socdev->card->codec;
155 155
156 cq93vc_set_bias_level(codec, codec->suspend_bias_level); 156 cq93vc_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
157 157
158 return 0; 158 return 0;
159} 159}
diff --git a/sound/soc/codecs/ssm2602.c b/sound/soc/codecs/ssm2602.c
index 99ddec7df614..f18c8b2d96d4 100644
--- a/sound/soc/codecs/ssm2602.c
+++ b/sound/soc/codecs/ssm2602.c
@@ -559,7 +559,6 @@ static int ssm2602_resume(struct platform_device *pdev)
559 codec->hw_write(codec->control_data, data, 2); 559 codec->hw_write(codec->control_data, data, 2);
560 } 560 }
561 ssm2602_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 561 ssm2602_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
562 ssm2602_set_bias_level(codec, codec->suspend_bias_level);
563 return 0; 562 return 0;
564} 563}
565 564
diff --git a/sound/soc/codecs/stac9766.c b/sound/soc/codecs/stac9766.c
index a1c7ca869d0e..e90fe295c655 100644
--- a/sound/soc/codecs/stac9766.c
+++ b/sound/soc/codecs/stac9766.c
@@ -288,9 +288,6 @@ reset:
288 } 288 }
289 stac9766_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 289 stac9766_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
290 290
291 if (codec->suspend_bias_level == SND_SOC_BIAS_ON)
292 stac9766_set_bias_level(codec, SND_SOC_BIAS_ON);
293
294 return 0; 291 return 0;
295} 292}
296 293
diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c
index da589d8664d0..40bcbbad07ff 100644
--- a/sound/soc/codecs/tlv320aic23.c
+++ b/sound/soc/codecs/tlv320aic23.c
@@ -633,7 +633,6 @@ static int tlv320aic23_resume(struct platform_device *pdev)
633 } 633 }
634 634
635 tlv320aic23_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 635 tlv320aic23_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
636 tlv320aic23_set_bias_level(codec, codec->suspend_bias_level);
637 636
638 return 0; 637 return 0;
639} 638}
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index d57372be7a96..eafa164a8f86 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -1143,7 +1143,7 @@ static int aic3x_resume(struct platform_device *pdev)
1143 codec->hw_write(codec->control_data, data, 2); 1143 codec->hw_write(codec->control_data, data, 2);
1144 } 1144 }
1145 1145
1146 aic3x_set_bias_level(codec, codec->suspend_bias_level); 1146 aic3x_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
1147 1147
1148 return 0; 1148 return 0;
1149} 1149}
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c
index ad5e2636c944..007fe830be46 100644
--- a/sound/soc/codecs/tlv320dac33.c
+++ b/sound/soc/codecs/tlv320dac33.c
@@ -1386,9 +1386,6 @@ static int dac33_soc_resume(struct platform_device *pdev)
1386 struct snd_soc_codec *codec = socdev->card->codec; 1386 struct snd_soc_codec *codec = socdev->card->codec;
1387 1387
1388 dac33_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 1388 dac33_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
1389 if (codec->suspend_bias_level == SND_SOC_BIAS_ON)
1390 dac33_set_bias_level(codec, SND_SOC_BIAS_PREPARE);
1391 dac33_set_bias_level(codec, codec->suspend_bias_level);
1392 1389
1393 return 0; 1390 return 0;
1394} 1391}
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
index b717a03dfacf..0fe74d1e2c5f 100644
--- a/sound/soc/codecs/twl4030.c
+++ b/sound/soc/codecs/twl4030.c
@@ -2181,7 +2181,6 @@ static int twl4030_soc_resume(struct platform_device *pdev)
2181 struct snd_soc_codec *codec = socdev->card->codec; 2181 struct snd_soc_codec *codec = socdev->card->codec;
2182 2182
2183 twl4030_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 2183 twl4030_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
2184 twl4030_set_bias_level(codec, codec->suspend_bias_level);
2185 return 0; 2184 return 0;
2186} 2185}
2187 2186
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c
index ead6d4b43b25..2ae442edeb9a 100644
--- a/sound/soc/codecs/twl6040.c
+++ b/sound/soc/codecs/twl6040.c
@@ -996,7 +996,6 @@ static int twl6040_resume(struct platform_device *pdev)
996 struct snd_soc_codec *codec = socdev->card->codec; 996 struct snd_soc_codec *codec = socdev->card->codec;
997 997
998 twl6040_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 998 twl6040_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
999 twl6040_set_bias_level(codec, codec->suspend_bias_level);
1000 999
1001 return 0; 1000 return 0;
1002} 1001}
diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c
index ecba686563aa..2f925a27dcde 100644
--- a/sound/soc/codecs/uda1380.c
+++ b/sound/soc/codecs/uda1380.c
@@ -670,7 +670,6 @@ static int uda1380_resume(struct platform_device *pdev)
670 codec->hw_write(codec->control_data, data, 2); 670 codec->hw_write(codec->control_data, data, 2);
671 } 671 }
672 uda1380_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 672 uda1380_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
673 uda1380_set_bias_level(codec, codec->suspend_bias_level);
674 return 0; 673 return 0;
675} 674}
676 675
diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c
index 145467d37054..e5a48da65f82 100644
--- a/sound/soc/codecs/wm8350.c
+++ b/sound/soc/codecs/wm8350.c
@@ -1336,9 +1336,6 @@ static int wm8350_resume(struct platform_device *pdev)
1336 1336
1337 wm8350_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 1337 wm8350_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
1338 1338
1339 if (codec->suspend_bias_level == SND_SOC_BIAS_ON)
1340 wm8350_set_bias_level(codec, SND_SOC_BIAS_ON);
1341
1342 return 0; 1339 return 0;
1343} 1340}
1344 1341
diff --git a/sound/soc/codecs/wm8510.c b/sound/soc/codecs/wm8510.c
index af8cb6995a1f..d3527001b178 100644
--- a/sound/soc/codecs/wm8510.c
+++ b/sound/soc/codecs/wm8510.c
@@ -556,7 +556,7 @@ static int wm8510_resume(struct platform_device *pdev)
556 codec->hw_write(codec->control_data, data, 2); 556 codec->hw_write(codec->control_data, data, 2);
557 } 557 }
558 wm8510_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 558 wm8510_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
559 wm8510_set_bias_level(codec, codec->suspend_bias_level); 559
560 return 0; 560 return 0;
561} 561}
562 562
diff --git a/sound/soc/codecs/wm8711.c b/sound/soc/codecs/wm8711.c
index f350c5ecd093..5acd35bdfd53 100644
--- a/sound/soc/codecs/wm8711.c
+++ b/sound/soc/codecs/wm8711.c
@@ -375,7 +375,7 @@ static int wm8711_resume(struct platform_device *pdev)
375 codec->hw_write(codec->control_data, data, 2); 375 codec->hw_write(codec->control_data, data, 2);
376 } 376 }
377 wm8711_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 377 wm8711_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
378 wm8711_set_bias_level(codec, codec->suspend_bias_level); 378
379 return 0; 379 return 0;
380} 380}
381 381
diff --git a/sound/soc/codecs/wm8728.c b/sound/soc/codecs/wm8728.c
index 3fb653ba363a..bf56a58d0916 100644
--- a/sound/soc/codecs/wm8728.c
+++ b/sound/soc/codecs/wm8728.c
@@ -237,7 +237,7 @@ static int wm8728_resume(struct platform_device *pdev)
237 struct snd_soc_device *socdev = platform_get_drvdata(pdev); 237 struct snd_soc_device *socdev = platform_get_drvdata(pdev);
238 struct snd_soc_codec *codec = socdev->card->codec; 238 struct snd_soc_codec *codec = socdev->card->codec;
239 239
240 wm8728_set_bias_level(codec, codec->suspend_bias_level); 240 wm8728_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
241 241
242 return 0; 242 return 0;
243} 243}
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c
index 63f90c4ad93a..c4b63538bb77 100644
--- a/sound/soc/codecs/wm8731.c
+++ b/sound/soc/codecs/wm8731.c
@@ -460,7 +460,6 @@ static int wm8731_resume(struct platform_device *pdev)
460 codec->hw_write(codec->control_data, data, 2); 460 codec->hw_write(codec->control_data, data, 2);
461 } 461 }
462 wm8731_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 462 wm8731_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
463 wm8731_set_bias_level(codec, codec->suspend_bias_level);
464 463
465 return 0; 464 return 0;
466} 465}
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index 5a2510c39c10..05b28cf0f96f 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -1628,7 +1628,6 @@ static int wm8903_resume(struct platform_device *pdev)
1628 1628
1629 /* Bring the codec back up to standby first to minimise pop/clicks */ 1629 /* Bring the codec back up to standby first to minimise pop/clicks */
1630 wm8903_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 1630 wm8903_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
1631 wm8903_set_bias_level(codec, codec->suspend_bias_level);
1632 1631
1633 /* Sync back everything else */ 1632 /* Sync back everything else */
1634 if (tmp_cache) { 1633 if (tmp_cache) {
diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c
index b2f12828630c..e313ab5de85a 100644
--- a/sound/soc/codecs/wm8940.c
+++ b/sound/soc/codecs/wm8940.c
@@ -691,7 +691,6 @@ static int wm8940_resume(struct platform_device *pdev)
691 ret = wm8940_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 691 ret = wm8940_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
692 if (ret) 692 if (ret)
693 goto error_ret; 693 goto error_ret;
694 ret = wm8940_set_bias_level(codec, codec->suspend_bias_level);
695 694
696error_ret: 695error_ret:
697 return ret; 696 return ret;
diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c
index 50b2376680c1..518c84e623ab 100644
--- a/sound/soc/codecs/wm8960.c
+++ b/sound/soc/codecs/wm8960.c
@@ -823,7 +823,7 @@ static int wm8960_resume(struct platform_device *pdev)
823 } 823 }
824 824
825 codec->set_bias_level(codec, SND_SOC_BIAS_STANDBY); 825 codec->set_bias_level(codec, SND_SOC_BIAS_STANDBY);
826 codec->set_bias_level(codec, codec->suspend_bias_level); 826
827 return 0; 827 return 0;
828} 828}
829 829
diff --git a/sound/soc/codecs/wm8974.c b/sound/soc/codecs/wm8974.c
index 270eb956294f..44841fec5545 100644
--- a/sound/soc/codecs/wm8974.c
+++ b/sound/soc/codecs/wm8974.c
@@ -608,7 +608,7 @@ static int wm8974_resume(struct platform_device *pdev)
608 codec->hw_write(codec->control_data, data, 2); 608 codec->hw_write(codec->control_data, data, 2);
609 } 609 }
610 wm8974_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 610 wm8974_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
611 wm8974_set_bias_level(codec, codec->suspend_bias_level); 611
612 return 0; 612 return 0;
613} 613}
614 614
diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c
index e237bf615129..dd4b6ce01ceb 100644
--- a/sound/soc/codecs/wm9712.c
+++ b/sound/soc/codecs/wm9712.c
@@ -631,9 +631,6 @@ static int wm9712_soc_resume(struct platform_device *pdev)
631 } 631 }
632 } 632 }
633 633
634 if (codec->suspend_bias_level == SND_SOC_BIAS_ON)
635 wm9712_set_bias_level(codec, SND_SOC_BIAS_ON);
636
637 return ret; 634 return ret;
638} 635}
639 636
diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c
index d2244c93f581..6a30b844a671 100644
--- a/sound/soc/codecs/wm9713.c
+++ b/sound/soc/codecs/wm9713.c
@@ -1200,9 +1200,6 @@ static int wm9713_soc_resume(struct platform_device *pdev)
1200 } 1200 }
1201 } 1201 }
1202 1202
1203 if (codec->suspend_bias_level == SND_SOC_BIAS_ON)
1204 wm9713_set_bias_level(codec, SND_SOC_BIAS_ON);
1205
1206 return ret; 1203 return ret;
1207} 1204}
1208 1205