diff options
Diffstat (limited to 'sound/soc/samsung')
32 files changed, 629 insertions, 261 deletions
diff --git a/sound/soc/samsung/Kconfig b/sound/soc/samsung/Kconfig index 53aaa69eda03..f3417f2311b8 100644 --- a/sound/soc/samsung/Kconfig +++ b/sound/soc/samsung/Kconfig | |||
@@ -193,8 +193,22 @@ config SND_SOC_SPEYSIDE | |||
193 | select SND_SOC_WM9081 | 193 | select SND_SOC_WM9081 |
194 | select SND_SOC_WM1250_EV1 | 194 | select SND_SOC_WM1250_EV1 |
195 | 195 | ||
196 | config SND_SOC_SPEYSIDE_WM8962 | 196 | config SND_SOC_TOBERMORY |
197 | tristate "Audio support for Wolfson Speyside with WM8962" | 197 | tristate "Audio support for Wolfson Tobermory" |
198 | depends on SND_SOC_SAMSUNG && MACH_WLF_CRAGG_6410 | 198 | depends on SND_SOC_SAMSUNG && MACH_WLF_CRAGG_6410 |
199 | select SND_SAMSUNG_I2S | 199 | select SND_SAMSUNG_I2S |
200 | select SND_SOC_WM8962 | 200 | select SND_SOC_WM8962 |
201 | |||
202 | config SND_SOC_LOWLAND | ||
203 | tristate "Audio support for Wolfson Lowland" | ||
204 | depends on SND_SOC_SAMSUNG && MACH_WLF_CRAGG_6410 | ||
205 | select SND_SAMSUNG_I2S | ||
206 | select SND_SOC_WM5100 | ||
207 | select SND_SOC_WM9081 | ||
208 | |||
209 | config SND_SOC_LITTLEMILL | ||
210 | tristate "Audio support for Wolfson Littlemill" | ||
211 | depends on SND_SOC_SAMSUNG && MACH_WLF_CRAGG_6410 | ||
212 | select SND_SAMSUNG_I2S | ||
213 | select MFD_WM8994 | ||
214 | select SND_SOC_WM8994 | ||
diff --git a/sound/soc/samsung/Makefile b/sound/soc/samsung/Makefile index 8509d3c4366e..9d03beb40c86 100644 --- a/sound/soc/samsung/Makefile +++ b/sound/soc/samsung/Makefile | |||
@@ -39,7 +39,9 @@ snd-soc-smdk-spdif-objs := smdk_spdif.o | |||
39 | snd-soc-smdk-wm8580pcm-objs := smdk_wm8580pcm.o | 39 | snd-soc-smdk-wm8580pcm-objs := smdk_wm8580pcm.o |
40 | snd-soc-smdk-wm8994pcm-objs := smdk_wm8994pcm.o | 40 | snd-soc-smdk-wm8994pcm-objs := smdk_wm8994pcm.o |
41 | snd-soc-speyside-objs := speyside.o | 41 | snd-soc-speyside-objs := speyside.o |
42 | snd-soc-speyside-wm8962-objs := speyside_wm8962.o | 42 | snd-soc-tobermory-objs := tobermory.o |
43 | snd-soc-lowland-objs := lowland.o | ||
44 | snd-soc-littlemill-objs := littlemill.o | ||
43 | 45 | ||
44 | obj-$(CONFIG_SND_SOC_SAMSUNG_JIVE_WM8750) += snd-soc-jive-wm8750.o | 46 | obj-$(CONFIG_SND_SOC_SAMSUNG_JIVE_WM8750) += snd-soc-jive-wm8750.o |
45 | obj-$(CONFIG_SND_SOC_SAMSUNG_NEO1973_WM8753) += snd-soc-neo1973-wm8753.o | 47 | obj-$(CONFIG_SND_SOC_SAMSUNG_NEO1973_WM8753) += snd-soc-neo1973-wm8753.o |
@@ -60,4 +62,6 @@ obj-$(CONFIG_SND_SOC_GONI_AQUILA_WM8994) += snd-soc-goni-wm8994.o | |||
60 | obj-$(CONFIG_SND_SOC_SMDK_WM8580_PCM) += snd-soc-smdk-wm8580pcm.o | 62 | obj-$(CONFIG_SND_SOC_SMDK_WM8580_PCM) += snd-soc-smdk-wm8580pcm.o |
61 | obj-$(CONFIG_SND_SOC_SMDK_WM8994_PCM) += snd-soc-smdk-wm8994pcm.o | 63 | obj-$(CONFIG_SND_SOC_SMDK_WM8994_PCM) += snd-soc-smdk-wm8994pcm.o |
62 | obj-$(CONFIG_SND_SOC_SPEYSIDE) += snd-soc-speyside.o | 64 | obj-$(CONFIG_SND_SOC_SPEYSIDE) += snd-soc-speyside.o |
63 | obj-$(CONFIG_SND_SOC_SPEYSIDE_WM8962) += snd-soc-speyside-wm8962.o | 65 | obj-$(CONFIG_SND_SOC_TOBERMORY) += snd-soc-tobermory.o |
66 | obj-$(CONFIG_SND_SOC_LOWLAND) += snd-soc-lowland.o | ||
67 | obj-$(CONFIG_SND_SOC_LITTLEMILL) += snd-soc-littlemill.o | ||
diff --git a/sound/soc/samsung/ac97.c b/sound/soc/samsung/ac97.c index 16521e3ffc0c..7b9bf93e3701 100644 --- a/sound/soc/samsung/ac97.c +++ b/sound/soc/samsung/ac97.c | |||
@@ -329,12 +329,12 @@ static int s3c_ac97_mic_trigger(struct snd_pcm_substream *substream, | |||
329 | return 0; | 329 | return 0; |
330 | } | 330 | } |
331 | 331 | ||
332 | static struct snd_soc_dai_ops s3c_ac97_dai_ops = { | 332 | static const struct snd_soc_dai_ops s3c_ac97_dai_ops = { |
333 | .hw_params = s3c_ac97_hw_params, | 333 | .hw_params = s3c_ac97_hw_params, |
334 | .trigger = s3c_ac97_trigger, | 334 | .trigger = s3c_ac97_trigger, |
335 | }; | 335 | }; |
336 | 336 | ||
337 | static struct snd_soc_dai_ops s3c_ac97_mic_dai_ops = { | 337 | static const struct snd_soc_dai_ops s3c_ac97_mic_dai_ops = { |
338 | .hw_params = s3c_ac97_hw_mic_params, | 338 | .hw_params = s3c_ac97_hw_mic_params, |
339 | .trigger = s3c_ac97_mic_trigger, | 339 | .trigger = s3c_ac97_mic_trigger, |
340 | }; | 340 | }; |
@@ -509,17 +509,7 @@ static struct platform_driver s3c_ac97_driver = { | |||
509 | }, | 509 | }, |
510 | }; | 510 | }; |
511 | 511 | ||
512 | static int __init s3c_ac97_init(void) | 512 | module_platform_driver(s3c_ac97_driver); |
513 | { | ||
514 | return platform_driver_register(&s3c_ac97_driver); | ||
515 | } | ||
516 | module_init(s3c_ac97_init); | ||
517 | |||
518 | static void __exit s3c_ac97_exit(void) | ||
519 | { | ||
520 | platform_driver_unregister(&s3c_ac97_driver); | ||
521 | } | ||
522 | module_exit(s3c_ac97_exit); | ||
523 | 513 | ||
524 | MODULE_AUTHOR("Jaswinder Singh, <jassi.brar@samsung.com>"); | 514 | MODULE_AUTHOR("Jaswinder Singh, <jassi.brar@samsung.com>"); |
525 | MODULE_DESCRIPTION("AC97 driver for the Samsung SoC"); | 515 | MODULE_DESCRIPTION("AC97 driver for the Samsung SoC"); |
diff --git a/sound/soc/samsung/dma.c b/sound/soc/samsung/dma.c index d400ed0a71f2..e4ba17ce6b32 100644 --- a/sound/soc/samsung/dma.c +++ b/sound/soc/samsung/dma.c | |||
@@ -403,7 +403,6 @@ static u64 dma_mask = DMA_BIT_MASK(32); | |||
403 | static int dma_new(struct snd_soc_pcm_runtime *rtd) | 403 | static int dma_new(struct snd_soc_pcm_runtime *rtd) |
404 | { | 404 | { |
405 | struct snd_card *card = rtd->card->snd_card; | 405 | struct snd_card *card = rtd->card->snd_card; |
406 | struct snd_soc_dai *dai = rtd->cpu_dai; | ||
407 | struct snd_pcm *pcm = rtd->pcm; | 406 | struct snd_pcm *pcm = rtd->pcm; |
408 | int ret = 0; | 407 | int ret = 0; |
409 | 408 | ||
@@ -414,14 +413,14 @@ static int dma_new(struct snd_soc_pcm_runtime *rtd) | |||
414 | if (!card->dev->coherent_dma_mask) | 413 | if (!card->dev->coherent_dma_mask) |
415 | card->dev->coherent_dma_mask = 0xffffffff; | 414 | card->dev->coherent_dma_mask = 0xffffffff; |
416 | 415 | ||
417 | if (dai->driver->playback.channels_min) { | 416 | if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { |
418 | ret = preallocate_dma_buffer(pcm, | 417 | ret = preallocate_dma_buffer(pcm, |
419 | SNDRV_PCM_STREAM_PLAYBACK); | 418 | SNDRV_PCM_STREAM_PLAYBACK); |
420 | if (ret) | 419 | if (ret) |
421 | goto out; | 420 | goto out; |
422 | } | 421 | } |
423 | 422 | ||
424 | if (dai->driver->capture.channels_min) { | 423 | if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { |
425 | ret = preallocate_dma_buffer(pcm, | 424 | ret = preallocate_dma_buffer(pcm, |
426 | SNDRV_PCM_STREAM_CAPTURE); | 425 | SNDRV_PCM_STREAM_CAPTURE); |
427 | if (ret) | 426 | if (ret) |
@@ -458,17 +457,7 @@ static struct platform_driver asoc_dma_driver = { | |||
458 | .remove = __devexit_p(samsung_asoc_platform_remove), | 457 | .remove = __devexit_p(samsung_asoc_platform_remove), |
459 | }; | 458 | }; |
460 | 459 | ||
461 | static int __init samsung_asoc_init(void) | 460 | module_platform_driver(asoc_dma_driver); |
462 | { | ||
463 | return platform_driver_register(&asoc_dma_driver); | ||
464 | } | ||
465 | module_init(samsung_asoc_init); | ||
466 | |||
467 | static void __exit samsung_asoc_exit(void) | ||
468 | { | ||
469 | platform_driver_unregister(&asoc_dma_driver); | ||
470 | } | ||
471 | module_exit(samsung_asoc_exit); | ||
472 | 461 | ||
473 | MODULE_AUTHOR("Ben Dooks, <ben@simtec.co.uk>"); | 462 | MODULE_AUTHOR("Ben Dooks, <ben@simtec.co.uk>"); |
474 | MODULE_DESCRIPTION("Samsung ASoC DMA Driver"); | 463 | MODULE_DESCRIPTION("Samsung ASoC DMA Driver"); |
diff --git a/sound/soc/samsung/goni_wm8994.c b/sound/soc/samsung/goni_wm8994.c index 84f9c3cf7f3e..c23c2ae91f58 100644 --- a/sound/soc/samsung/goni_wm8994.c +++ b/sound/soc/samsung/goni_wm8994.c | |||
@@ -244,6 +244,7 @@ static struct snd_soc_dai_link goni_dai[] = { | |||
244 | 244 | ||
245 | static struct snd_soc_card goni = { | 245 | static struct snd_soc_card goni = { |
246 | .name = "goni", | 246 | .name = "goni", |
247 | .owner = THIS_MODULE, | ||
247 | .dai_link = goni_dai, | 248 | .dai_link = goni_dai, |
248 | .num_links = ARRAY_SIZE(goni_dai), | 249 | .num_links = ARRAY_SIZE(goni_dai), |
249 | 250 | ||
diff --git a/sound/soc/samsung/h1940_uda1380.c b/sound/soc/samsung/h1940_uda1380.c index 03cfa5fcdcca..6e3257717c54 100644 --- a/sound/soc/samsung/h1940_uda1380.c +++ b/sound/soc/samsung/h1940_uda1380.c | |||
@@ -215,6 +215,7 @@ static struct snd_soc_dai_link h1940_uda1380_dai[] = { | |||
215 | 215 | ||
216 | static struct snd_soc_card h1940_asoc = { | 216 | static struct snd_soc_card h1940_asoc = { |
217 | .name = "h1940", | 217 | .name = "h1940", |
218 | .owner = THIS_MODULE, | ||
218 | .dai_link = h1940_uda1380_dai, | 219 | .dai_link = h1940_uda1380_dai, |
219 | .num_links = ARRAY_SIZE(h1940_uda1380_dai), | 220 | .num_links = ARRAY_SIZE(h1940_uda1380_dai), |
220 | 221 | ||
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index bff42bf370b9..87a874dc7a35 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/clk.h> | 15 | #include <linux/clk.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/pm_runtime.h> | ||
18 | 19 | ||
19 | #include <sound/soc.h> | 20 | #include <sound/soc.h> |
20 | #include <sound/pcm_params.h> | 21 | #include <sound/pcm_params.h> |
@@ -881,7 +882,7 @@ static int samsung_i2s_dai_probe(struct snd_soc_dai *dai) | |||
881 | writel(CON_RSTCLR, i2s->addr + I2SCON); | 882 | writel(CON_RSTCLR, i2s->addr + I2SCON); |
882 | 883 | ||
883 | if (i2s->quirks & QUIRK_SEC_DAI) | 884 | if (i2s->quirks & QUIRK_SEC_DAI) |
884 | idma_reg_addr_init((void *)i2s->addr, | 885 | idma_reg_addr_init(i2s->addr, |
885 | i2s->sec_dai->idma_playback.dma_addr); | 886 | i2s->sec_dai->idma_playback.dma_addr); |
886 | 887 | ||
887 | probe_exit: | 888 | probe_exit: |
@@ -923,7 +924,7 @@ static int samsung_i2s_dai_remove(struct snd_soc_dai *dai) | |||
923 | return 0; | 924 | return 0; |
924 | } | 925 | } |
925 | 926 | ||
926 | static struct snd_soc_dai_ops samsung_i2s_dai_ops = { | 927 | static const struct snd_soc_dai_ops samsung_i2s_dai_ops = { |
927 | .trigger = i2s_trigger, | 928 | .trigger = i2s_trigger, |
928 | .hw_params = i2s_hw_params, | 929 | .hw_params = i2s_hw_params, |
929 | .set_fmt = i2s_set_fmt, | 930 | .set_fmt = i2s_set_fmt, |
@@ -945,7 +946,7 @@ struct i2s_dai *i2s_alloc_dai(struct platform_device *pdev, bool sec) | |||
945 | { | 946 | { |
946 | struct i2s_dai *i2s; | 947 | struct i2s_dai *i2s; |
947 | 948 | ||
948 | i2s = kzalloc(sizeof(struct i2s_dai), GFP_KERNEL); | 949 | i2s = devm_kzalloc(&pdev->dev, sizeof(struct i2s_dai), GFP_KERNEL); |
949 | if (i2s == NULL) | 950 | if (i2s == NULL) |
950 | return NULL; | 951 | return NULL; |
951 | 952 | ||
@@ -972,10 +973,8 @@ struct i2s_dai *i2s_alloc_dai(struct platform_device *pdev, bool sec) | |||
972 | i2s->pdev = platform_device_register_resndata(NULL, | 973 | i2s->pdev = platform_device_register_resndata(NULL, |
973 | pdev->name, pdev->id + SAMSUNG_I2S_SECOFF, | 974 | pdev->name, pdev->id + SAMSUNG_I2S_SECOFF, |
974 | NULL, 0, NULL, 0); | 975 | NULL, 0, NULL, 0); |
975 | if (IS_ERR(i2s->pdev)) { | 976 | if (IS_ERR(i2s->pdev)) |
976 | kfree(i2s); | ||
977 | return NULL; | 977 | return NULL; |
978 | } | ||
979 | } | 978 | } |
980 | 979 | ||
981 | /* Pre-assign snd_soc_dai_set_drvdata */ | 980 | /* Pre-assign snd_soc_dai_set_drvdata */ |
@@ -1048,7 +1047,7 @@ static __devinit int samsung_i2s_probe(struct platform_device *pdev) | |||
1048 | if (!pri_dai) { | 1047 | if (!pri_dai) { |
1049 | dev_err(&pdev->dev, "Unable to alloc I2S_pri\n"); | 1048 | dev_err(&pdev->dev, "Unable to alloc I2S_pri\n"); |
1050 | ret = -ENOMEM; | 1049 | ret = -ENOMEM; |
1051 | goto err1; | 1050 | goto err; |
1052 | } | 1051 | } |
1053 | 1052 | ||
1054 | pri_dai->dma_playback.dma_addr = regs_base + I2STXD; | 1053 | pri_dai->dma_playback.dma_addr = regs_base + I2STXD; |
@@ -1073,7 +1072,7 @@ static __devinit int samsung_i2s_probe(struct platform_device *pdev) | |||
1073 | if (!sec_dai) { | 1072 | if (!sec_dai) { |
1074 | dev_err(&pdev->dev, "Unable to alloc I2S_sec\n"); | 1073 | dev_err(&pdev->dev, "Unable to alloc I2S_sec\n"); |
1075 | ret = -ENOMEM; | 1074 | ret = -ENOMEM; |
1076 | goto err2; | 1075 | goto err; |
1077 | } | 1076 | } |
1078 | sec_dai->dma_playback.dma_addr = regs_base + I2STXDS; | 1077 | sec_dai->dma_playback.dma_addr = regs_base + I2STXDS; |
1079 | sec_dai->dma_playback.client = | 1078 | sec_dai->dma_playback.client = |
@@ -1092,17 +1091,15 @@ static __devinit int samsung_i2s_probe(struct platform_device *pdev) | |||
1092 | if (i2s_pdata->cfg_gpio && i2s_pdata->cfg_gpio(pdev)) { | 1091 | if (i2s_pdata->cfg_gpio && i2s_pdata->cfg_gpio(pdev)) { |
1093 | dev_err(&pdev->dev, "Unable to configure gpio\n"); | 1092 | dev_err(&pdev->dev, "Unable to configure gpio\n"); |
1094 | ret = -EINVAL; | 1093 | ret = -EINVAL; |
1095 | goto err3; | 1094 | goto err; |
1096 | } | 1095 | } |
1097 | 1096 | ||
1098 | snd_soc_register_dai(&pri_dai->pdev->dev, &pri_dai->i2s_dai_drv); | 1097 | snd_soc_register_dai(&pri_dai->pdev->dev, &pri_dai->i2s_dai_drv); |
1099 | 1098 | ||
1099 | pm_runtime_enable(&pdev->dev); | ||
1100 | |||
1100 | return 0; | 1101 | return 0; |
1101 | err3: | 1102 | err: |
1102 | kfree(sec_dai); | ||
1103 | err2: | ||
1104 | kfree(pri_dai); | ||
1105 | err1: | ||
1106 | release_mem_region(regs_base, resource_size(res)); | 1103 | release_mem_region(regs_base, resource_size(res)); |
1107 | 1104 | ||
1108 | return ret; | 1105 | return ret; |
@@ -1111,6 +1108,7 @@ err1: | |||
1111 | static __devexit int samsung_i2s_remove(struct platform_device *pdev) | 1108 | static __devexit int samsung_i2s_remove(struct platform_device *pdev) |
1112 | { | 1109 | { |
1113 | struct i2s_dai *i2s, *other; | 1110 | struct i2s_dai *i2s, *other; |
1111 | struct resource *res; | ||
1114 | 1112 | ||
1115 | i2s = dev_get_drvdata(&pdev->dev); | 1113 | i2s = dev_get_drvdata(&pdev->dev); |
1116 | other = i2s->pri_dai ? : i2s->sec_dai; | 1114 | other = i2s->pri_dai ? : i2s->sec_dai; |
@@ -1119,7 +1117,7 @@ static __devexit int samsung_i2s_remove(struct platform_device *pdev) | |||
1119 | other->pri_dai = NULL; | 1117 | other->pri_dai = NULL; |
1120 | other->sec_dai = NULL; | 1118 | other->sec_dai = NULL; |
1121 | } else { | 1119 | } else { |
1122 | struct resource *res; | 1120 | pm_runtime_disable(&pdev->dev); |
1123 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 1121 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
1124 | if (res) | 1122 | if (res) |
1125 | release_mem_region(res->start, resource_size(res)); | 1123 | release_mem_region(res->start, resource_size(res)); |
@@ -1128,8 +1126,6 @@ static __devexit int samsung_i2s_remove(struct platform_device *pdev) | |||
1128 | i2s->pri_dai = NULL; | 1126 | i2s->pri_dai = NULL; |
1129 | i2s->sec_dai = NULL; | 1127 | i2s->sec_dai = NULL; |
1130 | 1128 | ||
1131 | kfree(i2s); | ||
1132 | |||
1133 | snd_soc_unregister_dai(&pdev->dev); | 1129 | snd_soc_unregister_dai(&pdev->dev); |
1134 | 1130 | ||
1135 | return 0; | 1131 | return 0; |
@@ -1144,17 +1140,7 @@ static struct platform_driver samsung_i2s_driver = { | |||
1144 | }, | 1140 | }, |
1145 | }; | 1141 | }; |
1146 | 1142 | ||
1147 | static int __init samsung_i2s_init(void) | 1143 | module_platform_driver(samsung_i2s_driver); |
1148 | { | ||
1149 | return platform_driver_register(&samsung_i2s_driver); | ||
1150 | } | ||
1151 | module_init(samsung_i2s_init); | ||
1152 | |||
1153 | static void __exit samsung_i2s_exit(void) | ||
1154 | { | ||
1155 | platform_driver_unregister(&samsung_i2s_driver); | ||
1156 | } | ||
1157 | module_exit(samsung_i2s_exit); | ||
1158 | 1144 | ||
1159 | /* Module information */ | 1145 | /* Module information */ |
1160 | MODULE_AUTHOR("Jaswinder Singh, <jassi.brar@samsung.com>"); | 1146 | MODULE_AUTHOR("Jaswinder Singh, <jassi.brar@samsung.com>"); |
diff --git a/sound/soc/samsung/idma.c b/sound/soc/samsung/idma.c index c41178efc908..c227c3163cae 100644 --- a/sound/soc/samsung/idma.c +++ b/sound/soc/samsung/idma.c | |||
@@ -387,7 +387,6 @@ static u64 idma_mask = DMA_BIT_MASK(32); | |||
387 | static int idma_new(struct snd_soc_pcm_runtime *rtd) | 387 | static int idma_new(struct snd_soc_pcm_runtime *rtd) |
388 | { | 388 | { |
389 | struct snd_card *card = rtd->card->snd_card; | 389 | struct snd_card *card = rtd->card->snd_card; |
390 | struct snd_soc_dai *dai = rtd->cpu_dai; | ||
391 | struct snd_pcm *pcm = rtd->pcm; | 390 | struct snd_pcm *pcm = rtd->pcm; |
392 | int ret = 0; | 391 | int ret = 0; |
393 | 392 | ||
@@ -396,21 +395,22 @@ static int idma_new(struct snd_soc_pcm_runtime *rtd) | |||
396 | if (!card->dev->coherent_dma_mask) | 395 | if (!card->dev->coherent_dma_mask) |
397 | card->dev->coherent_dma_mask = DMA_BIT_MASK(32); | 396 | card->dev->coherent_dma_mask = DMA_BIT_MASK(32); |
398 | 397 | ||
399 | if (dai->driver->playback.channels_min) | 398 | if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { |
400 | ret = preallocate_idma_buffer(pcm, | 399 | ret = preallocate_idma_buffer(pcm, |
401 | SNDRV_PCM_STREAM_PLAYBACK); | 400 | SNDRV_PCM_STREAM_PLAYBACK); |
401 | } | ||
402 | 402 | ||
403 | return ret; | 403 | return ret; |
404 | } | 404 | } |
405 | 405 | ||
406 | void idma_reg_addr_init(void *regs, dma_addr_t addr) | 406 | void idma_reg_addr_init(void __iomem *regs, dma_addr_t addr) |
407 | { | 407 | { |
408 | spin_lock_init(&idma.lock); | 408 | spin_lock_init(&idma.lock); |
409 | idma.regs = regs; | 409 | idma.regs = regs; |
410 | idma.lp_tx_addr = addr; | 410 | idma.lp_tx_addr = addr; |
411 | } | 411 | } |
412 | 412 | ||
413 | struct snd_soc_platform_driver asoc_idma_platform = { | 413 | static struct snd_soc_platform_driver asoc_idma_platform = { |
414 | .ops = &idma_ops, | 414 | .ops = &idma_ops, |
415 | .pcm_new = idma_new, | 415 | .pcm_new = idma_new, |
416 | .pcm_free = idma_free, | 416 | .pcm_free = idma_free, |
@@ -437,17 +437,7 @@ static struct platform_driver asoc_idma_driver = { | |||
437 | .remove = __devexit_p(asoc_idma_platform_remove), | 437 | .remove = __devexit_p(asoc_idma_platform_remove), |
438 | }; | 438 | }; |
439 | 439 | ||
440 | static int __init asoc_idma_init(void) | 440 | module_platform_driver(asoc_idma_driver); |
441 | { | ||
442 | return platform_driver_register(&asoc_idma_driver); | ||
443 | } | ||
444 | module_init(asoc_idma_init); | ||
445 | |||
446 | static void __exit asoc_idma_exit(void) | ||
447 | { | ||
448 | platform_driver_unregister(&asoc_idma_driver); | ||
449 | } | ||
450 | module_exit(asoc_idma_exit); | ||
451 | 441 | ||
452 | MODULE_AUTHOR("Jaswinder Singh, <jassisinghbrar@gmail.com>"); | 442 | MODULE_AUTHOR("Jaswinder Singh, <jassisinghbrar@gmail.com>"); |
453 | MODULE_DESCRIPTION("Samsung ASoC IDMA Driver"); | 443 | MODULE_DESCRIPTION("Samsung ASoC IDMA Driver"); |
diff --git a/sound/soc/samsung/idma.h b/sound/soc/samsung/idma.h index 48273216166e..8644946973e5 100644 --- a/sound/soc/samsung/idma.h +++ b/sound/soc/samsung/idma.h | |||
@@ -14,7 +14,7 @@ | |||
14 | #ifndef __SND_SOC_SAMSUNG_IDMA_H_ | 14 | #ifndef __SND_SOC_SAMSUNG_IDMA_H_ |
15 | #define __SND_SOC_SAMSUNG_IDMA_H_ | 15 | #define __SND_SOC_SAMSUNG_IDMA_H_ |
16 | 16 | ||
17 | extern void idma_reg_addr_init(void *regs, dma_addr_t addr); | 17 | extern void idma_reg_addr_init(void __iomem *regs, dma_addr_t addr); |
18 | 18 | ||
19 | /* dma_state */ | 19 | /* dma_state */ |
20 | #define LPAM_DMA_STOP 0 | 20 | #define LPAM_DMA_STOP 0 |
diff --git a/sound/soc/samsung/jive_wm8750.c b/sound/soc/samsung/jive_wm8750.c index 1826acf20f7c..1578663a1faa 100644 --- a/sound/soc/samsung/jive_wm8750.c +++ b/sound/soc/samsung/jive_wm8750.c | |||
@@ -101,7 +101,6 @@ static int jive_wm8750_init(struct snd_soc_pcm_runtime *rtd) | |||
101 | { | 101 | { |
102 | struct snd_soc_codec *codec = rtd->codec; | 102 | struct snd_soc_codec *codec = rtd->codec; |
103 | struct snd_soc_dapm_context *dapm = &codec->dapm; | 103 | struct snd_soc_dapm_context *dapm = &codec->dapm; |
104 | int err; | ||
105 | 104 | ||
106 | /* These endpoints are not being used. */ | 105 | /* These endpoints are not being used. */ |
107 | snd_soc_dapm_nc_pin(dapm, "LINPUT2"); | 106 | snd_soc_dapm_nc_pin(dapm, "LINPUT2"); |
@@ -128,10 +127,11 @@ static struct snd_soc_dai_link jive_dai = { | |||
128 | /* jive audio machine driver */ | 127 | /* jive audio machine driver */ |
129 | static struct snd_soc_card snd_soc_machine_jive = { | 128 | static struct snd_soc_card snd_soc_machine_jive = { |
130 | .name = "Jive", | 129 | .name = "Jive", |
130 | .owner = THIS_MODULE, | ||
131 | .dai_link = &jive_dai, | 131 | .dai_link = &jive_dai, |
132 | .num_links = 1, | 132 | .num_links = 1, |
133 | 133 | ||
134 | .dapm_widgtets = wm8750_dapm_widgets, | 134 | .dapm_widgets = wm8750_dapm_widgets, |
135 | .num_dapm_widgets = ARRAY_SIZE(wm8750_dapm_widgets), | 135 | .num_dapm_widgets = ARRAY_SIZE(wm8750_dapm_widgets), |
136 | .dapm_routes = audio_map, | 136 | .dapm_routes = audio_map, |
137 | .num_dapm_routes = ARRAY_SIZE(audio_map), | 137 | .num_dapm_routes = ARRAY_SIZE(audio_map), |
diff --git a/sound/soc/samsung/littlemill.c b/sound/soc/samsung/littlemill.c new file mode 100644 index 000000000000..9dd818bde06f --- /dev/null +++ b/sound/soc/samsung/littlemill.c | |||
@@ -0,0 +1,253 @@ | |||
1 | /* | ||
2 | * Littlemill audio support | ||
3 | * | ||
4 | * Copyright 2011 Wolfson Microelectronics | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | */ | ||
11 | |||
12 | #include <sound/soc.h> | ||
13 | #include <sound/soc-dapm.h> | ||
14 | #include <sound/jack.h> | ||
15 | #include <linux/gpio.h> | ||
16 | #include <linux/module.h> | ||
17 | |||
18 | #include "../codecs/wm8994.h" | ||
19 | |||
20 | static int sample_rate = 44100; | ||
21 | |||
22 | static int littlemill_set_bias_level(struct snd_soc_card *card, | ||
23 | struct snd_soc_dapm_context *dapm, | ||
24 | enum snd_soc_bias_level level) | ||
25 | { | ||
26 | struct snd_soc_dai *codec_dai = card->rtd[0].codec_dai; | ||
27 | int ret; | ||
28 | |||
29 | if (dapm->dev != codec_dai->dev) | ||
30 | return 0; | ||
31 | |||
32 | switch (level) { | ||
33 | case SND_SOC_BIAS_PREPARE: | ||
34 | /* | ||
35 | * If we've not already clocked things via hw_params() | ||
36 | * then do so now, otherwise these are noops. | ||
37 | */ | ||
38 | if (dapm->bias_level == SND_SOC_BIAS_STANDBY) { | ||
39 | ret = snd_soc_dai_set_pll(codec_dai, WM8994_FLL1, | ||
40 | WM8994_FLL_SRC_MCLK2, 32768, | ||
41 | sample_rate * 512); | ||
42 | if (ret < 0) { | ||
43 | pr_err("Failed to start FLL: %d\n", ret); | ||
44 | return ret; | ||
45 | } | ||
46 | |||
47 | ret = snd_soc_dai_set_sysclk(codec_dai, | ||
48 | WM8994_SYSCLK_FLL1, | ||
49 | sample_rate * 512, | ||
50 | SND_SOC_CLOCK_IN); | ||
51 | if (ret < 0) { | ||
52 | pr_err("Failed to set SYSCLK: %d\n", ret); | ||
53 | return ret; | ||
54 | } | ||
55 | } | ||
56 | break; | ||
57 | |||
58 | default: | ||
59 | break; | ||
60 | } | ||
61 | |||
62 | return 0; | ||
63 | } | ||
64 | |||
65 | static int littlemill_set_bias_level_post(struct snd_soc_card *card, | ||
66 | struct snd_soc_dapm_context *dapm, | ||
67 | enum snd_soc_bias_level level) | ||
68 | { | ||
69 | struct snd_soc_dai *codec_dai = card->rtd[0].codec_dai; | ||
70 | int ret; | ||
71 | |||
72 | if (dapm->dev != codec_dai->dev) | ||
73 | return 0; | ||
74 | |||
75 | switch (level) { | ||
76 | case SND_SOC_BIAS_STANDBY: | ||
77 | ret = snd_soc_dai_set_sysclk(codec_dai, WM8994_SYSCLK_MCLK2, | ||
78 | 32768, SND_SOC_CLOCK_IN); | ||
79 | if (ret < 0) { | ||
80 | pr_err("Failed to switch away from FLL: %d\n", ret); | ||
81 | return ret; | ||
82 | } | ||
83 | |||
84 | ret = snd_soc_dai_set_pll(codec_dai, WM8994_FLL1, | ||
85 | 0, 0, 0); | ||
86 | if (ret < 0) { | ||
87 | pr_err("Failed to stop FLL: %d\n", ret); | ||
88 | return ret; | ||
89 | } | ||
90 | break; | ||
91 | |||
92 | default: | ||
93 | break; | ||
94 | } | ||
95 | |||
96 | dapm->bias_level = level; | ||
97 | |||
98 | return 0; | ||
99 | } | ||
100 | |||
101 | static int littlemill_hw_params(struct snd_pcm_substream *substream, | ||
102 | struct snd_pcm_hw_params *params) | ||
103 | { | ||
104 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | ||
105 | struct snd_soc_dai *codec_dai = rtd->codec_dai; | ||
106 | int ret; | ||
107 | |||
108 | sample_rate = params_rate(params); | ||
109 | |||
110 | ret = snd_soc_dai_set_pll(codec_dai, WM8994_FLL1, | ||
111 | WM8994_FLL_SRC_MCLK2, 32768, | ||
112 | sample_rate * 512); | ||
113 | if (ret < 0) { | ||
114 | pr_err("Failed to start FLL: %d\n", ret); | ||
115 | return ret; | ||
116 | } | ||
117 | |||
118 | ret = snd_soc_dai_set_sysclk(codec_dai, | ||
119 | WM8994_SYSCLK_FLL1, | ||
120 | sample_rate * 512, | ||
121 | SND_SOC_CLOCK_IN); | ||
122 | if (ret < 0) { | ||
123 | pr_err("Failed to set SYSCLK: %d\n", ret); | ||
124 | return ret; | ||
125 | } | ||
126 | |||
127 | return 0; | ||
128 | } | ||
129 | |||
130 | static struct snd_soc_ops littlemill_ops = { | ||
131 | .hw_params = littlemill_hw_params, | ||
132 | }; | ||
133 | |||
134 | static struct snd_soc_dai_link littlemill_dai[] = { | ||
135 | { | ||
136 | .name = "CPU", | ||
137 | .stream_name = "CPU", | ||
138 | .cpu_dai_name = "samsung-i2s.0", | ||
139 | .codec_dai_name = "wm8994-aif1", | ||
140 | .platform_name = "samsung-audio", | ||
141 | .codec_name = "wm8994-codec", | ||
142 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | ||
143 | | SND_SOC_DAIFMT_CBM_CFM, | ||
144 | .ops = &littlemill_ops, | ||
145 | }, | ||
146 | }; | ||
147 | |||
148 | static struct snd_soc_dapm_widget widgets[] = { | ||
149 | SND_SOC_DAPM_HP("Headphone", NULL), | ||
150 | |||
151 | SND_SOC_DAPM_MIC("AMIC", NULL), | ||
152 | SND_SOC_DAPM_MIC("DMIC", NULL), | ||
153 | }; | ||
154 | |||
155 | static struct snd_soc_dapm_route audio_paths[] = { | ||
156 | { "Headphone", NULL, "HPOUT1L" }, | ||
157 | { "Headphone", NULL, "HPOUT1R" }, | ||
158 | |||
159 | { "AMIC", NULL, "MICBIAS1" }, /* Default for AMICBIAS jumper */ | ||
160 | { "IN1LN", NULL, "AMIC" }, | ||
161 | |||
162 | { "DMIC", NULL, "MICBIAS2" }, /* Default for DMICBIAS jumper */ | ||
163 | { "DMIC1DAT", NULL, "DMIC" }, | ||
164 | { "DMIC2DAT", NULL, "DMIC" }, | ||
165 | }; | ||
166 | |||
167 | static struct snd_soc_jack littlemill_headset; | ||
168 | |||
169 | static int littlemill_late_probe(struct snd_soc_card *card) | ||
170 | { | ||
171 | struct snd_soc_codec *codec = card->rtd[0].codec; | ||
172 | struct snd_soc_dai *codec_dai = card->rtd[0].codec_dai; | ||
173 | int ret; | ||
174 | |||
175 | ret = snd_soc_dai_set_sysclk(codec_dai, WM8994_SYSCLK_MCLK2, | ||
176 | 32768, SND_SOC_CLOCK_IN); | ||
177 | if (ret < 0) | ||
178 | return ret; | ||
179 | |||
180 | ret = snd_soc_jack_new(codec, "Headset", | ||
181 | SND_JACK_HEADSET | SND_JACK_MECHANICAL | | ||
182 | SND_JACK_BTN_0 | SND_JACK_BTN_1 | | ||
183 | SND_JACK_BTN_2 | SND_JACK_BTN_3 | | ||
184 | SND_JACK_BTN_4 | SND_JACK_BTN_5, | ||
185 | &littlemill_headset); | ||
186 | if (ret) | ||
187 | return ret; | ||
188 | |||
189 | /* This will check device compatibility itself */ | ||
190 | wm8958_mic_detect(codec, &littlemill_headset, NULL, NULL); | ||
191 | |||
192 | return 0; | ||
193 | } | ||
194 | |||
195 | static struct snd_soc_card littlemill = { | ||
196 | .name = "Littlemill", | ||
197 | .owner = THIS_MODULE, | ||
198 | .dai_link = littlemill_dai, | ||
199 | .num_links = ARRAY_SIZE(littlemill_dai), | ||
200 | |||
201 | .set_bias_level = littlemill_set_bias_level, | ||
202 | .set_bias_level_post = littlemill_set_bias_level_post, | ||
203 | |||
204 | .dapm_widgets = widgets, | ||
205 | .num_dapm_widgets = ARRAY_SIZE(widgets), | ||
206 | .dapm_routes = audio_paths, | ||
207 | .num_dapm_routes = ARRAY_SIZE(audio_paths), | ||
208 | |||
209 | .late_probe = littlemill_late_probe, | ||
210 | }; | ||
211 | |||
212 | static __devinit int littlemill_probe(struct platform_device *pdev) | ||
213 | { | ||
214 | struct snd_soc_card *card = &littlemill; | ||
215 | int ret; | ||
216 | |||
217 | card->dev = &pdev->dev; | ||
218 | |||
219 | ret = snd_soc_register_card(card); | ||
220 | if (ret) { | ||
221 | dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", | ||
222 | ret); | ||
223 | return ret; | ||
224 | } | ||
225 | |||
226 | return 0; | ||
227 | } | ||
228 | |||
229 | static int __devexit littlemill_remove(struct platform_device *pdev) | ||
230 | { | ||
231 | struct snd_soc_card *card = platform_get_drvdata(pdev); | ||
232 | |||
233 | snd_soc_unregister_card(card); | ||
234 | |||
235 | return 0; | ||
236 | } | ||
237 | |||
238 | static struct platform_driver littlemill_driver = { | ||
239 | .driver = { | ||
240 | .name = "littlemill", | ||
241 | .owner = THIS_MODULE, | ||
242 | .pm = &snd_soc_pm_ops, | ||
243 | }, | ||
244 | .probe = littlemill_probe, | ||
245 | .remove = __devexit_p(littlemill_remove), | ||
246 | }; | ||
247 | |||
248 | module_platform_driver(littlemill_driver); | ||
249 | |||
250 | MODULE_DESCRIPTION("Littlemill audio support"); | ||
251 | MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>"); | ||
252 | MODULE_LICENSE("GPL"); | ||
253 | MODULE_ALIAS("platform:littlemill"); | ||
diff --git a/sound/soc/samsung/ln2440sbc_alc650.c b/sound/soc/samsung/ln2440sbc_alc650.c index cde38b8e9dc2..69c4a5934a4d 100644 --- a/sound/soc/samsung/ln2440sbc_alc650.c +++ b/sound/soc/samsung/ln2440sbc_alc650.c | |||
@@ -34,6 +34,7 @@ static struct snd_soc_dai_link ln2440sbc_dai[] = { | |||
34 | 34 | ||
35 | static struct snd_soc_card ln2440sbc = { | 35 | static struct snd_soc_card ln2440sbc = { |
36 | .name = "LN2440SBC", | 36 | .name = "LN2440SBC", |
37 | .owner = THIS_MODULE, | ||
37 | .dai_link = ln2440sbc_dai, | 38 | .dai_link = ln2440sbc_dai, |
38 | .num_links = ARRAY_SIZE(ln2440sbc_dai), | 39 | .num_links = ARRAY_SIZE(ln2440sbc_dai), |
39 | }; | 40 | }; |
diff --git a/sound/soc/samsung/lowland.c b/sound/soc/samsung/lowland.c new file mode 100644 index 000000000000..4adff934f771 --- /dev/null +++ b/sound/soc/samsung/lowland.c | |||
@@ -0,0 +1,237 @@ | |||
1 | /* | ||
2 | * Lowland audio support | ||
3 | * | ||
4 | * Copyright 2011 Wolfson Microelectronics | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | */ | ||
11 | |||
12 | #include <sound/soc.h> | ||
13 | #include <sound/soc-dapm.h> | ||
14 | #include <sound/jack.h> | ||
15 | #include <linux/gpio.h> | ||
16 | #include <linux/module.h> | ||
17 | |||
18 | #include "../codecs/wm5100.h" | ||
19 | #include "../codecs/wm9081.h" | ||
20 | |||
21 | #define MCLK1_RATE (44100 * 512) | ||
22 | #define CLKOUT_RATE (44100 * 256) | ||
23 | |||
24 | static int lowland_hw_params(struct snd_pcm_substream *substream, | ||
25 | struct snd_pcm_hw_params *params) | ||
26 | { | ||
27 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | ||
28 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; | ||
29 | struct snd_soc_dai *codec_dai = rtd->codec_dai; | ||
30 | int ret; | ||
31 | |||
32 | ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | ||
33 | | SND_SOC_DAIFMT_NB_NF | ||
34 | | SND_SOC_DAIFMT_CBM_CFM); | ||
35 | if (ret < 0) | ||
36 | return ret; | ||
37 | |||
38 | ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | ||
39 | | SND_SOC_DAIFMT_NB_NF | ||
40 | | SND_SOC_DAIFMT_CBM_CFM); | ||
41 | if (ret < 0) | ||
42 | return ret; | ||
43 | |||
44 | return 0; | ||
45 | } | ||
46 | |||
47 | static struct snd_soc_ops lowland_ops = { | ||
48 | .hw_params = lowland_hw_params, | ||
49 | }; | ||
50 | |||
51 | static struct snd_soc_jack lowland_headset; | ||
52 | |||
53 | /* Headset jack detection DAPM pins */ | ||
54 | static struct snd_soc_jack_pin lowland_headset_pins[] = { | ||
55 | { | ||
56 | .pin = "Headphone", | ||
57 | .mask = SND_JACK_HEADPHONE | SND_JACK_LINEOUT, | ||
58 | }, | ||
59 | { | ||
60 | .pin = "Headset Mic", | ||
61 | .mask = SND_JACK_MICROPHONE, | ||
62 | }, | ||
63 | }; | ||
64 | |||
65 | static int lowland_wm5100_init(struct snd_soc_pcm_runtime *rtd) | ||
66 | { | ||
67 | struct snd_soc_codec *codec = rtd->codec; | ||
68 | int ret; | ||
69 | |||
70 | ret = snd_soc_codec_set_sysclk(codec, WM5100_CLK_SYSCLK, | ||
71 | WM5100_CLKSRC_MCLK1, MCLK1_RATE, | ||
72 | SND_SOC_CLOCK_IN); | ||
73 | if (ret < 0) { | ||
74 | pr_err("Failed to set SYSCLK clock source: %d\n", ret); | ||
75 | return ret; | ||
76 | } | ||
77 | |||
78 | /* Clock OPCLK, used by the other audio components. */ | ||
79 | ret = snd_soc_codec_set_sysclk(codec, WM5100_CLK_OPCLK, 0, | ||
80 | CLKOUT_RATE, 0); | ||
81 | if (ret < 0) { | ||
82 | pr_err("Failed to set OPCLK rate: %d\n", ret); | ||
83 | return ret; | ||
84 | } | ||
85 | |||
86 | ret = snd_soc_jack_new(codec, "Headset", | ||
87 | SND_JACK_LINEOUT | SND_JACK_HEADSET | | ||
88 | SND_JACK_BTN_0, | ||
89 | &lowland_headset); | ||
90 | if (ret) | ||
91 | return ret; | ||
92 | |||
93 | ret = snd_soc_jack_add_pins(&lowland_headset, | ||
94 | ARRAY_SIZE(lowland_headset_pins), | ||
95 | lowland_headset_pins); | ||
96 | if (ret) | ||
97 | return ret; | ||
98 | |||
99 | wm5100_detect(codec, &lowland_headset); | ||
100 | |||
101 | return 0; | ||
102 | } | ||
103 | |||
104 | static struct snd_soc_dai_link lowland_dai[] = { | ||
105 | { | ||
106 | .name = "CPU", | ||
107 | .stream_name = "CPU", | ||
108 | .cpu_dai_name = "samsung-i2s.0", | ||
109 | .codec_dai_name = "wm5100-aif1", | ||
110 | .platform_name = "samsung-audio", | ||
111 | .codec_name = "wm5100.1-001a", | ||
112 | .ops = &lowland_ops, | ||
113 | .init = lowland_wm5100_init, | ||
114 | }, | ||
115 | { | ||
116 | .name = "Baseband", | ||
117 | .stream_name = "Baseband", | ||
118 | .cpu_dai_name = "wm5100-aif2", | ||
119 | .codec_dai_name = "wm1250-ev1", | ||
120 | .codec_name = "wm1250-ev1.1-0027", | ||
121 | .ops = &lowland_ops, | ||
122 | .ignore_suspend = 1, | ||
123 | }, | ||
124 | }; | ||
125 | |||
126 | static int lowland_wm9081_init(struct snd_soc_dapm_context *dapm) | ||
127 | { | ||
128 | snd_soc_dapm_nc_pin(dapm, "LINEOUT"); | ||
129 | |||
130 | /* At any time the WM9081 is active it will have this clock */ | ||
131 | return snd_soc_codec_set_sysclk(dapm->codec, WM9081_SYSCLK_MCLK, 0, | ||
132 | CLKOUT_RATE, 0); | ||
133 | } | ||
134 | |||
135 | static struct snd_soc_aux_dev lowland_aux_dev[] = { | ||
136 | { | ||
137 | .name = "wm9081", | ||
138 | .codec_name = "wm9081.1-006c", | ||
139 | .init = lowland_wm9081_init, | ||
140 | }, | ||
141 | }; | ||
142 | |||
143 | static struct snd_soc_codec_conf lowland_codec_conf[] = { | ||
144 | { | ||
145 | .dev_name = "wm9081.1-006c", | ||
146 | .name_prefix = "Sub", | ||
147 | }, | ||
148 | }; | ||
149 | |||
150 | static const struct snd_kcontrol_new controls[] = { | ||
151 | SOC_DAPM_PIN_SWITCH("Main Speaker"), | ||
152 | SOC_DAPM_PIN_SWITCH("Main DMIC"), | ||
153 | SOC_DAPM_PIN_SWITCH("Main AMIC"), | ||
154 | SOC_DAPM_PIN_SWITCH("WM1250 Input"), | ||
155 | SOC_DAPM_PIN_SWITCH("WM1250 Output"), | ||
156 | SOC_DAPM_PIN_SWITCH("Headphone"), | ||
157 | }; | ||
158 | |||
159 | static struct snd_soc_dapm_widget widgets[] = { | ||
160 | SND_SOC_DAPM_HP("Headphone", NULL), | ||
161 | SND_SOC_DAPM_MIC("Headset Mic", NULL), | ||
162 | |||
163 | SND_SOC_DAPM_SPK("Main Speaker", NULL), | ||
164 | |||
165 | SND_SOC_DAPM_MIC("Main AMIC", NULL), | ||
166 | SND_SOC_DAPM_MIC("Main DMIC", NULL), | ||
167 | }; | ||
168 | |||
169 | static struct snd_soc_dapm_route audio_paths[] = { | ||
170 | { "Sub IN1", NULL, "HPOUT2L" }, | ||
171 | { "Sub IN2", NULL, "HPOUT2R" }, | ||
172 | |||
173 | { "Main Speaker", NULL, "Sub SPKN" }, | ||
174 | { "Main Speaker", NULL, "Sub SPKP" }, | ||
175 | { "Main Speaker", NULL, "SPKDAT1" }, | ||
176 | }; | ||
177 | |||
178 | static struct snd_soc_card lowland = { | ||
179 | .name = "Lowland", | ||
180 | .owner = THIS_MODULE, | ||
181 | .dai_link = lowland_dai, | ||
182 | .num_links = ARRAY_SIZE(lowland_dai), | ||
183 | .aux_dev = lowland_aux_dev, | ||
184 | .num_aux_devs = ARRAY_SIZE(lowland_aux_dev), | ||
185 | .codec_conf = lowland_codec_conf, | ||
186 | .num_configs = ARRAY_SIZE(lowland_codec_conf), | ||
187 | |||
188 | .controls = controls, | ||
189 | .num_controls = ARRAY_SIZE(controls), | ||
190 | .dapm_widgets = widgets, | ||
191 | .num_dapm_widgets = ARRAY_SIZE(widgets), | ||
192 | .dapm_routes = audio_paths, | ||
193 | .num_dapm_routes = ARRAY_SIZE(audio_paths), | ||
194 | }; | ||
195 | |||
196 | static __devinit int lowland_probe(struct platform_device *pdev) | ||
197 | { | ||
198 | struct snd_soc_card *card = &lowland; | ||
199 | int ret; | ||
200 | |||
201 | card->dev = &pdev->dev; | ||
202 | |||
203 | ret = snd_soc_register_card(card); | ||
204 | if (ret) { | ||
205 | dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", | ||
206 | ret); | ||
207 | return ret; | ||
208 | } | ||
209 | |||
210 | return 0; | ||
211 | } | ||
212 | |||
213 | static int __devexit lowland_remove(struct platform_device *pdev) | ||
214 | { | ||
215 | struct snd_soc_card *card = platform_get_drvdata(pdev); | ||
216 | |||
217 | snd_soc_unregister_card(card); | ||
218 | |||
219 | return 0; | ||
220 | } | ||
221 | |||
222 | static struct platform_driver lowland_driver = { | ||
223 | .driver = { | ||
224 | .name = "lowland", | ||
225 | .owner = THIS_MODULE, | ||
226 | .pm = &snd_soc_pm_ops, | ||
227 | }, | ||
228 | .probe = lowland_probe, | ||
229 | .remove = __devexit_p(lowland_remove), | ||
230 | }; | ||
231 | |||
232 | module_platform_driver(lowland_driver); | ||
233 | |||
234 | MODULE_DESCRIPTION("Lowland audio support"); | ||
235 | MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>"); | ||
236 | MODULE_LICENSE("GPL"); | ||
237 | MODULE_ALIAS("platform:lowland"); | ||
diff --git a/sound/soc/samsung/neo1973_wm8753.c b/sound/soc/samsung/neo1973_wm8753.c index 7207189cd211..7ac0ba2025c3 100644 --- a/sound/soc/samsung/neo1973_wm8753.c +++ b/sound/soc/samsung/neo1973_wm8753.c | |||
@@ -465,6 +465,7 @@ static const struct gpio neo1973_gta02_gpios[] = {}; | |||
465 | 465 | ||
466 | static struct snd_soc_card neo1973 = { | 466 | static struct snd_soc_card neo1973 = { |
467 | .name = "neo1973", | 467 | .name = "neo1973", |
468 | .owner = THIS_MODULE, | ||
468 | .dai_link = neo1973_dai, | 469 | .dai_link = neo1973_dai, |
469 | .num_links = ARRAY_SIZE(neo1973_dai), | 470 | .num_links = ARRAY_SIZE(neo1973_dai), |
470 | .aux_dev = neo1973_aux_devs, | 471 | .aux_dev = neo1973_aux_devs, |
diff --git a/sound/soc/samsung/pcm.c b/sound/soc/samsung/pcm.c index 05a47cf7f06e..56780206c000 100644 --- a/sound/soc/samsung/pcm.c +++ b/sound/soc/samsung/pcm.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/clk.h> | 14 | #include <linux/clk.h> |
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/pm_runtime.h> | ||
17 | 18 | ||
18 | #include <sound/soc.h> | 19 | #include <sound/soc.h> |
19 | #include <sound/pcm_params.h> | 20 | #include <sound/pcm_params.h> |
@@ -452,7 +453,7 @@ static int s3c_pcm_set_sysclk(struct snd_soc_dai *cpu_dai, | |||
452 | return 0; | 453 | return 0; |
453 | } | 454 | } |
454 | 455 | ||
455 | static struct snd_soc_dai_ops s3c_pcm_dai_ops = { | 456 | static const struct snd_soc_dai_ops s3c_pcm_dai_ops = { |
456 | .set_sysclk = s3c_pcm_set_sysclk, | 457 | .set_sysclk = s3c_pcm_set_sysclk, |
457 | .set_clkdiv = s3c_pcm_set_clkdiv, | 458 | .set_clkdiv = s3c_pcm_set_clkdiv, |
458 | .trigger = s3c_pcm_trigger, | 459 | .trigger = s3c_pcm_trigger, |
@@ -478,7 +479,7 @@ static struct snd_soc_dai_ops s3c_pcm_dai_ops = { | |||
478 | .formats = SNDRV_PCM_FMTBIT_S16_LE, \ | 479 | .formats = SNDRV_PCM_FMTBIT_S16_LE, \ |
479 | } | 480 | } |
480 | 481 | ||
481 | struct snd_soc_dai_driver s3c_pcm_dai[] = { | 482 | static struct snd_soc_dai_driver s3c_pcm_dai[] = { |
482 | [0] = { | 483 | [0] = { |
483 | .name = "samsung-pcm.0", | 484 | .name = "samsung-pcm.0", |
484 | S3C_PCM_DAI_DECLARE, | 485 | S3C_PCM_DAI_DECLARE, |
@@ -488,7 +489,6 @@ struct snd_soc_dai_driver s3c_pcm_dai[] = { | |||
488 | S3C_PCM_DAI_DECLARE, | 489 | S3C_PCM_DAI_DECLARE, |
489 | }, | 490 | }, |
490 | }; | 491 | }; |
491 | EXPORT_SYMBOL_GPL(s3c_pcm_dai); | ||
492 | 492 | ||
493 | static __devinit int s3c_pcm_dev_probe(struct platform_device *pdev) | 493 | static __devinit int s3c_pcm_dev_probe(struct platform_device *pdev) |
494 | { | 494 | { |
@@ -570,12 +570,6 @@ static __devinit int s3c_pcm_dev_probe(struct platform_device *pdev) | |||
570 | } | 570 | } |
571 | clk_enable(pcm->pclk); | 571 | clk_enable(pcm->pclk); |
572 | 572 | ||
573 | ret = snd_soc_register_dai(&pdev->dev, &s3c_pcm_dai[pdev->id]); | ||
574 | if (ret != 0) { | ||
575 | dev_err(&pdev->dev, "failed to get pcm_clock\n"); | ||
576 | goto err5; | ||
577 | } | ||
578 | |||
579 | s3c_pcm_stereo_in[pdev->id].dma_addr = mem_res->start | 573 | s3c_pcm_stereo_in[pdev->id].dma_addr = mem_res->start |
580 | + S3C_PCM_RXFIFO; | 574 | + S3C_PCM_RXFIFO; |
581 | s3c_pcm_stereo_out[pdev->id].dma_addr = mem_res->start | 575 | s3c_pcm_stereo_out[pdev->id].dma_addr = mem_res->start |
@@ -587,6 +581,14 @@ static __devinit int s3c_pcm_dev_probe(struct platform_device *pdev) | |||
587 | pcm->dma_capture = &s3c_pcm_stereo_in[pdev->id]; | 581 | pcm->dma_capture = &s3c_pcm_stereo_in[pdev->id]; |
588 | pcm->dma_playback = &s3c_pcm_stereo_out[pdev->id]; | 582 | pcm->dma_playback = &s3c_pcm_stereo_out[pdev->id]; |
589 | 583 | ||
584 | pm_runtime_enable(&pdev->dev); | ||
585 | |||
586 | ret = snd_soc_register_dai(&pdev->dev, &s3c_pcm_dai[pdev->id]); | ||
587 | if (ret != 0) { | ||
588 | dev_err(&pdev->dev, "failed to get register DAI: %d\n", ret); | ||
589 | goto err5; | ||
590 | } | ||
591 | |||
590 | return 0; | 592 | return 0; |
591 | 593 | ||
592 | err5: | 594 | err5: |
@@ -610,6 +612,8 @@ static __devexit int s3c_pcm_dev_remove(struct platform_device *pdev) | |||
610 | 612 | ||
611 | snd_soc_unregister_dai(&pdev->dev); | 613 | snd_soc_unregister_dai(&pdev->dev); |
612 | 614 | ||
615 | pm_runtime_disable(&pdev->dev); | ||
616 | |||
613 | iounmap(pcm->regs); | 617 | iounmap(pcm->regs); |
614 | 618 | ||
615 | mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 619 | mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
@@ -632,17 +636,7 @@ static struct platform_driver s3c_pcm_driver = { | |||
632 | }, | 636 | }, |
633 | }; | 637 | }; |
634 | 638 | ||
635 | static int __init s3c_pcm_init(void) | 639 | module_platform_driver(s3c_pcm_driver); |
636 | { | ||
637 | return platform_driver_register(&s3c_pcm_driver); | ||
638 | } | ||
639 | module_init(s3c_pcm_init); | ||
640 | |||
641 | static void __exit s3c_pcm_exit(void) | ||
642 | { | ||
643 | platform_driver_unregister(&s3c_pcm_driver); | ||
644 | } | ||
645 | module_exit(s3c_pcm_exit); | ||
646 | 640 | ||
647 | /* Module information */ | 641 | /* Module information */ |
648 | MODULE_AUTHOR("Jaswinder Singh, <jassi.brar@samsung.com>"); | 642 | MODULE_AUTHOR("Jaswinder Singh, <jassi.brar@samsung.com>"); |
diff --git a/sound/soc/samsung/rx1950_uda1380.c b/sound/soc/samsung/rx1950_uda1380.c index 71b4c029fc35..21e12361a9cd 100644 --- a/sound/soc/samsung/rx1950_uda1380.c +++ b/sound/soc/samsung/rx1950_uda1380.c | |||
@@ -114,6 +114,7 @@ static const struct snd_soc_dapm_route audio_map[] = { | |||
114 | 114 | ||
115 | static struct snd_soc_card rx1950_asoc = { | 115 | static struct snd_soc_card rx1950_asoc = { |
116 | .name = "rx1950", | 116 | .name = "rx1950", |
117 | .owner = THIS_MODULE, | ||
117 | .dai_link = rx1950_uda1380_dai, | 118 | .dai_link = rx1950_uda1380_dai, |
118 | .num_links = ARRAY_SIZE(rx1950_uda1380_dai), | 119 | .num_links = ARRAY_SIZE(rx1950_uda1380_dai), |
119 | 120 | ||
diff --git a/sound/soc/samsung/s3c2412-i2s.c b/sound/soc/samsung/s3c2412-i2s.c index 7bbec25e6e15..72185078ddf8 100644 --- a/sound/soc/samsung/s3c2412-i2s.c +++ b/sound/soc/samsung/s3c2412-i2s.c | |||
@@ -142,7 +142,7 @@ static int s3c2412_i2s_hw_params(struct snd_pcm_substream *substream, | |||
142 | SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \ | 142 | SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \ |
143 | SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000) | 143 | SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000) |
144 | 144 | ||
145 | static struct snd_soc_dai_ops s3c2412_i2s_dai_ops = { | 145 | static const struct snd_soc_dai_ops s3c2412_i2s_dai_ops = { |
146 | .hw_params = s3c2412_i2s_hw_params, | 146 | .hw_params = s3c2412_i2s_hw_params, |
147 | }; | 147 | }; |
148 | 148 | ||
@@ -184,17 +184,7 @@ static struct platform_driver s3c2412_iis_driver = { | |||
184 | }, | 184 | }, |
185 | }; | 185 | }; |
186 | 186 | ||
187 | static int __init s3c2412_i2s_init(void) | 187 | module_platform_driver(s3c2412_iis_driver); |
188 | { | ||
189 | return platform_driver_register(&s3c2412_iis_driver); | ||
190 | } | ||
191 | module_init(s3c2412_i2s_init); | ||
192 | |||
193 | static void __exit s3c2412_i2s_exit(void) | ||
194 | { | ||
195 | platform_driver_unregister(&s3c2412_iis_driver); | ||
196 | } | ||
197 | module_exit(s3c2412_i2s_exit); | ||
198 | 188 | ||
199 | /* Module information */ | 189 | /* Module information */ |
200 | MODULE_AUTHOR("Ben Dooks, <ben@simtec.co.uk>"); | 190 | MODULE_AUTHOR("Ben Dooks, <ben@simtec.co.uk>"); |
diff --git a/sound/soc/samsung/s3c24xx-i2s.c b/sound/soc/samsung/s3c24xx-i2s.c index 558c64bbed2e..c4aa4d412fbf 100644 --- a/sound/soc/samsung/s3c24xx-i2s.c +++ b/sound/soc/samsung/s3c24xx-i2s.c | |||
@@ -444,7 +444,7 @@ static int s3c24xx_i2s_resume(struct snd_soc_dai *cpu_dai) | |||
444 | SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \ | 444 | SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \ |
445 | SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000) | 445 | SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000) |
446 | 446 | ||
447 | static struct snd_soc_dai_ops s3c24xx_i2s_dai_ops = { | 447 | static const struct snd_soc_dai_ops s3c24xx_i2s_dai_ops = { |
448 | .trigger = s3c24xx_i2s_trigger, | 448 | .trigger = s3c24xx_i2s_trigger, |
449 | .hw_params = s3c24xx_i2s_hw_params, | 449 | .hw_params = s3c24xx_i2s_hw_params, |
450 | .set_fmt = s3c24xx_i2s_set_fmt, | 450 | .set_fmt = s3c24xx_i2s_set_fmt, |
@@ -489,17 +489,7 @@ static struct platform_driver s3c24xx_iis_driver = { | |||
489 | }, | 489 | }, |
490 | }; | 490 | }; |
491 | 491 | ||
492 | static int __init s3c24xx_i2s_init(void) | 492 | module_platform_driver(s3c24xx_iis_driver); |
493 | { | ||
494 | return platform_driver_register(&s3c24xx_iis_driver); | ||
495 | } | ||
496 | module_init(s3c24xx_i2s_init); | ||
497 | |||
498 | static void __exit s3c24xx_i2s_exit(void) | ||
499 | { | ||
500 | platform_driver_unregister(&s3c24xx_iis_driver); | ||
501 | } | ||
502 | module_exit(s3c24xx_i2s_exit); | ||
503 | 493 | ||
504 | /* Module information */ | 494 | /* Module information */ |
505 | MODULE_AUTHOR("Ben Dooks, <ben@simtec.co.uk>"); | 495 | MODULE_AUTHOR("Ben Dooks, <ben@simtec.co.uk>"); |
diff --git a/sound/soc/samsung/s3c24xx_simtec_hermes.c b/sound/soc/samsung/s3c24xx_simtec_hermes.c index d125e79baf7f..7ace6a87f41b 100644 --- a/sound/soc/samsung/s3c24xx_simtec_hermes.c +++ b/sound/soc/samsung/s3c24xx_simtec_hermes.c | |||
@@ -89,6 +89,7 @@ static struct snd_soc_dai_link simtec_dai_aic33 = { | |||
89 | /* simtec audio machine driver */ | 89 | /* simtec audio machine driver */ |
90 | static struct snd_soc_card snd_soc_machine_simtec_aic33 = { | 90 | static struct snd_soc_card snd_soc_machine_simtec_aic33 = { |
91 | .name = "Simtec-Hermes", | 91 | .name = "Simtec-Hermes", |
92 | .owner = THIS_MODULE, | ||
92 | .dai_link = &simtec_dai_aic33, | 93 | .dai_link = &simtec_dai_aic33, |
93 | .num_links = 1, | 94 | .num_links = 1, |
94 | 95 | ||
@@ -114,21 +115,9 @@ static struct platform_driver simtec_audio_hermes_platdrv = { | |||
114 | .remove = __devexit_p(simtec_audio_remove), | 115 | .remove = __devexit_p(simtec_audio_remove), |
115 | }; | 116 | }; |
116 | 117 | ||
117 | MODULE_ALIAS("platform:s3c24xx-simtec-hermes-snd"); | 118 | module_platform_driver(simtec_audio_hermes_platdrv); |
118 | |||
119 | static int __init simtec_hermes_modinit(void) | ||
120 | { | ||
121 | return platform_driver_register(&simtec_audio_hermes_platdrv); | ||
122 | } | ||
123 | |||
124 | static void __exit simtec_hermes_modexit(void) | ||
125 | { | ||
126 | platform_driver_unregister(&simtec_audio_hermes_platdrv); | ||
127 | } | ||
128 | |||
129 | module_init(simtec_hermes_modinit); | ||
130 | module_exit(simtec_hermes_modexit); | ||
131 | 119 | ||
120 | MODULE_ALIAS("platform:s3c24xx-simtec-hermes-snd"); | ||
132 | MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>"); | 121 | MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>"); |
133 | MODULE_DESCRIPTION("ALSA SoC Simtec Audio support"); | 122 | MODULE_DESCRIPTION("ALSA SoC Simtec Audio support"); |
134 | MODULE_LICENSE("GPL"); | 123 | MODULE_LICENSE("GPL"); |
diff --git a/sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c b/sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c index 5e4fd46b7200..c42d5f00b0e1 100644 --- a/sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c +++ b/sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c | |||
@@ -78,6 +78,7 @@ static struct snd_soc_dai_link simtec_dai_aic23 = { | |||
78 | /* simtec audio machine driver */ | 78 | /* simtec audio machine driver */ |
79 | static struct snd_soc_card snd_soc_machine_simtec_aic23 = { | 79 | static struct snd_soc_card snd_soc_machine_simtec_aic23 = { |
80 | .name = "Simtec", | 80 | .name = "Simtec", |
81 | .owner = THIS_MODULE, | ||
81 | .dai_link = &simtec_dai_aic23, | 82 | .dai_link = &simtec_dai_aic23, |
82 | .num_links = 1, | 83 | .num_links = 1, |
83 | 84 | ||
@@ -92,7 +93,7 @@ static int __devinit simtec_audio_tlv320aic23_probe(struct platform_device *pd) | |||
92 | return simtec_audio_core_probe(pd, &snd_soc_machine_simtec_aic23); | 93 | return simtec_audio_core_probe(pd, &snd_soc_machine_simtec_aic23); |
93 | } | 94 | } |
94 | 95 | ||
95 | static struct platform_driver simtec_audio_tlv320aic23_platdrv = { | 96 | static struct platform_driver simtec_audio_tlv320aic23_driver = { |
96 | .driver = { | 97 | .driver = { |
97 | .owner = THIS_MODULE, | 98 | .owner = THIS_MODULE, |
98 | .name = "s3c24xx-simtec-tlv320aic23", | 99 | .name = "s3c24xx-simtec-tlv320aic23", |
@@ -102,21 +103,9 @@ static struct platform_driver simtec_audio_tlv320aic23_platdrv = { | |||
102 | .remove = __devexit_p(simtec_audio_remove), | 103 | .remove = __devexit_p(simtec_audio_remove), |
103 | }; | 104 | }; |
104 | 105 | ||
105 | MODULE_ALIAS("platform:s3c24xx-simtec-tlv320aic23"); | 106 | module_platform_driver(simtec_audio_tlv320aic23_driver); |
106 | |||
107 | static int __init simtec_tlv320aic23_modinit(void) | ||
108 | { | ||
109 | return platform_driver_register(&simtec_audio_tlv320aic23_platdrv); | ||
110 | } | ||
111 | |||
112 | static void __exit simtec_tlv320aic23_modexit(void) | ||
113 | { | ||
114 | platform_driver_unregister(&simtec_audio_tlv320aic23_platdrv); | ||
115 | } | ||
116 | |||
117 | module_init(simtec_tlv320aic23_modinit); | ||
118 | module_exit(simtec_tlv320aic23_modexit); | ||
119 | 107 | ||
108 | MODULE_ALIAS("platform:s3c24xx-simtec-tlv320aic23"); | ||
120 | MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>"); | 109 | MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>"); |
121 | MODULE_DESCRIPTION("ALSA SoC Simtec Audio support"); | 110 | MODULE_DESCRIPTION("ALSA SoC Simtec Audio support"); |
122 | MODULE_LICENSE("GPL"); | 111 | MODULE_LICENSE("GPL"); |
diff --git a/sound/soc/samsung/s3c24xx_uda134x.c b/sound/soc/samsung/s3c24xx_uda134x.c index 548c6ac6e7b0..d731042e51b0 100644 --- a/sound/soc/samsung/s3c24xx_uda134x.c +++ b/sound/soc/samsung/s3c24xx_uda134x.c | |||
@@ -229,6 +229,7 @@ static struct snd_soc_dai_link s3c24xx_uda134x_dai_link = { | |||
229 | 229 | ||
230 | static struct snd_soc_card snd_soc_s3c24xx_uda134x = { | 230 | static struct snd_soc_card snd_soc_s3c24xx_uda134x = { |
231 | .name = "S3C24XX_UDA134X", | 231 | .name = "S3C24XX_UDA134X", |
232 | .owner = THIS_MODULE, | ||
232 | .dai_link = &s3c24xx_uda134x_dai_link, | 233 | .dai_link = &s3c24xx_uda134x_dai_link, |
233 | .num_links = 1, | 234 | .num_links = 1, |
234 | }; | 235 | }; |
@@ -343,19 +344,7 @@ static struct platform_driver s3c24xx_uda134x_driver = { | |||
343 | }, | 344 | }, |
344 | }; | 345 | }; |
345 | 346 | ||
346 | static int __init s3c24xx_uda134x_init(void) | 347 | module_platform_driver(s3c24xx_uda134x_driver); |
347 | { | ||
348 | return platform_driver_register(&s3c24xx_uda134x_driver); | ||
349 | } | ||
350 | |||
351 | static void __exit s3c24xx_uda134x_exit(void) | ||
352 | { | ||
353 | platform_driver_unregister(&s3c24xx_uda134x_driver); | ||
354 | } | ||
355 | |||
356 | |||
357 | module_init(s3c24xx_uda134x_init); | ||
358 | module_exit(s3c24xx_uda134x_exit); | ||
359 | 348 | ||
360 | MODULE_AUTHOR("Zoltan Devai, Christian Pellegrin <chripell@evolware.org>"); | 349 | MODULE_AUTHOR("Zoltan Devai, Christian Pellegrin <chripell@evolware.org>"); |
361 | MODULE_DESCRIPTION("S3C24XX_UDA134X ALSA SoC audio driver"); | 350 | MODULE_DESCRIPTION("S3C24XX_UDA134X ALSA SoC audio driver"); |
diff --git a/sound/soc/samsung/smartq_wm8987.c b/sound/soc/samsung/smartq_wm8987.c index a22fc4402802..f2dcb424ea25 100644 --- a/sound/soc/samsung/smartq_wm8987.c +++ b/sound/soc/samsung/smartq_wm8987.c | |||
@@ -198,6 +198,7 @@ static struct snd_soc_dai_link smartq_dai[] = { | |||
198 | 198 | ||
199 | static struct snd_soc_card snd_soc_smartq = { | 199 | static struct snd_soc_card snd_soc_smartq = { |
200 | .name = "SmartQ", | 200 | .name = "SmartQ", |
201 | .owner = THIS_MODULE, | ||
201 | .dai_link = smartq_dai, | 202 | .dai_link = smartq_dai, |
202 | .num_links = ARRAY_SIZE(smartq_dai), | 203 | .num_links = ARRAY_SIZE(smartq_dai), |
203 | 204 | ||
diff --git a/sound/soc/samsung/smdk2443_wm9710.c b/sound/soc/samsung/smdk2443_wm9710.c index 3a0dbfc793f0..720ba29bb7e4 100644 --- a/sound/soc/samsung/smdk2443_wm9710.c +++ b/sound/soc/samsung/smdk2443_wm9710.c | |||
@@ -12,6 +12,7 @@ | |||
12 | * | 12 | * |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/module.h> | ||
15 | #include <sound/soc.h> | 16 | #include <sound/soc.h> |
16 | 17 | ||
17 | static struct snd_soc_card smdk2443; | 18 | static struct snd_soc_card smdk2443; |
@@ -29,6 +30,7 @@ static struct snd_soc_dai_link smdk2443_dai[] = { | |||
29 | 30 | ||
30 | static struct snd_soc_card smdk2443 = { | 31 | static struct snd_soc_card smdk2443 = { |
31 | .name = "SMDK2443", | 32 | .name = "SMDK2443", |
33 | .owner = THIS_MODULE, | ||
32 | .dai_link = smdk2443_dai, | 34 | .dai_link = smdk2443_dai, |
33 | .num_links = ARRAY_SIZE(smdk2443_dai), | 35 | .num_links = ARRAY_SIZE(smdk2443_dai), |
34 | }; | 36 | }; |
diff --git a/sound/soc/samsung/smdk_spdif.c b/sound/soc/samsung/smdk_spdif.c index e0fd8ad23552..beaa9c15d697 100644 --- a/sound/soc/samsung/smdk_spdif.c +++ b/sound/soc/samsung/smdk_spdif.c | |||
@@ -160,6 +160,7 @@ static struct snd_soc_dai_link smdk_dai = { | |||
160 | 160 | ||
161 | static struct snd_soc_card smdk = { | 161 | static struct snd_soc_card smdk = { |
162 | .name = "SMDK-S/PDIF", | 162 | .name = "SMDK-S/PDIF", |
163 | .owner = THIS_MODULE, | ||
163 | .dai_link = &smdk_dai, | 164 | .dai_link = &smdk_dai, |
164 | .num_links = 1, | 165 | .num_links = 1, |
165 | }; | 166 | }; |
diff --git a/sound/soc/samsung/smdk_wm8580.c b/sound/soc/samsung/smdk_wm8580.c index 81b447823992..bff8758e7f20 100644 --- a/sound/soc/samsung/smdk_wm8580.c +++ b/sound/soc/samsung/smdk_wm8580.c | |||
@@ -203,6 +203,7 @@ static struct snd_soc_dai_link smdk_dai[] = { | |||
203 | 203 | ||
204 | static struct snd_soc_card smdk = { | 204 | static struct snd_soc_card smdk = { |
205 | .name = "SMDK-I2S", | 205 | .name = "SMDK-I2S", |
206 | .owner = THIS_MODULE, | ||
206 | .dai_link = smdk_dai, | 207 | .dai_link = smdk_dai, |
207 | .num_links = 2, | 208 | .num_links = 2, |
208 | 209 | ||
diff --git a/sound/soc/samsung/smdk_wm8580pcm.c b/sound/soc/samsung/smdk_wm8580pcm.c index 0677473e6b60..fab5322e9f05 100644 --- a/sound/soc/samsung/smdk_wm8580pcm.c +++ b/sound/soc/samsung/smdk_wm8580pcm.c | |||
@@ -143,6 +143,7 @@ static struct snd_soc_dai_link smdk_dai[] = { | |||
143 | 143 | ||
144 | static struct snd_soc_card smdk_pcm = { | 144 | static struct snd_soc_card smdk_pcm = { |
145 | .name = "SMDK-PCM", | 145 | .name = "SMDK-PCM", |
146 | .owner = THIS_MODULE, | ||
146 | .dai_link = smdk_dai, | 147 | .dai_link = smdk_dai, |
147 | .num_links = 2, | 148 | .num_links = 2, |
148 | }; | 149 | }; |
@@ -188,19 +189,7 @@ static struct platform_driver snd_smdk_driver = { | |||
188 | .remove = __devexit_p(snd_smdk_remove), | 189 | .remove = __devexit_p(snd_smdk_remove), |
189 | }; | 190 | }; |
190 | 191 | ||
191 | static int __init smdk_audio_init(void) | 192 | module_platform_driver(snd_smdk_driver); |
192 | { | ||
193 | return platform_driver_register(&snd_smdk_driver); | ||
194 | } | ||
195 | |||
196 | module_init(smdk_audio_init); | ||
197 | |||
198 | static void __exit smdk_audio_exit(void) | ||
199 | { | ||
200 | platform_driver_unregister(&snd_smdk_driver); | ||
201 | } | ||
202 | |||
203 | module_exit(smdk_audio_exit); | ||
204 | 193 | ||
205 | MODULE_AUTHOR("Sangbeom Kim, <sbkim73@samsung.com>"); | 194 | MODULE_AUTHOR("Sangbeom Kim, <sbkim73@samsung.com>"); |
206 | MODULE_DESCRIPTION("ALSA SoC SMDK WM8580 for PCM"); | 195 | MODULE_DESCRIPTION("ALSA SoC SMDK WM8580 for PCM"); |
diff --git a/sound/soc/samsung/smdk_wm8994.c b/sound/soc/samsung/smdk_wm8994.c index f75e43997d5b..8eb309f23d18 100644 --- a/sound/soc/samsung/smdk_wm8994.c +++ b/sound/soc/samsung/smdk_wm8994.c | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include "../codecs/wm8994.h" | 10 | #include "../codecs/wm8994.h" |
11 | #include <sound/pcm_params.h> | 11 | #include <sound/pcm_params.h> |
12 | #include <linux/module.h> | ||
12 | 13 | ||
13 | /* | 14 | /* |
14 | * Default CFG switch settings to use this driver: | 15 | * Default CFG switch settings to use this driver: |
@@ -143,6 +144,7 @@ static struct snd_soc_dai_link smdk_dai[] = { | |||
143 | 144 | ||
144 | static struct snd_soc_card smdk = { | 145 | static struct snd_soc_card smdk = { |
145 | .name = "SMDK-I2S", | 146 | .name = "SMDK-I2S", |
147 | .owner = THIS_MODULE, | ||
146 | .dai_link = smdk_dai, | 148 | .dai_link = smdk_dai, |
147 | .num_links = ARRAY_SIZE(smdk_dai), | 149 | .num_links = ARRAY_SIZE(smdk_dai), |
148 | }; | 150 | }; |
diff --git a/sound/soc/samsung/smdk_wm8994pcm.c b/sound/soc/samsung/smdk_wm8994pcm.c index da9c2a264d93..77ecba935119 100644 --- a/sound/soc/samsung/smdk_wm8994pcm.c +++ b/sound/soc/samsung/smdk_wm8994pcm.c | |||
@@ -124,6 +124,7 @@ static struct snd_soc_dai_link smdk_dai[] = { | |||
124 | 124 | ||
125 | static struct snd_soc_card smdk_pcm = { | 125 | static struct snd_soc_card smdk_pcm = { |
126 | .name = "SMDK-PCM", | 126 | .name = "SMDK-PCM", |
127 | .owner = THIS_MODULE, | ||
127 | .dai_link = smdk_dai, | 128 | .dai_link = smdk_dai, |
128 | .num_links = 1, | 129 | .num_links = 1, |
129 | }; | 130 | }; |
@@ -158,19 +159,7 @@ static struct platform_driver snd_smdk_driver = { | |||
158 | .remove = __devexit_p(snd_smdk_remove), | 159 | .remove = __devexit_p(snd_smdk_remove), |
159 | }; | 160 | }; |
160 | 161 | ||
161 | static int __init smdk_audio_init(void) | 162 | module_platform_driver(snd_smdk_driver); |
162 | { | ||
163 | return platform_driver_register(&snd_smdk_driver); | ||
164 | } | ||
165 | |||
166 | module_init(smdk_audio_init); | ||
167 | |||
168 | static void __exit smdk_audio_exit(void) | ||
169 | { | ||
170 | platform_driver_unregister(&snd_smdk_driver); | ||
171 | } | ||
172 | |||
173 | module_exit(smdk_audio_exit); | ||
174 | 163 | ||
175 | MODULE_AUTHOR("Sangbeom Kim, <sbkim73@samsung.com>"); | 164 | MODULE_AUTHOR("Sangbeom Kim, <sbkim73@samsung.com>"); |
176 | MODULE_DESCRIPTION("ALSA SoC SMDK WM8994 for PCM"); | 165 | MODULE_DESCRIPTION("ALSA SoC SMDK WM8994 for PCM"); |
diff --git a/sound/soc/samsung/smdk_wm9713.c b/sound/soc/samsung/smdk_wm9713.c index 31c6daf6d4d0..8e26a730fcdc 100644 --- a/sound/soc/samsung/smdk_wm9713.c +++ b/sound/soc/samsung/smdk_wm9713.c | |||
@@ -50,6 +50,7 @@ static struct snd_soc_dai_link smdk_dai = { | |||
50 | 50 | ||
51 | static struct snd_soc_card smdk = { | 51 | static struct snd_soc_card smdk = { |
52 | .name = "SMDK WM9713", | 52 | .name = "SMDK WM9713", |
53 | .owner = THIS_MODULE, | ||
53 | .dai_link = &smdk_dai, | 54 | .dai_link = &smdk_dai, |
54 | .num_links = 1, | 55 | .num_links = 1, |
55 | }; | 56 | }; |
diff --git a/sound/soc/samsung/spdif.c b/sound/soc/samsung/spdif.c index 468cff1bb1af..a5a56a120345 100644 --- a/sound/soc/samsung/spdif.c +++ b/sound/soc/samsung/spdif.c | |||
@@ -334,7 +334,7 @@ static int spdif_resume(struct snd_soc_dai *cpu_dai) | |||
334 | #define spdif_resume NULL | 334 | #define spdif_resume NULL |
335 | #endif | 335 | #endif |
336 | 336 | ||
337 | static struct snd_soc_dai_ops spdif_dai_ops = { | 337 | static const struct snd_soc_dai_ops spdif_dai_ops = { |
338 | .set_sysclk = spdif_set_sysclk, | 338 | .set_sysclk = spdif_set_sysclk, |
339 | .trigger = spdif_trigger, | 339 | .trigger = spdif_trigger, |
340 | .hw_params = spdif_hw_params, | 340 | .hw_params = spdif_hw_params, |
@@ -483,17 +483,7 @@ static struct platform_driver samsung_spdif_driver = { | |||
483 | }, | 483 | }, |
484 | }; | 484 | }; |
485 | 485 | ||
486 | static int __init spdif_init(void) | 486 | module_platform_driver(samsung_spdif_driver); |
487 | { | ||
488 | return platform_driver_register(&samsung_spdif_driver); | ||
489 | } | ||
490 | module_init(spdif_init); | ||
491 | |||
492 | static void __exit spdif_exit(void) | ||
493 | { | ||
494 | platform_driver_unregister(&samsung_spdif_driver); | ||
495 | } | ||
496 | module_exit(spdif_exit); | ||
497 | 487 | ||
498 | MODULE_AUTHOR("Seungwhan Youn, <sw.youn@samsung.com>"); | 488 | MODULE_AUTHOR("Seungwhan Youn, <sw.youn@samsung.com>"); |
499 | MODULE_DESCRIPTION("Samsung S/PDIF Controller Driver"); | 489 | MODULE_DESCRIPTION("Samsung S/PDIF Controller Driver"); |
diff --git a/sound/soc/samsung/speyside.c b/sound/soc/samsung/speyside.c index 85bf541a771d..f9ab7707a3e4 100644 --- a/sound/soc/samsung/speyside.c +++ b/sound/soc/samsung/speyside.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include "../codecs/wm9081.h" | 19 | #include "../codecs/wm9081.h" |
20 | 20 | ||
21 | #define WM8996_HPSEL_GPIO 214 | 21 | #define WM8996_HPSEL_GPIO 214 |
22 | #define MCLK_AUDIO_RATE (512 * 48000) | ||
22 | 23 | ||
23 | static int speyside_set_bias_level(struct snd_soc_card *card, | 24 | static int speyside_set_bias_level(struct snd_soc_card *card, |
24 | struct snd_soc_dapm_context *dapm, | 25 | struct snd_soc_dapm_context *dapm, |
@@ -67,7 +68,7 @@ static int speyside_set_bias_level_post(struct snd_soc_card *card, | |||
67 | if (card->dapm.bias_level == SND_SOC_BIAS_STANDBY) { | 68 | if (card->dapm.bias_level == SND_SOC_BIAS_STANDBY) { |
68 | ret = snd_soc_dai_set_pll(codec_dai, 0, | 69 | ret = snd_soc_dai_set_pll(codec_dai, 0, |
69 | WM8996_FLL_MCLK2, | 70 | WM8996_FLL_MCLK2, |
70 | 32768, 48000 * 256); | 71 | 32768, MCLK_AUDIO_RATE); |
71 | if (ret < 0) { | 72 | if (ret < 0) { |
72 | pr_err("Failed to start FLL\n"); | 73 | pr_err("Failed to start FLL\n"); |
73 | return ret; | 74 | return ret; |
@@ -75,7 +76,7 @@ static int speyside_set_bias_level_post(struct snd_soc_card *card, | |||
75 | 76 | ||
76 | ret = snd_soc_dai_set_sysclk(codec_dai, | 77 | ret = snd_soc_dai_set_sysclk(codec_dai, |
77 | WM8996_SYSCLK_FLL, | 78 | WM8996_SYSCLK_FLL, |
78 | 48000 * 256, | 79 | MCLK_AUDIO_RATE, |
79 | SND_SOC_CLOCK_IN); | 80 | SND_SOC_CLOCK_IN); |
80 | if (ret < 0) | 81 | if (ret < 0) |
81 | return ret; | 82 | return ret; |
@@ -191,7 +192,7 @@ static int speyside_late_probe(struct snd_soc_card *card) | |||
191 | snd_soc_dapm_ignore_suspend(&card->dapm, "Headset Mic"); | 192 | snd_soc_dapm_ignore_suspend(&card->dapm, "Headset Mic"); |
192 | snd_soc_dapm_ignore_suspend(&card->dapm, "Main AMIC"); | 193 | snd_soc_dapm_ignore_suspend(&card->dapm, "Main AMIC"); |
193 | snd_soc_dapm_ignore_suspend(&card->dapm, "Main DMIC"); | 194 | snd_soc_dapm_ignore_suspend(&card->dapm, "Main DMIC"); |
194 | snd_soc_dapm_ignore_suspend(&card->dapm, "Speaker"); | 195 | snd_soc_dapm_ignore_suspend(&card->dapm, "Main Speaker"); |
195 | snd_soc_dapm_ignore_suspend(&card->dapm, "WM1250 Output"); | 196 | snd_soc_dapm_ignore_suspend(&card->dapm, "WM1250 Output"); |
196 | snd_soc_dapm_ignore_suspend(&card->dapm, "WM1250 Input"); | 197 | snd_soc_dapm_ignore_suspend(&card->dapm, "WM1250 Input"); |
197 | 198 | ||
@@ -222,11 +223,9 @@ static struct snd_soc_dai_link speyside_dai[] = { | |||
222 | 223 | ||
223 | static int speyside_wm9081_init(struct snd_soc_dapm_context *dapm) | 224 | static int speyside_wm9081_init(struct snd_soc_dapm_context *dapm) |
224 | { | 225 | { |
225 | snd_soc_dapm_nc_pin(dapm, "LINEOUT"); | ||
226 | |||
227 | /* At any time the WM9081 is active it will have this clock */ | 226 | /* At any time the WM9081 is active it will have this clock */ |
228 | return snd_soc_codec_set_sysclk(dapm->codec, WM9081_SYSCLK_MCLK, 0, | 227 | return snd_soc_codec_set_sysclk(dapm->codec, WM9081_SYSCLK_MCLK, 0, |
229 | 48000 * 256, 0); | 228 | MCLK_AUDIO_RATE, 0); |
230 | } | 229 | } |
231 | 230 | ||
232 | static struct snd_soc_aux_dev speyside_aux_dev[] = { | 231 | static struct snd_soc_aux_dev speyside_aux_dev[] = { |
@@ -292,6 +291,7 @@ static struct snd_soc_dapm_route audio_paths[] = { | |||
292 | 291 | ||
293 | static struct snd_soc_card speyside = { | 292 | static struct snd_soc_card speyside = { |
294 | .name = "Speyside", | 293 | .name = "Speyside", |
294 | .owner = THIS_MODULE, | ||
295 | .dai_link = speyside_dai, | 295 | .dai_link = speyside_dai, |
296 | .num_links = ARRAY_SIZE(speyside_dai), | 296 | .num_links = ARRAY_SIZE(speyside_dai), |
297 | .aux_dev = speyside_aux_dev, | 297 | .aux_dev = speyside_aux_dev, |
@@ -308,6 +308,7 @@ static struct snd_soc_card speyside = { | |||
308 | .num_dapm_widgets = ARRAY_SIZE(widgets), | 308 | .num_dapm_widgets = ARRAY_SIZE(widgets), |
309 | .dapm_routes = audio_paths, | 309 | .dapm_routes = audio_paths, |
310 | .num_dapm_routes = ARRAY_SIZE(audio_paths), | 310 | .num_dapm_routes = ARRAY_SIZE(audio_paths), |
311 | .fully_routed = true, | ||
311 | 312 | ||
312 | .late_probe = speyside_late_probe, | 313 | .late_probe = speyside_late_probe, |
313 | }; | 314 | }; |
@@ -348,17 +349,7 @@ static struct platform_driver speyside_driver = { | |||
348 | .remove = __devexit_p(speyside_remove), | 349 | .remove = __devexit_p(speyside_remove), |
349 | }; | 350 | }; |
350 | 351 | ||
351 | static int __init speyside_audio_init(void) | 352 | module_platform_driver(speyside_driver); |
352 | { | ||
353 | return platform_driver_register(&speyside_driver); | ||
354 | } | ||
355 | module_init(speyside_audio_init); | ||
356 | |||
357 | static void __exit speyside_audio_exit(void) | ||
358 | { | ||
359 | platform_driver_unregister(&speyside_driver); | ||
360 | } | ||
361 | module_exit(speyside_audio_exit); | ||
362 | 353 | ||
363 | MODULE_DESCRIPTION("Speyside audio support"); | 354 | MODULE_DESCRIPTION("Speyside audio support"); |
364 | MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>"); | 355 | MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>"); |
diff --git a/sound/soc/samsung/speyside_wm8962.c b/sound/soc/samsung/tobermory.c index e3e27166cc50..9199649bf786 100644 --- a/sound/soc/samsung/speyside_wm8962.c +++ b/sound/soc/samsung/tobermory.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Speyside with WM8962 audio support | 2 | * Tobermory audio support |
3 | * | 3 | * |
4 | * Copyright 2011 Wolfson Microelectronics | 4 | * Copyright 2011 Wolfson Microelectronics |
5 | * | 5 | * |
@@ -19,7 +19,7 @@ | |||
19 | 19 | ||
20 | static int sample_rate = 44100; | 20 | static int sample_rate = 44100; |
21 | 21 | ||
22 | static int speyside_wm8962_set_bias_level(struct snd_soc_card *card, | 22 | static int tobermory_set_bias_level(struct snd_soc_card *card, |
23 | struct snd_soc_dapm_context *dapm, | 23 | struct snd_soc_dapm_context *dapm, |
24 | enum snd_soc_bias_level level) | 24 | enum snd_soc_bias_level level) |
25 | { | 25 | { |
@@ -56,7 +56,7 @@ static int speyside_wm8962_set_bias_level(struct snd_soc_card *card, | |||
56 | return 0; | 56 | return 0; |
57 | } | 57 | } |
58 | 58 | ||
59 | static int speyside_wm8962_set_bias_level_post(struct snd_soc_card *card, | 59 | static int tobermory_set_bias_level_post(struct snd_soc_card *card, |
60 | struct snd_soc_dapm_context *dapm, | 60 | struct snd_soc_dapm_context *dapm, |
61 | enum snd_soc_bias_level level) | 61 | enum snd_soc_bias_level level) |
62 | { | 62 | { |
@@ -92,7 +92,7 @@ static int speyside_wm8962_set_bias_level_post(struct snd_soc_card *card, | |||
92 | return 0; | 92 | return 0; |
93 | } | 93 | } |
94 | 94 | ||
95 | static int speyside_wm8962_hw_params(struct snd_pcm_substream *substream, | 95 | static int tobermory_hw_params(struct snd_pcm_substream *substream, |
96 | struct snd_pcm_hw_params *params) | 96 | struct snd_pcm_hw_params *params) |
97 | { | 97 | { |
98 | sample_rate = params_rate(params); | 98 | sample_rate = params_rate(params); |
@@ -100,11 +100,11 @@ static int speyside_wm8962_hw_params(struct snd_pcm_substream *substream, | |||
100 | return 0; | 100 | return 0; |
101 | } | 101 | } |
102 | 102 | ||
103 | static struct snd_soc_ops speyside_wm8962_ops = { | 103 | static struct snd_soc_ops tobermory_ops = { |
104 | .hw_params = speyside_wm8962_hw_params, | 104 | .hw_params = tobermory_hw_params, |
105 | }; | 105 | }; |
106 | 106 | ||
107 | static struct snd_soc_dai_link speyside_wm8962_dai[] = { | 107 | static struct snd_soc_dai_link tobermory_dai[] = { |
108 | { | 108 | { |
109 | .name = "CPU", | 109 | .name = "CPU", |
110 | .stream_name = "CPU", | 110 | .stream_name = "CPU", |
@@ -114,7 +114,7 @@ static struct snd_soc_dai_link speyside_wm8962_dai[] = { | |||
114 | .codec_name = "wm8962.1-001a", | 114 | .codec_name = "wm8962.1-001a", |
115 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | 115 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
116 | | SND_SOC_DAIFMT_CBM_CFM, | 116 | | SND_SOC_DAIFMT_CBM_CFM, |
117 | .ops = &speyside_wm8962_ops, | 117 | .ops = &tobermory_ops, |
118 | }, | 118 | }, |
119 | }; | 119 | }; |
120 | 120 | ||
@@ -152,10 +152,10 @@ static struct snd_soc_dapm_route audio_paths[] = { | |||
152 | { "DMICDAT", NULL, "DMIC" }, | 152 | { "DMICDAT", NULL, "DMIC" }, |
153 | }; | 153 | }; |
154 | 154 | ||
155 | static struct snd_soc_jack speyside_wm8962_headset; | 155 | static struct snd_soc_jack tobermory_headset; |
156 | 156 | ||
157 | /* Headset jack detection DAPM pins */ | 157 | /* Headset jack detection DAPM pins */ |
158 | static struct snd_soc_jack_pin speyside_wm8962_headset_pins[] = { | 158 | static struct snd_soc_jack_pin tobermory_headset_pins[] = { |
159 | { | 159 | { |
160 | .pin = "Headset Mic", | 160 | .pin = "Headset Mic", |
161 | .mask = SND_JACK_MICROPHONE, | 161 | .mask = SND_JACK_MICROPHONE, |
@@ -166,7 +166,7 @@ static struct snd_soc_jack_pin speyside_wm8962_headset_pins[] = { | |||
166 | }, | 166 | }, |
167 | }; | 167 | }; |
168 | 168 | ||
169 | static int speyside_wm8962_late_probe(struct snd_soc_card *card) | 169 | static int tobermory_late_probe(struct snd_soc_card *card) |
170 | { | 170 | { |
171 | struct snd_soc_codec *codec = card->rtd[0].codec; | 171 | struct snd_soc_codec *codec = card->rtd[0].codec; |
172 | struct snd_soc_dai *codec_dai = card->rtd[0].codec_dai; | 172 | struct snd_soc_dai *codec_dai = card->rtd[0].codec_dai; |
@@ -179,28 +179,29 @@ static int speyside_wm8962_late_probe(struct snd_soc_card *card) | |||
179 | 179 | ||
180 | ret = snd_soc_jack_new(codec, "Headset", | 180 | ret = snd_soc_jack_new(codec, "Headset", |
181 | SND_JACK_HEADSET | SND_JACK_BTN_0, | 181 | SND_JACK_HEADSET | SND_JACK_BTN_0, |
182 | &speyside_wm8962_headset); | 182 | &tobermory_headset); |
183 | if (ret) | 183 | if (ret) |
184 | return ret; | 184 | return ret; |
185 | 185 | ||
186 | ret = snd_soc_jack_add_pins(&speyside_wm8962_headset, | 186 | ret = snd_soc_jack_add_pins(&tobermory_headset, |
187 | ARRAY_SIZE(speyside_wm8962_headset_pins), | 187 | ARRAY_SIZE(tobermory_headset_pins), |
188 | speyside_wm8962_headset_pins); | 188 | tobermory_headset_pins); |
189 | if (ret) | 189 | if (ret) |
190 | return ret; | 190 | return ret; |
191 | 191 | ||
192 | wm8962_mic_detect(codec, &speyside_wm8962_headset); | 192 | wm8962_mic_detect(codec, &tobermory_headset); |
193 | 193 | ||
194 | return 0; | 194 | return 0; |
195 | } | 195 | } |
196 | 196 | ||
197 | static struct snd_soc_card speyside_wm8962 = { | 197 | static struct snd_soc_card tobermory = { |
198 | .name = "Speyside WM8962", | 198 | .name = "Tobermory", |
199 | .dai_link = speyside_wm8962_dai, | 199 | .owner = THIS_MODULE, |
200 | .num_links = ARRAY_SIZE(speyside_wm8962_dai), | 200 | .dai_link = tobermory_dai, |
201 | .num_links = ARRAY_SIZE(tobermory_dai), | ||
201 | 202 | ||
202 | .set_bias_level = speyside_wm8962_set_bias_level, | 203 | .set_bias_level = tobermory_set_bias_level, |
203 | .set_bias_level_post = speyside_wm8962_set_bias_level_post, | 204 | .set_bias_level_post = tobermory_set_bias_level_post, |
204 | 205 | ||
205 | .controls = controls, | 206 | .controls = controls, |
206 | .num_controls = ARRAY_SIZE(controls), | 207 | .num_controls = ARRAY_SIZE(controls), |
@@ -208,13 +209,14 @@ static struct snd_soc_card speyside_wm8962 = { | |||
208 | .num_dapm_widgets = ARRAY_SIZE(widgets), | 209 | .num_dapm_widgets = ARRAY_SIZE(widgets), |
209 | .dapm_routes = audio_paths, | 210 | .dapm_routes = audio_paths, |
210 | .num_dapm_routes = ARRAY_SIZE(audio_paths), | 211 | .num_dapm_routes = ARRAY_SIZE(audio_paths), |
212 | .fully_routed = true, | ||
211 | 213 | ||
212 | .late_probe = speyside_wm8962_late_probe, | 214 | .late_probe = tobermory_late_probe, |
213 | }; | 215 | }; |
214 | 216 | ||
215 | static __devinit int speyside_wm8962_probe(struct platform_device *pdev) | 217 | static __devinit int tobermory_probe(struct platform_device *pdev) |
216 | { | 218 | { |
217 | struct snd_soc_card *card = &speyside_wm8962; | 219 | struct snd_soc_card *card = &tobermory; |
218 | int ret; | 220 | int ret; |
219 | 221 | ||
220 | card->dev = &pdev->dev; | 222 | card->dev = &pdev->dev; |
@@ -229,7 +231,7 @@ static __devinit int speyside_wm8962_probe(struct platform_device *pdev) | |||
229 | return 0; | 231 | return 0; |
230 | } | 232 | } |
231 | 233 | ||
232 | static int __devexit speyside_wm8962_remove(struct platform_device *pdev) | 234 | static int __devexit tobermory_remove(struct platform_device *pdev) |
233 | { | 235 | { |
234 | struct snd_soc_card *card = platform_get_drvdata(pdev); | 236 | struct snd_soc_card *card = platform_get_drvdata(pdev); |
235 | 237 | ||
@@ -238,29 +240,19 @@ static int __devexit speyside_wm8962_remove(struct platform_device *pdev) | |||
238 | return 0; | 240 | return 0; |
239 | } | 241 | } |
240 | 242 | ||
241 | static struct platform_driver speyside_wm8962_driver = { | 243 | static struct platform_driver tobermory_driver = { |
242 | .driver = { | 244 | .driver = { |
243 | .name = "speyside-wm8962", | 245 | .name = "tobermory", |
244 | .owner = THIS_MODULE, | 246 | .owner = THIS_MODULE, |
245 | .pm = &snd_soc_pm_ops, | 247 | .pm = &snd_soc_pm_ops, |
246 | }, | 248 | }, |
247 | .probe = speyside_wm8962_probe, | 249 | .probe = tobermory_probe, |
248 | .remove = __devexit_p(speyside_wm8962_remove), | 250 | .remove = __devexit_p(tobermory_remove), |
249 | }; | 251 | }; |
250 | 252 | ||
251 | static int __init speyside_wm8962_audio_init(void) | 253 | module_platform_driver(tobermory_driver); |
252 | { | ||
253 | return platform_driver_register(&speyside_wm8962_driver); | ||
254 | } | ||
255 | module_init(speyside_wm8962_audio_init); | ||
256 | |||
257 | static void __exit speyside_wm8962_audio_exit(void) | ||
258 | { | ||
259 | platform_driver_unregister(&speyside_wm8962_driver); | ||
260 | } | ||
261 | module_exit(speyside_wm8962_audio_exit); | ||
262 | 254 | ||
263 | MODULE_DESCRIPTION("Speyside WM8962 audio support"); | 255 | MODULE_DESCRIPTION("Tobermory audio support"); |
264 | MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>"); | 256 | MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>"); |
265 | MODULE_LICENSE("GPL"); | 257 | MODULE_LICENSE("GPL"); |
266 | MODULE_ALIAS("platform:speyside-wm8962"); | 258 | MODULE_ALIAS("platform:tobermory"); |