diff options
100 files changed, 149 insertions, 168 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index 0bc83647d3fa..70216d20e897 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
| @@ -444,6 +444,9 @@ int snd_soc_dapm_dai_get_connected_widgets(struct snd_soc_dai *dai, int stream, | |||
| 444 | struct snd_soc_dapm_context *snd_soc_dapm_kcontrol_dapm( | 444 | struct snd_soc_dapm_context *snd_soc_dapm_kcontrol_dapm( |
| 445 | struct snd_kcontrol *kcontrol); | 445 | struct snd_kcontrol *kcontrol); |
| 446 | 446 | ||
| 447 | int snd_soc_dapm_force_bias_level(struct snd_soc_dapm_context *dapm, | ||
| 448 | enum snd_soc_bias_level level); | ||
| 449 | |||
| 447 | /* dapm widget types */ | 450 | /* dapm widget types */ |
| 448 | enum snd_soc_dapm_type { | 451 | enum snd_soc_dapm_type { |
| 449 | snd_soc_dapm_input = 0, /* input pin */ | 452 | snd_soc_dapm_input = 0, /* input pin */ |
| @@ -623,4 +626,35 @@ struct snd_soc_dapm_stats { | |||
| 623 | int neighbour_checks; | 626 | int neighbour_checks; |
| 624 | }; | 627 | }; |
| 625 | 628 | ||
| 629 | /** | ||
| 630 | * snd_soc_dapm_init_bias_level() - Initialize DAPM bias level | ||
| 631 | * @dapm: The DAPM context to initialize | ||
| 632 | * @level: The DAPM level to initialize to | ||
| 633 | * | ||
| 634 | * This function only sets the driver internal state of the DAPM level and will | ||
| 635 | * not modify the state of the device. Hence it should not be used during normal | ||
| 636 | * operation, but only to synchronize the internal state to the device state. | ||
| 637 | * E.g. during driver probe to set the DAPM level to the one corresponding with | ||
| 638 | * the power-on reset state of the device. | ||
| 639 | * | ||
| 640 | * To change the DAPM state of the device use snd_soc_dapm_set_bias_level(). | ||
| 641 | */ | ||
| 642 | static inline void snd_soc_dapm_init_bias_level( | ||
| 643 | struct snd_soc_dapm_context *dapm, enum snd_soc_bias_level level) | ||
| 644 | { | ||
| 645 | dapm->bias_level = level; | ||
| 646 | } | ||
| 647 | |||
| 648 | /** | ||
| 649 | * snd_soc_dapm_get_bias_level() - Get current DAPM bias level | ||
| 650 | * @dapm: The context for which to get the bias level | ||
| 651 | * | ||
| 652 | * Returns: The current bias level of the passed DAPM context. | ||
| 653 | */ | ||
| 654 | static inline enum snd_soc_bias_level snd_soc_dapm_get_bias_level( | ||
| 655 | struct snd_soc_dapm_context *dapm) | ||
| 656 | { | ||
| 657 | return dapm->bias_level; | ||
| 658 | } | ||
| 659 | |||
| 626 | #endif | 660 | #endif |
diff --git a/include/sound/soc.h b/include/sound/soc.h index fcb312b3f258..7781bfe85c5d 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
| @@ -807,7 +807,7 @@ struct snd_soc_codec { | |||
| 807 | /* component */ | 807 | /* component */ |
| 808 | struct snd_soc_component component; | 808 | struct snd_soc_component component; |
| 809 | 809 | ||
| 810 | /* dapm */ | 810 | /* Don't access this directly, use snd_soc_codec_get_dapm() */ |
| 811 | struct snd_soc_dapm_context dapm; | 811 | struct snd_soc_dapm_context dapm; |
| 812 | 812 | ||
| 813 | #ifdef CONFIG_DEBUG_FS | 813 | #ifdef CONFIG_DEBUG_FS |
| @@ -1270,6 +1270,58 @@ static inline struct snd_soc_dapm_context *snd_soc_component_get_dapm( | |||
| 1270 | } | 1270 | } |
| 1271 | 1271 | ||
| 1272 | /** | 1272 | /** |
| 1273 | * snd_soc_codec_get_dapm() - Returns the DAPM context for the CODEC | ||
| 1274 | * @codec: The CODEC for which to get the DAPM context | ||
| 1275 | * | ||
| 1276 | * Note: Use this function instead of directly accessing the CODEC's dapm field | ||
| 1277 | */ | ||
| 1278 | static inline struct snd_soc_dapm_context *snd_soc_codec_get_dapm( | ||
| 1279 | struct snd_soc_codec *codec) | ||
| 1280 | { | ||
| 1281 | return &codec->dapm; | ||
| 1282 | } | ||
| 1283 | |||
| 1284 | /** | ||
| 1285 | * snd_soc_dapm_init_bias_level() - Initialize CODEC DAPM bias level | ||
| 1286 | * @dapm: The CODEC for which to initialize the DAPM bias level | ||
| 1287 | * @level: The DAPM level to initialize to | ||
| 1288 | * | ||
| 1289 | * Initializes the CODEC DAPM bias level. See snd_soc_dapm_init_bias_level(). | ||
| 1290 | */ | ||
| 1291 | static inline void snd_soc_codec_init_bias_level(struct snd_soc_codec *codec, | ||
| 1292 | enum snd_soc_bias_level level) | ||
| 1293 | { | ||
| 1294 | snd_soc_dapm_init_bias_level(snd_soc_codec_get_dapm(codec), level); | ||
| 1295 | } | ||
| 1296 | |||
| 1297 | /** | ||
| 1298 | * snd_soc_dapm_get_bias_level() - Get current CODEC DAPM bias level | ||
| 1299 | * @codec: The CODEC for which to get the DAPM bias level | ||
| 1300 | * | ||
| 1301 | * Returns: The current DAPM bias level of the CODEC. | ||
| 1302 | */ | ||
| 1303 | static inline enum snd_soc_bias_level snd_soc_codec_get_bias_level( | ||
| 1304 | struct snd_soc_codec *codec) | ||
| 1305 | { | ||
| 1306 | return snd_soc_dapm_get_bias_level(snd_soc_codec_get_dapm(codec)); | ||
| 1307 | } | ||
| 1308 | |||
| 1309 | /** | ||
| 1310 | * snd_soc_codec_force_bias_level() - Set the CODEC DAPM bias level | ||
| 1311 | * @codec: The CODEC for which to set the level | ||
| 1312 | * @level: The level to set to | ||
| 1313 | * | ||
| 1314 | * Forces the CODEC bias level to a specific state. See | ||
| 1315 | * snd_soc_dapm_force_bias_level(). | ||
| 1316 | */ | ||
| 1317 | static inline int snd_soc_codec_force_bias_level(struct snd_soc_codec *codec, | ||
| 1318 | enum snd_soc_bias_level level) | ||
| 1319 | { | ||
| 1320 | return snd_soc_dapm_force_bias_level(snd_soc_codec_get_dapm(codec), | ||
| 1321 | level); | ||
| 1322 | } | ||
| 1323 | |||
| 1324 | /** | ||
| 1273 | * snd_soc_dapm_kcontrol_codec() - Returns the codec associated to a kcontrol | 1325 | * snd_soc_dapm_kcontrol_codec() - Returns the codec associated to a kcontrol |
| 1274 | * @kcontrol: The kcontrol | 1326 | * @kcontrol: The kcontrol |
| 1275 | * | 1327 | * |
diff --git a/sound/soc/codecs/88pm860x-codec.c b/sound/soc/codecs/88pm860x-codec.c index a0f265327fdf..c0b2686a6aac 100644 --- a/sound/soc/codecs/88pm860x-codec.c +++ b/sound/soc/codecs/88pm860x-codec.c | |||
| @@ -1156,7 +1156,6 @@ static int pm860x_set_bias_level(struct snd_soc_codec *codec, | |||
| 1156 | pm860x_set_bits(pm860x->i2c, REG_MISC2, data, 0); | 1156 | pm860x_set_bits(pm860x->i2c, REG_MISC2, data, 0); |
| 1157 | break; | 1157 | break; |
| 1158 | } | 1158 | } |
| 1159 | codec->dapm.bias_level = level; | ||
| 1160 | return 0; | 1159 | return 0; |
| 1161 | } | 1160 | } |
| 1162 | 1161 | ||
diff --git a/sound/soc/codecs/adau1373.c b/sound/soc/codecs/adau1373.c index 783dcb57043a..a43160254929 100644 --- a/sound/soc/codecs/adau1373.c +++ b/sound/soc/codecs/adau1373.c | |||
| @@ -1444,7 +1444,6 @@ static int adau1373_set_bias_level(struct snd_soc_codec *codec, | |||
| 1444 | ADAU1373_PWDN_CTRL3_PWR_EN, 0); | 1444 | ADAU1373_PWDN_CTRL3_PWR_EN, 0); |
| 1445 | break; | 1445 | break; |
| 1446 | } | 1446 | } |
| 1447 | codec->dapm.bias_level = level; | ||
| 1448 | return 0; | 1447 | return 0; |
| 1449 | } | 1448 | } |
| 1450 | 1449 | ||
diff --git a/sound/soc/codecs/adau1701.c b/sound/soc/codecs/adau1701.c index d4e219b6b98f..808b964086e3 100644 --- a/sound/soc/codecs/adau1701.c +++ b/sound/soc/codecs/adau1701.c | |||
| @@ -565,7 +565,6 @@ static int adau1701_set_bias_level(struct snd_soc_codec *codec, | |||
| 565 | break; | 565 | break; |
| 566 | } | 566 | } |
| 567 | 567 | ||
| 568 | codec->dapm.bias_level = level; | ||
| 569 | return 0; | 568 | return 0; |
| 570 | } | 569 | } |
| 571 | 570 | ||
diff --git a/sound/soc/codecs/adau1761.c b/sound/soc/codecs/adau1761.c index a1baeee160f4..5ba24618b576 100644 --- a/sound/soc/codecs/adau1761.c +++ b/sound/soc/codecs/adau1761.c | |||
| @@ -466,7 +466,6 @@ static int adau1761_set_bias_level(struct snd_soc_codec *codec, | |||
| 466 | break; | 466 | break; |
| 467 | 467 | ||
| 468 | } | 468 | } |
| 469 | codec->dapm.bias_level = level; | ||
| 470 | return 0; | 469 | return 0; |
| 471 | } | 470 | } |
| 472 | 471 | ||
diff --git a/sound/soc/codecs/adau1781.c b/sound/soc/codecs/adau1781.c index 35581f43fa6d..9c01ef0de0c0 100644 --- a/sound/soc/codecs/adau1781.c +++ b/sound/soc/codecs/adau1781.c | |||
| @@ -339,7 +339,6 @@ static int adau1781_set_bias_level(struct snd_soc_codec *codec, | |||
| 339 | break; | 339 | break; |
| 340 | } | 340 | } |
| 341 | 341 | ||
| 342 | codec->dapm.bias_level = level; | ||
| 343 | return 0; | 342 | return 0; |
| 344 | } | 343 | } |
| 345 | 344 | ||
diff --git a/sound/soc/codecs/adau1977.c b/sound/soc/codecs/adau1977.c index 7ad8e156e2df..3fb09c165055 100644 --- a/sound/soc/codecs/adau1977.c +++ b/sound/soc/codecs/adau1977.c | |||
| @@ -493,12 +493,7 @@ static int adau1977_set_bias_level(struct snd_soc_codec *codec, | |||
| 493 | break; | 493 | break; |
| 494 | } | 494 | } |
| 495 | 495 | ||
| 496 | if (ret) | 496 | return ret; |
| 497 | return ret; | ||
| 498 | |||
| 499 | codec->dapm.bias_level = level; | ||
| 500 | |||
| 501 | return 0; | ||
| 502 | } | 497 | } |
| 503 | 498 | ||
| 504 | static int adau1977_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask, | 499 | static int adau1977_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask, |
diff --git a/sound/soc/codecs/adav80x.c b/sound/soc/codecs/adav80x.c index 4373ada95648..260a652e4a43 100644 --- a/sound/soc/codecs/adav80x.c +++ b/sound/soc/codecs/adav80x.c | |||
| @@ -714,7 +714,6 @@ static int adav80x_set_bias_level(struct snd_soc_codec *codec, | |||
| 714 | break; | 714 | break; |
| 715 | } | 715 | } |
| 716 | 716 | ||
| 717 | codec->dapm.bias_level = level; | ||
| 718 | return 0; | 717 | return 0; |
| 719 | } | 718 | } |
| 720 | 719 | ||
diff --git a/sound/soc/codecs/ak4535.c b/sound/soc/codecs/ak4535.c index 9130d916f2f4..8670861e5bec 100644 --- a/sound/soc/codecs/ak4535.c +++ b/sound/soc/codecs/ak4535.c | |||
| @@ -341,7 +341,6 @@ static int ak4535_set_bias_level(struct snd_soc_codec *codec, | |||
| 341 | snd_soc_update_bits(codec, AK4535_PM1, 0x80, 0); | 341 | snd_soc_update_bits(codec, AK4535_PM1, 0x80, 0); |
| 342 | break; | 342 | break; |
| 343 | } | 343 | } |
| 344 | codec->dapm.bias_level = level; | ||
| 345 | return 0; | 344 | return 0; |
| 346 | } | 345 | } |
| 347 | 346 | ||
diff --git a/sound/soc/codecs/ak4641.c b/sound/soc/codecs/ak4641.c index 81b54a270bd8..3b22b587a820 100644 --- a/sound/soc/codecs/ak4641.c +++ b/sound/soc/codecs/ak4641.c | |||
| @@ -439,7 +439,6 @@ static int ak4641_set_bias_level(struct snd_soc_codec *codec, | |||
| 439 | regcache_mark_dirty(ak4641->regmap); | 439 | regcache_mark_dirty(ak4641->regmap); |
| 440 | break; | 440 | break; |
| 441 | } | 441 | } |
| 442 | codec->dapm.bias_level = level; | ||
| 443 | return 0; | 442 | return 0; |
| 444 | } | 443 | } |
| 445 | 444 | ||
diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c index 13585e88f597..7c0f6552c229 100644 --- a/sound/soc/codecs/ak4642.c +++ b/sound/soc/codecs/ak4642.c | |||
| @@ -482,7 +482,6 @@ static int ak4642_set_bias_level(struct snd_soc_codec *codec, | |||
| 482 | snd_soc_update_bits(codec, PW_MGMT1, PMVCM, PMVCM); | 482 | snd_soc_update_bits(codec, PW_MGMT1, PMVCM, PMVCM); |
| 483 | break; | 483 | break; |
| 484 | } | 484 | } |
| 485 | codec->dapm.bias_level = level; | ||
| 486 | 485 | ||
| 487 | return 0; | 486 | return 0; |
| 488 | } | 487 | } |
diff --git a/sound/soc/codecs/ak4671.c b/sound/soc/codecs/ak4671.c index 2a58b1dccd2f..0e59063aeb6f 100644 --- a/sound/soc/codecs/ak4671.c +++ b/sound/soc/codecs/ak4671.c | |||
| @@ -577,7 +577,6 @@ static int ak4671_set_bias_level(struct snd_soc_codec *codec, | |||
| 577 | snd_soc_write(codec, AK4671_AD_DA_POWER_MANAGEMENT, 0x00); | 577 | snd_soc_write(codec, AK4671_AD_DA_POWER_MANAGEMENT, 0x00); |
| 578 | break; | 578 | break; |
| 579 | } | 579 | } |
| 580 | codec->dapm.bias_level = level; | ||
| 581 | return 0; | 580 | return 0; |
| 582 | } | 581 | } |
| 583 | 582 | ||
diff --git a/sound/soc/codecs/alc5623.c b/sound/soc/codecs/alc5623.c index 0e357996864b..e92b5ae3cab2 100644 --- a/sound/soc/codecs/alc5623.c +++ b/sound/soc/codecs/alc5623.c | |||
| @@ -826,7 +826,6 @@ static int alc5623_set_bias_level(struct snd_soc_codec *codec, | |||
| 826 | snd_soc_write(codec, ALC5623_PWR_MANAG_ADD1, 0); | 826 | snd_soc_write(codec, ALC5623_PWR_MANAG_ADD1, 0); |
| 827 | break; | 827 | break; |
| 828 | } | 828 | } |
| 829 | codec->dapm.bias_level = level; | ||
| 830 | return 0; | 829 | return 0; |
| 831 | } | 830 | } |
| 832 | 831 | ||
diff --git a/sound/soc/codecs/alc5632.c b/sound/soc/codecs/alc5632.c index db3283abbe18..607a63b9705f 100644 --- a/sound/soc/codecs/alc5632.c +++ b/sound/soc/codecs/alc5632.c | |||
| @@ -1000,7 +1000,6 @@ static int alc5632_set_bias_level(struct snd_soc_codec *codec, | |||
| 1000 | ALC5632_PWR_MANAG_ADD1_MASK, 0); | 1000 | ALC5632_PWR_MANAG_ADD1_MASK, 0); |
| 1001 | break; | 1001 | break; |
| 1002 | } | 1002 | } |
| 1003 | codec->dapm.bias_level = level; | ||
| 1004 | return 0; | 1003 | return 0; |
| 1005 | } | 1004 | } |
| 1006 | 1005 | ||
diff --git a/sound/soc/codecs/cq93vc.c b/sound/soc/codecs/cq93vc.c index d6dedd4eab29..1c895a53001d 100644 --- a/sound/soc/codecs/cq93vc.c +++ b/sound/soc/codecs/cq93vc.c | |||
| @@ -92,7 +92,6 @@ static int cq93vc_set_bias_level(struct snd_soc_codec *codec, | |||
| 92 | DAVINCI_VC_REG12_POWER_ALL_OFF); | 92 | DAVINCI_VC_REG12_POWER_ALL_OFF); |
| 93 | break; | 93 | break; |
| 94 | } | 94 | } |
| 95 | codec->dapm.bias_level = level; | ||
| 96 | 95 | ||
| 97 | return 0; | 96 | return 0; |
| 98 | } | 97 | } |
diff --git a/sound/soc/codecs/cs4265.c b/sound/soc/codecs/cs4265.c index cac48ddf3ba6..d7ec4756e45b 100644 --- a/sound/soc/codecs/cs4265.c +++ b/sound/soc/codecs/cs4265.c | |||
| @@ -503,7 +503,6 @@ static int cs4265_set_bias_level(struct snd_soc_codec *codec, | |||
| 503 | CS4265_PWRCTL_PDN); | 503 | CS4265_PWRCTL_PDN); |
| 504 | break; | 504 | break; |
| 505 | } | 505 | } |
| 506 | codec->dapm.bias_level = level; | ||
| 507 | return 0; | 506 | return 0; |
| 508 | } | 507 | } |
| 509 | 508 | ||
diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c index 1589e7a881d8..3c49a756b89b 100644 --- a/sound/soc/codecs/cs42l52.c +++ b/sound/soc/codecs/cs42l52.c | |||
| @@ -908,7 +908,6 @@ static int cs42l52_set_bias_level(struct snd_soc_codec *codec, | |||
| 908 | regcache_cache_only(cs42l52->regmap, true); | 908 | regcache_cache_only(cs42l52->regmap, true); |
| 909 | break; | 909 | break; |
| 910 | } | 910 | } |
| 911 | codec->dapm.bias_level = level; | ||
| 912 | 911 | ||
| 913 | return 0; | 912 | return 0; |
| 914 | } | 913 | } |
diff --git a/sound/soc/codecs/cs42l56.c b/sound/soc/codecs/cs42l56.c index cbc654fe48c7..a7638c52b509 100644 --- a/sound/soc/codecs/cs42l56.c +++ b/sound/soc/codecs/cs42l56.c | |||
| @@ -978,7 +978,6 @@ static int cs42l56_set_bias_level(struct snd_soc_codec *codec, | |||
| 978 | cs42l56->supplies); | 978 | cs42l56->supplies); |
| 979 | break; | 979 | break; |
| 980 | } | 980 | } |
| 981 | codec->dapm.bias_level = level; | ||
| 982 | 981 | ||
| 983 | return 0; | 982 | return 0; |
| 984 | } | 983 | } |
diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c index 8ecedba79606..156ec938f441 100644 --- a/sound/soc/codecs/cs42l73.c +++ b/sound/soc/codecs/cs42l73.c | |||
| @@ -1228,7 +1228,6 @@ static int cs42l73_set_bias_level(struct snd_soc_codec *codec, | |||
| 1228 | snd_soc_update_bits(codec, CS42L73_DMMCC, CS42L73_MCLKDIS, 1); | 1228 | snd_soc_update_bits(codec, CS42L73_DMMCC, CS42L73_MCLKDIS, 1); |
| 1229 | break; | 1229 | break; |
| 1230 | } | 1230 | } |
| 1231 | codec->dapm.bias_level = level; | ||
| 1232 | return 0; | 1231 | return 0; |
| 1233 | } | 1232 | } |
| 1234 | 1233 | ||
diff --git a/sound/soc/codecs/cx20442.c b/sound/soc/codecs/cx20442.c index 0f334bc1b63c..13041ccf1010 100644 --- a/sound/soc/codecs/cx20442.c +++ b/sound/soc/codecs/cx20442.c | |||
| @@ -351,8 +351,6 @@ static int cx20442_set_bias_level(struct snd_soc_codec *codec, | |||
| 351 | default: | 351 | default: |
| 352 | break; | 352 | break; |
| 353 | } | 353 | } |
| 354 | if (!err) | ||
| 355 | codec->dapm.bias_level = level; | ||
| 356 | 354 | ||
| 357 | return err; | 355 | return err; |
| 358 | } | 356 | } |
diff --git a/sound/soc/codecs/da7213.c b/sound/soc/codecs/da7213.c index 9ec577f0edb4..925dd3c16d6c 100644 --- a/sound/soc/codecs/da7213.c +++ b/sound/soc/codecs/da7213.c | |||
| @@ -1387,7 +1387,6 @@ static int da7213_set_bias_level(struct snd_soc_codec *codec, | |||
| 1387 | DA7213_VMID_EN | DA7213_BIAS_EN, 0); | 1387 | DA7213_VMID_EN | DA7213_BIAS_EN, 0); |
| 1388 | break; | 1388 | break; |
| 1389 | } | 1389 | } |
| 1390 | codec->dapm.bias_level = level; | ||
| 1391 | return 0; | 1390 | return 0; |
| 1392 | } | 1391 | } |
| 1393 | 1392 | ||
diff --git a/sound/soc/codecs/da732x.c b/sound/soc/codecs/da732x.c index 911c26c705fc..06519057bdff 100644 --- a/sound/soc/codecs/da732x.c +++ b/sound/soc/codecs/da732x.c | |||
| @@ -1502,8 +1502,6 @@ static int da732x_set_bias_level(struct snd_soc_codec *codec, | |||
| 1502 | break; | 1502 | break; |
| 1503 | } | 1503 | } |
| 1504 | 1504 | ||
| 1505 | codec->dapm.bias_level = level; | ||
| 1506 | |||
| 1507 | return 0; | 1505 | return 0; |
| 1508 | } | 1506 | } |
| 1509 | 1507 | ||
diff --git a/sound/soc/codecs/da9055.c b/sound/soc/codecs/da9055.c index ad19cc56702b..3bdc95a70112 100644 --- a/sound/soc/codecs/da9055.c +++ b/sound/soc/codecs/da9055.c | |||
| @@ -1377,7 +1377,6 @@ static int da9055_set_bias_level(struct snd_soc_codec *codec, | |||
| 1377 | DA9055_VMID_EN | DA9055_BIAS_EN, 0); | 1377 | DA9055_VMID_EN | DA9055_BIAS_EN, 0); |
| 1378 | break; | 1378 | break; |
| 1379 | } | 1379 | } |
| 1380 | codec->dapm.bias_level = level; | ||
| 1381 | return 0; | 1380 | return 0; |
| 1382 | } | 1381 | } |
| 1383 | 1382 | ||
diff --git a/sound/soc/codecs/es8328.c b/sound/soc/codecs/es8328.c index c5f35a07e8e4..996e3f4e7343 100644 --- a/sound/soc/codecs/es8328.c +++ b/sound/soc/codecs/es8328.c | |||
| @@ -566,7 +566,6 @@ static int es8328_set_bias_level(struct snd_soc_codec *codec, | |||
| 566 | 0); | 566 | 0); |
| 567 | break; | 567 | break; |
| 568 | } | 568 | } |
| 569 | codec->dapm.bias_level = level; | ||
| 570 | return 0; | 569 | return 0; |
| 571 | } | 570 | } |
| 572 | 571 | ||
diff --git a/sound/soc/codecs/isabelle.c b/sound/soc/codecs/isabelle.c index 3a89ce66d51d..ebd90283c960 100644 --- a/sound/soc/codecs/isabelle.c +++ b/sound/soc/codecs/isabelle.c | |||
| @@ -909,8 +909,6 @@ static int isabelle_set_bias_level(struct snd_soc_codec *codec, | |||
| 909 | break; | 909 | break; |
| 910 | } | 910 | } |
| 911 | 911 | ||
| 912 | codec->dapm.bias_level = level; | ||
| 913 | |||
| 914 | return 0; | 912 | return 0; |
| 915 | } | 913 | } |
| 916 | 914 | ||
diff --git a/sound/soc/codecs/jz4740.c b/sound/soc/codecs/jz4740.c index 933f4476d76c..8425d262e566 100644 --- a/sound/soc/codecs/jz4740.c +++ b/sound/soc/codecs/jz4740.c | |||
| @@ -281,8 +281,6 @@ static int jz4740_codec_set_bias_level(struct snd_soc_codec *codec, | |||
| 281 | break; | 281 | break; |
| 282 | } | 282 | } |
| 283 | 283 | ||
| 284 | codec->dapm.bias_level = level; | ||
| 285 | |||
| 286 | return 0; | 284 | return 0; |
| 287 | } | 285 | } |
| 288 | 286 | ||
diff --git a/sound/soc/codecs/lm4857.c b/sound/soc/codecs/lm4857.c index a924bb9d7886..79ad4cbdcdd4 100644 --- a/sound/soc/codecs/lm4857.c +++ b/sound/soc/codecs/lm4857.c | |||
| @@ -89,8 +89,6 @@ static int lm4857_set_bias_level(struct snd_soc_codec *codec, | |||
| 89 | break; | 89 | break; |
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | codec->dapm.bias_level = level; | ||
| 93 | |||
| 94 | return 0; | 92 | return 0; |
| 95 | } | 93 | } |
| 96 | 94 | ||
diff --git a/sound/soc/codecs/lm49453.c b/sound/soc/codecs/lm49453.c index c4dfde9bdf1c..166fd4c88ddb 100644 --- a/sound/soc/codecs/lm49453.c +++ b/sound/soc/codecs/lm49453.c | |||
| @@ -1284,8 +1284,6 @@ static int lm49453_set_bias_level(struct snd_soc_codec *codec, | |||
| 1284 | break; | 1284 | break; |
| 1285 | } | 1285 | } |
| 1286 | 1286 | ||
| 1287 | codec->dapm.bias_level = level; | ||
| 1288 | |||
| 1289 | return 0; | 1287 | return 0; |
| 1290 | } | 1288 | } |
| 1291 | 1289 | ||
diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c index 805b3f8cd39d..3200aa80f1f2 100644 --- a/sound/soc/codecs/max98088.c +++ b/sound/soc/codecs/max98088.c | |||
| @@ -1584,7 +1584,6 @@ static int max98088_set_bias_level(struct snd_soc_codec *codec, | |||
| 1584 | regcache_mark_dirty(max98088->regmap); | 1584 | regcache_mark_dirty(max98088->regmap); |
| 1585 | break; | 1585 | break; |
| 1586 | } | 1586 | } |
| 1587 | codec->dapm.bias_level = level; | ||
| 1588 | return 0; | 1587 | return 0; |
| 1589 | } | 1588 | } |
| 1590 | 1589 | ||
diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c index 3e33ef2acf3c..c5736b2f7c76 100644 --- a/sound/soc/codecs/max98090.c +++ b/sound/soc/codecs/max98090.c | |||
| @@ -1824,7 +1824,6 @@ static int max98090_set_bias_level(struct snd_soc_codec *codec, | |||
| 1824 | regcache_mark_dirty(max98090->regmap); | 1824 | regcache_mark_dirty(max98090->regmap); |
| 1825 | break; | 1825 | break; |
| 1826 | } | 1826 | } |
| 1827 | codec->dapm.bias_level = level; | ||
| 1828 | return 0; | 1827 | return 0; |
| 1829 | } | 1828 | } |
| 1830 | 1829 | ||
diff --git a/sound/soc/codecs/max98095.c b/sound/soc/codecs/max98095.c index 8fba0c3db798..66c7ca431a2e 100644 --- a/sound/soc/codecs/max98095.c +++ b/sound/soc/codecs/max98095.c | |||
| @@ -1678,7 +1678,6 @@ static int max98095_set_bias_level(struct snd_soc_codec *codec, | |||
| 1678 | regcache_mark_dirty(max98095->regmap); | 1678 | regcache_mark_dirty(max98095->regmap); |
| 1679 | break; | 1679 | break; |
| 1680 | } | 1680 | } |
| 1681 | codec->dapm.bias_level = level; | ||
| 1682 | return 0; | 1681 | return 0; |
| 1683 | } | 1682 | } |
| 1684 | 1683 | ||
| @@ -2198,7 +2197,7 @@ static int max98095_suspend(struct snd_soc_codec *codec) | |||
| 2198 | if (max98095->headphone_jack || max98095->mic_jack) | 2197 | if (max98095->headphone_jack || max98095->mic_jack) |
| 2199 | max98095_jack_detect_disable(codec); | 2198 | max98095_jack_detect_disable(codec); |
| 2200 | 2199 | ||
| 2201 | max98095_set_bias_level(codec, SND_SOC_BIAS_OFF); | 2200 | snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_OFF); |
| 2202 | 2201 | ||
| 2203 | return 0; | 2202 | return 0; |
| 2204 | } | 2203 | } |
| @@ -2208,7 +2207,7 @@ static int max98095_resume(struct snd_soc_codec *codec) | |||
| 2208 | struct max98095_priv *max98095 = snd_soc_codec_get_drvdata(codec); | 2207 | struct max98095_priv *max98095 = snd_soc_codec_get_drvdata(codec); |
| 2209 | struct i2c_client *client = to_i2c_client(codec->dev); | 2208 | struct i2c_client *client = to_i2c_client(codec->dev); |
| 2210 | 2209 | ||
| 2211 | max98095_set_bias_level(codec, SND_SOC_BIAS_STANDBY); | 2210 | snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_STANDBY); |
| 2212 | 2211 | ||
| 2213 | if (max98095->headphone_jack || max98095->mic_jack) { | 2212 | if (max98095->headphone_jack || max98095->mic_jack) { |
| 2214 | max98095_jack_detect_enable(codec); | 2213 | max98095_jack_detect_enable(codec); |
diff --git a/sound/soc/codecs/max9850.c b/sound/soc/codecs/max9850.c index 10f8e47ce2c2..f6b616b6ffca 100644 --- a/sound/soc/codecs/max9850.c +++ b/sound/soc/codecs/max9850.c | |||
| @@ -264,7 +264,6 @@ static int max9850_set_bias_level(struct snd_soc_codec *codec, | |||
| 264 | case SND_SOC_BIAS_OFF: | 264 | case SND_SOC_BIAS_OFF: |
| 265 | break; | 265 | break; |
| 266 | } | 266 | } |
| 267 | codec->dapm.bias_level = level; | ||
| 268 | return 0; | 267 | return 0; |
| 269 | } | 268 | } |
| 270 | 269 | ||
diff --git a/sound/soc/codecs/ml26124.c b/sound/soc/codecs/ml26124.c index 711f55039522..f1d5778e6599 100644 --- a/sound/soc/codecs/ml26124.c +++ b/sound/soc/codecs/ml26124.c | |||
| @@ -536,7 +536,6 @@ static int ml26124_set_bias_level(struct snd_soc_codec *codec, | |||
| 536 | ML26124_VMID, 0); | 536 | ML26124_VMID, 0); |
| 537 | break; | 537 | break; |
| 538 | } | 538 | } |
| 539 | codec->dapm.bias_level = level; | ||
| 540 | return 0; | 539 | return 0; |
| 541 | } | 540 | } |
| 542 | 541 | ||
diff --git a/sound/soc/codecs/pcm512x.c b/sound/soc/codecs/pcm512x.c index e12764d15431..c305b2871c59 100644 --- a/sound/soc/codecs/pcm512x.c +++ b/sound/soc/codecs/pcm512x.c | |||
| @@ -641,8 +641,6 @@ static int pcm512x_set_bias_level(struct snd_soc_codec *codec, | |||
| 641 | break; | 641 | break; |
| 642 | } | 642 | } |
| 643 | 643 | ||
| 644 | codec->dapm.bias_level = level; | ||
| 645 | |||
| 646 | return 0; | 644 | return 0; |
| 647 | } | 645 | } |
| 648 | 646 | ||
diff --git a/sound/soc/codecs/rt286.c b/sound/soc/codecs/rt286.c index 0fcda35a3a93..dbdbb9e8d4ba 100644 --- a/sound/soc/codecs/rt286.c +++ b/sound/soc/codecs/rt286.c | |||
| @@ -1012,7 +1012,6 @@ static int rt286_set_bias_level(struct snd_soc_codec *codec, | |||
| 1012 | default: | 1012 | default: |
| 1013 | break; | 1013 | break; |
| 1014 | } | 1014 | } |
| 1015 | codec->dapm.bias_level = level; | ||
| 1016 | 1015 | ||
| 1017 | return 0; | 1016 | return 0; |
| 1018 | } | 1017 | } |
diff --git a/sound/soc/codecs/rt5631.c b/sound/soc/codecs/rt5631.c index 2c10d77727af..e285d8ad260a 100644 --- a/sound/soc/codecs/rt5631.c +++ b/sound/soc/codecs/rt5631.c | |||
| @@ -1569,7 +1569,6 @@ static int rt5631_set_bias_level(struct snd_soc_codec *codec, | |||
| 1569 | default: | 1569 | default: |
| 1570 | break; | 1570 | break; |
| 1571 | } | 1571 | } |
| 1572 | codec->dapm.bias_level = level; | ||
| 1573 | 1572 | ||
| 1574 | return 0; | 1573 | return 0; |
| 1575 | } | 1574 | } |
diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c index 178e55d4d481..7d488d8b03d6 100644 --- a/sound/soc/codecs/rt5640.c +++ b/sound/soc/codecs/rt5640.c | |||
| @@ -1902,7 +1902,6 @@ static int rt5640_set_bias_level(struct snd_soc_codec *codec, | |||
| 1902 | default: | 1902 | default: |
| 1903 | break; | 1903 | break; |
| 1904 | } | 1904 | } |
| 1905 | codec->dapm.bias_level = level; | ||
| 1906 | 1905 | ||
| 1907 | return 0; | 1906 | return 0; |
| 1908 | } | 1907 | } |
| @@ -1939,7 +1938,7 @@ static int rt5640_probe(struct snd_soc_codec *codec) | |||
| 1939 | 1938 | ||
| 1940 | rt5640->codec = codec; | 1939 | rt5640->codec = codec; |
| 1941 | 1940 | ||
| 1942 | rt5640_set_bias_level(codec, SND_SOC_BIAS_OFF); | 1941 | snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_OFF); |
| 1943 | 1942 | ||
| 1944 | snd_soc_update_bits(codec, RT5640_DUMMY1, 0x0301, 0x0301); | 1943 | snd_soc_update_bits(codec, RT5640_DUMMY1, 0x0301, 0x0301); |
| 1945 | snd_soc_update_bits(codec, RT5640_MICBIAS, 0x0030, 0x0030); | 1944 | snd_soc_update_bits(codec, RT5640_MICBIAS, 0x0030, 0x0030); |
| @@ -1991,7 +1990,7 @@ static int rt5640_suspend(struct snd_soc_codec *codec) | |||
| 1991 | { | 1990 | { |
| 1992 | struct rt5640_priv *rt5640 = snd_soc_codec_get_drvdata(codec); | 1991 | struct rt5640_priv *rt5640 = snd_soc_codec_get_drvdata(codec); |
| 1993 | 1992 | ||
| 1994 | rt5640_set_bias_level(codec, SND_SOC_BIAS_OFF); | 1993 | snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_OFF); |
| 1995 | rt5640_reset(codec); | 1994 | rt5640_reset(codec); |
| 1996 | regcache_cache_only(rt5640->regmap, true); | 1995 | regcache_cache_only(rt5640->regmap, true); |
| 1997 | regcache_mark_dirty(rt5640->regmap); | 1996 | regcache_mark_dirty(rt5640->regmap); |
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c index 69528ae5410c..ea583675fa00 100644 --- a/sound/soc/codecs/rt5645.c +++ b/sound/soc/codecs/rt5645.c | |||
| @@ -2409,7 +2409,6 @@ static int rt5645_set_bias_level(struct snd_soc_codec *codec, | |||
| 2409 | default: | 2409 | default: |
| 2410 | break; | 2410 | break; |
| 2411 | } | 2411 | } |
| 2412 | codec->dapm.bias_level = level; | ||
| 2413 | 2412 | ||
| 2414 | return 0; | 2413 | return 0; |
| 2415 | } | 2414 | } |
| @@ -2520,7 +2519,7 @@ static int rt5645_probe(struct snd_soc_codec *codec) | |||
| 2520 | break; | 2519 | break; |
| 2521 | } | 2520 | } |
| 2522 | 2521 | ||
| 2523 | rt5645_set_bias_level(codec, SND_SOC_BIAS_OFF); | 2522 | snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_OFF); |
| 2524 | 2523 | ||
| 2525 | snd_soc_update_bits(codec, RT5645_CHARGE_PUMP, 0x0300, 0x0200); | 2524 | snd_soc_update_bits(codec, RT5645_CHARGE_PUMP, 0x0300, 0x0200); |
| 2526 | 2525 | ||
diff --git a/sound/soc/codecs/rt5651.c b/sound/soc/codecs/rt5651.c index 9f4c7be6d798..f03c6fc1a7e9 100644 --- a/sound/soc/codecs/rt5651.c +++ b/sound/soc/codecs/rt5651.c | |||
| @@ -1604,7 +1604,6 @@ static int rt5651_set_bias_level(struct snd_soc_codec *codec, | |||
| 1604 | default: | 1604 | default: |
| 1605 | break; | 1605 | break; |
| 1606 | } | 1606 | } |
| 1607 | codec->dapm.bias_level = level; | ||
| 1608 | 1607 | ||
| 1609 | return 0; | 1608 | return 0; |
| 1610 | } | 1609 | } |
| @@ -1625,7 +1624,7 @@ static int rt5651_probe(struct snd_soc_codec *codec) | |||
| 1625 | RT5651_PWR_FV1 | RT5651_PWR_FV2, | 1624 | RT5651_PWR_FV1 | RT5651_PWR_FV2, |
| 1626 | RT5651_PWR_FV1 | RT5651_PWR_FV2); | 1625 | RT5651_PWR_FV1 | RT5651_PWR_FV2); |
| 1627 | 1626 | ||
| 1628 | rt5651_set_bias_level(codec, SND_SOC_BIAS_OFF); | 1627 | snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_OFF); |
| 1629 | 1628 | ||
| 1630 | return 0; | 1629 | return 0; |
| 1631 | } | 1630 | } |
diff --git a/sound/soc/codecs/rt5670.c b/sound/soc/codecs/rt5670.c index cc7f84a150a7..9235711e86c2 100644 --- a/sound/soc/codecs/rt5670.c +++ b/sound/soc/codecs/rt5670.c | |||
| @@ -2647,7 +2647,6 @@ static int rt5670_set_bias_level(struct snd_soc_codec *codec, | |||
| 2647 | default: | 2647 | default: |
| 2648 | break; | 2648 | break; |
| 2649 | } | 2649 | } |
| 2650 | codec->dapm.bias_level = level; | ||
| 2651 | 2650 | ||
| 2652 | return 0; | 2651 | return 0; |
| 2653 | } | 2652 | } |
diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c index af182586712d..696ba587969e 100644 --- a/sound/soc/codecs/rt5677.c +++ b/sound/soc/codecs/rt5677.c | |||
| @@ -4392,7 +4392,6 @@ static int rt5677_set_bias_level(struct snd_soc_codec *codec, | |||
| 4392 | default: | 4392 | default: |
| 4393 | break; | 4393 | break; |
| 4394 | } | 4394 | } |
| 4395 | codec->dapm.bias_level = level; | ||
| 4396 | 4395 | ||
| 4397 | return 0; | 4396 | return 0; |
| 4398 | } | 4397 | } |
| @@ -4618,7 +4617,7 @@ static int rt5677_probe(struct snd_soc_codec *codec) | |||
| 4618 | ARRAY_SIZE(rt5677_dmic2_clk_1)); | 4617 | ARRAY_SIZE(rt5677_dmic2_clk_1)); |
| 4619 | } | 4618 | } |
| 4620 | 4619 | ||
| 4621 | rt5677_set_bias_level(codec, SND_SOC_BIAS_OFF); | 4620 | snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_OFF); |
| 4622 | 4621 | ||
| 4623 | regmap_write(rt5677->regmap, RT5677_DIG_MISC, 0x0020); | 4622 | regmap_write(rt5677->regmap, RT5677_DIG_MISC, 0x0020); |
| 4624 | regmap_write(rt5677->regmap, RT5677_PWR_DSP2, 0x0c00); | 4623 | regmap_write(rt5677->regmap, RT5677_PWR_DSP2, 0x0c00); |
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index 3593a1496056..b01c985a2307 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c | |||
| @@ -979,7 +979,6 @@ static int sgtl5000_set_bias_level(struct snd_soc_codec *codec, | |||
| 979 | break; | 979 | break; |
| 980 | } | 980 | } |
| 981 | 981 | ||
| 982 | codec->dapm.bias_level = level; | ||
| 983 | return 0; | 982 | return 0; |
| 984 | } | 983 | } |
| 985 | 984 | ||
diff --git a/sound/soc/codecs/sn95031.c b/sound/soc/codecs/sn95031.c index 7947c0ebb1ed..e4743684cc1d 100644 --- a/sound/soc/codecs/sn95031.c +++ b/sound/soc/codecs/sn95031.c | |||
| @@ -226,7 +226,6 @@ static int sn95031_set_vaud_bias(struct snd_soc_codec *codec, | |||
| 226 | break; | 226 | break; |
| 227 | } | 227 | } |
| 228 | 228 | ||
| 229 | codec->dapm.bias_level = level; | ||
| 230 | return 0; | 229 | return 0; |
| 231 | } | 230 | } |
| 232 | 231 | ||
diff --git a/sound/soc/codecs/ssm2518.c b/sound/soc/codecs/ssm2518.c index 67ea55adb307..13c6ab0f7af0 100644 --- a/sound/soc/codecs/ssm2518.c +++ b/sound/soc/codecs/ssm2518.c | |||
| @@ -518,12 +518,7 @@ static int ssm2518_set_bias_level(struct snd_soc_codec *codec, | |||
| 518 | break; | 518 | break; |
| 519 | } | 519 | } |
| 520 | 520 | ||
| 521 | if (ret) | 521 | return ret; |
| 522 | return ret; | ||
| 523 | |||
| 524 | codec->dapm.bias_level = level; | ||
| 525 | |||
| 526 | return 0; | ||
| 527 | } | 522 | } |
| 528 | 523 | ||
| 529 | static int ssm2518_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask, | 524 | static int ssm2518_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask, |
diff --git a/sound/soc/codecs/ssm2602.c b/sound/soc/codecs/ssm2602.c index 314eaece1b7d..296a140b8c35 100644 --- a/sound/soc/codecs/ssm2602.c +++ b/sound/soc/codecs/ssm2602.c | |||
| @@ -473,7 +473,6 @@ static int ssm2602_set_bias_level(struct snd_soc_codec *codec, | |||
| 473 | break; | 473 | break; |
| 474 | 474 | ||
| 475 | } | 475 | } |
| 476 | codec->dapm.bias_level = level; | ||
| 477 | return 0; | 476 | return 0; |
| 478 | } | 477 | } |
| 479 | 478 | ||
diff --git a/sound/soc/codecs/ssm4567.c b/sound/soc/codecs/ssm4567.c index a984485108cd..643bcff4a919 100644 --- a/sound/soc/codecs/ssm4567.c +++ b/sound/soc/codecs/ssm4567.c | |||
| @@ -361,12 +361,7 @@ static int ssm4567_set_bias_level(struct snd_soc_codec *codec, | |||
| 361 | break; | 361 | break; |
| 362 | } | 362 | } |
| 363 | 363 | ||
| 364 | if (ret) | 364 | return ret; |
| 365 | return ret; | ||
| 366 | |||
| 367 | codec->dapm.bias_level = level; | ||
| 368 | |||
| 369 | return 0; | ||
| 370 | } | 365 | } |
| 371 | 366 | ||
| 372 | static const struct snd_soc_dai_ops ssm4567_dai_ops = { | 367 | static const struct snd_soc_dai_ops ssm4567_dai_ops = { |
diff --git a/sound/soc/codecs/sta32x.c b/sound/soc/codecs/sta32x.c index 007a0e3bc273..033b7d9f45f7 100644 --- a/sound/soc/codecs/sta32x.c +++ b/sound/soc/codecs/sta32x.c | |||
| @@ -854,7 +854,6 @@ static int sta32x_set_bias_level(struct snd_soc_codec *codec, | |||
| 854 | sta32x->supplies); | 854 | sta32x->supplies); |
| 855 | break; | 855 | break; |
| 856 | } | 856 | } |
| 857 | codec->dapm.bias_level = level; | ||
| 858 | return 0; | 857 | return 0; |
| 859 | } | 858 | } |
| 860 | 859 | ||
| @@ -970,7 +969,7 @@ static int sta32x_probe(struct snd_soc_codec *codec) | |||
| 970 | if (sta32x->pdata->needs_esd_watchdog) | 969 | if (sta32x->pdata->needs_esd_watchdog) |
| 971 | INIT_DELAYED_WORK(&sta32x->watchdog_work, sta32x_watchdog); | 970 | INIT_DELAYED_WORK(&sta32x->watchdog_work, sta32x_watchdog); |
| 972 | 971 | ||
| 973 | sta32x_set_bias_level(codec, SND_SOC_BIAS_STANDBY); | 972 | snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_STANDBY); |
| 974 | /* Bias level configuration will have done an extra enable */ | 973 | /* Bias level configuration will have done an extra enable */ |
| 975 | regulator_bulk_disable(ARRAY_SIZE(sta32x->supplies), sta32x->supplies); | 974 | regulator_bulk_disable(ARRAY_SIZE(sta32x->supplies), sta32x->supplies); |
| 976 | 975 | ||
diff --git a/sound/soc/codecs/sta350.c b/sound/soc/codecs/sta350.c index 669e3228241e..50d8bbf90ce2 100644 --- a/sound/soc/codecs/sta350.c +++ b/sound/soc/codecs/sta350.c | |||
| @@ -890,7 +890,6 @@ static int sta350_set_bias_level(struct snd_soc_codec *codec, | |||
| 890 | sta350->supplies); | 890 | sta350->supplies); |
| 891 | break; | 891 | break; |
| 892 | } | 892 | } |
| 893 | codec->dapm.bias_level = level; | ||
| 894 | return 0; | 893 | return 0; |
| 895 | } | 894 | } |
| 896 | 895 | ||
| @@ -1037,7 +1036,7 @@ static int sta350_probe(struct snd_soc_codec *codec) | |||
| 1037 | sta350->coef_shadow[60] = 0x400000; | 1036 | sta350->coef_shadow[60] = 0x400000; |
| 1038 | sta350->coef_shadow[61] = 0x400000; | 1037 | sta350->coef_shadow[61] = 0x400000; |
| 1039 | 1038 | ||
| 1040 | sta350_set_bias_level(codec, SND_SOC_BIAS_STANDBY); | 1039 | snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_STANDBY); |
| 1041 | /* Bias level configuration will have done an extra enable */ | 1040 | /* Bias level configuration will have done an extra enable */ |
| 1042 | regulator_bulk_disable(ARRAY_SIZE(sta350->supplies), sta350->supplies); | 1041 | regulator_bulk_disable(ARRAY_SIZE(sta350->supplies), sta350->supplies); |
| 1043 | 1042 | ||
diff --git a/sound/soc/codecs/sta529.c b/sound/soc/codecs/sta529.c index b0f436d10125..c3217af1ca29 100644 --- a/sound/soc/codecs/sta529.c +++ b/sound/soc/codecs/sta529.c | |||
| @@ -179,12 +179,6 @@ static int sta529_set_bias_level(struct snd_soc_codec *codec, enum | |||
| 179 | break; | 179 | break; |
| 180 | } | 180 | } |
| 181 | 181 | ||
| 182 | /* | ||
| 183 | * store the label for powers down audio subsystem for suspend.This is | ||
| 184 | * used by soc core layer | ||
| 185 | */ | ||
| 186 | codec->dapm.bias_level = level; | ||
| 187 | |||
| 188 | return 0; | 182 | return 0; |
| 189 | 183 | ||
| 190 | } | 184 | } |
diff --git a/sound/soc/codecs/stac9766.c b/sound/soc/codecs/stac9766.c index 6464caf72b21..2341e8e6bfc1 100644 --- a/sound/soc/codecs/stac9766.c +++ b/sound/soc/codecs/stac9766.c | |||
| @@ -236,7 +236,6 @@ static int stac9766_set_bias_level(struct snd_soc_codec *codec, | |||
| 236 | stac9766_ac97_write(codec, AC97_POWERDOWN, 0xffff); | 236 | stac9766_ac97_write(codec, AC97_POWERDOWN, 0xffff); |
| 237 | break; | 237 | break; |
| 238 | } | 238 | } |
| 239 | codec->dapm.bias_level = level; | ||
| 240 | return 0; | 239 | return 0; |
| 241 | } | 240 | } |
| 242 | 241 | ||
diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c index cc17e7e5126e..cd8c02b6e4de 100644 --- a/sound/soc/codecs/tlv320aic23.c +++ b/sound/soc/codecs/tlv320aic23.c | |||
| @@ -506,7 +506,6 @@ static int tlv320aic23_set_bias_level(struct snd_soc_codec *codec, | |||
| 506 | snd_soc_write(codec, TLV320AIC23_PWR, 0x1ff); | 506 | snd_soc_write(codec, TLV320AIC23_PWR, 0x1ff); |
| 507 | break; | 507 | break; |
| 508 | } | 508 | } |
| 509 | codec->dapm.bias_level = level; | ||
| 510 | return 0; | 509 | return 0; |
| 511 | } | 510 | } |
| 512 | 511 | ||
diff --git a/sound/soc/codecs/tlv320aic31xx.c b/sound/soc/codecs/tlv320aic31xx.c index c86dd9aae157..e629273019d0 100644 --- a/sound/soc/codecs/tlv320aic31xx.c +++ b/sound/soc/codecs/tlv320aic31xx.c | |||
| @@ -1053,7 +1053,6 @@ static int aic31xx_set_bias_level(struct snd_soc_codec *codec, | |||
| 1053 | aic31xx_power_off(codec); | 1053 | aic31xx_power_off(codec); |
| 1054 | break; | 1054 | break; |
| 1055 | } | 1055 | } |
| 1056 | codec->dapm.bias_level = level; | ||
| 1057 | 1056 | ||
| 1058 | return 0; | 1057 | return 0; |
| 1059 | } | 1058 | } |
diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c index 015467ed606b..ad6cb90e5f9b 100644 --- a/sound/soc/codecs/tlv320aic32x4.c +++ b/sound/soc/codecs/tlv320aic32x4.c | |||
| @@ -564,7 +564,6 @@ static int aic32x4_set_bias_level(struct snd_soc_codec *codec, | |||
| 564 | case SND_SOC_BIAS_OFF: | 564 | case SND_SOC_BIAS_OFF: |
| 565 | break; | 565 | break; |
| 566 | } | 566 | } |
| 567 | codec->dapm.bias_level = level; | ||
| 568 | return 0; | 567 | return 0; |
| 569 | } | 568 | } |
| 570 | 569 | ||
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index 51c4713ac6e3..57d709075746 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c | |||
| @@ -1406,7 +1406,6 @@ static int aic3x_set_bias_level(struct snd_soc_codec *codec, | |||
| 1406 | aic3x_set_power(codec, 0); | 1406 | aic3x_set_power(codec, 0); |
| 1407 | break; | 1407 | break; |
| 1408 | } | 1408 | } |
| 1409 | codec->dapm.bias_level = level; | ||
| 1410 | 1409 | ||
| 1411 | return 0; | 1410 | return 0; |
| 1412 | } | 1411 | } |
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c index 4e3e607dec13..33e93f62de30 100644 --- a/sound/soc/codecs/tlv320dac33.c +++ b/sound/soc/codecs/tlv320dac33.c | |||
| @@ -651,7 +651,6 @@ static int dac33_set_bias_level(struct snd_soc_codec *codec, | |||
| 651 | return ret; | 651 | return ret; |
| 652 | break; | 652 | break; |
| 653 | } | 653 | } |
| 654 | codec->dapm.bias_level = level; | ||
| 655 | 654 | ||
| 656 | return 0; | 655 | return 0; |
| 657 | } | 656 | } |
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c index d04693e9cf9f..e725e13a7f59 100644 --- a/sound/soc/codecs/twl4030.c +++ b/sound/soc/codecs/twl4030.c | |||
| @@ -1595,7 +1595,6 @@ static int twl4030_set_bias_level(struct snd_soc_codec *codec, | |||
| 1595 | twl4030_codec_enable(codec, 0); | 1595 | twl4030_codec_enable(codec, 0); |
| 1596 | break; | 1596 | break; |
| 1597 | } | 1597 | } |
| 1598 | codec->dapm.bias_level = level; | ||
| 1599 | 1598 | ||
| 1600 | return 0; | 1599 | return 0; |
| 1601 | } | 1600 | } |
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c index aeec27b6f1af..b8ecce206af8 100644 --- a/sound/soc/codecs/twl6040.c +++ b/sound/soc/codecs/twl6040.c | |||
| @@ -853,8 +853,6 @@ static int twl6040_set_bias_level(struct snd_soc_codec *codec, | |||
| 853 | break; | 853 | break; |
| 854 | } | 854 | } |
| 855 | 855 | ||
| 856 | codec->dapm.bias_level = level; | ||
| 857 | |||
| 858 | return 0; | 856 | return 0; |
| 859 | } | 857 | } |
| 860 | 858 | ||
| @@ -1130,7 +1128,7 @@ static int twl6040_probe(struct snd_soc_codec *codec) | |||
| 1130 | return ret; | 1128 | return ret; |
| 1131 | } | 1129 | } |
| 1132 | 1130 | ||
| 1133 | twl6040_set_bias_level(codec, SND_SOC_BIAS_STANDBY); | 1131 | snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_STANDBY); |
| 1134 | twl6040_init_chip(codec); | 1132 | twl6040_init_chip(codec); |
| 1135 | 1133 | ||
| 1136 | return 0; | 1134 | return 0; |
diff --git a/sound/soc/codecs/uda134x.c b/sound/soc/codecs/uda134x.c index f883308c00de..dbecbc05cf7b 100644 --- a/sound/soc/codecs/uda134x.c +++ b/sound/soc/codecs/uda134x.c | |||
| @@ -350,7 +350,6 @@ static int uda134x_set_bias_level(struct snd_soc_codec *codec, | |||
| 350 | pd->power(0); | 350 | pd->power(0); |
| 351 | break; | 351 | break; |
| 352 | } | 352 | } |
| 353 | codec->dapm.bias_level = level; | ||
| 354 | return 0; | 353 | return 0; |
| 355 | } | 354 | } |
| 356 | 355 | ||
diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c index dc7778b6dd7f..cc5b1769958a 100644 --- a/sound/soc/codecs/uda1380.c +++ b/sound/soc/codecs/uda1380.c | |||
| @@ -623,7 +623,6 @@ static int uda1380_set_bias_level(struct snd_soc_codec *codec, | |||
| 623 | for (reg = UDA1380_MVOL; reg < UDA1380_CACHEREGNUM; reg++) | 623 | for (reg = UDA1380_MVOL; reg < UDA1380_CACHEREGNUM; reg++) |
| 624 | set_bit(reg - 0x10, &uda1380_cache_dirty); | 624 | set_bit(reg - 0x10, &uda1380_cache_dirty); |
| 625 | } | 625 | } |
| 626 | codec->dapm.bias_level = level; | ||
| 627 | return 0; | 626 | return 0; |
| 628 | } | 627 | } |
| 629 | 628 | ||
diff --git a/sound/soc/codecs/wm0010.c b/sound/soc/codecs/wm0010.c index f37989ec7cba..3358dd6811fa 100644 --- a/sound/soc/codecs/wm0010.c +++ b/sound/soc/codecs/wm0010.c | |||
| @@ -767,8 +767,6 @@ static int wm0010_set_bias_level(struct snd_soc_codec *codec, | |||
| 767 | break; | 767 | break; |
| 768 | } | 768 | } |
| 769 | 769 | ||
| 770 | codec->dapm.bias_level = level; | ||
| 771 | |||
| 772 | return 0; | 770 | return 0; |
| 773 | } | 771 | } |
| 774 | 772 | ||
diff --git a/sound/soc/codecs/wm1250-ev1.c b/sound/soc/codecs/wm1250-ev1.c index 8011f75fb6cb..048f00568260 100644 --- a/sound/soc/codecs/wm1250-ev1.c +++ b/sound/soc/codecs/wm1250-ev1.c | |||
| @@ -61,8 +61,6 @@ static int wm1250_ev1_set_bias_level(struct snd_soc_codec *codec, | |||
| 61 | break; | 61 | break; |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | codec->dapm.bias_level = level; | ||
| 65 | |||
| 66 | return 0; | 64 | return 0; |
| 67 | } | 65 | } |
| 68 | 66 | ||
diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c index c65e5a75fc1a..dd0d0248e641 100644 --- a/sound/soc/codecs/wm8350.c +++ b/sound/soc/codecs/wm8350.c | |||
| @@ -1235,7 +1235,6 @@ static int wm8350_set_bias_level(struct snd_soc_codec *codec, | |||
| 1235 | priv->supplies); | 1235 | priv->supplies); |
| 1236 | break; | 1236 | break; |
| 1237 | } | 1237 | } |
| 1238 | codec->dapm.bias_level = level; | ||
| 1239 | return 0; | 1238 | return 0; |
| 1240 | } | 1239 | } |
| 1241 | 1240 | ||
diff --git a/sound/soc/codecs/wm8400.c b/sound/soc/codecs/wm8400.c index b0d84e552fca..adbfebe04c77 100644 --- a/sound/soc/codecs/wm8400.c +++ b/sound/soc/codecs/wm8400.c | |||
| @@ -1232,7 +1232,6 @@ static int wm8400_set_bias_level(struct snd_soc_codec *codec, | |||
| 1232 | break; | 1232 | break; |
| 1233 | } | 1233 | } |
| 1234 | 1234 | ||
| 1235 | codec->dapm.bias_level = level; | ||
| 1236 | return 0; | 1235 | return 0; |
| 1237 | } | 1236 | } |
| 1238 | 1237 | ||
diff --git a/sound/soc/codecs/wm8510.c b/sound/soc/codecs/wm8510.c index 8736ad094b24..a380c10e867b 100644 --- a/sound/soc/codecs/wm8510.c +++ b/sound/soc/codecs/wm8510.c | |||
| @@ -538,7 +538,6 @@ static int wm8510_set_bias_level(struct snd_soc_codec *codec, | |||
| 538 | break; | 538 | break; |
| 539 | } | 539 | } |
| 540 | 540 | ||
| 541 | codec->dapm.bias_level = level; | ||
| 542 | return 0; | 541 | return 0; |
| 543 | } | 542 | } |
| 544 | 543 | ||
diff --git a/sound/soc/codecs/wm8523.c b/sound/soc/codecs/wm8523.c index b1cc94f5fc4b..34ebe95d93f1 100644 --- a/sound/soc/codecs/wm8523.c +++ b/sound/soc/codecs/wm8523.c | |||
| @@ -344,7 +344,6 @@ static int wm8523_set_bias_level(struct snd_soc_codec *codec, | |||
| 344 | wm8523->supplies); | 344 | wm8523->supplies); |
| 345 | break; | 345 | break; |
| 346 | } | 346 | } |
| 347 | codec->dapm.bias_level = level; | ||
| 348 | return 0; | 347 | return 0; |
| 349 | } | 348 | } |
| 350 | 349 | ||
diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c index 0a887c5ec83a..5951d88e3dc9 100644 --- a/sound/soc/codecs/wm8580.c +++ b/sound/soc/codecs/wm8580.c | |||
| @@ -812,7 +812,6 @@ static int wm8580_set_bias_level(struct snd_soc_codec *codec, | |||
| 812 | WM8580_PWRDN1_PWDN, WM8580_PWRDN1_PWDN); | 812 | WM8580_PWRDN1_PWDN, WM8580_PWRDN1_PWDN); |
| 813 | break; | 813 | break; |
| 814 | } | 814 | } |
| 815 | codec->dapm.bias_level = level; | ||
| 816 | return 0; | 815 | return 0; |
| 817 | } | 816 | } |
| 818 | 817 | ||
diff --git a/sound/soc/codecs/wm8711.c b/sound/soc/codecs/wm8711.c index 121e46d53779..a4aab6e7f5cc 100644 --- a/sound/soc/codecs/wm8711.c +++ b/sound/soc/codecs/wm8711.c | |||
| @@ -320,7 +320,6 @@ static int wm8711_set_bias_level(struct snd_soc_codec *codec, | |||
| 320 | snd_soc_write(codec, WM8711_PWR, 0xffff); | 320 | snd_soc_write(codec, WM8711_PWR, 0xffff); |
| 321 | break; | 321 | break; |
| 322 | } | 322 | } |
| 323 | codec->dapm.bias_level = level; | ||
| 324 | return 0; | 323 | return 0; |
| 325 | } | 324 | } |
| 326 | 325 | ||
diff --git a/sound/soc/codecs/wm8728.c b/sound/soc/codecs/wm8728.c index 55c7fb4fc786..a737068d5576 100644 --- a/sound/soc/codecs/wm8728.c +++ b/sound/soc/codecs/wm8728.c | |||
| @@ -185,7 +185,6 @@ static int wm8728_set_bias_level(struct snd_soc_codec *codec, | |||
| 185 | snd_soc_write(codec, WM8728_DACCTL, reg | 0x4); | 185 | snd_soc_write(codec, WM8728_DACCTL, reg | 0x4); |
| 186 | break; | 186 | break; |
| 187 | } | 187 | } |
| 188 | codec->dapm.bias_level = level; | ||
| 189 | return 0; | 188 | return 0; |
| 190 | } | 189 | } |
| 191 | 190 | ||
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c index 2245b6a32f3d..a13a20ac47af 100644 --- a/sound/soc/codecs/wm8731.c +++ b/sound/soc/codecs/wm8731.c | |||
| @@ -523,7 +523,6 @@ static int wm8731_set_bias_level(struct snd_soc_codec *codec, | |||
| 523 | regcache_mark_dirty(wm8731->regmap); | 523 | regcache_mark_dirty(wm8731->regmap); |
| 524 | break; | 524 | break; |
| 525 | } | 525 | } |
| 526 | codec->dapm.bias_level = level; | ||
| 527 | return 0; | 526 | return 0; |
| 528 | } | 527 | } |
| 529 | 528 | ||
| @@ -599,7 +598,7 @@ static int wm8731_probe(struct snd_soc_codec *codec) | |||
| 599 | goto err_regulator_enable; | 598 | goto err_regulator_enable; |
| 600 | } | 599 | } |
| 601 | 600 | ||
| 602 | wm8731_set_bias_level(codec, SND_SOC_BIAS_STANDBY); | 601 | snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_STANDBY); |
| 603 | 602 | ||
| 604 | /* Latch the update bits */ | 603 | /* Latch the update bits */ |
| 605 | snd_soc_update_bits(codec, WM8731_LOUT1V, 0x100, 0); | 604 | snd_soc_update_bits(codec, WM8731_LOUT1V, 0x100, 0); |
diff --git a/sound/soc/codecs/wm8737.c b/sound/soc/codecs/wm8737.c index ada9ac1ba2c6..4a9407dadae3 100644 --- a/sound/soc/codecs/wm8737.c +++ b/sound/soc/codecs/wm8737.c | |||
| @@ -510,7 +510,6 @@ static int wm8737_set_bias_level(struct snd_soc_codec *codec, | |||
| 510 | break; | 510 | break; |
| 511 | } | 511 | } |
| 512 | 512 | ||
| 513 | codec->dapm.bias_level = level; | ||
| 514 | return 0; | 513 | return 0; |
| 515 | } | 514 | } |
| 516 | 515 | ||
| @@ -560,7 +559,7 @@ static int wm8737_probe(struct snd_soc_codec *codec) | |||
| 560 | snd_soc_update_bits(codec, WM8737_RIGHT_PGA_VOLUME, WM8737_RVU, | 559 | snd_soc_update_bits(codec, WM8737_RIGHT_PGA_VOLUME, WM8737_RVU, |
| 561 | WM8737_RVU); | 560 | WM8737_RVU); |
| 562 | 561 | ||
| 563 | wm8737_set_bias_level(codec, SND_SOC_BIAS_STANDBY); | 562 | snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_STANDBY); |
| 564 | 563 | ||
| 565 | /* Bias level configuration will have done an extra enable */ | 564 | /* Bias level configuration will have done an extra enable */ |
| 566 | regulator_bulk_disable(ARRAY_SIZE(wm8737->supplies), wm8737->supplies); | 565 | regulator_bulk_disable(ARRAY_SIZE(wm8737->supplies), wm8737->supplies); |
diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c index eb0a1644ba11..d6ff25a9d5af 100644 --- a/sound/soc/codecs/wm8750.c +++ b/sound/soc/codecs/wm8750.c | |||
| @@ -651,7 +651,6 @@ static int wm8750_set_bias_level(struct snd_soc_codec *codec, | |||
| 651 | snd_soc_write(codec, WM8750_PWR1, 0x0001); | 651 | snd_soc_write(codec, WM8750_PWR1, 0x0001); |
| 652 | break; | 652 | break; |
| 653 | } | 653 | } |
| 654 | codec->dapm.bias_level = level; | ||
| 655 | return 0; | 654 | return 0; |
| 656 | } | 655 | } |
| 657 | 656 | ||
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c index c50a5959345f..b7d38f7ba636 100644 --- a/sound/soc/codecs/wm8753.c +++ b/sound/soc/codecs/wm8753.c | |||
| @@ -1367,7 +1367,6 @@ static int wm8753_set_bias_level(struct snd_soc_codec *codec, | |||
| 1367 | snd_soc_write(codec, WM8753_PWR1, 0x0001); | 1367 | snd_soc_write(codec, WM8753_PWR1, 0x0001); |
| 1368 | break; | 1368 | break; |
| 1369 | } | 1369 | } |
| 1370 | codec->dapm.bias_level = level; | ||
| 1371 | return 0; | 1370 | return 0; |
| 1372 | } | 1371 | } |
| 1373 | 1372 | ||
diff --git a/sound/soc/codecs/wm8770.c b/sound/soc/codecs/wm8770.c index 53e977da2f86..c24db8037201 100644 --- a/sound/soc/codecs/wm8770.c +++ b/sound/soc/codecs/wm8770.c | |||
| @@ -534,7 +534,6 @@ static int wm8770_set_bias_level(struct snd_soc_codec *codec, | |||
| 534 | break; | 534 | break; |
| 535 | } | 535 | } |
| 536 | 536 | ||
| 537 | codec->dapm.bias_level = level; | ||
| 538 | return 0; | 537 | return 0; |
| 539 | } | 538 | } |
| 540 | 539 | ||
diff --git a/sound/soc/codecs/wm8776.c b/sound/soc/codecs/wm8776.c index c13050b77931..b0e3c3bbd440 100644 --- a/sound/soc/codecs/wm8776.c +++ b/sound/soc/codecs/wm8776.c | |||
| @@ -357,7 +357,6 @@ static int wm8776_set_bias_level(struct snd_soc_codec *codec, | |||
| 357 | break; | 357 | break; |
| 358 | } | 358 | } |
| 359 | 359 | ||
| 360 | codec->dapm.bias_level = level; | ||
| 361 | return 0; | 360 | return 0; |
| 362 | } | 361 | } |
| 363 | 362 | ||
diff --git a/sound/soc/codecs/wm8900.c b/sound/soc/codecs/wm8900.c index 2eb986c19b88..e7d2ecd150cf 100644 --- a/sound/soc/codecs/wm8900.c +++ b/sound/soc/codecs/wm8900.c | |||
| @@ -1117,7 +1117,6 @@ static int wm8900_set_bias_level(struct snd_soc_codec *codec, | |||
| 1117 | WM8900_REG_POWER2_SYSCLK_ENA); | 1117 | WM8900_REG_POWER2_SYSCLK_ENA); |
| 1118 | break; | 1118 | break; |
| 1119 | } | 1119 | } |
| 1120 | codec->dapm.bias_level = level; | ||
| 1121 | return 0; | 1120 | return 0; |
| 1122 | } | 1121 | } |
| 1123 | 1122 | ||
| @@ -1138,7 +1137,7 @@ static int wm8900_suspend(struct snd_soc_codec *codec) | |||
| 1138 | wm8900->fll_out = fll_out; | 1137 | wm8900->fll_out = fll_out; |
| 1139 | wm8900->fll_in = fll_in; | 1138 | wm8900->fll_in = fll_in; |
| 1140 | 1139 | ||
| 1141 | wm8900_set_bias_level(codec, SND_SOC_BIAS_OFF); | 1140 | snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_OFF); |
| 1142 | 1141 | ||
| 1143 | return 0; | 1142 | return 0; |
| 1144 | } | 1143 | } |
| @@ -1156,7 +1155,7 @@ static int wm8900_resume(struct snd_soc_codec *codec) | |||
| 1156 | return ret; | 1155 | return ret; |
| 1157 | } | 1156 | } |
| 1158 | 1157 | ||
| 1159 | wm8900_set_bias_level(codec, SND_SOC_BIAS_STANDBY); | 1158 | snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_STANDBY); |
| 1160 | 1159 | ||
| 1161 | /* Restart the FLL? */ | 1160 | /* Restart the FLL? */ |
| 1162 | if (wm8900->fll_out) { | 1161 | if (wm8900->fll_out) { |
| @@ -1189,7 +1188,7 @@ static int wm8900_probe(struct snd_soc_codec *codec) | |||
| 1189 | wm8900_reset(codec); | 1188 | wm8900_reset(codec); |
| 1190 | 1189 | ||
| 1191 | /* Turn the chip on */ | 1190 | /* Turn the chip on */ |
| 1192 | wm8900_set_bias_level(codec, SND_SOC_BIAS_STANDBY); | 1191 | snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_STANDBY); |
| 1193 | 1192 | ||
| 1194 | /* Latch the volume update bits */ | 1193 | /* Latch the volume update bits */ |
| 1195 | snd_soc_update_bits(codec, WM8900_REG_LINVOL, 0x100, 0x100); | 1194 | snd_soc_update_bits(codec, WM8900_REG_LINVOL, 0x100, 0x100); |
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c index 04b04f8e147c..5e0bef62d974 100644 --- a/sound/soc/codecs/wm8903.c +++ b/sound/soc/codecs/wm8903.c | |||
| @@ -1200,8 +1200,6 @@ static int wm8903_set_bias_level(struct snd_soc_codec *codec, | |||
| 1200 | break; | 1200 | break; |
| 1201 | } | 1201 | } |
| 1202 | 1202 | ||
| 1203 | codec->dapm.bias_level = level; | ||
| 1204 | |||
| 1205 | return 0; | 1203 | return 0; |
| 1206 | } | 1204 | } |
| 1207 | 1205 | ||
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c index 215e93c1ddf0..a7a8fa0567b1 100644 --- a/sound/soc/codecs/wm8904.c +++ b/sound/soc/codecs/wm8904.c | |||
| @@ -1907,7 +1907,6 @@ static int wm8904_set_bias_level(struct snd_soc_codec *codec, | |||
| 1907 | clk_disable_unprepare(wm8904->mclk); | 1907 | clk_disable_unprepare(wm8904->mclk); |
| 1908 | break; | 1908 | break; |
| 1909 | } | 1909 | } |
| 1910 | codec->dapm.bias_level = level; | ||
| 1911 | return 0; | 1910 | return 0; |
| 1912 | } | 1911 | } |
| 1913 | 1912 | ||
diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c index e4142b4309eb..f2d6a490713f 100644 --- a/sound/soc/codecs/wm8940.c +++ b/sound/soc/codecs/wm8940.c | |||
| @@ -510,8 +510,6 @@ static int wm8940_set_bias_level(struct snd_soc_codec *codec, | |||
| 510 | break; | 510 | break; |
| 511 | } | 511 | } |
| 512 | 512 | ||
| 513 | codec->dapm.bias_level = level; | ||
| 514 | |||
| 515 | return ret; | 513 | return ret; |
| 516 | } | 514 | } |
| 517 | 515 | ||
| @@ -707,7 +705,7 @@ static int wm8940_probe(struct snd_soc_codec *codec) | |||
| 707 | return ret; | 705 | return ret; |
| 708 | } | 706 | } |
| 709 | 707 | ||
| 710 | wm8940_set_bias_level(codec, SND_SOC_BIAS_STANDBY); | 708 | snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_STANDBY); |
| 711 | 709 | ||
| 712 | ret = snd_soc_write(codec, WM8940_POWER1, 0x180); | 710 | ret = snd_soc_write(codec, WM8940_POWER1, 0x180); |
| 713 | if (ret < 0) | 711 | if (ret < 0) |
diff --git a/sound/soc/codecs/wm8955.c b/sound/soc/codecs/wm8955.c index 00bec915d652..f400d5c7234c 100644 --- a/sound/soc/codecs/wm8955.c +++ b/sound/soc/codecs/wm8955.c | |||
| @@ -838,7 +838,6 @@ static int wm8955_set_bias_level(struct snd_soc_codec *codec, | |||
| 838 | wm8955->supplies); | 838 | wm8955->supplies); |
| 839 | break; | 839 | break; |
| 840 | } | 840 | } |
| 841 | codec->dapm.bias_level = level; | ||
| 842 | return 0; | 841 | return 0; |
| 843 | } | 842 | } |
| 844 | 843 | ||
| @@ -929,7 +928,7 @@ static int wm8955_probe(struct snd_soc_codec *codec) | |||
| 929 | WM8955_DMEN, WM8955_DMEN); | 928 | WM8955_DMEN, WM8955_DMEN); |
| 930 | } | 929 | } |
| 931 | 930 | ||
| 932 | wm8955_set_bias_level(codec, SND_SOC_BIAS_STANDBY); | 931 | snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_STANDBY); |
| 933 | 932 | ||
| 934 | /* Bias level configuration will have done an extra enable */ | 933 | /* Bias level configuration will have done an extra enable */ |
| 935 | regulator_bulk_disable(ARRAY_SIZE(wm8955->supplies), wm8955->supplies); | 934 | regulator_bulk_disable(ARRAY_SIZE(wm8955->supplies), wm8955->supplies); |
diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index 3035d9856415..6fa832b6365b 100644 --- a/sound/soc/codecs/wm8960.c +++ b/sound/soc/codecs/wm8960.c | |||
| @@ -691,8 +691,6 @@ static int wm8960_set_bias_level_out3(struct snd_soc_codec *codec, | |||
| 691 | break; | 691 | break; |
| 692 | } | 692 | } |
| 693 | 693 | ||
| 694 | codec->dapm.bias_level = level; | ||
| 695 | |||
| 696 | return 0; | 694 | return 0; |
| 697 | } | 695 | } |
| 698 | 696 | ||
| @@ -802,8 +800,6 @@ static int wm8960_set_bias_level_capless(struct snd_soc_codec *codec, | |||
| 802 | break; | 800 | break; |
| 803 | } | 801 | } |
| 804 | 802 | ||
| 805 | codec->dapm.bias_level = level; | ||
| 806 | |||
| 807 | return 0; | 803 | return 0; |
| 808 | } | 804 | } |
| 809 | 805 | ||
diff --git a/sound/soc/codecs/wm8961.c b/sound/soc/codecs/wm8961.c index 95e2c1bfc809..6f95d7044aac 100644 --- a/sound/soc/codecs/wm8961.c +++ b/sound/soc/codecs/wm8961.c | |||
| @@ -795,8 +795,6 @@ static int wm8961_set_bias_level(struct snd_soc_codec *codec, | |||
| 795 | break; | 795 | break; |
| 796 | } | 796 | } |
| 797 | 797 | ||
| 798 | codec->dapm.bias_level = level; | ||
| 799 | |||
| 800 | return 0; | 798 | return 0; |
| 801 | } | 799 | } |
| 802 | 800 | ||
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index 118b0034ba23..00793b7b0a83 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c | |||
| @@ -2538,7 +2538,6 @@ static int wm8962_set_bias_level(struct snd_soc_codec *codec, | |||
| 2538 | break; | 2538 | break; |
| 2539 | } | 2539 | } |
| 2540 | 2540 | ||
| 2541 | codec->dapm.bias_level = level; | ||
| 2542 | return 0; | 2541 | return 0; |
| 2543 | } | 2542 | } |
| 2544 | 2543 | ||
diff --git a/sound/soc/codecs/wm8971.c b/sound/soc/codecs/wm8971.c index f9cbabdc6238..94eb27ec572f 100644 --- a/sound/soc/codecs/wm8971.c +++ b/sound/soc/codecs/wm8971.c | |||
| @@ -594,7 +594,6 @@ static int wm8971_set_bias_level(struct snd_soc_codec *codec, | |||
| 594 | snd_soc_write(codec, WM8971_PWR1, 0x0001); | 594 | snd_soc_write(codec, WM8971_PWR1, 0x0001); |
| 595 | break; | 595 | break; |
| 596 | } | 596 | } |
| 597 | codec->dapm.bias_level = level; | ||
| 598 | return 0; | 597 | return 0; |
| 599 | } | 598 | } |
| 600 | 599 | ||
diff --git a/sound/soc/codecs/wm8974.c b/sound/soc/codecs/wm8974.c index ff0e4646b934..d2180c83a5cc 100644 --- a/sound/soc/codecs/wm8974.c +++ b/sound/soc/codecs/wm8974.c | |||
| @@ -533,7 +533,6 @@ static int wm8974_set_bias_level(struct snd_soc_codec *codec, | |||
| 533 | break; | 533 | break; |
| 534 | } | 534 | } |
| 535 | 535 | ||
| 536 | codec->dapm.bias_level = level; | ||
| 537 | return 0; | 536 | return 0; |
| 538 | } | 537 | } |
| 539 | 538 | ||
diff --git a/sound/soc/codecs/wm8978.c b/sound/soc/codecs/wm8978.c index cf7032911721..e2363b9a38a0 100644 --- a/sound/soc/codecs/wm8978.c +++ b/sound/soc/codecs/wm8978.c | |||
| @@ -888,7 +888,6 @@ static int wm8978_set_bias_level(struct snd_soc_codec *codec, | |||
| 888 | 888 | ||
| 889 | dev_dbg(codec->dev, "%s: %d, %x\n", __func__, level, power1); | 889 | dev_dbg(codec->dev, "%s: %d, %x\n", __func__, level, power1); |
| 890 | 890 | ||
| 891 | codec->dapm.bias_level = level; | ||
| 892 | return 0; | 891 | return 0; |
| 893 | } | 892 | } |
| 894 | 893 | ||
| @@ -928,7 +927,7 @@ static int wm8978_suspend(struct snd_soc_codec *codec) | |||
| 928 | { | 927 | { |
| 929 | struct wm8978_priv *wm8978 = snd_soc_codec_get_drvdata(codec); | 928 | struct wm8978_priv *wm8978 = snd_soc_codec_get_drvdata(codec); |
| 930 | 929 | ||
| 931 | wm8978_set_bias_level(codec, SND_SOC_BIAS_OFF); | 930 | snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_OFF); |
| 932 | /* Also switch PLL off */ | 931 | /* Also switch PLL off */ |
| 933 | snd_soc_write(codec, WM8978_POWER_MANAGEMENT_1, 0); | 932 | snd_soc_write(codec, WM8978_POWER_MANAGEMENT_1, 0); |
| 934 | 933 | ||
| @@ -944,7 +943,7 @@ static int wm8978_resume(struct snd_soc_codec *codec) | |||
| 944 | /* Sync reg_cache with the hardware */ | 943 | /* Sync reg_cache with the hardware */ |
| 945 | regcache_sync(wm8978->regmap); | 944 | regcache_sync(wm8978->regmap); |
| 946 | 945 | ||
| 947 | wm8978_set_bias_level(codec, SND_SOC_BIAS_STANDBY); | 946 | snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_STANDBY); |
| 948 | 947 | ||
| 949 | if (wm8978->f_pllout) | 948 | if (wm8978->f_pllout) |
| 950 | /* Switch PLL on */ | 949 | /* Switch PLL on */ |
diff --git a/sound/soc/codecs/wm8983.c b/sound/soc/codecs/wm8983.c index 5d1cf08a72b8..f9245715cebd 100644 --- a/sound/soc/codecs/wm8983.c +++ b/sound/soc/codecs/wm8983.c | |||
| @@ -963,7 +963,6 @@ static int wm8983_set_bias_level(struct snd_soc_codec *codec, | |||
| 963 | break; | 963 | break; |
| 964 | } | 964 | } |
| 965 | 965 | ||
| 966 | codec->dapm.bias_level = level; | ||
| 967 | return 0; | 966 | return 0; |
| 968 | } | 967 | } |
| 969 | 968 | ||
diff --git a/sound/soc/codecs/wm8985.c b/sound/soc/codecs/wm8985.c index 0b3b54c9971d..4e6901b5c819 100644 --- a/sound/soc/codecs/wm8985.c +++ b/sound/soc/codecs/wm8985.c | |||
| @@ -957,7 +957,6 @@ static int wm8985_set_bias_level(struct snd_soc_codec *codec, | |||
| 957 | break; | 957 | break; |
| 958 | } | 958 | } |
| 959 | 959 | ||
| 960 | codec->dapm.bias_level = level; | ||
| 961 | return 0; | 960 | return 0; |
| 962 | } | 961 | } |
| 963 | 962 | ||
diff --git a/sound/soc/codecs/wm8988.c b/sound/soc/codecs/wm8988.c index 24968aa8618a..92680c6d247e 100644 --- a/sound/soc/codecs/wm8988.c +++ b/sound/soc/codecs/wm8988.c | |||
| @@ -756,7 +756,6 @@ static int wm8988_set_bias_level(struct snd_soc_codec *codec, | |||
| 756 | snd_soc_write(codec, WM8988_PWR1, 0x0000); | 756 | snd_soc_write(codec, WM8988_PWR1, 0x0000); |
| 757 | break; | 757 | break; |
| 758 | } | 758 | } |
| 759 | codec->dapm.bias_level = level; | ||
| 760 | return 0; | 759 | return 0; |
| 761 | } | 760 | } |
| 762 | 761 | ||
diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c index c93bffcb3cfb..ff377cab5775 100644 --- a/sound/soc/codecs/wm8990.c +++ b/sound/soc/codecs/wm8990.c | |||
| @@ -1227,7 +1227,6 @@ static int wm8990_set_bias_level(struct snd_soc_codec *codec, | |||
| 1227 | break; | 1227 | break; |
| 1228 | } | 1228 | } |
| 1229 | 1229 | ||
| 1230 | codec->dapm.bias_level = level; | ||
| 1231 | return 0; | 1230 | return 0; |
| 1232 | } | 1231 | } |
| 1233 | 1232 | ||
| @@ -1281,7 +1280,7 @@ static int wm8990_probe(struct snd_soc_codec *codec) | |||
| 1281 | wm8990_reset(codec); | 1280 | wm8990_reset(codec); |
| 1282 | 1281 | ||
| 1283 | /* charge output caps */ | 1282 | /* charge output caps */ |
| 1284 | wm8990_set_bias_level(codec, SND_SOC_BIAS_STANDBY); | 1283 | snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_STANDBY); |
| 1285 | 1284 | ||
| 1286 | snd_soc_update_bits(codec, WM8990_AUDIO_INTERFACE_4, | 1285 | snd_soc_update_bits(codec, WM8990_AUDIO_INTERFACE_4, |
| 1287 | WM8990_ALRCGPIO1, WM8990_ALRCGPIO1); | 1286 | WM8990_ALRCGPIO1, WM8990_ALRCGPIO1); |
diff --git a/sound/soc/codecs/wm8991.c b/sound/soc/codecs/wm8991.c index 49df0dc607e6..abd439fb0820 100644 --- a/sound/soc/codecs/wm8991.c +++ b/sound/soc/codecs/wm8991.c | |||
| @@ -1224,7 +1224,6 @@ static int wm8991_set_bias_level(struct snd_soc_codec *codec, | |||
| 1224 | break; | 1224 | break; |
| 1225 | } | 1225 | } |
| 1226 | 1226 | ||
| 1227 | codec->dapm.bias_level = level; | ||
| 1228 | return 0; | 1227 | return 0; |
| 1229 | } | 1228 | } |
| 1230 | 1229 | ||
diff --git a/sound/soc/codecs/wm8993.c b/sound/soc/codecs/wm8993.c index 2e70a270eb28..52ec4fe03b23 100644 --- a/sound/soc/codecs/wm8993.c +++ b/sound/soc/codecs/wm8993.c | |||
| @@ -1065,8 +1065,6 @@ static int wm8993_set_bias_level(struct snd_soc_codec *codec, | |||
| 1065 | break; | 1065 | break; |
| 1066 | } | 1066 | } |
| 1067 | 1067 | ||
| 1068 | codec->dapm.bias_level = level; | ||
| 1069 | |||
| 1070 | return 0; | 1068 | return 0; |
| 1071 | } | 1069 | } |
| 1072 | 1070 | ||
| @@ -1563,7 +1561,7 @@ static int wm8993_suspend(struct snd_soc_codec *codec) | |||
| 1563 | wm8993->fll_fout = fll_fout; | 1561 | wm8993->fll_fout = fll_fout; |
| 1564 | wm8993->fll_fref = fll_fref; | 1562 | wm8993->fll_fref = fll_fref; |
| 1565 | 1563 | ||
| 1566 | wm8993_set_bias_level(codec, SND_SOC_BIAS_OFF); | 1564 | snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_OFF); |
| 1567 | 1565 | ||
| 1568 | return 0; | 1566 | return 0; |
| 1569 | } | 1567 | } |
| @@ -1573,7 +1571,7 @@ static int wm8993_resume(struct snd_soc_codec *codec) | |||
| 1573 | struct wm8993_priv *wm8993 = snd_soc_codec_get_drvdata(codec); | 1571 | struct wm8993_priv *wm8993 = snd_soc_codec_get_drvdata(codec); |
| 1574 | int ret; | 1572 | int ret; |
| 1575 | 1573 | ||
| 1576 | wm8993_set_bias_level(codec, SND_SOC_BIAS_STANDBY); | 1574 | snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_STANDBY); |
| 1577 | 1575 | ||
| 1578 | /* Restart the FLL? */ | 1576 | /* Restart the FLL? */ |
| 1579 | if (wm8993->fll_fout) { | 1577 | if (wm8993->fll_fout) { |
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 4fbc7689339a..2d32b542f103 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
| @@ -2546,8 +2546,6 @@ static int wm8994_set_bias_level(struct snd_soc_codec *codec, | |||
| 2546 | break; | 2546 | break; |
| 2547 | } | 2547 | } |
| 2548 | 2548 | ||
| 2549 | codec->dapm.bias_level = level; | ||
| 2550 | |||
| 2551 | return 0; | 2549 | return 0; |
| 2552 | } | 2550 | } |
| 2553 | 2551 | ||
| @@ -3163,7 +3161,7 @@ static int wm8994_codec_suspend(struct snd_soc_codec *codec) | |||
| 3163 | i + 1, ret); | 3161 | i + 1, ret); |
| 3164 | } | 3162 | } |
| 3165 | 3163 | ||
| 3166 | wm8994_set_bias_level(codec, SND_SOC_BIAS_OFF); | 3164 | snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_OFF); |
| 3167 | 3165 | ||
| 3168 | return 0; | 3166 | return 0; |
| 3169 | } | 3167 | } |
diff --git a/sound/soc/codecs/wm8995.c b/sound/soc/codecs/wm8995.c index 66103c2b012e..47af27fb339a 100644 --- a/sound/soc/codecs/wm8995.c +++ b/sound/soc/codecs/wm8995.c | |||
| @@ -1990,7 +1990,6 @@ static int wm8995_set_bias_level(struct snd_soc_codec *codec, | |||
| 1990 | break; | 1990 | break; |
| 1991 | } | 1991 | } |
| 1992 | 1992 | ||
| 1993 | codec->dapm.bias_level = level; | ||
| 1994 | return 0; | 1993 | return 0; |
| 1995 | } | 1994 | } |
| 1996 | 1995 | ||
diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c index 308748a022c5..3dce50751469 100644 --- a/sound/soc/codecs/wm8996.c +++ b/sound/soc/codecs/wm8996.c | |||
| @@ -1628,8 +1628,6 @@ static int wm8996_set_bias_level(struct snd_soc_codec *codec, | |||
| 1628 | break; | 1628 | break; |
| 1629 | } | 1629 | } |
| 1630 | 1630 | ||
| 1631 | codec->dapm.bias_level = level; | ||
| 1632 | |||
| 1633 | return 0; | 1631 | return 0; |
| 1634 | } | 1632 | } |
| 1635 | 1633 | ||
diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c index 13a3f335ea5b..02d9a5012c1b 100644 --- a/sound/soc/codecs/wm9081.c +++ b/sound/soc/codecs/wm9081.c | |||
| @@ -898,8 +898,6 @@ static int wm9081_set_bias_level(struct snd_soc_codec *codec, | |||
| 898 | break; | 898 | break; |
| 899 | } | 899 | } |
| 900 | 900 | ||
| 901 | codec->dapm.bias_level = level; | ||
| 902 | |||
| 903 | return 0; | 901 | return 0; |
| 904 | } | 902 | } |
| 905 | 903 | ||
diff --git a/sound/soc/codecs/wm9090.c b/sound/soc/codecs/wm9090.c index 60d243c904f5..03bca8581bc7 100644 --- a/sound/soc/codecs/wm9090.c +++ b/sound/soc/codecs/wm9090.c | |||
| @@ -515,8 +515,6 @@ static int wm9090_set_bias_level(struct snd_soc_codec *codec, | |||
| 515 | break; | 515 | break; |
| 516 | } | 516 | } |
| 517 | 517 | ||
| 518 | codec->dapm.bias_level = level; | ||
| 519 | |||
| 520 | return 0; | 518 | return 0; |
| 521 | } | 519 | } |
| 522 | 520 | ||
diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c index 98c9525bd751..1fda104dfc45 100644 --- a/sound/soc/codecs/wm9712.c +++ b/sound/soc/codecs/wm9712.c | |||
| @@ -610,7 +610,6 @@ static int wm9712_set_bias_level(struct snd_soc_codec *codec, | |||
| 610 | ac97_write(codec, AC97_POWERDOWN, 0xffff); | 610 | ac97_write(codec, AC97_POWERDOWN, 0xffff); |
| 611 | break; | 611 | break; |
| 612 | } | 612 | } |
| 613 | codec->dapm.bias_level = level; | ||
| 614 | return 0; | 613 | return 0; |
| 615 | } | 614 | } |
| 616 | 615 | ||
| @@ -646,7 +645,7 @@ static int wm9712_soc_resume(struct snd_soc_codec *codec) | |||
| 646 | if (ret < 0) | 645 | if (ret < 0) |
| 647 | return ret; | 646 | return ret; |
| 648 | 647 | ||
| 649 | wm9712_set_bias_level(codec, SND_SOC_BIAS_STANDBY); | 648 | snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_STANDBY); |
| 650 | 649 | ||
| 651 | if (ret == 0) { | 650 | if (ret == 0) { |
| 652 | /* Sync reg_cache with the hardware after cold reset */ | 651 | /* Sync reg_cache with the hardware after cold reset */ |
diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c index 79552953e1bd..9d18a0ec4280 100644 --- a/sound/soc/codecs/wm9713.c +++ b/sound/soc/codecs/wm9713.c | |||
| @@ -1171,7 +1171,6 @@ static int wm9713_set_bias_level(struct snd_soc_codec *codec, | |||
| 1171 | ac97_write(codec, AC97_POWERDOWN, 0xffff); | 1171 | ac97_write(codec, AC97_POWERDOWN, 0xffff); |
| 1172 | break; | 1172 | break; |
| 1173 | } | 1173 | } |
| 1174 | codec->dapm.bias_level = level; | ||
| 1175 | return 0; | 1174 | return 0; |
| 1176 | } | 1175 | } |
| 1177 | 1176 | ||
| @@ -1201,7 +1200,7 @@ static int wm9713_soc_resume(struct snd_soc_codec *codec) | |||
| 1201 | if (ret < 0) | 1200 | if (ret < 0) |
| 1202 | return ret; | 1201 | return ret; |
| 1203 | 1202 | ||
| 1204 | wm9713_set_bias_level(codec, SND_SOC_BIAS_STANDBY); | 1203 | snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_STANDBY); |
| 1205 | 1204 | ||
| 1206 | /* do we need to re-start the PLL ? */ | 1205 | /* do we need to re-start the PLL ? */ |
| 1207 | if (wm9713->pll_in) | 1206 | if (wm9713->pll_in) |
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index defe0f0082b5..79b947820231 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
| @@ -526,6 +526,38 @@ static void soc_dapm_async_complete(struct snd_soc_dapm_context *dapm) | |||
| 526 | } | 526 | } |
| 527 | 527 | ||
| 528 | /** | 528 | /** |
| 529 | * snd_soc_dapm_force_bias_level() - Sets the DAPM bias level | ||
| 530 | * @dapm: The DAPM context for which to set the level | ||
| 531 | * @level: The level to set | ||
| 532 | * | ||
| 533 | * Forces the DAPM bias level to a specific state. It will call the bias level | ||
| 534 | * callback of DAPM context with the specified level. This will even happen if | ||
| 535 | * the context is already at the same level. Furthermore it will not go through | ||
| 536 | * the normal bias level sequencing, meaning any intermediate states between the | ||
| 537 | * current and the target state will not be entered. | ||
| 538 | * | ||
| 539 | * Note that the change in bias level is only temporary and the next time | ||
| 540 | * snd_soc_dapm_sync() is called the state will be set to the level as | ||
| 541 | * determined by the DAPM core. The function is mainly intended to be used to | ||
| 542 | * used during probe or resume from suspend to power up the device so | ||
| 543 | * initialization can be done, before the DAPM core takes over. | ||
| 544 | */ | ||
| 545 | int snd_soc_dapm_force_bias_level(struct snd_soc_dapm_context *dapm, | ||
| 546 | enum snd_soc_bias_level level) | ||
| 547 | { | ||
| 548 | int ret = 0; | ||
| 549 | |||
| 550 | if (dapm->set_bias_level) | ||
| 551 | ret = dapm->set_bias_level(dapm, level); | ||
| 552 | |||
| 553 | if (ret == 0) | ||
| 554 | dapm->bias_level = level; | ||
| 555 | |||
| 556 | return ret; | ||
| 557 | } | ||
| 558 | EXPORT_SYMBOL_GPL(snd_soc_dapm_force_bias_level); | ||
| 559 | |||
| 560 | /** | ||
| 529 | * snd_soc_dapm_set_bias_level - set the bias level for the system | 561 | * snd_soc_dapm_set_bias_level - set the bias level for the system |
| 530 | * @dapm: DAPM context | 562 | * @dapm: DAPM context |
| 531 | * @level: level to configure | 563 | * @level: level to configure |
| @@ -547,10 +579,8 @@ static int snd_soc_dapm_set_bias_level(struct snd_soc_dapm_context *dapm, | |||
| 547 | if (ret != 0) | 579 | if (ret != 0) |
| 548 | goto out; | 580 | goto out; |
| 549 | 581 | ||
| 550 | if (dapm->set_bias_level) | 582 | if (!card || dapm != &card->dapm) |
| 551 | ret = dapm->set_bias_level(dapm, level); | 583 | ret = snd_soc_dapm_force_bias_level(dapm, level); |
| 552 | else if (!card || dapm != &card->dapm) | ||
| 553 | dapm->bias_level = level; | ||
| 554 | 584 | ||
| 555 | if (ret != 0) | 585 | if (ret != 0) |
| 556 | goto out; | 586 | goto out; |
