aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/s3c24xx
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-03-11 12:51:31 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-03-11 12:51:31 -0400
commit65ec1cd1e2c6228752d2f167b01e6d291014d249 (patch)
tree8a54ef7d2a0d4770b49779114f9e1ac654363bdd /sound/soc/s3c24xx
parent5314adc3612d893c7cc526b3312d124805e45bc3 (diff)
parent6335d05548eece40092000aa91b64a50310d69d5 (diff)
ASoC: Merge dai_ops factor out
Merge Eric Maio's patch to merge snd_soc_dai_ops out of line. Fixed merge issues and updated drivers, plus an issue with the ops for the two s3c2443 AC97 DAIs having been merged. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/s3c24xx')
-rw-r--r--sound/soc/s3c24xx/s3c2412-i2s.c8
-rw-r--r--sound/soc/s3c24xx/s3c2443-ac97.c18
-rw-r--r--sound/soc/s3c24xx/s3c24xx-i2s.c16
3 files changed, 26 insertions, 16 deletions
diff --git a/sound/soc/s3c24xx/s3c2412-i2s.c b/sound/soc/s3c24xx/s3c2412-i2s.c
index 1ceae690d019..1ca3cdaa8213 100644
--- a/sound/soc/s3c24xx/s3c2412-i2s.c
+++ b/sound/soc/s3c24xx/s3c2412-i2s.c
@@ -147,6 +147,10 @@ static int s3c2412_i2s_probe(struct platform_device *pdev,
147 SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \ 147 SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \
148 SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000) 148 SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000)
149 149
150static struct snd_soc_dai_ops s3c2412_i2s_dai_ops = {
151 .set_sysclk = s3c2412_i2s_set_sysclk,
152};
153
150struct snd_soc_dai s3c2412_i2s_dai = { 154struct snd_soc_dai s3c2412_i2s_dai = {
151 .name = "s3c2412-i2s", 155 .name = "s3c2412-i2s",
152 .id = 0, 156 .id = 0,
@@ -163,9 +167,7 @@ struct snd_soc_dai s3c2412_i2s_dai = {
163 .rates = S3C2412_I2S_RATES, 167 .rates = S3C2412_I2S_RATES,
164 .formats = SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE, 168 .formats = SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE,
165 }, 169 },
166 .ops = { 170 .ops = &s3c2412_i2s_dai_ops,
167 .set_sysclk = s3c2412_i2s_set_sysclk,
168 },
169}; 171};
170EXPORT_SYMBOL_GPL(s3c2412_i2s_dai); 172EXPORT_SYMBOL_GPL(s3c2412_i2s_dai);
171 173
diff --git a/sound/soc/s3c24xx/s3c2443-ac97.c b/sound/soc/s3c24xx/s3c2443-ac97.c
index 5c7f18a22645..3698f707c44d 100644
--- a/sound/soc/s3c24xx/s3c2443-ac97.c
+++ b/sound/soc/s3c24xx/s3c2443-ac97.c
@@ -355,6 +355,16 @@ static int s3c2443_ac97_mic_trigger(struct snd_pcm_substream *substream,
355 SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 | \ 355 SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 | \
356 SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000) 356 SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000)
357 357
358static struct snd_soc_dai_ops s3c2443_ac97_dai_ops = {
359 .hw_params = s3c2443_ac97_hw_params,
360 .trigger = s3c2443_ac97_trigger,
361};
362
363static struct snd_soc_dai_ops s3c2443_ac97_mic_dai_ops = {
364 .hw_params = s3c2443_ac97_hw_mic_params,
365 .trigger = s3c2443_ac97_mic_trigger,
366};
367
358struct snd_soc_dai s3c2443_ac97_dai[] = { 368struct snd_soc_dai s3c2443_ac97_dai[] = {
359{ 369{
360 .name = "s3c2443-ac97", 370 .name = "s3c2443-ac97",
@@ -374,9 +384,7 @@ struct snd_soc_dai s3c2443_ac97_dai[] = {
374 .channels_max = 2, 384 .channels_max = 2,
375 .rates = s3c2443_AC97_RATES, 385 .rates = s3c2443_AC97_RATES,
376 .formats = SNDRV_PCM_FMTBIT_S16_LE,}, 386 .formats = SNDRV_PCM_FMTBIT_S16_LE,},
377 .ops = { 387 .ops = &s3c2443_ac97_dai_ops,
378 .hw_params = s3c2443_ac97_hw_params,
379 .trigger = s3c2443_ac97_trigger},
380}, 388},
381{ 389{
382 .name = "pxa2xx-ac97-mic", 390 .name = "pxa2xx-ac97-mic",
@@ -388,9 +396,7 @@ struct snd_soc_dai s3c2443_ac97_dai[] = {
388 .channels_max = 1, 396 .channels_max = 1,
389 .rates = s3c2443_AC97_RATES, 397 .rates = s3c2443_AC97_RATES,
390 .formats = SNDRV_PCM_FMTBIT_S16_LE,}, 398 .formats = SNDRV_PCM_FMTBIT_S16_LE,},
391 .ops = { 399 .ops = &s3c2443_ac97_mic_dai_ops,
392 .hw_params = s3c2443_ac97_hw_mic_params,
393 .trigger = s3c2443_ac97_mic_trigger,},
394}, 400},
395}; 401};
396EXPORT_SYMBOL_GPL(s3c2443_ac97_dai); 402EXPORT_SYMBOL_GPL(s3c2443_ac97_dai);
diff --git a/sound/soc/s3c24xx/s3c24xx-i2s.c b/sound/soc/s3c24xx/s3c24xx-i2s.c
index 407ccd7180fe..cc066964dad6 100644
--- a/sound/soc/s3c24xx/s3c24xx-i2s.c
+++ b/sound/soc/s3c24xx/s3c24xx-i2s.c
@@ -449,6 +449,14 @@ static int s3c24xx_i2s_resume(struct snd_soc_dai *cpu_dai)
449 SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \ 449 SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \
450 SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000) 450 SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000)
451 451
452static struct snd_soc_dai_ops s3c24xx_i2s_dai_ops = {
453 .trigger = s3c24xx_i2s_trigger,
454 .hw_params = s3c24xx_i2s_hw_params,
455 .set_fmt = s3c24xx_i2s_set_fmt,
456 .set_clkdiv = s3c24xx_i2s_set_clkdiv,
457 .set_sysclk = s3c24xx_i2s_set_sysclk,
458};
459
452struct snd_soc_dai s3c24xx_i2s_dai = { 460struct snd_soc_dai s3c24xx_i2s_dai = {
453 .name = "s3c24xx-i2s", 461 .name = "s3c24xx-i2s",
454 .id = 0, 462 .id = 0,
@@ -465,13 +473,7 @@ struct snd_soc_dai s3c24xx_i2s_dai = {
465 .channels_max = 2, 473 .channels_max = 2,
466 .rates = S3C24XX_I2S_RATES, 474 .rates = S3C24XX_I2S_RATES,
467 .formats = SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE,}, 475 .formats = SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE,},
468 .ops = { 476 .ops = &s3c24xx_i2s_dai_ops,
469 .trigger = s3c24xx_i2s_trigger,
470 .hw_params = s3c24xx_i2s_hw_params,
471 .set_fmt = s3c24xx_i2s_set_fmt,
472 .set_clkdiv = s3c24xx_i2s_set_clkdiv,
473 .set_sysclk = s3c24xx_i2s_set_sysclk,
474 },
475}; 477};
476EXPORT_SYMBOL_GPL(s3c24xx_i2s_dai); 478EXPORT_SYMBOL_GPL(s3c24xx_i2s_dai);
477 479