diff options
Diffstat (limited to 'sound/soc/pxa')
-rw-r--r-- | sound/soc/pxa/corgi.c | 14 | ||||
-rw-r--r-- | sound/soc/pxa/magician.c | 2 | ||||
-rw-r--r-- | sound/soc/pxa/poodle.c | 14 | ||||
-rw-r--r-- | sound/soc/pxa/pxa-ssp.c | 64 | ||||
-rw-r--r-- | sound/soc/pxa/pxa2xx-ac97.c | 10 | ||||
-rw-r--r-- | sound/soc/pxa/raumfeld.c | 2 | ||||
-rw-r--r-- | sound/soc/pxa/spitz.c | 14 | ||||
-rw-r--r-- | sound/soc/pxa/tosa.c | 2 |
8 files changed, 64 insertions, 58 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 @@ | |||
45 | static int corgi_jack_func; | 45 | static int corgi_jack_func; |
46 | static int corgi_spk_func; | 46 | static int corgi_spk_func; |
47 | 47 | ||
48 | static void corgi_ext_control(struct snd_soc_codec *codec) | 48 | static 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, | |||
173 | static int corgi_set_jack(struct snd_kcontrol *kcontrol, | 171 | static 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, | |||
193 | static int corgi_set_spk(struct snd_kcontrol *kcontrol, | 191 | static 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 | ||
diff --git a/sound/soc/pxa/magician.c b/sound/soc/pxa/magician.c index 3f7a8ecb9720..aace19e0fe2c 100644 --- a/sound/soc/pxa/magician.c +++ b/sound/soc/pxa/magician.c | |||
@@ -411,7 +411,7 @@ static int magician_uda1380_init(struct snd_soc_pcm_runtime *rtd) | |||
411 | snd_soc_dapm_nc_pin(dapm, "VINR"); | 411 | snd_soc_dapm_nc_pin(dapm, "VINR"); |
412 | 412 | ||
413 | /* Add magician specific controls */ | 413 | /* Add magician specific controls */ |
414 | err = snd_soc_add_controls(codec, uda1380_magician_controls, | 414 | err = snd_soc_add_codec_controls(codec, uda1380_magician_controls, |
415 | ARRAY_SIZE(uda1380_magician_controls)); | 415 | ARRAY_SIZE(uda1380_magician_controls)); |
416 | if (err < 0) | 416 | if (err < 0) |
417 | return err; | 417 | return err; |
diff --git a/sound/soc/pxa/poodle.c b/sound/soc/pxa/poodle.c index fd0ed10c6fe7..d2cc81735036 100644 --- a/sound/soc/pxa/poodle.c +++ b/sound/soc/pxa/poodle.c | |||
@@ -43,10 +43,8 @@ | |||
43 | static int poodle_jack_func; | 43 | static int poodle_jack_func; |
44 | static int poodle_spk_func; | 44 | static int poodle_spk_func; |
45 | 45 | ||
46 | static void poodle_ext_control(struct snd_soc_codec *codec) | 46 | static void poodle_ext_control(struct snd_soc_dapm_context *dapm) |
47 | { | 47 | { |
48 | struct snd_soc_dapm_context *dapm = &codec->dapm; | ||
49 | |||
50 | /* set up jack connection */ | 48 | /* set up jack connection */ |
51 | if (poodle_jack_func == POODLE_HP) { | 49 | if (poodle_jack_func == POODLE_HP) { |
52 | /* set = unmute headphone */ | 50 | /* set = unmute headphone */ |
@@ -81,7 +79,7 @@ static int poodle_startup(struct snd_pcm_substream *substream) | |||
81 | mutex_lock(&codec->mutex); | 79 | mutex_lock(&codec->mutex); |
82 | 80 | ||
83 | /* check the jack status at stream startup */ | 81 | /* check the jack status at stream startup */ |
84 | poodle_ext_control(codec); | 82 | poodle_ext_control(&codec->dapm); |
85 | 83 | ||
86 | mutex_unlock(&codec->mutex); | 84 | mutex_unlock(&codec->mutex); |
87 | 85 | ||
@@ -152,13 +150,13 @@ static int poodle_get_jack(struct snd_kcontrol *kcontrol, | |||
152 | static int poodle_set_jack(struct snd_kcontrol *kcontrol, | 150 | static int poodle_set_jack(struct snd_kcontrol *kcontrol, |
153 | struct snd_ctl_elem_value *ucontrol) | 151 | struct snd_ctl_elem_value *ucontrol) |
154 | { | 152 | { |
155 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 153 | struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); |
156 | 154 | ||
157 | if (poodle_jack_func == ucontrol->value.integer.value[0]) | 155 | if (poodle_jack_func == ucontrol->value.integer.value[0]) |
158 | return 0; | 156 | return 0; |
159 | 157 | ||
160 | poodle_jack_func = ucontrol->value.integer.value[0]; | 158 | poodle_jack_func = ucontrol->value.integer.value[0]; |
161 | poodle_ext_control(codec); | 159 | poodle_ext_control(&card->dapm); |
162 | return 1; | 160 | return 1; |
163 | } | 161 | } |
164 | 162 | ||
@@ -172,13 +170,13 @@ static int poodle_get_spk(struct snd_kcontrol *kcontrol, | |||
172 | static int poodle_set_spk(struct snd_kcontrol *kcontrol, | 170 | static int poodle_set_spk(struct snd_kcontrol *kcontrol, |
173 | struct snd_ctl_elem_value *ucontrol) | 171 | struct snd_ctl_elem_value *ucontrol) |
174 | { | 172 | { |
175 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 173 | struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); |
176 | 174 | ||
177 | if (poodle_spk_func == ucontrol->value.integer.value[0]) | 175 | if (poodle_spk_func == ucontrol->value.integer.value[0]) |
178 | return 0; | 176 | return 0; |
179 | 177 | ||
180 | poodle_spk_func = ucontrol->value.integer.value[0]; | 178 | poodle_spk_func = ucontrol->value.integer.value[0]; |
181 | poodle_ext_control(codec); | 179 | poodle_ext_control(&card->dapm); |
182 | return 1; | 180 | return 1; |
183 | } | 181 | } |
184 | 182 | ||
diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c index a57cfbc038e3..fd04ce139031 100644 --- a/sound/soc/pxa/pxa-ssp.c +++ b/sound/soc/pxa/pxa-ssp.c | |||
@@ -668,6 +668,38 @@ static int pxa_ssp_hw_params(struct snd_pcm_substream *substream, | |||
668 | return 0; | 668 | return 0; |
669 | } | 669 | } |
670 | 670 | ||
671 | static void pxa_ssp_set_running_bit(struct snd_pcm_substream *substream, | ||
672 | struct ssp_device *ssp, int value) | ||
673 | { | ||
674 | uint32_t sscr0 = pxa_ssp_read_reg(ssp, SSCR0); | ||
675 | uint32_t sscr1 = pxa_ssp_read_reg(ssp, SSCR1); | ||
676 | uint32_t sspsp = pxa_ssp_read_reg(ssp, SSPSP); | ||
677 | uint32_t sssr = pxa_ssp_read_reg(ssp, SSSR); | ||
678 | |||
679 | if (value && (sscr0 & SSCR0_SSE)) | ||
680 | pxa_ssp_write_reg(ssp, SSCR0, sscr0 & ~SSCR0_SSE); | ||
681 | |||
682 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { | ||
683 | if (value) | ||
684 | sscr1 |= SSCR1_TSRE; | ||
685 | else | ||
686 | sscr1 &= ~SSCR1_TSRE; | ||
687 | } else { | ||
688 | if (value) | ||
689 | sscr1 |= SSCR1_RSRE; | ||
690 | else | ||
691 | sscr1 &= ~SSCR1_RSRE; | ||
692 | } | ||
693 | |||
694 | pxa_ssp_write_reg(ssp, SSCR1, sscr1); | ||
695 | |||
696 | if (value) { | ||
697 | pxa_ssp_write_reg(ssp, SSSR, sssr); | ||
698 | pxa_ssp_write_reg(ssp, SSPSP, sspsp); | ||
699 | pxa_ssp_write_reg(ssp, SSCR0, sscr0 | SSCR0_SSE); | ||
700 | } | ||
701 | } | ||
702 | |||
671 | static int pxa_ssp_trigger(struct snd_pcm_substream *substream, int cmd, | 703 | static int pxa_ssp_trigger(struct snd_pcm_substream *substream, int cmd, |
672 | struct snd_soc_dai *cpu_dai) | 704 | struct snd_soc_dai *cpu_dai) |
673 | { | 705 | { |
@@ -681,42 +713,21 @@ static int pxa_ssp_trigger(struct snd_pcm_substream *substream, int cmd, | |||
681 | pxa_ssp_enable(ssp); | 713 | pxa_ssp_enable(ssp); |
682 | break; | 714 | break; |
683 | case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: | 715 | case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: |
684 | val = pxa_ssp_read_reg(ssp, SSCR1); | 716 | pxa_ssp_set_running_bit(substream, ssp, 1); |
685 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | ||
686 | val |= SSCR1_TSRE; | ||
687 | else | ||
688 | val |= SSCR1_RSRE; | ||
689 | pxa_ssp_write_reg(ssp, SSCR1, val); | ||
690 | val = pxa_ssp_read_reg(ssp, SSSR); | 717 | val = pxa_ssp_read_reg(ssp, SSSR); |
691 | pxa_ssp_write_reg(ssp, SSSR, val); | 718 | pxa_ssp_write_reg(ssp, SSSR, val); |
692 | break; | 719 | break; |
693 | case SNDRV_PCM_TRIGGER_START: | 720 | case SNDRV_PCM_TRIGGER_START: |
694 | val = pxa_ssp_read_reg(ssp, SSCR1); | 721 | pxa_ssp_set_running_bit(substream, ssp, 1); |
695 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | ||
696 | val |= SSCR1_TSRE; | ||
697 | else | ||
698 | val |= SSCR1_RSRE; | ||
699 | pxa_ssp_write_reg(ssp, SSCR1, val); | ||
700 | pxa_ssp_enable(ssp); | ||
701 | break; | 722 | break; |
702 | case SNDRV_PCM_TRIGGER_STOP: | 723 | case SNDRV_PCM_TRIGGER_STOP: |
703 | val = pxa_ssp_read_reg(ssp, SSCR1); | 724 | pxa_ssp_set_running_bit(substream, ssp, 0); |
704 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | ||
705 | val &= ~SSCR1_TSRE; | ||
706 | else | ||
707 | val &= ~SSCR1_RSRE; | ||
708 | pxa_ssp_write_reg(ssp, SSCR1, val); | ||
709 | break; | 725 | break; |
710 | case SNDRV_PCM_TRIGGER_SUSPEND: | 726 | case SNDRV_PCM_TRIGGER_SUSPEND: |
711 | pxa_ssp_disable(ssp); | 727 | pxa_ssp_disable(ssp); |
712 | break; | 728 | break; |
713 | case SNDRV_PCM_TRIGGER_PAUSE_PUSH: | 729 | case SNDRV_PCM_TRIGGER_PAUSE_PUSH: |
714 | val = pxa_ssp_read_reg(ssp, SSCR1); | 730 | pxa_ssp_set_running_bit(substream, ssp, 0); |
715 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | ||
716 | val &= ~SSCR1_TSRE; | ||
717 | else | ||
718 | val &= ~SSCR1_RSRE; | ||
719 | pxa_ssp_write_reg(ssp, SSCR1, val); | ||
720 | break; | 731 | break; |
721 | 732 | ||
722 | default: | 733 | default: |
@@ -764,7 +775,8 @@ static int pxa_ssp_remove(struct snd_soc_dai *dai) | |||
764 | 775 | ||
765 | #define PXA_SSP_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\ | 776 | #define PXA_SSP_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\ |
766 | SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 | \ | 777 | SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 | \ |
767 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 | \ | 778 | SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \ |
779 | SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_64000 | \ | ||
768 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000) | 780 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000) |
769 | 781 | ||
770 | #define PXA_SSP_FORMATS (SNDRV_PCM_FMTBIT_S16_LE |\ | 782 | #define PXA_SSP_FORMATS (SNDRV_PCM_FMTBIT_S16_LE |\ |
diff --git a/sound/soc/pxa/pxa2xx-ac97.c b/sound/soc/pxa/pxa2xx-ac97.c index 837ff341fd6d..4800d5fe568d 100644 --- a/sound/soc/pxa/pxa2xx-ac97.c +++ b/sound/soc/pxa/pxa2xx-ac97.c | |||
@@ -103,7 +103,7 @@ static int pxa2xx_ac97_resume(struct snd_soc_dai *dai) | |||
103 | #define pxa2xx_ac97_resume NULL | 103 | #define pxa2xx_ac97_resume NULL |
104 | #endif | 104 | #endif |
105 | 105 | ||
106 | static int pxa2xx_ac97_probe(struct snd_soc_dai *dai) | 106 | static int __devinit pxa2xx_ac97_probe(struct snd_soc_dai *dai) |
107 | { | 107 | { |
108 | return pxa2xx_ac97_hw_probe(to_platform_device(dai->dev)); | 108 | return pxa2xx_ac97_hw_probe(to_platform_device(dai->dev)); |
109 | } | 109 | } |
@@ -179,7 +179,7 @@ static const struct snd_soc_dai_ops pxa_ac97_mic_dai_ops = { | |||
179 | * There is only 1 physical AC97 interface for pxa2xx, but it | 179 | * There is only 1 physical AC97 interface for pxa2xx, but it |
180 | * has extra fifo's that can be used for aux DACs and ADCs. | 180 | * has extra fifo's that can be used for aux DACs and ADCs. |
181 | */ | 181 | */ |
182 | static struct snd_soc_dai_driver pxa_ac97_dai[] = { | 182 | static struct snd_soc_dai_driver pxa_ac97_dai_driver[] = { |
183 | { | 183 | { |
184 | .name = "pxa2xx-ac97", | 184 | .name = "pxa2xx-ac97", |
185 | .ac97_control = 1, | 185 | .ac97_control = 1, |
@@ -244,13 +244,13 @@ static __devinit int pxa2xx_ac97_dev_probe(struct platform_device *pdev) | |||
244 | * driver to do interesting things with the clocking to get us up | 244 | * driver to do interesting things with the clocking to get us up |
245 | * and running. | 245 | * and running. |
246 | */ | 246 | */ |
247 | return snd_soc_register_dais(&pdev->dev, pxa_ac97_dai, | 247 | return snd_soc_register_dais(&pdev->dev, pxa_ac97_dai_driver, |
248 | ARRAY_SIZE(pxa_ac97_dai)); | 248 | ARRAY_SIZE(pxa_ac97_dai_driver)); |
249 | } | 249 | } |
250 | 250 | ||
251 | static int __devexit pxa2xx_ac97_dev_remove(struct platform_device *pdev) | 251 | static int __devexit pxa2xx_ac97_dev_remove(struct platform_device *pdev) |
252 | { | 252 | { |
253 | snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(pxa_ac97_dai)); | 253 | snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(pxa_ac97_dai_driver)); |
254 | return 0; | 254 | return 0; |
255 | } | 255 | } |
256 | 256 | ||
diff --git a/sound/soc/pxa/raumfeld.c b/sound/soc/pxa/raumfeld.c index ba1545188ec6..083706595495 100644 --- a/sound/soc/pxa/raumfeld.c +++ b/sound/soc/pxa/raumfeld.c | |||
@@ -232,7 +232,7 @@ static struct snd_soc_ops raumfeld_ak4104_ops = { | |||
232 | .cpu_dai_name = "pxa-ssp-dai.0", \ | 232 | .cpu_dai_name = "pxa-ssp-dai.0", \ |
233 | .platform_name = "pxa-pcm-audio", \ | 233 | .platform_name = "pxa-pcm-audio", \ |
234 | .codec_dai_name = "cs4270-hifi", \ | 234 | .codec_dai_name = "cs4270-hifi", \ |
235 | .codec_name = "cs4270-codec.0-0048", \ | 235 | .codec_name = "cs4270.0-0048", \ |
236 | .ops = &raumfeld_cs4270_ops, \ | 236 | .ops = &raumfeld_cs4270_ops, \ |
237 | } | 237 | } |
238 | 238 | ||
diff --git a/sound/soc/pxa/spitz.c b/sound/soc/pxa/spitz.c index 90c5245c4742..fc052d8247ff 100644 --- a/sound/soc/pxa/spitz.c +++ b/sound/soc/pxa/spitz.c | |||
@@ -44,10 +44,8 @@ static int spitz_jack_func; | |||
44 | static int spitz_spk_func; | 44 | static int spitz_spk_func; |
45 | static int spitz_mic_gpio; | 45 | static int spitz_mic_gpio; |
46 | 46 | ||
47 | static void spitz_ext_control(struct snd_soc_codec *codec) | 47 | static void spitz_ext_control(struct snd_soc_dapm_context *dapm) |
48 | { | 48 | { |
49 | struct snd_soc_dapm_context *dapm = &codec->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 | ||
@@ -173,13 +171,13 @@ static int spitz_get_jack(struct snd_kcontrol *kcontrol, | |||
173 | static int spitz_set_jack(struct snd_kcontrol *kcontrol, | 171 | static int spitz_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 (spitz_jack_func == ucontrol->value.integer.value[0]) | 176 | if (spitz_jack_func == ucontrol->value.integer.value[0]) |
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(codec); | 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, | |||
193 | static int spitz_set_spk(struct snd_kcontrol *kcontrol, | 191 | static 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_codec *codec = 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(codec); | 200 | spitz_ext_control(&card->dapm); |
203 | return 1; | 201 | return 1; |
204 | } | 202 | } |
205 | 203 | ||
diff --git a/sound/soc/pxa/tosa.c b/sound/soc/pxa/tosa.c index 564ef08a89f2..2aec63f3706a 100644 --- a/sound/soc/pxa/tosa.c +++ b/sound/soc/pxa/tosa.c | |||
@@ -197,7 +197,7 @@ static int tosa_ac97_init(struct snd_soc_pcm_runtime *rtd) | |||
197 | snd_soc_dapm_nc_pin(dapm, "MONOOUT"); | 197 | snd_soc_dapm_nc_pin(dapm, "MONOOUT"); |
198 | 198 | ||
199 | /* add tosa specific controls */ | 199 | /* add tosa specific controls */ |
200 | err = snd_soc_add_controls(codec, tosa_controls, | 200 | err = snd_soc_add_codec_controls(codec, tosa_controls, |
201 | ARRAY_SIZE(tosa_controls)); | 201 | ARRAY_SIZE(tosa_controls)); |
202 | if (err < 0) | 202 | if (err < 0) |
203 | return err; | 203 | return err; |