diff options
| -rw-r--r-- | sound/soc/s3c24xx/rx1950_uda1380.c | 20 |
1 files changed, 3 insertions, 17 deletions
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 | ||
