aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/wm8991.c32
-rw-r--r--sound/soc/codecs/wm8993.c12
-rw-r--r--sound/soc/codecs/wm8994.c2
-rw-r--r--sound/soc/codecs/wm8995.c17
-rw-r--r--sound/soc/codecs/wm9081.c7
5 files changed, 9 insertions, 61 deletions
diff --git a/sound/soc/codecs/wm8991.c b/sound/soc/codecs/wm8991.c
index d0be89731cdb..b0ac2c3e31b9 100644
--- a/sound/soc/codecs/wm8991.c
+++ b/sound/soc/codecs/wm8991.c
@@ -1227,32 +1227,6 @@ static int wm8991_set_bias_level(struct snd_soc_codec *codec,
1227 return 0; 1227 return 0;
1228} 1228}
1229 1229
1230static int wm8991_suspend(struct snd_soc_codec *codec)
1231{
1232 wm8991_set_bias_level(codec, SND_SOC_BIAS_OFF);
1233 return 0;
1234}
1235
1236static int wm8991_resume(struct snd_soc_codec *codec)
1237{
1238 wm8991_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
1239 return 0;
1240}
1241
1242/* power down chip */
1243static int wm8991_remove(struct snd_soc_codec *codec)
1244{
1245 wm8991_set_bias_level(codec, SND_SOC_BIAS_OFF);
1246 return 0;
1247}
1248
1249static int wm8991_probe(struct snd_soc_codec *codec)
1250{
1251 wm8991_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
1252
1253 return 0;
1254}
1255
1256#define WM8991_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ 1230#define WM8991_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\
1257 SNDRV_PCM_FMTBIT_S24_LE) 1231 SNDRV_PCM_FMTBIT_S24_LE)
1258 1232
@@ -1293,11 +1267,9 @@ static struct snd_soc_dai_driver wm8991_dai = {
1293}; 1267};
1294 1268
1295static struct snd_soc_codec_driver soc_codec_dev_wm8991 = { 1269static struct snd_soc_codec_driver soc_codec_dev_wm8991 = {
1296 .probe = wm8991_probe,
1297 .remove = wm8991_remove,
1298 .suspend = wm8991_suspend,
1299 .resume = wm8991_resume,
1300 .set_bias_level = wm8991_set_bias_level, 1270 .set_bias_level = wm8991_set_bias_level,
1271 .suspend_bias_off = true,
1272
1301 .controls = wm8991_snd_controls, 1273 .controls = wm8991_snd_controls,
1302 .num_controls = ARRAY_SIZE(wm8991_snd_controls), 1274 .num_controls = ARRAY_SIZE(wm8991_snd_controls),
1303 .dapm_widgets = wm8991_dapm_widgets, 1275 .dapm_widgets = wm8991_dapm_widgets,
diff --git a/sound/soc/codecs/wm8993.c b/sound/soc/codecs/wm8993.c
index 93b14eda355a..53c6fe359496 100644
--- a/sound/soc/codecs/wm8993.c
+++ b/sound/soc/codecs/wm8993.c
@@ -1486,7 +1486,6 @@ static int wm8993_probe(struct snd_soc_codec *codec)
1486{ 1486{
1487 struct wm8993_priv *wm8993 = snd_soc_codec_get_drvdata(codec); 1487 struct wm8993_priv *wm8993 = snd_soc_codec_get_drvdata(codec);
1488 struct snd_soc_dapm_context *dapm = &codec->dapm; 1488 struct snd_soc_dapm_context *dapm = &codec->dapm;
1489 int ret;
1490 1489
1491 wm8993->hubs_data.hp_startup_mode = 1; 1490 wm8993->hubs_data.hp_startup_mode = 1;
1492 wm8993->hubs_data.dcs_codes_l = -2; 1491 wm8993->hubs_data.dcs_codes_l = -2;
@@ -1518,10 +1517,6 @@ static int wm8993_probe(struct snd_soc_codec *codec)
1518 wm8993->pdata.micbias1_lvl, 1517 wm8993->pdata.micbias1_lvl,
1519 wm8993->pdata.micbias2_lvl); 1518 wm8993->pdata.micbias2_lvl);
1520 1519
1521 ret = wm8993_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
1522 if (ret != 0)
1523 return ret;
1524
1525 snd_soc_add_codec_controls(codec, wm8993_snd_controls, 1520 snd_soc_add_codec_controls(codec, wm8993_snd_controls,
1526 ARRAY_SIZE(wm8993_snd_controls)); 1521 ARRAY_SIZE(wm8993_snd_controls));
1527 if (wm8993->pdata.num_retune_configs != 0) { 1522 if (wm8993->pdata.num_retune_configs != 0) {
@@ -1550,12 +1545,6 @@ static int wm8993_probe(struct snd_soc_codec *codec)
1550 1545
1551} 1546}
1552 1547
1553static int wm8993_remove(struct snd_soc_codec *codec)
1554{
1555 wm8993_set_bias_level(codec, SND_SOC_BIAS_OFF);
1556 return 0;
1557}
1558
1559#ifdef CONFIG_PM 1548#ifdef CONFIG_PM
1560static int wm8993_suspend(struct snd_soc_codec *codec) 1549static int wm8993_suspend(struct snd_soc_codec *codec)
1561{ 1550{
@@ -1629,7 +1618,6 @@ static const struct regmap_config wm8993_regmap = {
1629 1618
1630static struct snd_soc_codec_driver soc_codec_dev_wm8993 = { 1619static struct snd_soc_codec_driver soc_codec_dev_wm8993 = {
1631 .probe = wm8993_probe, 1620 .probe = wm8993_probe,
1632 .remove = wm8993_remove,
1633 .suspend = wm8993_suspend, 1621 .suspend = wm8993_suspend,
1634 .resume = wm8993_resume, 1622 .resume = wm8993_resume,
1635 .set_bias_level = wm8993_set_bias_level, 1623 .set_bias_level = wm8993_set_bias_level,
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index dbca6e0cc93a..36b767fa37a6 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -4391,8 +4391,6 @@ static int wm8994_codec_remove(struct snd_soc_codec *codec)
4391 struct wm8994 *control = wm8994->wm8994; 4391 struct wm8994 *control = wm8994->wm8994;
4392 int i; 4392 int i;
4393 4393
4394 wm8994_set_bias_level(codec, SND_SOC_BIAS_OFF);
4395
4396 for (i = 0; i < ARRAY_SIZE(wm8994->fll_locked); i++) 4394 for (i = 0; i < ARRAY_SIZE(wm8994->fll_locked); i++)
4397 wm8994_free_irq(wm8994->wm8994, WM8994_IRQ_FLL1_LOCK + i, 4395 wm8994_free_irq(wm8994->wm8994, WM8994_IRQ_FLL1_LOCK + i,
4398 &wm8994->fll_locked[i]); 4396 &wm8994->fll_locked[i]);
diff --git a/sound/soc/codecs/wm8995.c b/sound/soc/codecs/wm8995.c
index 1288edeb8c7d..c280f0a3a424 100644
--- a/sound/soc/codecs/wm8995.c
+++ b/sound/soc/codecs/wm8995.c
@@ -2004,7 +2004,6 @@ static int wm8995_remove(struct snd_soc_codec *codec)
2004 int i; 2004 int i;
2005 2005
2006 wm8995 = snd_soc_codec_get_drvdata(codec); 2006 wm8995 = snd_soc_codec_get_drvdata(codec);
2007 wm8995_set_bias_level(codec, SND_SOC_BIAS_OFF);
2008 2007
2009 for (i = 0; i < ARRAY_SIZE(wm8995->supplies); ++i) 2008 for (i = 0; i < ARRAY_SIZE(wm8995->supplies); ++i)
2010 regulator_unregister_notifier(wm8995->supplies[i].consumer, 2009 regulator_unregister_notifier(wm8995->supplies[i].consumer,
@@ -2078,8 +2077,6 @@ static int wm8995_probe(struct snd_soc_codec *codec)
2078 goto err_reg_enable; 2077 goto err_reg_enable;
2079 } 2078 }
2080 2079
2081 wm8995_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
2082
2083 /* Latch volume updates (right only; we always do left then right). */ 2080 /* Latch volume updates (right only; we always do left then right). */
2084 snd_soc_update_bits(codec, WM8995_AIF1_DAC1_RIGHT_VOLUME, 2081 snd_soc_update_bits(codec, WM8995_AIF1_DAC1_RIGHT_VOLUME,
2085 WM8995_AIF1DAC1_VU_MASK, WM8995_AIF1DAC1_VU); 2082 WM8995_AIF1DAC1_VU_MASK, WM8995_AIF1DAC1_VU);
@@ -2102,13 +2099,6 @@ static int wm8995_probe(struct snd_soc_codec *codec)
2102 2099
2103 wm8995_update_class_w(codec); 2100 wm8995_update_class_w(codec);
2104 2101
2105 snd_soc_add_codec_controls(codec, wm8995_snd_controls,
2106 ARRAY_SIZE(wm8995_snd_controls));
2107 snd_soc_dapm_new_controls(&codec->dapm, wm8995_dapm_widgets,
2108 ARRAY_SIZE(wm8995_dapm_widgets));
2109 snd_soc_dapm_add_routes(&codec->dapm, wm8995_intercon,
2110 ARRAY_SIZE(wm8995_intercon));
2111
2112 return 0; 2102 return 0;
2113 2103
2114err_reg_enable: 2104err_reg_enable:
@@ -2205,6 +2195,13 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8995 = {
2205 .remove = wm8995_remove, 2195 .remove = wm8995_remove,
2206 .set_bias_level = wm8995_set_bias_level, 2196 .set_bias_level = wm8995_set_bias_level,
2207 .idle_bias_off = true, 2197 .idle_bias_off = true,
2198
2199 .controls = wm8995_snd_controls,
2200 .num_controls = ARRAY_SIZE(wm8995_snd_controls),
2201 .dapm_widgets = wm8995_dapm_widgets,
2202 .num_dapm_widgets = ARRAY_SIZE(wm8995_dapm_widgets),
2203 .dapm_routes = wm8995_intercon,
2204 .num_dapm_routes = ARRAY_SIZE(wm8995_intercon),
2208}; 2205};
2209 2206
2210static struct regmap_config wm8995_regmap = { 2207static struct regmap_config wm8995_regmap = {
diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c
index 0cdc9e2184ab..b1d946facd57 100644
--- a/sound/soc/codecs/wm9081.c
+++ b/sound/soc/codecs/wm9081.c
@@ -1277,15 +1277,8 @@ static int wm9081_probe(struct snd_soc_codec *codec)
1277 return 0; 1277 return 0;
1278} 1278}
1279 1279
1280static int wm9081_remove(struct snd_soc_codec *codec)
1281{
1282 wm9081_set_bias_level(codec, SND_SOC_BIAS_OFF);
1283 return 0;
1284}
1285
1286static struct snd_soc_codec_driver soc_codec_dev_wm9081 = { 1280static struct snd_soc_codec_driver soc_codec_dev_wm9081 = {
1287 .probe = wm9081_probe, 1281 .probe = wm9081_probe,
1288 .remove = wm9081_remove,
1289 1282
1290 .set_sysclk = wm9081_set_sysclk, 1283 .set_sysclk = wm9081_set_sysclk,
1291 .set_bias_level = wm9081_set_bias_level, 1284 .set_bias_level = wm9081_set_bias_level,