diff options
Diffstat (limited to 'sound/soc/s3c24xx/s3c64xx-i2s.c')
-rw-r--r-- | sound/soc/s3c24xx/s3c64xx-i2s.c | 43 |
1 files changed, 3 insertions, 40 deletions
diff --git a/sound/soc/s3c24xx/s3c64xx-i2s.c b/sound/soc/s3c24xx/s3c64xx-i2s.c index 6d49bd93717b..1d85cb85a7d2 100644 --- a/sound/soc/s3c24xx/s3c64xx-i2s.c +++ b/sound/soc/s3c24xx/s3c64xx-i2s.c | |||
@@ -54,43 +54,6 @@ static inline struct s3c_i2sv2_info *to_info(struct snd_soc_dai *cpu_dai) | |||
54 | return cpu_dai->private_data; | 54 | return cpu_dai->private_data; |
55 | } | 55 | } |
56 | 56 | ||
57 | static int s3c64xx_i2s_set_sysclk(struct snd_soc_dai *cpu_dai, | ||
58 | int clk_id, unsigned int freq, int dir) | ||
59 | { | ||
60 | struct s3c_i2sv2_info *i2s = to_info(cpu_dai); | ||
61 | u32 iismod = readl(i2s->regs + S3C2412_IISMOD); | ||
62 | |||
63 | switch (clk_id) { | ||
64 | case S3C64XX_CLKSRC_PCLK: | ||
65 | iismod &= ~S3C2412_IISMOD_IMS_SYSMUX; | ||
66 | break; | ||
67 | |||
68 | case S3C64XX_CLKSRC_MUX: | ||
69 | iismod |= S3C2412_IISMOD_IMS_SYSMUX; | ||
70 | break; | ||
71 | |||
72 | case S3C64XX_CLKSRC_CDCLK: | ||
73 | switch (dir) { | ||
74 | case SND_SOC_CLOCK_IN: | ||
75 | iismod |= S3C64XX_IISMOD_CDCLKCON; | ||
76 | break; | ||
77 | case SND_SOC_CLOCK_OUT: | ||
78 | iismod &= ~S3C64XX_IISMOD_CDCLKCON; | ||
79 | break; | ||
80 | default: | ||
81 | return -EINVAL; | ||
82 | } | ||
83 | break; | ||
84 | |||
85 | default: | ||
86 | return -EINVAL; | ||
87 | } | ||
88 | |||
89 | writel(iismod, i2s->regs + S3C2412_IISMOD); | ||
90 | |||
91 | return 0; | ||
92 | } | ||
93 | |||
94 | static int s3c64xx_i2s_probe(struct platform_device *pdev, | 57 | static int s3c64xx_i2s_probe(struct platform_device *pdev, |
95 | struct snd_soc_dai *dai) | 58 | struct snd_soc_dai *dai) |
96 | { | 59 | { |
@@ -115,9 +78,7 @@ static int s3c64xx_i2s_probe(struct platform_device *pdev, | |||
115 | } | 78 | } |
116 | 79 | ||
117 | 80 | ||
118 | static struct snd_soc_dai_ops s3c64xx_i2s_dai_ops = { | 81 | static struct snd_soc_dai_ops s3c64xx_i2s_dai_ops; |
119 | .set_sysclk = s3c64xx_i2s_set_sysclk, | ||
120 | }; | ||
121 | 82 | ||
122 | static __devinit int s3c64xx_iis_dev_probe(struct platform_device *pdev) | 83 | static __devinit int s3c64xx_iis_dev_probe(struct platform_device *pdev) |
123 | { | 84 | { |
@@ -147,6 +108,8 @@ static __devinit int s3c64xx_iis_dev_probe(struct platform_device *pdev) | |||
147 | dai->probe = s3c64xx_i2s_probe; | 108 | dai->probe = s3c64xx_i2s_probe; |
148 | dai->ops = &s3c64xx_i2s_dai_ops; | 109 | dai->ops = &s3c64xx_i2s_dai_ops; |
149 | 110 | ||
111 | i2s->feature |= S3C_FEATURE_CDCLKCON; | ||
112 | |||
150 | i2s->dma_capture = &s3c64xx_i2s_pcm_stereo_in[pdev->id]; | 113 | i2s->dma_capture = &s3c64xx_i2s_pcm_stereo_in[pdev->id]; |
151 | i2s->dma_playback = &s3c64xx_i2s_pcm_stereo_out[pdev->id]; | 114 | i2s->dma_playback = &s3c64xx_i2s_pcm_stereo_out[pdev->id]; |
152 | 115 | ||