diff options
Diffstat (limited to 'sound/soc/omap/n810.c')
-rw-r--r-- | sound/soc/omap/n810.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/sound/soc/omap/n810.c b/sound/soc/omap/n810.c index 597be412f1e4..abac4b690750 100644 --- a/sound/soc/omap/n810.c +++ b/sound/soc/omap/n810.c | |||
@@ -55,9 +55,8 @@ static int n810_spk_func; | |||
55 | static int n810_jack_func; | 55 | static int n810_jack_func; |
56 | static int n810_dmic_func; | 56 | static int n810_dmic_func; |
57 | 57 | ||
58 | static void n810_ext_control(struct snd_soc_codec *codec) | 58 | static void n810_ext_control(struct snd_soc_dapm_context *dapm) |
59 | { | 59 | { |
60 | struct snd_soc_dapm_context *dapm = &codec->dapm; | ||
61 | int hp = 0, line1l = 0; | 60 | int hp = 0, line1l = 0; |
62 | 61 | ||
63 | switch (n810_jack_func) { | 62 | switch (n810_jack_func) { |
@@ -102,7 +101,7 @@ static int n810_startup(struct snd_pcm_substream *substream) | |||
102 | snd_pcm_hw_constraint_minmax(runtime, | 101 | snd_pcm_hw_constraint_minmax(runtime, |
103 | SNDRV_PCM_HW_PARAM_CHANNELS, 2, 2); | 102 | SNDRV_PCM_HW_PARAM_CHANNELS, 2, 2); |
104 | 103 | ||
105 | n810_ext_control(codec); | 104 | n810_ext_control(&codec->dapm); |
106 | return clk_enable(sys_clkout2); | 105 | return clk_enable(sys_clkout2); |
107 | } | 106 | } |
108 | 107 | ||
@@ -142,13 +141,13 @@ static int n810_get_spk(struct snd_kcontrol *kcontrol, | |||
142 | static int n810_set_spk(struct snd_kcontrol *kcontrol, | 141 | static int n810_set_spk(struct snd_kcontrol *kcontrol, |
143 | struct snd_ctl_elem_value *ucontrol) | 142 | struct snd_ctl_elem_value *ucontrol) |
144 | { | 143 | { |
145 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 144 | struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); |
146 | 145 | ||
147 | if (n810_spk_func == ucontrol->value.integer.value[0]) | 146 | if (n810_spk_func == ucontrol->value.integer.value[0]) |
148 | return 0; | 147 | return 0; |
149 | 148 | ||
150 | n810_spk_func = ucontrol->value.integer.value[0]; | 149 | n810_spk_func = ucontrol->value.integer.value[0]; |
151 | n810_ext_control(codec); | 150 | n810_ext_control(&card->dapm); |
152 | 151 | ||
153 | return 1; | 152 | return 1; |
154 | } | 153 | } |
@@ -164,13 +163,13 @@ static int n810_get_jack(struct snd_kcontrol *kcontrol, | |||
164 | static int n810_set_jack(struct snd_kcontrol *kcontrol, | 163 | static int n810_set_jack(struct snd_kcontrol *kcontrol, |
165 | struct snd_ctl_elem_value *ucontrol) | 164 | struct snd_ctl_elem_value *ucontrol) |
166 | { | 165 | { |
167 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 166 | struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); |
168 | 167 | ||
169 | if (n810_jack_func == ucontrol->value.integer.value[0]) | 168 | if (n810_jack_func == ucontrol->value.integer.value[0]) |
170 | return 0; | 169 | return 0; |
171 | 170 | ||
172 | n810_jack_func = ucontrol->value.integer.value[0]; | 171 | n810_jack_func = ucontrol->value.integer.value[0]; |
173 | n810_ext_control(codec); | 172 | n810_ext_control(&card->dapm); |
174 | 173 | ||
175 | return 1; | 174 | return 1; |
176 | } | 175 | } |
@@ -186,13 +185,13 @@ static int n810_get_input(struct snd_kcontrol *kcontrol, | |||
186 | static int n810_set_input(struct snd_kcontrol *kcontrol, | 185 | static int n810_set_input(struct snd_kcontrol *kcontrol, |
187 | struct snd_ctl_elem_value *ucontrol) | 186 | struct snd_ctl_elem_value *ucontrol) |
188 | { | 187 | { |
189 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 188 | struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); |
190 | 189 | ||
191 | if (n810_dmic_func == ucontrol->value.integer.value[0]) | 190 | if (n810_dmic_func == ucontrol->value.integer.value[0]) |
192 | return 0; | 191 | return 0; |
193 | 192 | ||
194 | n810_dmic_func = ucontrol->value.integer.value[0]; | 193 | n810_dmic_func = ucontrol->value.integer.value[0]; |
195 | n810_ext_control(codec); | 194 | n810_ext_control(&card->dapm); |
196 | 195 | ||
197 | return 1; | 196 | return 1; |
198 | } | 197 | } |
@@ -276,7 +275,7 @@ static int n810_aic33_init(struct snd_soc_pcm_runtime *rtd) | |||
276 | static struct snd_soc_dai_link n810_dai = { | 275 | static struct snd_soc_dai_link n810_dai = { |
277 | .name = "TLV320AIC33", | 276 | .name = "TLV320AIC33", |
278 | .stream_name = "AIC33", | 277 | .stream_name = "AIC33", |
279 | .cpu_dai_name = "omap-mcbsp-dai.1", | 278 | .cpu_dai_name = "omap-mcbsp.2", |
280 | .platform_name = "omap-pcm-audio", | 279 | .platform_name = "omap-pcm-audio", |
281 | .codec_name = "tlv320aic3x-codec.2-0018", | 280 | .codec_name = "tlv320aic3x-codec.2-0018", |
282 | .codec_dai_name = "tlv320aic3x-hifi", | 281 | .codec_dai_name = "tlv320aic3x-hifi", |