ASoC: Set idle_bias_off flag in snd_soc_codec_driver
authorAxel Lin <axel.lin@gmail.com>
Fri, 27 Jan 2012 10:02:09 +0000 (18:02 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 27 Jan 2012 11:22:05 +0000 (11:22 +0000)
Since commit 33c5f969 "ASoC: Allow idle_bias_off to be specified in CODEC
drivers", now we can set idle_bias_off flag in struct snd_soc_codec_driver
for devices can unconditionally support idle_bias_off.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/adau1373.c
sound/soc/codecs/adau1701.c
sound/soc/codecs/sn95031.c
sound/soc/codecs/tlv320aic3x.c
sound/soc/codecs/tlv320dac33.c
sound/soc/codecs/twl4030.c
sound/soc/codecs/wm8770.c
sound/soc/codecs/wm8804.c
sound/soc/codecs/wm8904.c
sound/soc/codecs/wm8995.c
sound/soc/codecs/wm8996.c

index 971ba45291717d9c9c87dc662b07b23deb2b55a2..facda33db1c06c8848a8db29fa450a52b9ec17b6 100644 (file)
@@ -1244,8 +1244,6 @@ static int adau1373_probe(struct snd_soc_codec *codec)
                return ret;
        }
 
-       codec->dapm.idle_bias_off = true;
-
        if (pdata) {
                if (pdata->num_drc > ARRAY_SIZE(pdata->drc_setting))
                        return -EINVAL;
@@ -1340,6 +1338,7 @@ static struct snd_soc_codec_driver adau1373_codec_driver = {
        .suspend =      adau1373_suspend,
        .resume =       adau1373_resume,
        .set_bias_level = adau1373_set_bias_level,
+       .idle_bias_off = true,
        .reg_cache_size = ARRAY_SIZE(adau1373_default_regs),
        .reg_cache_default = adau1373_default_regs,
        .reg_word_size = sizeof(uint8_t),
index 6b325ea03869f4758247cec758c96ed71ab60b7e..78e9ce48bb99e6402987a0083d124219bd3400f7 100644 (file)
@@ -457,7 +457,6 @@ static int adau1701_probe(struct snd_soc_codec *codec)
 {
        int ret;
 
-       codec->dapm.idle_bias_off = 1;
        codec->control_data = to_i2c_client(codec->dev);
 
        ret = adau1701_load_firmware(codec);
@@ -473,6 +472,7 @@ static int adau1701_probe(struct snd_soc_codec *codec)
 static struct snd_soc_codec_driver adau1701_codec_drv = {
        .probe                  = adau1701_probe,
        .set_bias_level         = adau1701_set_bias_level,
+       .idle_bias_off          = true,
 
        .reg_cache_size         = ADAU1701_NUM_REGS,
        .reg_word_size          = sizeof(u16),
index f99baa0b8c39133b5cbc342368b4ac98f79cb365..aa0392360da9fa4fbb4ca701861ee41926a87e23 100644 (file)
@@ -827,8 +827,6 @@ static int sn95031_codec_probe(struct snd_soc_codec *codec)
 {
        pr_debug("codec_probe called\n");
 
-       codec->dapm.idle_bias_off = 1;
-
        /* PCM interface config
         * This sets the pcm rx slot conguration to max 6 slots
         * for max 4 dais (2 stereo and 2 mono)
@@ -891,6 +889,7 @@ struct snd_soc_codec_driver sn95031_codec = {
        .read           = sn95031_read,
        .write          = sn95031_write,
        .set_bias_level = sn95031_set_vaud_bias,
+       .idle_bias_off  = true,
        .dapm_widgets   = sn95031_dapm_widgets,
        .num_dapm_widgets       = ARRAY_SIZE(sn95031_dapm_widgets),
        .dapm_routes    = sn95031_audio_map,
index 492f22f8a4d7bd8ae30bbd2bb4ae6dae3488ccad..285b7a22dc1042eb10eb53f0b4415c6ed72ce634 100644 (file)
@@ -1377,7 +1377,6 @@ static int aic3x_probe(struct snd_soc_codec *codec)
 
        INIT_LIST_HEAD(&aic3x->list);
        aic3x->codec = codec;
-       codec->dapm.idle_bias_off = 1;
 
        ret = snd_soc_codec_set_cache_io(codec, 8, 8, aic3x->control_type);
        if (ret != 0) {
@@ -1471,6 +1470,7 @@ static int aic3x_remove(struct snd_soc_codec *codec)
 
 static struct snd_soc_codec_driver soc_codec_dev_aic3x = {
        .set_bias_level = aic3x_set_bias_level,
+       .idle_bias_off = true,
        .reg_cache_size = ARRAY_SIZE(aic3x_reg),
        .reg_word_size = sizeof(u8),
        .reg_cache_default = aic3x_reg,
index c06c3e4b91279d5af9e175674929714a807d54fb..2c957c8457099217324f6b7c394b91d654236374 100644 (file)
@@ -1395,7 +1395,6 @@ static int dac33_soc_probe(struct snd_soc_codec *codec)
 
        codec->control_data = dac33->control_data;
        codec->hw_write = (hw_write_t) i2c_master_send;
-       codec->dapm.idle_bias_off = 1;
        dac33->codec = codec;
 
        /* Read the tlv320dac33 ID registers */
@@ -1476,6 +1475,7 @@ static struct snd_soc_codec_driver soc_codec_dev_tlv320dac33 = {
        .read = dac33_read_reg_cache,
        .write = dac33_write_locked,
        .set_bias_level = dac33_set_bias_level,
+       .idle_bias_off = true,
        .reg_cache_size = ARRAY_SIZE(dac33_reg),
        .reg_word_size = sizeof(u8),
        .reg_cache_default = dac33_reg,
index a193f5fa4b3afec713d15915995885a6523bc31a..3039ba209d1d7e5848e44a66788151920f96a361 100644 (file)
@@ -2227,7 +2227,6 @@ static int twl4030_soc_probe(struct snd_soc_codec *codec)
        snd_soc_codec_set_drvdata(codec, twl4030);
        /* Set the defaults, and power up the codec */
        twl4030->sysclk = twl4030_audio_get_mclk() / 1000;
-       codec->dapm.idle_bias_off = 1;
 
        twl4030_init_chip(codec);
 
@@ -2253,6 +2252,7 @@ static struct snd_soc_codec_driver soc_codec_dev_twl4030 = {
        .read = twl4030_read_reg_cache,
        .write = twl4030_write,
        .set_bias_level = twl4030_set_bias_level,
+       .idle_bias_off = true,
        .reg_cache_size = sizeof(twl4030_reg),
        .reg_word_size = sizeof(u8),
        .reg_cache_default = twl4030_reg,
index 19374a9e5ba6ce06fc721e768255fcdb1ea2d97b..bd60f847762c906eb6e6943e745c998b26876a4f 100644 (file)
@@ -580,8 +580,6 @@ static int wm8770_probe(struct snd_soc_codec *codec)
        wm8770 = snd_soc_codec_get_drvdata(codec);
        wm8770->codec = codec;
 
-       codec->dapm.idle_bias_off = 1;
-
        ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8770->control_type);
        if (ret < 0) {
                dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
@@ -679,6 +677,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8770 = {
        .suspend = wm8770_suspend,
        .resume = wm8770_resume,
        .set_bias_level = wm8770_set_bias_level,
+       .idle_bias_off = true,
        .reg_cache_size = ARRAY_SIZE(wm8770_reg_defs),
        .reg_word_size = sizeof (u16),
        .reg_cache_default = wm8770_reg_defs
index 8abe3757a979b7149c61abe6b7b39f61a480043a..7ee8dcf1fe32c7e7848cf3d2f4fde78f7f668c7e 100644 (file)
@@ -549,7 +549,6 @@ static int wm8804_probe(struct snd_soc_codec *codec)
 
        wm8804 = snd_soc_codec_get_drvdata(codec);
 
-       codec->dapm.idle_bias_off = 1;
        codec->control_data = wm8804->regmap;
 
        ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
@@ -678,6 +677,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8804 = {
        .suspend = wm8804_suspend,
        .resume = wm8804_resume,
        .set_bias_level = wm8804_set_bias_level,
+       .idle_bias_off = true,
 
        .controls = wm8804_snd_controls,
        .num_controls = ARRAY_SIZE(wm8804_snd_controls),
index 14afc1193343718fff7abe26cbb734596c75701d..37079eace412eee6f6fefbc83f58e81f6ce95ed2 100644 (file)
@@ -2088,7 +2088,6 @@ static int wm8904_probe(struct snd_soc_codec *codec)
        int ret, i;
 
        codec->cache_sync = 1;
-       codec->dapm.idle_bias_off = 1;
        codec->control_data = wm8904->regmap;
 
        switch (wm8904->devtype) {
@@ -2237,6 +2236,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8904 = {
        .suspend =      wm8904_suspend,
        .resume =       wm8904_resume,
        .set_bias_level = wm8904_set_bias_level,
+       .idle_bias_off = true,
 };
 
 static const struct regmap_config wm8904_regmap = {
index c8aada597d7049cfc756cf887a886bd9f30cd54b..89a864287c13ff3b5ab7b6489f7574e2a5cd5d9f 100644 (file)
@@ -2047,7 +2047,6 @@ static int wm8995_probe(struct snd_soc_codec *codec)
        int i;
        int ret;
 
-       codec->dapm.idle_bias_off = 1;
        wm8995 = snd_soc_codec_get_drvdata(codec);
        wm8995->codec = codec;
 
@@ -2241,6 +2240,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8995 = {
        .suspend = wm8995_suspend,
        .resume = wm8995_resume,
        .set_bias_level = wm8995_set_bias_level,
+       .idle_bias_off = true,
 };
 
 static struct regmap_config wm8995_regmap = {
index cde11ca9d9e47cb5d77870c883c60aa1a9e2af8a..7f7e914f5a9ad965ddce474efcfcaf3873454776 100644 (file)
@@ -2804,7 +2804,6 @@ static int wm8996_probe(struct snd_soc_codec *codec)
        int ret;
        struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec);
        struct i2c_client *i2c = to_i2c_client(codec->dev);
-       struct snd_soc_dapm_context *dapm = &codec->dapm;
        int i, irq_flags;
 
        wm8996->codec = codec;
@@ -2812,8 +2811,6 @@ static int wm8996_probe(struct snd_soc_codec *codec)
        init_completion(&wm8996->dcs_done);
        init_completion(&wm8996->fll_lock);
 
-       dapm->idle_bias_off = true;
-
        codec->control_data = wm8996->regmap;
 
        ret = snd_soc_codec_set_cache_io(codec, 16, 16, SND_SOC_REGMAP);
@@ -3067,6 +3064,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8996 = {
        .probe =        wm8996_probe,
        .remove =       wm8996_remove,
        .set_bias_level = wm8996_set_bias_level,
+       .idle_bias_off  = true,
        .seq_notifier = wm8996_seq_notifier,
        .controls = wm8996_snd_controls,
        .num_controls = ARRAY_SIZE(wm8996_snd_controls),