Skip to contentSkip to conversation

ASoC: rx1950-related fixes

PATCH Applied Vasily Khoruzhick 2 participants 7 messages Sep 7, 2010 – Sep 8, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover ASoC: rx1950-related fixes

Some cosmetical fixes for rx1950 and uda1380 ASoC drivers

#1 lore raw

PATCH 1/4 ASoC: rx1950: check that machine is rx1950 in glue driver

---
 sound/soc/s3c24xx/rx1950_uda1380.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
sound/soc/s3c24xx/rx1950_uda1380.c +5 -0
index 2a16113..0f6e806 100644
@@ -40,6 +40,8 @@
 
 #include <mach/regs-clock.h>
 
+#include <asm/mach-types.h>
+
 #include "s3c-dma.h"
 #include "s3c24xx-i2s.h"
 #include "../codecs/uda1380.h"
@@ -274,6 +276,9 @@ static int __init rx1950_init(void)
 {
 	int ret;
 
+	if (!machine_is_rx1950())
+		return -ENODEV;
+
 	/* configure some gpios */
 	ret = gpio_request(S3C2410_GPA(1), "speaker-power");
 	if (ret)
Signature · 1 line
1.7.2.2
#2 lore raw

PATCH 2/4 ASoC: rx1950: remove unnecessary headers

In reply to Vasily Khoruzhick
---
 sound/soc/s3c24xx/rx1950_uda1380.c |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)
sound/soc/s3c24xx/rx1950_uda1380.c +0 -7
index 0f6e806..9552296 100644
@@ -19,18 +19,11 @@
 
 #include <linux/module.h>
 #include <linux/moduleparam.h>
-#include <linux/timer.h>
-#include <linux/delay.h>
-#include <linux/interrupt.h>
 #include <linux/platform_device.h>
-#include <linux/spinlock.h>
 #include <linux/i2c.h>
 #include <linux/gpio.h>
 #include <linux/clk.h>
 
-#include <sound/core.h>
-#include <sound/pcm.h>
-#include <sound/pcm_params.h>
 #include <sound/soc.h>
 #include <sound/soc-dapm.h>
 #include <sound/uda1380.h>
Signature · 1 line
1.7.2.2
#3 lore raw

PATCH 3/4 ASoC: UDA1380: Add delay between power on and reset

In reply to Vasily Khoruzhick
---
 sound/soc/codecs/uda1380.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
sound/soc/codecs/uda1380.c +1 -0
index 488f801..0c6c725 100644
@@ -616,6 +616,7 @@ static int uda1380_set_bias_level(struct snd_soc_codec *codec,
 		if (codec->bias_level == SND_SOC_BIAS_OFF) {
 			if (gpio_is_valid(pdata->gpio_power)) {
 				gpio_set_value(pdata->gpio_power, 1);
+				mdelay(1);
 				uda1380_reset(codec);
 			}
 
Signature · 1 line
1.7.2.2
#4 lore raw

PATCH 4/4 ASoC: rx1950: Fix clkdiv for 16khz and 48khz

In reply to Vasily Khoruzhick

Usage of 256 as clkdiv gives better rounding error (<1%) for 16khz and 48khz

---
 sound/soc/s3c24xx/rx1950_uda1380.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
sound/soc/s3c24xx/rx1950_uda1380.c +3 -3
index 9552296..ffd5cf2 100644
@@ -171,9 +171,9 @@ static int rx1950_hw_params(struct snd_pcm_substream *substream,
 	case 16000:
 	case 48000:
 		clk_source = S3C24XX_CLKSRC_PCLK;
-		fs_mode = S3C2410_IISMOD_384FS;
-		div = s3c24xx_i2s_get_clockrate() / (384 * rate);
-		if (s3c24xx_i2s_get_clockrate() % (384 * rate) > (182 * rate))
+		fs_mode = S3C2410_IISMOD_256FS;
+		div = s3c24xx_i2s_get_clockrate() / (256 * rate);
+		if (s3c24xx_i2s_get_clockrate() % (256 * rate) > (128 * rate))
 			div++;
 		break;
 	case 44100:
Signature · 1 line
1.7.2.2
Applied
#5 lore raw
In reply to Vasily Khoruzhick
Quoted 1 line · Vasily Khoruzhick

Some cosmetical fixes for rx1950 and uda1380 ASoC drivers

Applied all four, thanks. Your description for the series doesn't quite match the last two patches, though...

#6 lore raw

В сообщении от 8 сентября 2010 13:35:27 автор Mark Brown написал:

Quoted 5 lines · Vasily Khoruzhick
Quoted 1 line

Some cosmetical fixes for rx1950 and uda1380 ASoC drivers

Applied all four, thanks. Your description for the series doesn't quite match the last two patches, though...

Agreed, sorry for that, I'll add more verbose description into cover message next time.

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel