ASoC: Trigger wm_hubs series update startup off a separate flag
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 7 Jun 2011 22:23:52 +0000 (23:23 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 23 Jun 2011 19:05:23 +0000 (20:05 +0100)
Allowing the two to be used independently.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
sound/soc/codecs/wm8993.c
sound/soc/codecs/wm8994.c
sound/soc/codecs/wm_hubs.c
sound/soc/codecs/wm_hubs.h

index 9e5ff789b805bcf932238a07ba422ab88b8a6e44..03af7ada985dd944b1216eaa9b8161a00d96c794 100644 (file)
@@ -1434,6 +1434,7 @@ static int wm8993_probe(struct snd_soc_codec *codec)
 
        wm8993->hubs_data.hp_startup_mode = 1;
        wm8993->hubs_data.dcs_codes = -2;
+       wm8993->hubs_data.series_startup = 1;
 
        ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_I2C);
        if (ret != 0) {
index 970a95c5360bfc271fd9a43c0a259bedd2d0d7a9..dc2350e6350b6c9489f8132c0507462e8c43ad15 100644 (file)
@@ -2903,6 +2903,7 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec)
                        wm8994->hubs.dcs_codes = -5;
                        wm8994->hubs.hp_startup_mode = 1;
                        wm8994->hubs.dcs_readback_mode = 1;
+                       wm8994->hubs.series_startup = 1;
                        break;
                default:
                        wm8994->hubs.dcs_readback_mode = 1;
index 9e370d14ad88f2bce72ccd0ce1204eb01bd854fa..ee218a80e5878f60b31d81387a56d960e180cf43 100644 (file)
@@ -107,8 +107,7 @@ static void calibrate_dc_servo(struct snd_soc_codec *codec)
                return;
        }
 
-       /* Devices not using a DCS code correction have startup mode */
-       if (hubs->dcs_codes) {
+       if (hubs->series_startup) {
                /* Set for 32 series updates */
                snd_soc_update_bits(codec, WM8993_DC_SERVO_1,
                                    WM8993_DCS_SERIES_NO_01_MASK,
index f8a5e976b5e6e3fcd755a224e54c36e3f2415841..aeb58712a0e8f88f226936cab11f6116c0375919 100644 (file)
@@ -23,6 +23,7 @@ struct wm_hubs_data {
        int dcs_codes;
        int dcs_readback_mode;
        int hp_startup_mode;
+       int series_startup;
 
        bool class_w;
        u16 class_w_dcs;