aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/pxa/spitz.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sound/soc/pxa/spitz.c b/sound/soc/pxa/spitz.c
index 4d108dc52e2e..fc052d8247ff 100644
--- a/sound/soc/pxa/spitz.c
+++ b/sound/soc/pxa/spitz.c
@@ -44,10 +44,8 @@ static int spitz_jack_func;
44static int spitz_spk_func; 44static int spitz_spk_func;
45static int spitz_mic_gpio; 45static int spitz_mic_gpio;
46 46
47static void spitz_ext_control(struct snd_soc_card *card) 47static void spitz_ext_control(struct snd_soc_dapm_context *dapm)
48{ 48{
49 struct snd_soc_dapm_context *dapm = &card->dapm;
50
51 if (spitz_spk_func == SPITZ_SPK_ON) 49 if (spitz_spk_func == SPITZ_SPK_ON)
52 snd_soc_dapm_enable_pin(dapm, "Ext Spk"); 50 snd_soc_dapm_enable_pin(dapm, "Ext Spk");
53 else 51 else
@@ -113,7 +111,7 @@ static int spitz_startup(struct snd_pcm_substream *substream)
113 mutex_lock(&codec->mutex); 111 mutex_lock(&codec->mutex);
114 112
115 /* check the jack status at stream startup */ 113 /* check the jack status at stream startup */
116 spitz_ext_control(codec); 114 spitz_ext_control(&codec->dapm);
117 115
118 mutex_unlock(&codec->mutex); 116 mutex_unlock(&codec->mutex);
119 117
@@ -179,7 +177,7 @@ static int spitz_set_jack(struct snd_kcontrol *kcontrol,
179 return 0; 177 return 0;
180 178
181 spitz_jack_func = ucontrol->value.integer.value[0]; 179 spitz_jack_func = ucontrol->value.integer.value[0];
182 spitz_ext_control(card); 180 spitz_ext_control(&card->dapm);
183 return 1; 181 return 1;
184} 182}
185 183
@@ -193,13 +191,13 @@ static int spitz_get_spk(struct snd_kcontrol *kcontrol,
193static int spitz_set_spk(struct snd_kcontrol *kcontrol, 191static int spitz_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_card *card = snd_kcontrol_chip(kcontrol); 194 struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
197 195
198 if (spitz_spk_func == ucontrol->value.integer.value[0]) 196 if (spitz_spk_func == ucontrol->value.integer.value[0])
199 return 0; 197 return 0;
200 198
201 spitz_spk_func = ucontrol->value.integer.value[0]; 199 spitz_spk_func = ucontrol->value.integer.value[0];
202 spitz_ext_control(card); 200 spitz_ext_control(&card->dapm);
203 return 1; 201 return 1;
204} 202}
205 203