ASoC: tlv320aic3x: Don't sync first two registers from register cache
[linux-2.6-block.git] / sound / soc / codecs / tlv320aic3x.c
index 6c43c13f04304543b127fb0e4f6b5eb60d6740e4..9047bb173c6b9b1618d4f24dc3e0dd49acae4f02 100644 (file)
@@ -157,7 +157,8 @@ static int aic3x_read(struct snd_soc_codec *codec, unsigned int reg,
 static int snd_soc_dapm_put_volsw_aic3x(struct snd_kcontrol *kcontrol,
                                        struct snd_ctl_elem_value *ucontrol)
 {
-       struct snd_soc_dapm_widget *widget = snd_kcontrol_chip(kcontrol);
+       struct snd_soc_dapm_widget_list *wlist = snd_kcontrol_chip(kcontrol);
+       struct snd_soc_dapm_widget *widget = wlist->widgets[0];
        struct soc_mixer_control *mc =
                (struct soc_mixer_control *)kcontrol->private_value;
        unsigned int reg = mc->reg;
@@ -1113,7 +1114,7 @@ static int aic3x_set_power(struct snd_soc_codec *codec, int power)
 
                /* Sync reg_cache with the hardware */
                codec->cache_only = 0;
-               for (i = 0; i < ARRAY_SIZE(aic3x_reg); i++)
+               for (i = AIC3X_SAMPLE_RATE_SEL_REG; i < ARRAY_SIZE(aic3x_reg); i++)
                        snd_soc_write(codec, i, cache[i]);
                if (aic3x->model == AIC3X_MODEL_3007)
                        aic3x_init_3007(codec);