aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/tlv320aic3x.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/tlv320aic3x.c')
-rw-r--r--sound/soc/codecs/tlv320aic3x.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index fc687790188b..6173c2b4c364 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -183,7 +183,7 @@ static int snd_soc_dapm_put_volsw_aic3x(struct snd_kcontrol *kcontrol,
183 183
184 if (snd_soc_test_bits(widget->codec, reg, val_mask, val)) { 184 if (snd_soc_test_bits(widget->codec, reg, val_mask, val)) {
185 /* find dapm widget path assoc with kcontrol */ 185 /* find dapm widget path assoc with kcontrol */
186 list_for_each_entry(path, &widget->codec->dapm_paths, list) { 186 list_for_each_entry(path, &widget->dapm->paths, list) {
187 if (path->kcontrol != kcontrol) 187 if (path->kcontrol != kcontrol)
188 continue; 188 continue;
189 189
@@ -199,7 +199,7 @@ static int snd_soc_dapm_put_volsw_aic3x(struct snd_kcontrol *kcontrol,
199 } 199 }
200 200
201 if (found) 201 if (found)
202 snd_soc_dapm_sync(widget->codec); 202 snd_soc_dapm_sync(widget->dapm);
203 } 203 }
204 204
205 ret = snd_soc_update_bits(widget->codec, reg, val_mask, val); 205 ret = snd_soc_update_bits(widget->codec, reg, val_mask, val);
@@ -788,17 +788,19 @@ static const struct snd_soc_dapm_route intercon_3007[] = {
788static int aic3x_add_widgets(struct snd_soc_codec *codec) 788static int aic3x_add_widgets(struct snd_soc_codec *codec)
789{ 789{
790 struct aic3x_priv *aic3x = snd_soc_codec_get_drvdata(codec); 790 struct aic3x_priv *aic3x = snd_soc_codec_get_drvdata(codec);
791 struct snd_soc_dapm_context *dapm = &codec->dapm;
791 792
792 snd_soc_dapm_new_controls(codec, aic3x_dapm_widgets, 793 snd_soc_dapm_new_controls(dapm, aic3x_dapm_widgets,
793 ARRAY_SIZE(aic3x_dapm_widgets)); 794 ARRAY_SIZE(aic3x_dapm_widgets));
794 795
795 /* set up audio path interconnects */ 796 /* set up audio path interconnects */
796 snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon)); 797 snd_soc_dapm_add_routes(dapm, intercon, ARRAY_SIZE(intercon));
797 798
798 if (aic3x->model == AIC3X_MODEL_3007) { 799 if (aic3x->model == AIC3X_MODEL_3007) {
799 snd_soc_dapm_new_controls(codec, aic3007_dapm_widgets, 800 snd_soc_dapm_new_controls(dapm, aic3007_dapm_widgets,
800 ARRAY_SIZE(aic3007_dapm_widgets)); 801 ARRAY_SIZE(aic3007_dapm_widgets));
801 snd_soc_dapm_add_routes(codec, intercon_3007, ARRAY_SIZE(intercon_3007)); 802 snd_soc_dapm_add_routes(dapm, intercon_3007,
803 ARRAY_SIZE(intercon_3007));
802 } 804 }
803 805
804 return 0; 806 return 0;
@@ -1135,7 +1137,7 @@ static int aic3x_set_bias_level(struct snd_soc_codec *codec,
1135 case SND_SOC_BIAS_ON: 1137 case SND_SOC_BIAS_ON:
1136 break; 1138 break;
1137 case SND_SOC_BIAS_PREPARE: 1139 case SND_SOC_BIAS_PREPARE:
1138 if (codec->bias_level == SND_SOC_BIAS_STANDBY && 1140 if (codec->dapm.bias_level == SND_SOC_BIAS_STANDBY &&
1139 aic3x->master) { 1141 aic3x->master) {
1140 /* enable pll */ 1142 /* enable pll */
1141 reg = snd_soc_read(codec, AIC3X_PLL_PROGA_REG); 1143 reg = snd_soc_read(codec, AIC3X_PLL_PROGA_REG);
@@ -1146,7 +1148,7 @@ static int aic3x_set_bias_level(struct snd_soc_codec *codec,
1146 case SND_SOC_BIAS_STANDBY: 1148 case SND_SOC_BIAS_STANDBY:
1147 if (!aic3x->power) 1149 if (!aic3x->power)
1148 aic3x_set_power(codec, 1); 1150 aic3x_set_power(codec, 1);
1149 if (codec->bias_level == SND_SOC_BIAS_PREPARE && 1151 if (codec->dapm.bias_level == SND_SOC_BIAS_PREPARE &&
1150 aic3x->master) { 1152 aic3x->master) {
1151 /* disable pll */ 1153 /* disable pll */
1152 reg = snd_soc_read(codec, AIC3X_PLL_PROGA_REG); 1154 reg = snd_soc_read(codec, AIC3X_PLL_PROGA_REG);
@@ -1159,7 +1161,7 @@ static int aic3x_set_bias_level(struct snd_soc_codec *codec,
1159 aic3x_set_power(codec, 0); 1161 aic3x_set_power(codec, 0);
1160 break; 1162 break;
1161 } 1163 }
1162 codec->bias_level = level; 1164 codec->dapm.bias_level = level;
1163 1165
1164 return 0; 1166 return 0;
1165} 1167}
@@ -1351,7 +1353,7 @@ static int aic3x_probe(struct snd_soc_codec *codec)
1351 1353
1352 codec->control_data = aic3x->control_data; 1354 codec->control_data = aic3x->control_data;
1353 aic3x->codec = codec; 1355 aic3x->codec = codec;
1354 codec->idle_bias_off = 1; 1356 codec->dapm.idle_bias_off = 1;
1355 1357
1356 ret = snd_soc_codec_set_cache_io(codec, 8, 8, aic3x->control_type); 1358 ret = snd_soc_codec_set_cache_io(codec, 8, 8, aic3x->control_type);
1357 if (ret != 0) { 1359 if (ret != 0) {