diff options
Diffstat (limited to 'sound/soc/davinci')
-rw-r--r-- | sound/soc/davinci/davinci-evm.c | 15 | ||||
-rw-r--r-- | sound/soc/davinci/davinci-i2s.c | 10 | ||||
-rw-r--r-- | sound/soc/davinci/davinci-mcasp.c | 10 | ||||
-rw-r--r-- | sound/soc/davinci/davinci-pcm.c | 23 | ||||
-rw-r--r-- | sound/soc/davinci/davinci-pcm.h | 3 | ||||
-rw-r--r-- | sound/soc/davinci/davinci-sffsdr.c | 2 | ||||
-rw-r--r-- | sound/soc/davinci/davinci-vcif.c | 8 |
7 files changed, 46 insertions, 25 deletions
diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c index c80c20a89b11..4b37e2ac4685 100644 --- a/sound/soc/davinci/davinci-evm.c +++ b/sound/soc/davinci/davinci-evm.c | |||
@@ -159,7 +159,7 @@ static struct snd_soc_dai_link dm6446_evm_dai = { | |||
159 | .cpu_dai_name = "davinci-mcbsp", | 159 | .cpu_dai_name = "davinci-mcbsp", |
160 | .codec_dai_name = "tlv320aic3x-hifi", | 160 | .codec_dai_name = "tlv320aic3x-hifi", |
161 | .codec_name = "tlv320aic3x-codec.1-001b", | 161 | .codec_name = "tlv320aic3x-codec.1-001b", |
162 | .platform_name = "davinci-pcm-audio", | 162 | .platform_name = "davinci-mcbsp", |
163 | .init = evm_aic3x_init, | 163 | .init = evm_aic3x_init, |
164 | .ops = &evm_ops, | 164 | .ops = &evm_ops, |
165 | }; | 165 | }; |
@@ -170,7 +170,7 @@ static struct snd_soc_dai_link dm355_evm_dai = { | |||
170 | .cpu_dai_name = "davinci-mcbsp.1", | 170 | .cpu_dai_name = "davinci-mcbsp.1", |
171 | .codec_dai_name = "tlv320aic3x-hifi", | 171 | .codec_dai_name = "tlv320aic3x-hifi", |
172 | .codec_name = "tlv320aic3x-codec.1-001b", | 172 | .codec_name = "tlv320aic3x-codec.1-001b", |
173 | .platform_name = "davinci-pcm-audio", | 173 | .platform_name = "davinci-mcbsp.1", |
174 | .init = evm_aic3x_init, | 174 | .init = evm_aic3x_init, |
175 | .ops = &evm_ops, | 175 | .ops = &evm_ops, |
176 | }; | 176 | }; |
@@ -184,14 +184,15 @@ static struct snd_soc_dai_link dm365_evm_dai = { | |||
184 | .init = evm_aic3x_init, | 184 | .init = evm_aic3x_init, |
185 | .codec_name = "tlv320aic3x-codec.1-0018", | 185 | .codec_name = "tlv320aic3x-codec.1-0018", |
186 | .ops = &evm_ops, | 186 | .ops = &evm_ops, |
187 | .platform_name = "davinci-mcbsp", | ||
187 | #elif defined(CONFIG_SND_DM365_VOICE_CODEC) | 188 | #elif defined(CONFIG_SND_DM365_VOICE_CODEC) |
188 | .name = "Voice Codec - CQ93VC", | 189 | .name = "Voice Codec - CQ93VC", |
189 | .stream_name = "CQ93", | 190 | .stream_name = "CQ93", |
190 | .cpu_dai_name = "davinci-vcif", | 191 | .cpu_dai_name = "davinci-vcif", |
191 | .codec_dai_name = "cq93vc-hifi", | 192 | .codec_dai_name = "cq93vc-hifi", |
192 | .codec_name = "cq93vc-codec", | 193 | .codec_name = "cq93vc-codec", |
194 | .platform_name = "avinci-vcif", | ||
193 | #endif | 195 | #endif |
194 | .platform_name = "davinci-pcm-audio", | ||
195 | }; | 196 | }; |
196 | 197 | ||
197 | static struct snd_soc_dai_link dm6467_evm_dai[] = { | 198 | static struct snd_soc_dai_link dm6467_evm_dai[] = { |
@@ -200,7 +201,7 @@ static struct snd_soc_dai_link dm6467_evm_dai[] = { | |||
200 | .stream_name = "AIC3X", | 201 | .stream_name = "AIC3X", |
201 | .cpu_dai_name= "davinci-mcasp.0", | 202 | .cpu_dai_name= "davinci-mcasp.0", |
202 | .codec_dai_name = "tlv320aic3x-hifi", | 203 | .codec_dai_name = "tlv320aic3x-hifi", |
203 | .platform_name ="davinci-pcm-audio", | 204 | .platform_name = "davinci-mcasp.0", |
204 | .codec_name = "tlv320aic3x-codec.0-001a", | 205 | .codec_name = "tlv320aic3x-codec.0-001a", |
205 | .init = evm_aic3x_init, | 206 | .init = evm_aic3x_init, |
206 | .ops = &evm_ops, | 207 | .ops = &evm_ops, |
@@ -211,7 +212,7 @@ static struct snd_soc_dai_link dm6467_evm_dai[] = { | |||
211 | .cpu_dai_name= "davinci-mcasp.1", | 212 | .cpu_dai_name= "davinci-mcasp.1", |
212 | .codec_dai_name = "dit-hifi", | 213 | .codec_dai_name = "dit-hifi", |
213 | .codec_name = "spdif_dit", | 214 | .codec_name = "spdif_dit", |
214 | .platform_name = "davinci-pcm-audio", | 215 | .platform_name = "davinci-mcasp.1", |
215 | .ops = &evm_spdif_ops, | 216 | .ops = &evm_spdif_ops, |
216 | }, | 217 | }, |
217 | }; | 218 | }; |
@@ -222,7 +223,7 @@ static struct snd_soc_dai_link da830_evm_dai = { | |||
222 | .cpu_dai_name = "davinci-mcasp.1", | 223 | .cpu_dai_name = "davinci-mcasp.1", |
223 | .codec_dai_name = "tlv320aic3x-hifi", | 224 | .codec_dai_name = "tlv320aic3x-hifi", |
224 | .codec_name = "tlv320aic3x-codec.1-0018", | 225 | .codec_name = "tlv320aic3x-codec.1-0018", |
225 | .platform_name = "davinci-pcm-audio", | 226 | .platform_name = "davinci-mcasp.1", |
226 | .init = evm_aic3x_init, | 227 | .init = evm_aic3x_init, |
227 | .ops = &evm_ops, | 228 | .ops = &evm_ops, |
228 | }; | 229 | }; |
@@ -233,7 +234,7 @@ static struct snd_soc_dai_link da850_evm_dai = { | |||
233 | .cpu_dai_name= "davinci-mcasp.0", | 234 | .cpu_dai_name= "davinci-mcasp.0", |
234 | .codec_dai_name = "tlv320aic3x-hifi", | 235 | .codec_dai_name = "tlv320aic3x-hifi", |
235 | .codec_name = "tlv320aic3x-codec.1-0018", | 236 | .codec_name = "tlv320aic3x-codec.1-0018", |
236 | .platform_name = "davinci-pcm-audio", | 237 | .platform_name = "davinci-mcasp.0", |
237 | .init = evm_aic3x_init, | 238 | .init = evm_aic3x_init, |
238 | .ops = &evm_ops, | 239 | .ops = &evm_ops, |
239 | }; | 240 | }; |
diff --git a/sound/soc/davinci/davinci-i2s.c b/sound/soc/davinci/davinci-i2s.c index 0a74b9587a2c..407df7233d6d 100644 --- a/sound/soc/davinci/davinci-i2s.c +++ b/sound/soc/davinci/davinci-i2s.c | |||
@@ -732,8 +732,16 @@ static int davinci_i2s_probe(struct platform_device *pdev) | |||
732 | if (ret != 0) | 732 | if (ret != 0) |
733 | goto err_release_clk; | 733 | goto err_release_clk; |
734 | 734 | ||
735 | ret = davinci_soc_platform_register(&pdev->dev); | ||
736 | if (ret) { | ||
737 | dev_err(&pdev->dev, "register PCM failed: %d\n", ret); | ||
738 | goto err_unregister_dai; | ||
739 | } | ||
740 | |||
735 | return 0; | 741 | return 0; |
736 | 742 | ||
743 | err_unregister_dai: | ||
744 | snd_soc_unregister_dai(&pdev->dev); | ||
737 | err_release_clk: | 745 | err_release_clk: |
738 | clk_disable(dev->clk); | 746 | clk_disable(dev->clk); |
739 | clk_put(dev->clk); | 747 | clk_put(dev->clk); |
@@ -745,6 +753,8 @@ static int davinci_i2s_remove(struct platform_device *pdev) | |||
745 | struct davinci_mcbsp_dev *dev = dev_get_drvdata(&pdev->dev); | 753 | struct davinci_mcbsp_dev *dev = dev_get_drvdata(&pdev->dev); |
746 | 754 | ||
747 | snd_soc_unregister_dai(&pdev->dev); | 755 | snd_soc_unregister_dai(&pdev->dev); |
756 | davinci_soc_platform_unregister(&pdev->dev); | ||
757 | |||
748 | clk_disable(dev->clk); | 758 | clk_disable(dev->clk); |
749 | clk_put(dev->clk); | 759 | clk_put(dev->clk); |
750 | dev->clk = NULL; | 760 | dev->clk = NULL; |
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c index d919fb8de7a3..8f3c5a4cf537 100644 --- a/sound/soc/davinci/davinci-mcasp.c +++ b/sound/soc/davinci/davinci-mcasp.c | |||
@@ -945,8 +945,17 @@ static int davinci_mcasp_probe(struct platform_device *pdev) | |||
945 | 945 | ||
946 | if (ret != 0) | 946 | if (ret != 0) |
947 | goto err_release_clk; | 947 | goto err_release_clk; |
948 | |||
949 | ret = davinci_soc_platform_register(&pdev->dev); | ||
950 | if (ret) { | ||
951 | dev_err(&pdev->dev, "register PCM failed: %d\n", ret); | ||
952 | goto err_unregister_dai; | ||
953 | } | ||
954 | |||
948 | return 0; | 955 | return 0; |
949 | 956 | ||
957 | err_unregister_dai: | ||
958 | snd_soc_unregister_dai(&pdev->dev); | ||
950 | err_release_clk: | 959 | err_release_clk: |
951 | pm_runtime_put_sync(&pdev->dev); | 960 | pm_runtime_put_sync(&pdev->dev); |
952 | pm_runtime_disable(&pdev->dev); | 961 | pm_runtime_disable(&pdev->dev); |
@@ -957,6 +966,7 @@ static int davinci_mcasp_remove(struct platform_device *pdev) | |||
957 | { | 966 | { |
958 | 967 | ||
959 | snd_soc_unregister_dai(&pdev->dev); | 968 | snd_soc_unregister_dai(&pdev->dev); |
969 | davinci_soc_platform_unregister(&pdev->dev); | ||
960 | 970 | ||
961 | pm_runtime_put_sync(&pdev->dev); | 971 | pm_runtime_put_sync(&pdev->dev); |
962 | pm_runtime_disable(&pdev->dev); | 972 | pm_runtime_disable(&pdev->dev); |
diff --git a/sound/soc/davinci/davinci-pcm.c b/sound/soc/davinci/davinci-pcm.c index 97d77b298968..4b70828beedb 100644 --- a/sound/soc/davinci/davinci-pcm.c +++ b/sound/soc/davinci/davinci-pcm.c | |||
@@ -864,28 +864,17 @@ static struct snd_soc_platform_driver davinci_soc_platform = { | |||
864 | .pcm_free = davinci_pcm_free, | 864 | .pcm_free = davinci_pcm_free, |
865 | }; | 865 | }; |
866 | 866 | ||
867 | static int __devinit davinci_soc_platform_probe(struct platform_device *pdev) | 867 | int davinci_soc_platform_register(struct device *dev) |
868 | { | 868 | { |
869 | return snd_soc_register_platform(&pdev->dev, &davinci_soc_platform); | 869 | return snd_soc_register_platform(dev, &davinci_soc_platform); |
870 | } | 870 | } |
871 | EXPORT_SYMBOL_GPL(davinci_soc_platform_register); | ||
871 | 872 | ||
872 | static int __devexit davinci_soc_platform_remove(struct platform_device *pdev) | 873 | void davinci_soc_platform_unregister(struct device *dev) |
873 | { | 874 | { |
874 | snd_soc_unregister_platform(&pdev->dev); | 875 | snd_soc_unregister_platform(dev); |
875 | return 0; | ||
876 | } | 876 | } |
877 | 877 | EXPORT_SYMBOL_GPL(davinci_soc_platform_unregister); | |
878 | static struct platform_driver davinci_pcm_driver = { | ||
879 | .driver = { | ||
880 | .name = "davinci-pcm-audio", | ||
881 | .owner = THIS_MODULE, | ||
882 | }, | ||
883 | |||
884 | .probe = davinci_soc_platform_probe, | ||
885 | .remove = __devexit_p(davinci_soc_platform_remove), | ||
886 | }; | ||
887 | |||
888 | module_platform_driver(davinci_pcm_driver); | ||
889 | 878 | ||
890 | MODULE_AUTHOR("Vladimir Barinov"); | 879 | MODULE_AUTHOR("Vladimir Barinov"); |
891 | MODULE_DESCRIPTION("TI DAVINCI PCM DMA module"); | 880 | MODULE_DESCRIPTION("TI DAVINCI PCM DMA module"); |
diff --git a/sound/soc/davinci/davinci-pcm.h b/sound/soc/davinci/davinci-pcm.h index c0d6c9be4b4d..5e5516460461 100644 --- a/sound/soc/davinci/davinci-pcm.h +++ b/sound/soc/davinci/davinci-pcm.h | |||
@@ -28,4 +28,7 @@ struct davinci_pcm_dma_params { | |||
28 | unsigned int fifo_level; | 28 | unsigned int fifo_level; |
29 | }; | 29 | }; |
30 | 30 | ||
31 | int davinci_soc_platform_register(struct device *dev); | ||
32 | void davinci_soc_platform_unregister(struct device *dev); | ||
33 | |||
31 | #endif | 34 | #endif |
diff --git a/sound/soc/davinci/davinci-sffsdr.c b/sound/soc/davinci/davinci-sffsdr.c index f71175b29e38..5be65aae7e0e 100644 --- a/sound/soc/davinci/davinci-sffsdr.c +++ b/sound/soc/davinci/davinci-sffsdr.c | |||
@@ -86,7 +86,7 @@ static struct snd_soc_dai_link sffsdr_dai = { | |||
86 | .cpu_dai_name = "davinci-mcbsp", | 86 | .cpu_dai_name = "davinci-mcbsp", |
87 | .codec_dai_name = "pcm3008-hifi", | 87 | .codec_dai_name = "pcm3008-hifi", |
88 | .codec_name = "pcm3008-codec", | 88 | .codec_name = "pcm3008-codec", |
89 | .platform_name = "davinci-pcm-audio", | 89 | .platform_name = "davinci-mcbsp", |
90 | .ops = &sffsdr_ops, | 90 | .ops = &sffsdr_ops, |
91 | }; | 91 | }; |
92 | 92 | ||
diff --git a/sound/soc/davinci/davinci-vcif.c b/sound/soc/davinci/davinci-vcif.c index da030ff883d5..07bde2e6f84e 100644 --- a/sound/soc/davinci/davinci-vcif.c +++ b/sound/soc/davinci/davinci-vcif.c | |||
@@ -240,12 +240,20 @@ static int davinci_vcif_probe(struct platform_device *pdev) | |||
240 | return ret; | 240 | return ret; |
241 | } | 241 | } |
242 | 242 | ||
243 | ret = davinci_soc_platform_register(&pdev->dev); | ||
244 | if (ret) { | ||
245 | dev_err(&pdev->dev, "register PCM failed: %d\n", ret); | ||
246 | snd_soc_unregister_dai(&pdev->dev); | ||
247 | return ret; | ||
248 | } | ||
249 | |||
243 | return 0; | 250 | return 0; |
244 | } | 251 | } |
245 | 252 | ||
246 | static int davinci_vcif_remove(struct platform_device *pdev) | 253 | static int davinci_vcif_remove(struct platform_device *pdev) |
247 | { | 254 | { |
248 | snd_soc_unregister_dai(&pdev->dev); | 255 | snd_soc_unregister_dai(&pdev->dev); |
256 | davinci_soc_platform_unregister(&pdev->dev); | ||
249 | 257 | ||
250 | return 0; | 258 | return 0; |
251 | } | 259 | } |