diff options
Diffstat (limited to 'sound/soc/s3c24xx')
-rw-r--r-- | sound/soc/s3c24xx/Kconfig | 1 | ||||
-rw-r--r-- | sound/soc/s3c24xx/rx1950_uda1380.c | 20 | ||||
-rw-r--r-- | sound/soc/s3c24xx/smdk_spdif.c | 4 |
3 files changed, 6 insertions, 19 deletions
diff --git a/sound/soc/s3c24xx/Kconfig b/sound/soc/s3c24xx/Kconfig index 8a6b53ccd203..d85bf8a0abb2 100644 --- a/sound/soc/s3c24xx/Kconfig +++ b/sound/soc/s3c24xx/Kconfig | |||
@@ -2,6 +2,7 @@ config SND_S3C24XX_SOC | |||
2 | tristate "SoC Audio for the Samsung S3CXXXX chips" | 2 | tristate "SoC Audio for the Samsung S3CXXXX chips" |
3 | depends on ARCH_S3C2410 || ARCH_S3C64XX || ARCH_S5PC100 || ARCH_S5PV210 | 3 | depends on ARCH_S3C2410 || ARCH_S3C64XX || ARCH_S5PC100 || ARCH_S5PV210 |
4 | select S3C64XX_DMA if ARCH_S3C64XX | 4 | select S3C64XX_DMA if ARCH_S3C64XX |
5 | select S3C2410_DMA if ARCH_S3C2410 | ||
5 | help | 6 | help |
6 | Say Y or M if you want to add support for codecs attached to | 7 | Say Y or M if you want to add support for codecs attached to |
7 | the S3C24XX AC97 or I2S interfaces. You will also need to | 8 | the S3C24XX AC97 or I2S interfaces. You will also need to |
diff --git a/sound/soc/s3c24xx/rx1950_uda1380.c b/sound/soc/s3c24xx/rx1950_uda1380.c index ffd5cf2fb0a9..468cc11fdf47 100644 --- a/sound/soc/s3c24xx/rx1950_uda1380.c +++ b/sound/soc/s3c24xx/rx1950_uda1380.c | |||
@@ -50,7 +50,6 @@ static unsigned int rates[] = { | |||
50 | 16000, | 50 | 16000, |
51 | 44100, | 51 | 44100, |
52 | 48000, | 52 | 48000, |
53 | 88200, | ||
54 | }; | 53 | }; |
55 | 54 | ||
56 | static struct snd_pcm_hw_constraint_list hw_rates = { | 55 | static struct snd_pcm_hw_constraint_list hw_rates = { |
@@ -130,7 +129,6 @@ static const struct snd_soc_dapm_route audio_map[] = { | |||
130 | }; | 129 | }; |
131 | 130 | ||
132 | static struct platform_device *s3c24xx_snd_device; | 131 | static struct platform_device *s3c24xx_snd_device; |
133 | static struct clk *xtal; | ||
134 | 132 | ||
135 | static int rx1950_startup(struct snd_pcm_substream *substream) | 133 | static int rx1950_startup(struct snd_pcm_substream *substream) |
136 | { | 134 | { |
@@ -179,10 +177,8 @@ static int rx1950_hw_params(struct snd_pcm_substream *substream, | |||
179 | case 44100: | 177 | case 44100: |
180 | case 88200: | 178 | case 88200: |
181 | clk_source = S3C24XX_CLKSRC_MPLL; | 179 | clk_source = S3C24XX_CLKSRC_MPLL; |
182 | fs_mode = S3C2410_IISMOD_256FS; | 180 | fs_mode = S3C2410_IISMOD_384FS; |
183 | div = clk_get_rate(xtal) / (256 * rate); | 181 | div = 1; |
184 | if (clk_get_rate(xtal) % (256 * rate) > (128 * rate)) | ||
185 | div++; | ||
186 | break; | 182 | break; |
187 | default: | 183 | default: |
188 | printk(KERN_ERR "%s: rate %d is not supported\n", | 184 | printk(KERN_ERR "%s: rate %d is not supported\n", |
@@ -210,7 +206,7 @@ static int rx1950_hw_params(struct snd_pcm_substream *substream, | |||
210 | 206 | ||
211 | /* set MCLK division for sample rate */ | 207 | /* set MCLK division for sample rate */ |
212 | ret = snd_soc_dai_set_clkdiv(cpu_dai, S3C24XX_DIV_MCLK, | 208 | ret = snd_soc_dai_set_clkdiv(cpu_dai, S3C24XX_DIV_MCLK, |
213 | S3C2410_IISMOD_384FS); | 209 | fs_mode); |
214 | if (ret < 0) | 210 | if (ret < 0) |
215 | return ret; | 211 | return ret; |
216 | 212 | ||
@@ -295,17 +291,8 @@ static int __init rx1950_init(void) | |||
295 | goto err_plat_add; | 291 | goto err_plat_add; |
296 | } | 292 | } |
297 | 293 | ||
298 | xtal = clk_get(&s3c24xx_snd_device->dev, "xtal"); | ||
299 | |||
300 | if (IS_ERR(xtal)) { | ||
301 | ret = PTR_ERR(xtal); | ||
302 | platform_device_unregister(s3c24xx_snd_device); | ||
303 | goto err_clk; | ||
304 | } | ||
305 | |||
306 | return 0; | 294 | return 0; |
307 | 295 | ||
308 | err_clk: | ||
309 | err_plat_add: | 296 | err_plat_add: |
310 | err_plat_alloc: | 297 | err_plat_alloc: |
311 | err_gpio_conf: | 298 | err_gpio_conf: |
@@ -320,7 +307,6 @@ static void __exit rx1950_exit(void) | |||
320 | platform_device_unregister(s3c24xx_snd_device); | 307 | platform_device_unregister(s3c24xx_snd_device); |
321 | snd_soc_jack_free_gpios(&hp_jack, ARRAY_SIZE(hp_jack_gpios), | 308 | snd_soc_jack_free_gpios(&hp_jack, ARRAY_SIZE(hp_jack_gpios), |
322 | hp_jack_gpios); | 309 | hp_jack_gpios); |
323 | clk_put(xtal); | ||
324 | gpio_free(S3C2410_GPA(1)); | 310 | gpio_free(S3C2410_GPA(1)); |
325 | } | 311 | } |
326 | 312 | ||
diff --git a/sound/soc/s3c24xx/smdk_spdif.c b/sound/soc/s3c24xx/smdk_spdif.c index f31d22ad7c88..c8bd90488a87 100644 --- a/sound/soc/s3c24xx/smdk_spdif.c +++ b/sound/soc/s3c24xx/smdk_spdif.c | |||
@@ -38,7 +38,7 @@ static int set_audio_clock_heirachy(struct platform_device *pdev) | |||
38 | } | 38 | } |
39 | 39 | ||
40 | mout_epll = clk_get(NULL, "mout_epll"); | 40 | mout_epll = clk_get(NULL, "mout_epll"); |
41 | if (IS_ERR(fout_epll)) { | 41 | if (IS_ERR(mout_epll)) { |
42 | printk(KERN_WARNING "%s: Cannot find mout_epll.\n", | 42 | printk(KERN_WARNING "%s: Cannot find mout_epll.\n", |
43 | __func__); | 43 | __func__); |
44 | ret = -EINVAL; | 44 | ret = -EINVAL; |
@@ -54,7 +54,7 @@ static int set_audio_clock_heirachy(struct platform_device *pdev) | |||
54 | } | 54 | } |
55 | 55 | ||
56 | sclk_spdif = clk_get(NULL, "sclk_spdif"); | 56 | sclk_spdif = clk_get(NULL, "sclk_spdif"); |
57 | if (IS_ERR(fout_epll)) { | 57 | if (IS_ERR(sclk_spdif)) { |
58 | printk(KERN_WARNING "%s: Cannot find sclk_spdif.\n", | 58 | printk(KERN_WARNING "%s: Cannot find sclk_spdif.\n", |
59 | __func__); | 59 | __func__); |
60 | ret = -EINVAL; | 60 | ret = -EINVAL; |