aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/mxs
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/mxs')
-rw-r--r--sound/soc/mxs/mxs-pcm.c14
-rw-r--r--sound/soc/mxs/mxs-pcm.h1
-rw-r--r--sound/soc/mxs/mxs-saif.c18
3 files changed, 6 insertions, 27 deletions
diff --git a/sound/soc/mxs/mxs-pcm.c b/sound/soc/mxs/mxs-pcm.c
index b16abbbf7764..a371b4f91c53 100644
--- a/sound/soc/mxs/mxs-pcm.c
+++ b/sound/soc/mxs/mxs-pcm.c
@@ -36,11 +36,6 @@ static const struct snd_pcm_hardware snd_mxs_hardware = {
36 SNDRV_PCM_INFO_RESUME | 36 SNDRV_PCM_INFO_RESUME |
37 SNDRV_PCM_INFO_INTERLEAVED | 37 SNDRV_PCM_INFO_INTERLEAVED |
38 SNDRV_PCM_INFO_HALF_DUPLEX, 38 SNDRV_PCM_INFO_HALF_DUPLEX,
39 .formats = SNDRV_PCM_FMTBIT_S16_LE |
40 SNDRV_PCM_FMTBIT_S20_3LE |
41 SNDRV_PCM_FMTBIT_S24_LE,
42 .channels_min = 2,
43 .channels_max = 2,
44 .period_bytes_min = 32, 39 .period_bytes_min = 32,
45 .period_bytes_max = 8192, 40 .period_bytes_max = 8192,
46 .periods_min = 1, 41 .periods_min = 1,
@@ -56,16 +51,9 @@ static const struct snd_dmaengine_pcm_config mxs_dmaengine_pcm_config = {
56 51
57int mxs_pcm_platform_register(struct device *dev) 52int mxs_pcm_platform_register(struct device *dev)
58{ 53{
59 return snd_dmaengine_pcm_register(dev, &mxs_dmaengine_pcm_config, 54 return devm_snd_dmaengine_pcm_register(dev, &mxs_dmaengine_pcm_config,
60 SND_DMAENGINE_PCM_FLAG_NO_RESIDUE |
61 SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX); 55 SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX);
62} 56}
63EXPORT_SYMBOL_GPL(mxs_pcm_platform_register); 57EXPORT_SYMBOL_GPL(mxs_pcm_platform_register);
64 58
65void mxs_pcm_platform_unregister(struct device *dev)
66{
67 snd_dmaengine_pcm_unregister(dev);
68}
69EXPORT_SYMBOL_GPL(mxs_pcm_platform_unregister);
70
71MODULE_LICENSE("GPL"); 59MODULE_LICENSE("GPL");
diff --git a/sound/soc/mxs/mxs-pcm.h b/sound/soc/mxs/mxs-pcm.h
index bc685b67cac7..035ea0436ca5 100644
--- a/sound/soc/mxs/mxs-pcm.h
+++ b/sound/soc/mxs/mxs-pcm.h
@@ -20,6 +20,5 @@
20#define _MXS_PCM_H 20#define _MXS_PCM_H
21 21
22int mxs_pcm_platform_register(struct device *dev); 22int mxs_pcm_platform_register(struct device *dev);
23void mxs_pcm_platform_unregister(struct device *dev);
24 23
25#endif 24#endif
diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
index 54e622acac33..231d7e7b0711 100644
--- a/sound/soc/mxs/mxs-saif.c
+++ b/sound/soc/mxs/mxs-saif.c
@@ -50,9 +50,9 @@ static struct mxs_saif *mxs_saif[2];
50 * This also means that both SAIFs must operate at the same sample rate. 50 * This also means that both SAIFs must operate at the same sample rate.
51 * 51 *
52 * We abstract this as each saif has a master, the master could be 52 * We abstract this as each saif has a master, the master could be
53 * himself or other saifs. In the generic saif driver, saif does not need 53 * itself or other saifs. In the generic saif driver, saif does not need
54 * to know the different clkmux. Saif only needs to know who is his master 54 * to know the different clkmux. Saif only needs to know who is its master
55 * and operating his master to generate the proper clock rate for him. 55 * and operating its master to generate the proper clock rate for it.
56 * The master id is provided in mach-specific layer according to different 56 * The master id is provided in mach-specific layer according to different
57 * clkmux setting. 57 * clkmux setting.
58 */ 58 */
@@ -76,7 +76,7 @@ static int mxs_saif_set_dai_sysclk(struct snd_soc_dai *cpu_dai,
76 * Since SAIF may work on EXTMASTER mode, IOW, it's working BITCLK&LRCLK 76 * Since SAIF may work on EXTMASTER mode, IOW, it's working BITCLK&LRCLK
77 * is provided by other SAIF, we provide a interface here to get its master 77 * is provided by other SAIF, we provide a interface here to get its master
78 * from its master_id. 78 * from its master_id.
79 * Note that the master could be himself. 79 * Note that the master could be itself.
80 */ 80 */
81static inline struct mxs_saif *mxs_saif_get_master(struct mxs_saif * saif) 81static inline struct mxs_saif *mxs_saif_get_master(struct mxs_saif * saif)
82{ 82{
@@ -516,7 +516,7 @@ static int mxs_saif_trigger(struct snd_pcm_substream *substream, int cmd,
516 } 516 }
517 517
518 /* 518 /*
519 * If the saif's master is not himself, we also need to enable 519 * If the saif's master is not itself, we also need to enable
520 * itself clk for its internal basic logic to work. 520 * itself clk for its internal basic logic to work.
521 */ 521 */
522 if (saif != master_saif) { 522 if (saif != master_saif) {
@@ -804,13 +804,6 @@ static int mxs_saif_probe(struct platform_device *pdev)
804 return 0; 804 return 0;
805} 805}
806 806
807static int mxs_saif_remove(struct platform_device *pdev)
808{
809 mxs_pcm_platform_unregister(&pdev->dev);
810
811 return 0;
812}
813
814static const struct of_device_id mxs_saif_dt_ids[] = { 807static const struct of_device_id mxs_saif_dt_ids[] = {
815 { .compatible = "fsl,imx28-saif", }, 808 { .compatible = "fsl,imx28-saif", },
816 { /* sentinel */ } 809 { /* sentinel */ }
@@ -819,7 +812,6 @@ MODULE_DEVICE_TABLE(of, mxs_saif_dt_ids);
819 812
820static struct platform_driver mxs_saif_driver = { 813static struct platform_driver mxs_saif_driver = {
821 .probe = mxs_saif_probe, 814 .probe = mxs_saif_probe,
822 .remove = mxs_saif_remove,
823 815
824 .driver = { 816 .driver = {
825 .name = "mxs-saif", 817 .name = "mxs-saif",