diff options
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/twl4030.c | 12 | ||||
-rw-r--r-- | sound/soc/pxa/pxa2xx-ac97.c | 16 | ||||
-rw-r--r-- | sound/soc/s3c24xx/s3c64xx-i2s.c | 8 | ||||
-rw-r--r-- | sound/soc/sh/hac.c | 12 | ||||
-rw-r--r-- | sound/soc/soc-core.c | 3 |
5 files changed, 32 insertions, 19 deletions
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c index 86bb15cc82ce..97738e2ece04 100644 --- a/sound/soc/codecs/twl4030.c +++ b/sound/soc/codecs/twl4030.c | |||
@@ -1383,6 +1383,12 @@ static int twl4030_set_dai_fmt(struct snd_soc_dai *codec_dai, | |||
1383 | #define TWL4030_RATES (SNDRV_PCM_RATE_8000_48000) | 1383 | #define TWL4030_RATES (SNDRV_PCM_RATE_8000_48000) |
1384 | #define TWL4030_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FORMAT_S24_LE) | 1384 | #define TWL4030_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FORMAT_S24_LE) |
1385 | 1385 | ||
1386 | static struct snd_soc_dai_ops twl4030_dai_ops = { | ||
1387 | .hw_params = twl4030_hw_params, | ||
1388 | .set_sysclk = twl4030_set_dai_sysclk, | ||
1389 | .set_fmt = twl4030_set_dai_fmt, | ||
1390 | }; | ||
1391 | |||
1386 | struct snd_soc_dai twl4030_dai = { | 1392 | struct snd_soc_dai twl4030_dai = { |
1387 | .name = "twl4030", | 1393 | .name = "twl4030", |
1388 | .playback = { | 1394 | .playback = { |
@@ -1397,11 +1403,7 @@ struct snd_soc_dai twl4030_dai = { | |||
1397 | .channels_max = 2, | 1403 | .channels_max = 2, |
1398 | .rates = TWL4030_RATES, | 1404 | .rates = TWL4030_RATES, |
1399 | .formats = TWL4030_FORMATS,}, | 1405 | .formats = TWL4030_FORMATS,}, |
1400 | .ops = { | 1406 | .ops = &twl4030_dai_ops, |
1401 | .hw_params = twl4030_hw_params, | ||
1402 | .set_sysclk = twl4030_set_dai_sysclk, | ||
1403 | .set_fmt = twl4030_set_dai_fmt, | ||
1404 | } | ||
1405 | }; | 1407 | }; |
1406 | EXPORT_SYMBOL_GPL(twl4030_dai); | 1408 | EXPORT_SYMBOL_GPL(twl4030_dai); |
1407 | 1409 | ||
diff --git a/sound/soc/pxa/pxa2xx-ac97.c b/sound/soc/pxa/pxa2xx-ac97.c index cf809049272a..01c21c6cdbbc 100644 --- a/sound/soc/pxa/pxa2xx-ac97.c +++ b/sound/soc/pxa/pxa2xx-ac97.c | |||
@@ -164,10 +164,18 @@ static int pxa2xx_ac97_hw_mic_params(struct snd_pcm_substream *substream, | |||
164 | SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 | \ | 164 | SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 | \ |
165 | SNDRV_PCM_RATE_48000) | 165 | SNDRV_PCM_RATE_48000) |
166 | 166 | ||
167 | static struct snd_soc_dai_ops pxa_ac97_dai_ops = { | 167 | static struct snd_soc_dai_ops pxa_ac97_hifi_dai_ops = { |
168 | .hw_params = pxa2xx_ac97_hw_params, | 168 | .hw_params = pxa2xx_ac97_hw_params, |
169 | }; | 169 | }; |
170 | 170 | ||
171 | static struct snd_soc_dai_ops pxa_ac97_aux_dai_ops = { | ||
172 | .hw_params = pxa2xx_ac97_hw_aux_params, | ||
173 | }; | ||
174 | |||
175 | static struct snd_soc_dai_ops pxa_ac97_mic_dai_ops = { | ||
176 | .hw_params = pxa2xx_ac97_hw_mic_params, | ||
177 | }; | ||
178 | |||
171 | /* | 179 | /* |
172 | * There is only 1 physical AC97 interface for pxa2xx, but it | 180 | * There is only 1 physical AC97 interface for pxa2xx, but it |
173 | * has extra fifo's that can be used for aux DACs and ADCs. | 181 | * has extra fifo's that can be used for aux DACs and ADCs. |
@@ -193,7 +201,7 @@ struct snd_soc_dai pxa_ac97_dai[] = { | |||
193 | .channels_max = 2, | 201 | .channels_max = 2, |
194 | .rates = PXA2XX_AC97_RATES, | 202 | .rates = PXA2XX_AC97_RATES, |
195 | .formats = SNDRV_PCM_FMTBIT_S16_LE,}, | 203 | .formats = SNDRV_PCM_FMTBIT_S16_LE,}, |
196 | .ops = &pxa_ac97_dai_ops, | 204 | .ops = &pxa_ac97_hifi_dai_ops, |
197 | }, | 205 | }, |
198 | { | 206 | { |
199 | .name = "pxa2xx-ac97-aux", | 207 | .name = "pxa2xx-ac97-aux", |
@@ -211,7 +219,7 @@ struct snd_soc_dai pxa_ac97_dai[] = { | |||
211 | .channels_max = 1, | 219 | .channels_max = 1, |
212 | .rates = PXA2XX_AC97_RATES, | 220 | .rates = PXA2XX_AC97_RATES, |
213 | .formats = SNDRV_PCM_FMTBIT_S16_LE,}, | 221 | .formats = SNDRV_PCM_FMTBIT_S16_LE,}, |
214 | .ops = &pxa_ac97_dai_ops, | 222 | .ops = &pxa_ac97_aux_dai_ops, |
215 | }, | 223 | }, |
216 | { | 224 | { |
217 | .name = "pxa2xx-ac97-mic", | 225 | .name = "pxa2xx-ac97-mic", |
@@ -223,7 +231,7 @@ struct snd_soc_dai pxa_ac97_dai[] = { | |||
223 | .channels_max = 1, | 231 | .channels_max = 1, |
224 | .rates = PXA2XX_AC97_RATES, | 232 | .rates = PXA2XX_AC97_RATES, |
225 | .formats = SNDRV_PCM_FMTBIT_S16_LE,}, | 233 | .formats = SNDRV_PCM_FMTBIT_S16_LE,}, |
226 | .ops = &pxa_ac97_dai_ops, | 234 | .ops = &pxa_ac97_mic_dai_ops, |
227 | }, | 235 | }, |
228 | }; | 236 | }; |
229 | 237 | ||
diff --git a/sound/soc/s3c24xx/s3c64xx-i2s.c b/sound/soc/s3c24xx/s3c64xx-i2s.c index 6e1e85dc1ff2..33c5de7e255f 100644 --- a/sound/soc/s3c24xx/s3c64xx-i2s.c +++ b/sound/soc/s3c24xx/s3c64xx-i2s.c | |||
@@ -177,6 +177,10 @@ static int s3c64xx_i2s_probe(struct platform_device *pdev, | |||
177 | #define S3C64XX_I2S_FMTS \ | 177 | #define S3C64XX_I2S_FMTS \ |
178 | (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE) | 178 | (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE) |
179 | 179 | ||
180 | static struct snd_soc_dai_ops s3c64xx_i2s_dai_ops = { | ||
181 | .set_sysclk = s3c64xx_i2s_set_sysclk, | ||
182 | }; | ||
183 | |||
180 | struct snd_soc_dai s3c64xx_i2s_dai = { | 184 | struct snd_soc_dai s3c64xx_i2s_dai = { |
181 | .name = "s3c64xx-i2s", | 185 | .name = "s3c64xx-i2s", |
182 | .id = 0, | 186 | .id = 0, |
@@ -193,9 +197,7 @@ struct snd_soc_dai s3c64xx_i2s_dai = { | |||
193 | .rates = S3C64XX_I2S_RATES, | 197 | .rates = S3C64XX_I2S_RATES, |
194 | .formats = S3C64XX_I2S_FMTS, | 198 | .formats = S3C64XX_I2S_FMTS, |
195 | }, | 199 | }, |
196 | .ops = { | 200 | .ops = &s3c64xx_i2s_dai_ops, |
197 | .set_sysclk = s3c64xx_i2s_set_sysclk, | ||
198 | }, | ||
199 | }; | 201 | }; |
200 | EXPORT_SYMBOL_GPL(s3c64xx_i2s_dai); | 202 | EXPORT_SYMBOL_GPL(s3c64xx_i2s_dai); |
201 | 203 | ||
diff --git a/sound/soc/sh/hac.c b/sound/soc/sh/hac.c index eab31838badf..41db75af3c69 100644 --- a/sound/soc/sh/hac.c +++ b/sound/soc/sh/hac.c | |||
@@ -267,6 +267,10 @@ static int hac_hw_params(struct snd_pcm_substream *substream, | |||
267 | #define AC97_FMTS \ | 267 | #define AC97_FMTS \ |
268 | SNDRV_PCM_FMTBIT_S16_LE | 268 | SNDRV_PCM_FMTBIT_S16_LE |
269 | 269 | ||
270 | static struct snd_soc_dai_ops hac_dai_ops = { | ||
271 | .hw_params = hac_hw_params, | ||
272 | }; | ||
273 | |||
270 | struct snd_soc_dai sh4_hac_dai[] = { | 274 | struct snd_soc_dai sh4_hac_dai[] = { |
271 | { | 275 | { |
272 | .name = "HAC0", | 276 | .name = "HAC0", |
@@ -284,9 +288,7 @@ struct snd_soc_dai sh4_hac_dai[] = { | |||
284 | .channels_min = 2, | 288 | .channels_min = 2, |
285 | .channels_max = 2, | 289 | .channels_max = 2, |
286 | }, | 290 | }, |
287 | .ops = { | 291 | .ops = &hac_dai_ops, |
288 | .hw_params = hac_hw_params, | ||
289 | }, | ||
290 | }, | 292 | }, |
291 | #ifdef CONFIG_CPU_SUBTYPE_SH7760 | 293 | #ifdef CONFIG_CPU_SUBTYPE_SH7760 |
292 | { | 294 | { |
@@ -305,9 +307,7 @@ struct snd_soc_dai sh4_hac_dai[] = { | |||
305 | .channels_min = 2, | 307 | .channels_min = 2, |
306 | .channels_max = 2, | 308 | .channels_max = 2, |
307 | }, | 309 | }, |
308 | .ops = { | 310 | .ops = &hac_dai_ops, |
309 | .hw_params = hac_hw_params, | ||
310 | }, | ||
311 | 311 | ||
312 | }, | 312 | }, |
313 | #endif | 313 | #endif |
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 16518329f6b2..6e710f705a74 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -1432,7 +1432,8 @@ void snd_soc_free_pcms(struct snd_soc_device *socdev) | |||
1432 | #ifdef CONFIG_SND_SOC_AC97_BUS | 1432 | #ifdef CONFIG_SND_SOC_AC97_BUS |
1433 | for (i = 0; i < codec->num_dai; i++) { | 1433 | for (i = 0; i < codec->num_dai; i++) { |
1434 | codec_dai = &codec->dai[i]; | 1434 | codec_dai = &codec->dai[i]; |
1435 | if (codec_dai->ac97_control && codec->ac97) { | 1435 | if (codec_dai->ac97_control && codec->ac97 && |
1436 | strcmp(codec->name, "AC97") != 0) { | ||
1436 | soc_ac97_dev_unregister(codec); | 1437 | soc_ac97_dev_unregister(codec); |
1437 | goto free_card; | 1438 | goto free_card; |
1438 | } | 1439 | } |