[alsa-devel] [PATCH 0/4] ASoC: rx1950-related fixes
Signed-off-by: Vasily Khoruzhick anarsoul@gmail.com --- sound/soc/s3c24xx/rx1950_uda1380.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/sound/soc/s3c24xx/rx1950_uda1380.c b/sound/soc/s3c24xx/rx1950_uda1380.c index 2a16113..0f6e806 100644 --- a/sound/soc/s3c24xx/rx1950_uda1380.c +++ b/sound/soc/s3c24xx/rx1950_uda1380.c @@ -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)
Signed-off-by: Vasily Khoruzhick anarsoul@gmail.com --- sound/soc/s3c24xx/rx1950_uda1380.c | 7 ------- 1 files changed, 0 insertions(+), 7 deletions(-)
diff --git a/sound/soc/s3c24xx/rx1950_uda1380.c b/sound/soc/s3c24xx/rx1950_uda1380.c index 0f6e806..9552296 100644 --- a/sound/soc/s3c24xx/rx1950_uda1380.c +++ b/sound/soc/s3c24xx/rx1950_uda1380.c @@ -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>
Signed-off-by: Vasily Khoruzhick anarsoul@gmail.com --- sound/soc/codecs/uda1380.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c index 488f801..0c6c725 100644 --- a/sound/soc/codecs/uda1380.c +++ b/sound/soc/codecs/uda1380.c @@ -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); }
Usage of 256 as clkdiv gives better rounding error (<1%) for 16khz and 48khz
Signed-off-by: Vasily Khoruzhick anarsoul@gmail.com --- sound/soc/s3c24xx/rx1950_uda1380.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/s3c24xx/rx1950_uda1380.c b/sound/soc/s3c24xx/rx1950_uda1380.c index 9552296..ffd5cf2 100644 --- a/sound/soc/s3c24xx/rx1950_uda1380.c +++ b/sound/soc/s3c24xx/rx1950_uda1380.c @@ -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:
В сообщении от 8 сентября 2010 13:35:27 автор Mark Brown написал:
On Tue, Sep 07, 2010 at 05:04:14PM +0300, Vasily Khoruzhick wrote:
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.
participants (2)
-
Mark Brown
-
Vasily Khoruzhick