diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-03-18 13:22:37 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-03-18 13:22:37 -0400 |
commit | cb3f2adc03ab055b19c677a6283523861fafebdd (patch) | |
tree | 59cfb6800f0635a4aec16c8e0da619f27e51ee79 /sound/soc/pxa | |
parent | 44c76a960a62fcc46cbcaa0a22a34e666a729329 (diff) | |
parent | 828006de1bddf83b6ecf03ec459c15f7c7c22db7 (diff) |
Merge branch 'topic/asoc' into for-linus
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 | 3 | ||||
-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, 28 insertions, 33 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..a16df0fa6eff 100644 --- a/sound/soc/pxa/pxa-ssp.c +++ b/sound/soc/pxa/pxa-ssp.c | |||
@@ -764,7 +764,8 @@ static int pxa_ssp_remove(struct snd_soc_dai *dai) | |||
764 | 764 | ||
765 | #define PXA_SSP_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\ | 765 | #define PXA_SSP_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\ |
766 | SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 | \ | 766 | SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 | \ |
767 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 | \ | 767 | SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \ |
768 | SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_64000 | \ | ||
768 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000) | 769 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000) |
769 | 770 | ||
770 | #define PXA_SSP_FORMATS (SNDRV_PCM_FMTBIT_S16_LE |\ | 771 | #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; |