aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2013-02-19 14:54:15 -0500
committerArnd Bergmann <arnd@arndb.de>2013-02-19 14:54:25 -0500
commit6e7f7cfce26cabea2965a43b69b4a0c285a7e4c5 (patch)
treedb7c3d908e8b308c7c559ed4bd561c7ff86da753 /sound/soc
parent001c5c4aaaffda840184700b8f488ced3c9dd0a1 (diff)
parent64ff1673332a1109780d731ca08dcd4f8ad33097 (diff)
Merge tag 'omap-for-v3.9/usb-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc
These changes contain the OMAP USB related platform data changes that were dropped from linux next because of the merge conflicts as requested by me and Olof. The reason was that at this point we really should be able to do the arch/arm related changes separately from driver changes to avoid dependencies between branches. These patches were initially part of the USB related MFD patches. Based on our comments, Roger Quadros quickly reworked these patches into a shared branch between ARM SoC tree and the MFD tree, then separate patches for the OMAP platform data and MFD driver. Note that this branch will conflict with c1d1cd597fc7 ("ARM: OMAP2+: omap_device: remove obsolete pm_lats and early_device code"). Please see http://lkml.org/lkml/2013/2/11/16 for the merge resolution. [arnd - resolved the merge conflict] Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/fsl/Kconfig9
-rw-r--r--sound/soc/fsl/Makefile5
-rw-r--r--sound/soc/fsl/imx-pcm-dma.c21
-rw-r--r--sound/soc/fsl/imx-pcm-fiq.c22
-rw-r--r--sound/soc/fsl/imx-pcm.c35
-rw-r--r--sound/soc/fsl/imx-pcm.h18
6 files changed, 63 insertions, 47 deletions
diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig
index a210c8d7b4bc..3b98159d9645 100644
--- a/sound/soc/fsl/Kconfig
+++ b/sound/soc/fsl/Kconfig
@@ -108,13 +108,18 @@ if SND_IMX_SOC
108config SND_SOC_IMX_SSI 108config SND_SOC_IMX_SSI
109 tristate 109 tristate
110 110
111config SND_SOC_IMX_PCM_FIQ 111config SND_SOC_IMX_PCM
112 tristate 112 tristate
113
114config SND_SOC_IMX_PCM_FIQ
115 bool
113 select FIQ 116 select FIQ
117 select SND_SOC_IMX_PCM
114 118
115config SND_SOC_IMX_PCM_DMA 119config SND_SOC_IMX_PCM_DMA
116 tristate 120 bool
117 select SND_SOC_DMAENGINE_PCM 121 select SND_SOC_DMAENGINE_PCM
122 select SND_SOC_IMX_PCM
118 123
119config SND_SOC_IMX_AUDMUX 124config SND_SOC_IMX_AUDMUX
120 tristate 125 tristate
diff --git a/sound/soc/fsl/Makefile b/sound/soc/fsl/Makefile
index ec1457915d7c..afd34794db53 100644
--- a/sound/soc/fsl/Makefile
+++ b/sound/soc/fsl/Makefile
@@ -41,10 +41,7 @@ endif
41obj-$(CONFIG_SND_SOC_IMX_SSI) += snd-soc-imx-ssi.o 41obj-$(CONFIG_SND_SOC_IMX_SSI) += snd-soc-imx-ssi.o
42obj-$(CONFIG_SND_SOC_IMX_AUDMUX) += snd-soc-imx-audmux.o 42obj-$(CONFIG_SND_SOC_IMX_AUDMUX) += snd-soc-imx-audmux.o
43 43
44obj-$(CONFIG_SND_SOC_IMX_PCM_FIQ) += snd-soc-imx-pcm-fiq.o 44obj-$(CONFIG_SND_SOC_IMX_PCM) += snd-soc-imx-pcm.o
45snd-soc-imx-pcm-fiq-y := imx-pcm-fiq.o imx-pcm.o
46obj-$(CONFIG_SND_SOC_IMX_PCM_DMA) += snd-soc-imx-pcm-dma.o
47snd-soc-imx-pcm-dma-y := imx-pcm-dma.o imx-pcm.o
48 45
49# i.MX Machine Support 46# i.MX Machine Support
50snd-soc-eukrea-tlv320-objs := eukrea-tlv320.o 47snd-soc-eukrea-tlv320-objs := eukrea-tlv320.o
diff --git a/sound/soc/fsl/imx-pcm-dma.c b/sound/soc/fsl/imx-pcm-dma.c
index bf363d8d044a..500f8ce55d78 100644
--- a/sound/soc/fsl/imx-pcm-dma.c
+++ b/sound/soc/fsl/imx-pcm-dma.c
@@ -154,26 +154,7 @@ static struct snd_soc_platform_driver imx_soc_platform_mx2 = {
154 .pcm_free = imx_pcm_free, 154 .pcm_free = imx_pcm_free,
155}; 155};
156 156
157static int imx_soc_platform_probe(struct platform_device *pdev) 157int imx_pcm_dma_init(struct platform_device *pdev)
158{ 158{
159 return snd_soc_register_platform(&pdev->dev, &imx_soc_platform_mx2); 159 return snd_soc_register_platform(&pdev->dev, &imx_soc_platform_mx2);
160} 160}
161
162static int imx_soc_platform_remove(struct platform_device *pdev)
163{
164 snd_soc_unregister_platform(&pdev->dev);
165 return 0;
166}
167
168static struct platform_driver imx_pcm_driver = {
169 .driver = {
170 .name = "imx-pcm-audio",
171 .owner = THIS_MODULE,
172 },
173 .probe = imx_soc_platform_probe,
174 .remove = imx_soc_platform_remove,
175};
176
177module_platform_driver(imx_pcm_driver);
178MODULE_LICENSE("GPL");
179MODULE_ALIAS("platform:imx-pcm-audio");
diff --git a/sound/soc/fsl/imx-pcm-fiq.c b/sound/soc/fsl/imx-pcm-fiq.c
index 5ec362ae4d01..920f945cb2f4 100644
--- a/sound/soc/fsl/imx-pcm-fiq.c
+++ b/sound/soc/fsl/imx-pcm-fiq.c
@@ -281,7 +281,7 @@ static struct snd_soc_platform_driver imx_soc_platform_fiq = {
281 .pcm_free = imx_pcm_fiq_free, 281 .pcm_free = imx_pcm_fiq_free,
282}; 282};
283 283
284static int imx_soc_platform_probe(struct platform_device *pdev) 284int imx_pcm_fiq_init(struct platform_device *pdev)
285{ 285{
286 struct imx_ssi *ssi = platform_get_drvdata(pdev); 286 struct imx_ssi *ssi = platform_get_drvdata(pdev);
287 int ret; 287 int ret;
@@ -314,23 +314,3 @@ failed_register:
314 314
315 return ret; 315 return ret;
316} 316}
317
318static int imx_soc_platform_remove(struct platform_device *pdev)
319{
320 snd_soc_unregister_platform(&pdev->dev);
321 return 0;
322}
323
324static struct platform_driver imx_pcm_driver = {
325 .driver = {
326 .name = "imx-fiq-pcm-audio",
327 .owner = THIS_MODULE,
328 },
329
330 .probe = imx_soc_platform_probe,
331 .remove = imx_soc_platform_remove,
332};
333
334module_platform_driver(imx_pcm_driver);
335
336MODULE_LICENSE("GPL");
diff --git a/sound/soc/fsl/imx-pcm.c b/sound/soc/fsl/imx-pcm.c
index 0c9f188ddc68..0d0625bfcb65 100644
--- a/sound/soc/fsl/imx-pcm.c
+++ b/sound/soc/fsl/imx-pcm.c
@@ -31,6 +31,7 @@ int snd_imx_pcm_mmap(struct snd_pcm_substream *substream,
31 runtime->dma_bytes); 31 runtime->dma_bytes);
32 return ret; 32 return ret;
33} 33}
34EXPORT_SYMBOL_GPL(snd_imx_pcm_mmap);
34 35
35static int imx_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream) 36static int imx_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream)
36{ 37{
@@ -79,6 +80,7 @@ int imx_pcm_new(struct snd_soc_pcm_runtime *rtd)
79out: 80out:
80 return ret; 81 return ret;
81} 82}
83EXPORT_SYMBOL_GPL(imx_pcm_new);
82 84
83void imx_pcm_free(struct snd_pcm *pcm) 85void imx_pcm_free(struct snd_pcm *pcm)
84{ 86{
@@ -100,6 +102,39 @@ void imx_pcm_free(struct snd_pcm *pcm)
100 buf->area = NULL; 102 buf->area = NULL;
101 } 103 }
102} 104}
105EXPORT_SYMBOL_GPL(imx_pcm_free);
106
107static int imx_pcm_probe(struct platform_device *pdev)
108{
109 if (strcmp(pdev->id_entry->name, "imx-fiq-pcm-audio") == 0)
110 return imx_pcm_fiq_init(pdev);
111
112 return imx_pcm_dma_init(pdev);
113}
114
115static int imx_pcm_remove(struct platform_device *pdev)
116{
117 snd_soc_unregister_platform(&pdev->dev);
118 return 0;
119}
120
121static struct platform_device_id imx_pcm_devtype[] = {
122 { .name = "imx-pcm-audio", },
123 { .name = "imx-fiq-pcm-audio", },
124 { /* sentinel */ }
125};
126MODULE_DEVICE_TABLE(platform, imx_pcm_devtype);
127
128static struct platform_driver imx_pcm_driver = {
129 .driver = {
130 .name = "imx-pcm",
131 .owner = THIS_MODULE,
132 },
133 .id_table = imx_pcm_devtype,
134 .probe = imx_pcm_probe,
135 .remove = imx_pcm_remove,
136};
137module_platform_driver(imx_pcm_driver);
103 138
104MODULE_DESCRIPTION("Freescale i.MX PCM driver"); 139MODULE_DESCRIPTION("Freescale i.MX PCM driver");
105MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de>"); 140MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de>");
diff --git a/sound/soc/fsl/imx-pcm.h b/sound/soc/fsl/imx-pcm.h
index 83c0ed7d55c9..5ae13a13a353 100644
--- a/sound/soc/fsl/imx-pcm.h
+++ b/sound/soc/fsl/imx-pcm.h
@@ -30,4 +30,22 @@ int snd_imx_pcm_mmap(struct snd_pcm_substream *substream,
30int imx_pcm_new(struct snd_soc_pcm_runtime *rtd); 30int imx_pcm_new(struct snd_soc_pcm_runtime *rtd);
31void imx_pcm_free(struct snd_pcm *pcm); 31void imx_pcm_free(struct snd_pcm *pcm);
32 32
33#ifdef CONFIG_SND_SOC_IMX_PCM_DMA
34int imx_pcm_dma_init(struct platform_device *pdev);
35#else
36static inline int imx_pcm_dma_init(struct platform_device *pdev)
37{
38 return -ENODEV;
39}
40#endif
41
42#ifdef CONFIG_SND_SOC_IMX_PCM_FIQ
43int imx_pcm_fiq_init(struct platform_device *pdev);
44#else
45static inline int imx_pcm_fiq_init(struct platform_device *pdev)
46{
47 return -ENODEV;
48}
49#endif
50
33#endif /* _IMX_PCM_H */ 51#endif /* _IMX_PCM_H */