aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/pxa/corgi.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/pxa/corgi.c')
-rw-r--r--sound/soc/pxa/corgi.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/sound/soc/pxa/corgi.c b/sound/soc/pxa/corgi.c
index bc21944851c4..863367ad89ce 100644
--- a/sound/soc/pxa/corgi.c
+++ b/sound/soc/pxa/corgi.c
@@ -45,10 +45,8 @@
45static int corgi_jack_func; 45static int corgi_jack_func;
46static int corgi_spk_func; 46static int corgi_spk_func;
47 47
48static void corgi_ext_control(struct snd_soc_codec *codec) 48static void corgi_ext_control(struct snd_soc_dapm_context *dapm)
49{ 49{
50 struct snd_soc_dapm_context *dapm = &codec->dapm;
51
52 /* set up jack connection */ 50 /* set up jack connection */
53 switch (corgi_jack_func) { 51 switch (corgi_jack_func) {
54 case CORGI_HP: 52 case CORGI_HP:
@@ -104,7 +102,7 @@ static int corgi_startup(struct snd_pcm_substream *substream)
104 mutex_lock(&codec->mutex); 102 mutex_lock(&codec->mutex);
105 103
106 /* check the jack status at stream startup */ 104 /* check the jack status at stream startup */
107 corgi_ext_control(codec); 105 corgi_ext_control(&codec->dapm);
108 106
109 mutex_unlock(&codec->mutex); 107 mutex_unlock(&codec->mutex);
110 108
@@ -173,13 +171,13 @@ static int corgi_get_jack(struct snd_kcontrol *kcontrol,
173static int corgi_set_jack(struct snd_kcontrol *kcontrol, 171static int corgi_set_jack(struct snd_kcontrol *kcontrol,
174 struct snd_ctl_elem_value *ucontrol) 172 struct snd_ctl_elem_value *ucontrol)
175{ 173{
176 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 174 struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
177 175
178 if (corgi_jack_func == ucontrol->value.integer.value[0]) 176 if (corgi_jack_func == ucontrol->value.integer.value[0])
179 return 0; 177 return 0;
180 178
181 corgi_jack_func = ucontrol->value.integer.value[0]; 179 corgi_jack_func = ucontrol->value.integer.value[0];
182 corgi_ext_control(codec); 180 corgi_ext_control(&card->dapm);
183 return 1; 181 return 1;
184} 182}
185 183
@@ -193,13 +191,13 @@ static int corgi_get_spk(struct snd_kcontrol *kcontrol,
193static int corgi_set_spk(struct snd_kcontrol *kcontrol, 191static int corgi_set_spk(struct snd_kcontrol *kcontrol,
194 struct snd_ctl_elem_value *ucontrol) 192 struct snd_ctl_elem_value *ucontrol)
195{ 193{
196 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 194 struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
197 195
198 if (corgi_spk_func == ucontrol->value.integer.value[0]) 196 if (corgi_spk_func == ucontrol->value.integer.value[0])
199 return 0; 197 return 0;
200 198
201 corgi_spk_func = ucontrol->value.integer.value[0]; 199 corgi_spk_func = ucontrol->value.integer.value[0];
202 corgi_ext_control(codec); 200 corgi_ext_control(&card->dapm);
203 return 1; 201 return 1;
204} 202}
205 203