diff options
Diffstat (limited to 'sound/soc/ep93xx')
-rw-r--r-- | sound/soc/ep93xx/edb93xx.c | 27 | ||||
-rw-r--r-- | sound/soc/ep93xx/ep93xx-ac97.c | 14 | ||||
-rw-r--r-- | sound/soc/ep93xx/ep93xx-i2s.c | 15 | ||||
-rw-r--r-- | sound/soc/ep93xx/ep93xx-pcm.c | 18 | ||||
-rw-r--r-- | sound/soc/ep93xx/simone.c | 13 | ||||
-rw-r--r-- | sound/soc/ep93xx/snappercl15.c | 26 |
6 files changed, 17 insertions, 96 deletions
diff --git a/sound/soc/ep93xx/edb93xx.c b/sound/soc/ep93xx/edb93xx.c index 51930b6a83af..bae5cbbbd2b2 100644 --- a/sound/soc/ep93xx/edb93xx.c +++ b/sound/soc/ep93xx/edb93xx.c | |||
@@ -48,18 +48,6 @@ static int edb93xx_hw_params(struct snd_pcm_substream *substream, | |||
48 | else | 48 | else |
49 | mclk_rate = rate * 64 * 2; | 49 | mclk_rate = rate * 64 * 2; |
50 | 50 | ||
51 | err = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | | ||
52 | SND_SOC_DAIFMT_NB_IF | | ||
53 | SND_SOC_DAIFMT_CBS_CFS); | ||
54 | if (err) | ||
55 | return err; | ||
56 | |||
57 | err = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | | ||
58 | SND_SOC_DAIFMT_NB_IF | | ||
59 | SND_SOC_DAIFMT_CBS_CFS); | ||
60 | if (err) | ||
61 | return err; | ||
62 | |||
63 | err = snd_soc_dai_set_sysclk(codec_dai, 0, mclk_rate, | 51 | err = snd_soc_dai_set_sysclk(codec_dai, 0, mclk_rate, |
64 | SND_SOC_CLOCK_IN); | 52 | SND_SOC_CLOCK_IN); |
65 | if (err) | 53 | if (err) |
@@ -80,11 +68,14 @@ static struct snd_soc_dai_link edb93xx_dai = { | |||
80 | .cpu_dai_name = "ep93xx-i2s", | 68 | .cpu_dai_name = "ep93xx-i2s", |
81 | .codec_name = "spi0.0", | 69 | .codec_name = "spi0.0", |
82 | .codec_dai_name = "cs4271-hifi", | 70 | .codec_dai_name = "cs4271-hifi", |
71 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_IF | | ||
72 | SND_SOC_DAIFMT_CBS_CFS, | ||
83 | .ops = &edb93xx_ops, | 73 | .ops = &edb93xx_ops, |
84 | }; | 74 | }; |
85 | 75 | ||
86 | static struct snd_soc_card snd_soc_edb93xx = { | 76 | static struct snd_soc_card snd_soc_edb93xx = { |
87 | .name = "EDB93XX", | 77 | .name = "EDB93XX", |
78 | .owner = THIS_MODULE, | ||
88 | .dai_link = &edb93xx_dai, | 79 | .dai_link = &edb93xx_dai, |
89 | .num_links = 1, | 80 | .num_links = 1, |
90 | }; | 81 | }; |
@@ -131,17 +122,7 @@ static struct platform_driver edb93xx_driver = { | |||
131 | .remove = __devexit_p(edb93xx_remove), | 122 | .remove = __devexit_p(edb93xx_remove), |
132 | }; | 123 | }; |
133 | 124 | ||
134 | static int __init edb93xx_init(void) | 125 | module_platform_driver(edb93xx_driver); |
135 | { | ||
136 | return platform_driver_register(&edb93xx_driver); | ||
137 | } | ||
138 | module_init(edb93xx_init); | ||
139 | |||
140 | static void __exit edb93xx_exit(void) | ||
141 | { | ||
142 | platform_driver_unregister(&edb93xx_driver); | ||
143 | } | ||
144 | module_exit(edb93xx_exit); | ||
145 | 126 | ||
146 | MODULE_AUTHOR("Alexander Sverdlin <subaparts@yandex.ru>"); | 127 | MODULE_AUTHOR("Alexander Sverdlin <subaparts@yandex.ru>"); |
147 | MODULE_DESCRIPTION("ALSA SoC EDB93xx"); | 128 | MODULE_DESCRIPTION("ALSA SoC EDB93xx"); |
diff --git a/sound/soc/ep93xx/ep93xx-ac97.c b/sound/soc/ep93xx/ep93xx-ac97.c index 3cd6158d83e1..0678637abd66 100644 --- a/sound/soc/ep93xx/ep93xx-ac97.c +++ b/sound/soc/ep93xx/ep93xx-ac97.c | |||
@@ -330,7 +330,7 @@ static int ep93xx_ac97_startup(struct snd_pcm_substream *substream, | |||
330 | return 0; | 330 | return 0; |
331 | } | 331 | } |
332 | 332 | ||
333 | static struct snd_soc_dai_ops ep93xx_ac97_dai_ops = { | 333 | static const struct snd_soc_dai_ops ep93xx_ac97_dai_ops = { |
334 | .startup = ep93xx_ac97_startup, | 334 | .startup = ep93xx_ac97_startup, |
335 | .trigger = ep93xx_ac97_trigger, | 335 | .trigger = ep93xx_ac97_trigger, |
336 | }; | 336 | }; |
@@ -449,17 +449,7 @@ static struct platform_driver ep93xx_ac97_driver = { | |||
449 | }, | 449 | }, |
450 | }; | 450 | }; |
451 | 451 | ||
452 | static int __init ep93xx_ac97_init(void) | 452 | module_platform_driver(ep93xx_ac97_driver); |
453 | { | ||
454 | return platform_driver_register(&ep93xx_ac97_driver); | ||
455 | } | ||
456 | module_init(ep93xx_ac97_init); | ||
457 | |||
458 | static void __exit ep93xx_ac97_exit(void) | ||
459 | { | ||
460 | platform_driver_unregister(&ep93xx_ac97_driver); | ||
461 | } | ||
462 | module_exit(ep93xx_ac97_exit); | ||
463 | 453 | ||
464 | MODULE_DESCRIPTION("EP93xx AC97 ASoC Driver"); | 454 | MODULE_DESCRIPTION("EP93xx AC97 ASoC Driver"); |
465 | MODULE_AUTHOR("Mika Westerberg <mika.westerberg@iki.fi>"); | 455 | MODULE_AUTHOR("Mika Westerberg <mika.westerberg@iki.fi>"); |
diff --git a/sound/soc/ep93xx/ep93xx-i2s.c b/sound/soc/ep93xx/ep93xx-i2s.c index 099614e16651..f7a62348e3fe 100644 --- a/sound/soc/ep93xx/ep93xx-i2s.c +++ b/sound/soc/ep93xx/ep93xx-i2s.c | |||
@@ -338,7 +338,7 @@ static int ep93xx_i2s_resume(struct snd_soc_dai *dai) | |||
338 | #define ep93xx_i2s_resume NULL | 338 | #define ep93xx_i2s_resume NULL |
339 | #endif | 339 | #endif |
340 | 340 | ||
341 | static struct snd_soc_dai_ops ep93xx_i2s_dai_ops = { | 341 | static const struct snd_soc_dai_ops ep93xx_i2s_dai_ops = { |
342 | .startup = ep93xx_i2s_startup, | 342 | .startup = ep93xx_i2s_startup, |
343 | .shutdown = ep93xx_i2s_shutdown, | 343 | .shutdown = ep93xx_i2s_shutdown, |
344 | .hw_params = ep93xx_i2s_hw_params, | 344 | .hw_params = ep93xx_i2s_hw_params, |
@@ -464,18 +464,7 @@ static struct platform_driver ep93xx_i2s_driver = { | |||
464 | }, | 464 | }, |
465 | }; | 465 | }; |
466 | 466 | ||
467 | static int __init ep93xx_i2s_init(void) | 467 | module_platform_driver(ep93xx_i2s_driver); |
468 | { | ||
469 | return platform_driver_register(&ep93xx_i2s_driver); | ||
470 | } | ||
471 | |||
472 | static void __exit ep93xx_i2s_exit(void) | ||
473 | { | ||
474 | platform_driver_unregister(&ep93xx_i2s_driver); | ||
475 | } | ||
476 | |||
477 | module_init(ep93xx_i2s_init); | ||
478 | module_exit(ep93xx_i2s_exit); | ||
479 | 468 | ||
480 | MODULE_ALIAS("platform:ep93xx-i2s"); | 469 | MODULE_ALIAS("platform:ep93xx-i2s"); |
481 | MODULE_AUTHOR("Ryan Mallon"); | 470 | MODULE_AUTHOR("Ryan Mallon"); |
diff --git a/sound/soc/ep93xx/ep93xx-pcm.c b/sound/soc/ep93xx/ep93xx-pcm.c index d00230a591b1..3fc96130d1a6 100644 --- a/sound/soc/ep93xx/ep93xx-pcm.c +++ b/sound/soc/ep93xx/ep93xx-pcm.c | |||
@@ -286,7 +286,6 @@ static u64 ep93xx_pcm_dmamask = 0xffffffff; | |||
286 | static int ep93xx_pcm_new(struct snd_soc_pcm_runtime *rtd) | 286 | static int ep93xx_pcm_new(struct snd_soc_pcm_runtime *rtd) |
287 | { | 287 | { |
288 | struct snd_card *card = rtd->card->snd_card; | 288 | struct snd_card *card = rtd->card->snd_card; |
289 | struct snd_soc_dai *dai = rtd->cpu_dai; | ||
290 | struct snd_pcm *pcm = rtd->pcm; | 289 | struct snd_pcm *pcm = rtd->pcm; |
291 | int ret = 0; | 290 | int ret = 0; |
292 | 291 | ||
@@ -295,14 +294,14 @@ static int ep93xx_pcm_new(struct snd_soc_pcm_runtime *rtd) | |||
295 | if (!card->dev->coherent_dma_mask) | 294 | if (!card->dev->coherent_dma_mask) |
296 | card->dev->coherent_dma_mask = 0xffffffff; | 295 | card->dev->coherent_dma_mask = 0xffffffff; |
297 | 296 | ||
298 | if (dai->driver->playback.channels_min) { | 297 | if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { |
299 | ret = ep93xx_pcm_preallocate_dma_buffer(pcm, | 298 | ret = ep93xx_pcm_preallocate_dma_buffer(pcm, |
300 | SNDRV_PCM_STREAM_PLAYBACK); | 299 | SNDRV_PCM_STREAM_PLAYBACK); |
301 | if (ret) | 300 | if (ret) |
302 | return ret; | 301 | return ret; |
303 | } | 302 | } |
304 | 303 | ||
305 | if (dai->driver->capture.channels_min) { | 304 | if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { |
306 | ret = ep93xx_pcm_preallocate_dma_buffer(pcm, | 305 | ret = ep93xx_pcm_preallocate_dma_buffer(pcm, |
307 | SNDRV_PCM_STREAM_CAPTURE); | 306 | SNDRV_PCM_STREAM_CAPTURE); |
308 | if (ret) | 307 | if (ret) |
@@ -339,18 +338,7 @@ static struct platform_driver ep93xx_pcm_driver = { | |||
339 | .remove = __devexit_p(ep93xx_soc_platform_remove), | 338 | .remove = __devexit_p(ep93xx_soc_platform_remove), |
340 | }; | 339 | }; |
341 | 340 | ||
342 | static int __init ep93xx_soc_platform_init(void) | 341 | module_platform_driver(ep93xx_pcm_driver); |
343 | { | ||
344 | return platform_driver_register(&ep93xx_pcm_driver); | ||
345 | } | ||
346 | |||
347 | static void __exit ep93xx_soc_platform_exit(void) | ||
348 | { | ||
349 | platform_driver_unregister(&ep93xx_pcm_driver); | ||
350 | } | ||
351 | |||
352 | module_init(ep93xx_soc_platform_init); | ||
353 | module_exit(ep93xx_soc_platform_exit); | ||
354 | 342 | ||
355 | MODULE_AUTHOR("Ryan Mallon"); | 343 | MODULE_AUTHOR("Ryan Mallon"); |
356 | MODULE_DESCRIPTION("EP93xx ALSA PCM interface"); | 344 | MODULE_DESCRIPTION("EP93xx ALSA PCM interface"); |
diff --git a/sound/soc/ep93xx/simone.c b/sound/soc/ep93xx/simone.c index 968cb316d511..dd997094eb30 100644 --- a/sound/soc/ep93xx/simone.c +++ b/sound/soc/ep93xx/simone.c | |||
@@ -34,6 +34,7 @@ static struct snd_soc_dai_link simone_dai = { | |||
34 | 34 | ||
35 | static struct snd_soc_card snd_soc_simone = { | 35 | static struct snd_soc_card snd_soc_simone = { |
36 | .name = "Sim.One", | 36 | .name = "Sim.One", |
37 | .owner = THIS_MODULE, | ||
37 | .dai_link = &simone_dai, | 38 | .dai_link = &simone_dai, |
38 | .num_links = 1, | 39 | .num_links = 1, |
39 | }; | 40 | }; |
@@ -81,17 +82,7 @@ static struct platform_driver simone_driver = { | |||
81 | .remove = __devexit_p(simone_remove), | 82 | .remove = __devexit_p(simone_remove), |
82 | }; | 83 | }; |
83 | 84 | ||
84 | static int __init simone_init(void) | 85 | module_platform_driver(simone_driver); |
85 | { | ||
86 | return platform_driver_register(&simone_driver); | ||
87 | } | ||
88 | module_init(simone_init); | ||
89 | |||
90 | static void __exit simone_exit(void) | ||
91 | { | ||
92 | platform_driver_unregister(&simone_driver); | ||
93 | } | ||
94 | module_exit(simone_exit); | ||
95 | 86 | ||
96 | MODULE_DESCRIPTION("ALSA SoC Simplemachines Sim.One"); | 87 | MODULE_DESCRIPTION("ALSA SoC Simplemachines Sim.One"); |
97 | MODULE_AUTHOR("Mika Westerberg <mika.westerberg@iki.fi>"); | 88 | MODULE_AUTHOR("Mika Westerberg <mika.westerberg@iki.fi>"); |
diff --git a/sound/soc/ep93xx/snappercl15.c b/sound/soc/ep93xx/snappercl15.c index 2cde43321eec..ccae34a3f280 100644 --- a/sound/soc/ep93xx/snappercl15.c +++ b/sound/soc/ep93xx/snappercl15.c | |||
@@ -33,16 +33,6 @@ static int snappercl15_hw_params(struct snd_pcm_substream *substream, | |||
33 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; | 33 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; |
34 | int err; | 34 | int err; |
35 | 35 | ||
36 | err = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | | ||
37 | SND_SOC_DAIFMT_NB_IF | | ||
38 | SND_SOC_DAIFMT_CBS_CFS); | ||
39 | |||
40 | err = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | | ||
41 | SND_SOC_DAIFMT_NB_IF | | ||
42 | SND_SOC_DAIFMT_CBS_CFS); | ||
43 | if (err) | ||
44 | return err; | ||
45 | |||
46 | err = snd_soc_dai_set_sysclk(codec_dai, 0, CODEC_CLOCK, | 36 | err = snd_soc_dai_set_sysclk(codec_dai, 0, CODEC_CLOCK, |
47 | SND_SOC_CLOCK_IN); | 37 | SND_SOC_CLOCK_IN); |
48 | if (err) | 38 | if (err) |
@@ -96,11 +86,14 @@ static struct snd_soc_dai_link snappercl15_dai = { | |||
96 | .codec_name = "tlv320aic23-codec.0-001a", | 86 | .codec_name = "tlv320aic23-codec.0-001a", |
97 | .platform_name = "ep93xx-pcm-audio", | 87 | .platform_name = "ep93xx-pcm-audio", |
98 | .init = snappercl15_tlv320aic23_init, | 88 | .init = snappercl15_tlv320aic23_init, |
89 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_IF | | ||
90 | SND_SOC_DAIFMT_CBS_CFS, | ||
99 | .ops = &snappercl15_ops, | 91 | .ops = &snappercl15_ops, |
100 | }; | 92 | }; |
101 | 93 | ||
102 | static struct snd_soc_card snd_soc_snappercl15 = { | 94 | static struct snd_soc_card snd_soc_snappercl15 = { |
103 | .name = "Snapper CL15", | 95 | .name = "Snapper CL15", |
96 | .owner = THIS_MODULE, | ||
104 | .dai_link = &snappercl15_dai, | 97 | .dai_link = &snappercl15_dai, |
105 | .num_links = 1, | 98 | .num_links = 1, |
106 | }; | 99 | }; |
@@ -147,18 +140,7 @@ static struct platform_driver snappercl15_driver = { | |||
147 | .remove = __devexit_p(snappercl15_remove), | 140 | .remove = __devexit_p(snappercl15_remove), |
148 | }; | 141 | }; |
149 | 142 | ||
150 | static int __init snappercl15_init(void) | 143 | module_platform_driver(snappercl15_driver); |
151 | { | ||
152 | return platform_driver_register(&snappercl15_driver); | ||
153 | } | ||
154 | |||
155 | static void __exit snappercl15_exit(void) | ||
156 | { | ||
157 | platform_driver_unregister(&snappercl15_driver); | ||
158 | } | ||
159 | |||
160 | module_init(snappercl15_init); | ||
161 | module_exit(snappercl15_exit); | ||
162 | 144 | ||
163 | MODULE_AUTHOR("Ryan Mallon"); | 145 | MODULE_AUTHOR("Ryan Mallon"); |
164 | MODULE_DESCRIPTION("ALSA SoC Snapper CL15"); | 146 | MODULE_DESCRIPTION("ALSA SoC Snapper CL15"); |