diff options
Diffstat (limited to 'sound/soc/s3c24xx/s3c2443-ac97.c')
-rw-r--r-- | sound/soc/s3c24xx/s3c2443-ac97.c | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/sound/soc/s3c24xx/s3c2443-ac97.c b/sound/soc/s3c24xx/s3c2443-ac97.c index 19c5c3cf5d8c..1bfce40bb2e4 100644 --- a/sound/soc/s3c24xx/s3c2443-ac97.c +++ b/sound/soc/s3c24xx/s3c2443-ac97.c | |||
@@ -271,7 +271,8 @@ static void s3c2443_ac97_remove(struct platform_device *pdev, | |||
271 | } | 271 | } |
272 | 272 | ||
273 | static int s3c2443_ac97_hw_params(struct snd_pcm_substream *substream, | 273 | static int s3c2443_ac97_hw_params(struct snd_pcm_substream *substream, |
274 | struct snd_pcm_hw_params *params) | 274 | struct snd_pcm_hw_params *params, |
275 | struct snd_soc_dai *dai) | ||
275 | { | 276 | { |
276 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 277 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
277 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; | 278 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; |
@@ -284,7 +285,8 @@ static int s3c2443_ac97_hw_params(struct snd_pcm_substream *substream, | |||
284 | return 0; | 285 | return 0; |
285 | } | 286 | } |
286 | 287 | ||
287 | static int s3c2443_ac97_trigger(struct snd_pcm_substream *substream, int cmd) | 288 | static int s3c2443_ac97_trigger(struct snd_pcm_substream *substream, int cmd, |
289 | struct snd_soc_dai *dai) | ||
288 | { | 290 | { |
289 | u32 ac_glbctrl; | 291 | u32 ac_glbctrl; |
290 | 292 | ||
@@ -313,7 +315,8 @@ static int s3c2443_ac97_trigger(struct snd_pcm_substream *substream, int cmd) | |||
313 | } | 315 | } |
314 | 316 | ||
315 | static int s3c2443_ac97_hw_mic_params(struct snd_pcm_substream *substream, | 317 | static int s3c2443_ac97_hw_mic_params(struct snd_pcm_substream *substream, |
316 | struct snd_pcm_hw_params *params) | 318 | struct snd_pcm_hw_params *params, |
319 | struct snd_soc_dai *dai) | ||
317 | { | 320 | { |
318 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 321 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
319 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; | 322 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; |
@@ -327,7 +330,7 @@ static int s3c2443_ac97_hw_mic_params(struct snd_pcm_substream *substream, | |||
327 | } | 330 | } |
328 | 331 | ||
329 | static int s3c2443_ac97_mic_trigger(struct snd_pcm_substream *substream, | 332 | static int s3c2443_ac97_mic_trigger(struct snd_pcm_substream *substream, |
330 | int cmd) | 333 | int cmd, struct snd_soc_dai *dai) |
331 | { | 334 | { |
332 | u32 ac_glbctrl; | 335 | u32 ac_glbctrl; |
333 | 336 | ||
@@ -356,7 +359,7 @@ struct snd_soc_dai s3c2443_ac97_dai[] = { | |||
356 | { | 359 | { |
357 | .name = "s3c2443-ac97", | 360 | .name = "s3c2443-ac97", |
358 | .id = 0, | 361 | .id = 0, |
359 | .type = SND_SOC_DAI_AC97, | 362 | .ac97_control = 1, |
360 | .probe = s3c2443_ac97_probe, | 363 | .probe = s3c2443_ac97_probe, |
361 | .remove = s3c2443_ac97_remove, | 364 | .remove = s3c2443_ac97_remove, |
362 | .playback = { | 365 | .playback = { |
@@ -378,7 +381,7 @@ struct snd_soc_dai s3c2443_ac97_dai[] = { | |||
378 | { | 381 | { |
379 | .name = "pxa2xx-ac97-mic", | 382 | .name = "pxa2xx-ac97-mic", |
380 | .id = 1, | 383 | .id = 1, |
381 | .type = SND_SOC_DAI_AC97, | 384 | .ac97_control = 1, |
382 | .capture = { | 385 | .capture = { |
383 | .stream_name = "AC97 Mic Capture", | 386 | .stream_name = "AC97 Mic Capture", |
384 | .channels_min = 1, | 387 | .channels_min = 1, |
@@ -393,6 +396,21 @@ struct snd_soc_dai s3c2443_ac97_dai[] = { | |||
393 | EXPORT_SYMBOL_GPL(s3c2443_ac97_dai); | 396 | EXPORT_SYMBOL_GPL(s3c2443_ac97_dai); |
394 | EXPORT_SYMBOL_GPL(soc_ac97_ops); | 397 | EXPORT_SYMBOL_GPL(soc_ac97_ops); |
395 | 398 | ||
399 | static int __init s3c2443_ac97_init(void) | ||
400 | { | ||
401 | return snd_soc_register_dais(s3c2443_ac97_dai, | ||
402 | ARRAY_SIZE(s3c2443_ac97_dai)); | ||
403 | } | ||
404 | module_init(s3c2443_ac97_init); | ||
405 | |||
406 | static void __exit s3c2443_ac97_exit(void) | ||
407 | { | ||
408 | snd_soc_unregister_dais(s3c2443_ac97_dai, | ||
409 | ARRAY_SIZE(s3c2443_ac97_dai)); | ||
410 | } | ||
411 | module_exit(s3c2443_ac97_exit); | ||
412 | |||
413 | |||
396 | MODULE_AUTHOR("Graeme Gregory"); | 414 | MODULE_AUTHOR("Graeme Gregory"); |
397 | MODULE_DESCRIPTION("AC97 driver for the Samsung s3c2443 chip"); | 415 | MODULE_DESCRIPTION("AC97 driver for the Samsung s3c2443 chip"); |
398 | MODULE_LICENSE("GPL"); | 416 | MODULE_LICENSE("GPL"); |