aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/codecs/wm8978.c10
-rw-r--r--sound/soc/codecs/wm8983.c27
-rw-r--r--sound/soc/codecs/wm8985.c28
-rw-r--r--sound/soc/codecs/wm8988.c27
-rw-r--r--sound/soc/codecs/wm8990.c24
5 files changed, 5 insertions, 111 deletions
diff --git a/sound/soc/codecs/wm8978.c b/sound/soc/codecs/wm8978.c
index ee2ba574952b..cf7032911721 100644
--- a/sound/soc/codecs/wm8978.c
+++ b/sound/soc/codecs/wm8978.c
@@ -991,21 +991,11 @@ static int wm8978_probe(struct snd_soc_codec *codec)
991 for (i = 0; i < ARRAY_SIZE(update_reg); i++) 991 for (i = 0; i < ARRAY_SIZE(update_reg); i++)
992 snd_soc_update_bits(codec, update_reg[i], 0x100, 0x100); 992 snd_soc_update_bits(codec, update_reg[i], 0x100, 0x100);
993 993
994 wm8978_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
995
996 return 0;
997}
998
999/* power down chip */
1000static int wm8978_remove(struct snd_soc_codec *codec)
1001{
1002 wm8978_set_bias_level(codec, SND_SOC_BIAS_OFF);
1003 return 0; 994 return 0;
1004} 995}
1005 996
1006static struct snd_soc_codec_driver soc_codec_dev_wm8978 = { 997static struct snd_soc_codec_driver soc_codec_dev_wm8978 = {
1007 .probe = wm8978_probe, 998 .probe = wm8978_probe,
1008 .remove = wm8978_remove,
1009 .suspend = wm8978_suspend, 999 .suspend = wm8978_suspend,
1010 .resume = wm8978_resume, 1000 .resume = wm8978_resume,
1011 .set_bias_level = wm8978_set_bias_level, 1001 .set_bias_level = wm8978_set_bias_level,
diff --git a/sound/soc/codecs/wm8983.c b/sound/soc/codecs/wm8983.c
index ac5defda8824..5d1cf08a72b8 100644
--- a/sound/soc/codecs/wm8983.c
+++ b/sound/soc/codecs/wm8983.c
@@ -967,29 +967,6 @@ static int wm8983_set_bias_level(struct snd_soc_codec *codec,
967 return 0; 967 return 0;
968} 968}
969 969
970#ifdef CONFIG_PM
971static int wm8983_suspend(struct snd_soc_codec *codec)
972{
973 wm8983_set_bias_level(codec, SND_SOC_BIAS_OFF);
974 return 0;
975}
976
977static int wm8983_resume(struct snd_soc_codec *codec)
978{
979 wm8983_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
980 return 0;
981}
982#else
983#define wm8983_suspend NULL
984#define wm8983_resume NULL
985#endif
986
987static int wm8983_remove(struct snd_soc_codec *codec)
988{
989 wm8983_set_bias_level(codec, SND_SOC_BIAS_OFF);
990 return 0;
991}
992
993static int wm8983_probe(struct snd_soc_codec *codec) 970static int wm8983_probe(struct snd_soc_codec *codec)
994{ 971{
995 int ret; 972 int ret;
@@ -1055,10 +1032,8 @@ static struct snd_soc_dai_driver wm8983_dai = {
1055 1032
1056static struct snd_soc_codec_driver soc_codec_dev_wm8983 = { 1033static struct snd_soc_codec_driver soc_codec_dev_wm8983 = {
1057 .probe = wm8983_probe, 1034 .probe = wm8983_probe,
1058 .remove = wm8983_remove,
1059 .suspend = wm8983_suspend,
1060 .resume = wm8983_resume,
1061 .set_bias_level = wm8983_set_bias_level, 1035 .set_bias_level = wm8983_set_bias_level,
1036 .suspend_bias_off = true,
1062 .controls = wm8983_snd_controls, 1037 .controls = wm8983_snd_controls,
1063 .num_controls = ARRAY_SIZE(wm8983_snd_controls), 1038 .num_controls = ARRAY_SIZE(wm8983_snd_controls),
1064 .dapm_widgets = wm8983_dapm_widgets, 1039 .dapm_widgets = wm8983_dapm_widgets,
diff --git a/sound/soc/codecs/wm8985.c b/sound/soc/codecs/wm8985.c
index ee380190399f..0b3b54c9971d 100644
--- a/sound/soc/codecs/wm8985.c
+++ b/sound/soc/codecs/wm8985.c
@@ -961,29 +961,6 @@ static int wm8985_set_bias_level(struct snd_soc_codec *codec,
961 return 0; 961 return 0;
962} 962}
963 963
964#ifdef CONFIG_PM
965static int wm8985_suspend(struct snd_soc_codec *codec)
966{
967 wm8985_set_bias_level(codec, SND_SOC_BIAS_OFF);
968 return 0;
969}
970
971static int wm8985_resume(struct snd_soc_codec *codec)
972{
973 wm8985_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
974 return 0;
975}
976#else
977#define wm8985_suspend NULL
978#define wm8985_resume NULL
979#endif
980
981static int wm8985_remove(struct snd_soc_codec *codec)
982{
983 wm8985_set_bias_level(codec, SND_SOC_BIAS_OFF);
984 return 0;
985}
986
987static int wm8985_probe(struct snd_soc_codec *codec) 964static int wm8985_probe(struct snd_soc_codec *codec)
988{ 965{
989 size_t i; 966 size_t i;
@@ -1023,7 +1000,6 @@ static int wm8985_probe(struct snd_soc_codec *codec)
1023 snd_soc_update_bits(codec, WM8985_BIAS_CTRL, WM8985_BIASCUT, 1000 snd_soc_update_bits(codec, WM8985_BIAS_CTRL, WM8985_BIASCUT,
1024 WM8985_BIASCUT); 1001 WM8985_BIASCUT);
1025 1002
1026 wm8985_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
1027 return 0; 1003 return 0;
1028 1004
1029err_reg_enable: 1005err_reg_enable:
@@ -1064,10 +1040,8 @@ static struct snd_soc_dai_driver wm8985_dai = {
1064 1040
1065static struct snd_soc_codec_driver soc_codec_dev_wm8985 = { 1041static struct snd_soc_codec_driver soc_codec_dev_wm8985 = {
1066 .probe = wm8985_probe, 1042 .probe = wm8985_probe,
1067 .remove = wm8985_remove,
1068 .suspend = wm8985_suspend,
1069 .resume = wm8985_resume,
1070 .set_bias_level = wm8985_set_bias_level, 1043 .set_bias_level = wm8985_set_bias_level,
1044 .suspend_bias_off = true,
1071 1045
1072 .controls = wm8985_snd_controls, 1046 .controls = wm8985_snd_controls,
1073 .num_controls = ARRAY_SIZE(wm8985_snd_controls), 1047 .num_controls = ARRAY_SIZE(wm8985_snd_controls),
diff --git a/sound/soc/codecs/wm8988.c b/sound/soc/codecs/wm8988.c
index a5130d965146..e418199155a8 100644
--- a/sound/soc/codecs/wm8988.c
+++ b/sound/soc/codecs/wm8988.c
@@ -793,21 +793,6 @@ static struct snd_soc_dai_driver wm8988_dai = {
793 .symmetric_rates = 1, 793 .symmetric_rates = 1,
794}; 794};
795 795
796static int wm8988_suspend(struct snd_soc_codec *codec)
797{
798 struct wm8988_priv *wm8988 = snd_soc_codec_get_drvdata(codec);
799
800 wm8988_set_bias_level(codec, SND_SOC_BIAS_OFF);
801 regcache_mark_dirty(wm8988->regmap);
802 return 0;
803}
804
805static int wm8988_resume(struct snd_soc_codec *codec)
806{
807 wm8988_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
808 return 0;
809}
810
811static int wm8988_probe(struct snd_soc_codec *codec) 796static int wm8988_probe(struct snd_soc_codec *codec)
812{ 797{
813 int ret = 0; 798 int ret = 0;
@@ -825,23 +810,13 @@ static int wm8988_probe(struct snd_soc_codec *codec)
825 snd_soc_update_bits(codec, WM8988_ROUT2V, 0x0100, 0x0100); 810 snd_soc_update_bits(codec, WM8988_ROUT2V, 0x0100, 0x0100);
826 snd_soc_update_bits(codec, WM8988_RINVOL, 0x0100, 0x0100); 811 snd_soc_update_bits(codec, WM8988_RINVOL, 0x0100, 0x0100);
827 812
828 wm8988_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
829
830 return 0;
831}
832
833static int wm8988_remove(struct snd_soc_codec *codec)
834{
835 wm8988_set_bias_level(codec, SND_SOC_BIAS_OFF);
836 return 0; 813 return 0;
837} 814}
838 815
839static struct snd_soc_codec_driver soc_codec_dev_wm8988 = { 816static struct snd_soc_codec_driver soc_codec_dev_wm8988 = {
840 .probe = wm8988_probe, 817 .probe = wm8988_probe,
841 .remove = wm8988_remove,
842 .suspend = wm8988_suspend,
843 .resume = wm8988_resume,
844 .set_bias_level = wm8988_set_bias_level, 818 .set_bias_level = wm8988_set_bias_level,
819 .suspend_bias_off = true,
845 820
846 .controls = wm8988_snd_controls, 821 .controls = wm8988_snd_controls,
847 .num_controls = ARRAY_SIZE(wm8988_snd_controls), 822 .num_controls = ARRAY_SIZE(wm8988_snd_controls),
diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c
index 03e43e3f395e..8a584229310a 100644
--- a/sound/soc/codecs/wm8990.c
+++ b/sound/soc/codecs/wm8990.c
@@ -1271,18 +1271,6 @@ static struct snd_soc_dai_driver wm8990_dai = {
1271 .ops = &wm8990_dai_ops, 1271 .ops = &wm8990_dai_ops,
1272}; 1272};
1273 1273
1274static int wm8990_suspend(struct snd_soc_codec *codec)
1275{
1276 wm8990_set_bias_level(codec, SND_SOC_BIAS_OFF);
1277 return 0;
1278}
1279
1280static int wm8990_resume(struct snd_soc_codec *codec)
1281{
1282 wm8990_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
1283 return 0;
1284}
1285
1286/* 1274/*
1287 * initialise the WM8990 driver 1275 * initialise the WM8990 driver
1288 * register the mixer and dsp interfaces with the kernel 1276 * register the mixer and dsp interfaces with the kernel
@@ -1309,19 +1297,11 @@ static int wm8990_probe(struct snd_soc_codec *codec)
1309 return 0; 1297 return 0;
1310} 1298}
1311 1299
1312/* power down chip */
1313static int wm8990_remove(struct snd_soc_codec *codec)
1314{
1315 wm8990_set_bias_level(codec, SND_SOC_BIAS_OFF);
1316 return 0;
1317}
1318
1319static struct snd_soc_codec_driver soc_codec_dev_wm8990 = { 1300static struct snd_soc_codec_driver soc_codec_dev_wm8990 = {
1320 .probe = wm8990_probe, 1301 .probe = wm8990_probe,
1321 .remove = wm8990_remove,
1322 .suspend = wm8990_suspend,
1323 .resume = wm8990_resume,
1324 .set_bias_level = wm8990_set_bias_level, 1302 .set_bias_level = wm8990_set_bias_level,
1303 .suspend_bias_off = true,
1304
1325 .controls = wm8990_snd_controls, 1305 .controls = wm8990_snd_controls,
1326 .num_controls = ARRAY_SIZE(wm8990_snd_controls), 1306 .num_controls = ARRAY_SIZE(wm8990_snd_controls),
1327 .dapm_widgets = wm8990_dapm_widgets, 1307 .dapm_widgets = wm8990_dapm_widgets,