aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-11-15 08:20:12 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-11-15 08:20:12 -0500
commit6ccd744123679c1f19fb6e414e3df717d9ed57f6 (patch)
tree5ab696b70ca95af60e9515f7d623c8738af1d7e1
parent3c9e28e751cf9969c2cb2e57b5573cab86cf521a (diff)
parentbcbb243396b82b0369465e9a547b7d5278cd26ad (diff)
Merge branch 'for-2.6.37' into for-2.6.38
-rw-r--r--sound/soc/s3c24xx/rx1950_uda1380.c20
-rw-r--r--sound/soc/soc-dapm.c4
2 files changed, 5 insertions, 19 deletions
diff --git a/sound/soc/s3c24xx/rx1950_uda1380.c b/sound/soc/s3c24xx/rx1950_uda1380.c
index 105d177fa427..b2a741a7288b 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
56static struct snd_pcm_hw_constraint_list hw_rates = { 55static 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
132static struct platform_device *s3c24xx_snd_device; 131static struct platform_device *s3c24xx_snd_device;
133static struct clk *xtal;
134 132
135static int rx1950_startup(struct snd_pcm_substream *substream) 133static 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
@@ -296,17 +292,8 @@ static int __init rx1950_init(void)
296 goto err_plat_add; 292 goto err_plat_add;
297 } 293 }
298 294
299 xtal = clk_get(&s3c24xx_snd_device->dev, "xtal");
300
301 if (IS_ERR(xtal)) {
302 ret = PTR_ERR(xtal);
303 platform_device_unregister(s3c24xx_snd_device);
304 goto err_clk;
305 }
306
307 return 0; 295 return 0;
308 296
309err_clk:
310err_plat_add: 297err_plat_add:
311err_plat_alloc: 298err_plat_alloc:
312err_gpio_conf: 299err_gpio_conf:
@@ -321,7 +308,6 @@ static void __exit rx1950_exit(void)
321 platform_device_unregister(s3c24xx_snd_device); 308 platform_device_unregister(s3c24xx_snd_device);
322 snd_soc_jack_free_gpios(&hp_jack, ARRAY_SIZE(hp_jack_gpios), 309 snd_soc_jack_free_gpios(&hp_jack, ARRAY_SIZE(hp_jack_gpios),
323 hp_jack_gpios); 310 hp_jack_gpios);
324 clk_put(xtal);
325 gpio_free(S3C2410_GPA(1)); 311 gpio_free(S3C2410_GPA(1));
326} 312}
327 313
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 8352430f4043..bc2ec06943c0 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -706,12 +706,12 @@ static int dapm_seq_compare(struct snd_soc_dapm_widget *a,
706 struct snd_soc_dapm_widget *b, 706 struct snd_soc_dapm_widget *b,
707 int sort[]) 707 int sort[])
708{ 708{
709 if (a->codec != b->codec)
710 return (unsigned long)a - (unsigned long)b;
711 if (sort[a->id] != sort[b->id]) 709 if (sort[a->id] != sort[b->id])
712 return sort[a->id] - sort[b->id]; 710 return sort[a->id] - sort[b->id];
713 if (a->reg != b->reg) 711 if (a->reg != b->reg)
714 return a->reg - b->reg; 712 return a->reg - b->reg;
713 if (a->codec != b->codec)
714 return (unsigned long)a->codec - (unsigned long)b->codec;
715 715
716 return 0; 716 return 0;
717} 717}