ASoC updates
Subsystems (3)
cover ASoC updates
The following changes since commit fb0ef645f2c546f8297b2fbf9b2b8fff4a7455e8:
Naresh Medisetty (1):
ASoC: DaVinci: Audio: Fix swapping of channels at start of stereo playback
are available in the git repository at:
git://opensource.wolfsonmicro.com/linux-2.6-asoc for-tiwai
Jarkko Nikula (2):
ASoC: Fix supported sample rates of TWL4030 audio codec
ASoC: OMAP: Add more supported sample rates into McBSP DAI driver
Mark Brown (2):
ASoC: Revert "ASoC: Add new parameter to s3c24xx_pcm_enqueue"
ASoC: Add WM8728 codec driver
sound/soc/codecs/Kconfig | 4 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/twl4030.c | 2 +- sound/soc/codecs/wm8728.c | 574 +++++++++++++++++++++++++++++++++++++++ sound/soc/codecs/wm8728.h | 30 ++ sound/soc/omap/omap-mcbsp.c | 4 +- sound/soc/s3c24xx/s3c24xx-pcm.c | 12 +- 7 files changed, 616 insertions(+), 12 deletions(-) create mode 100644 sound/soc/codecs/wm8728.c create mode 100644 sound/soc/codecs/wm8728.h
PATCH 1/4 ASoC: Fix supported sample rates of TWL4030 audio codec
From: Jarkko Nikula <[email protected]>
TWL4030 currently supports rates between 8 kHz and 48 kHz and sets the codec mode register accordingly in twl4030_hw_params. Expose this info so that ASoC can match other rates than 44.1 kHz or 48 kHz as well.
--- sound/soc/codecs/twl4030.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/codecs/twl4030.c +1 -1
@@ -504,7 +504,7 @@ static int twl4030_set_dai_fmt(struct snd_soc_dai *codec_dai,return 0 ; } -#define TWL4030_RATES (SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000) +#define TWL4030_RATES (SNDRV_PCM_RATE_8000_48000)#define TWL4030_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FORMAT_S24_LE)struct snd_soc_dai twl4030_dai = {
Signature · 1 line
1.5.6.5
PATCH 2/4 ASoC: OMAP: Add more supported sample rates into McBSP DAI driver
From: Jarkko Nikula <[email protected]>
Originally it was put too tight limits to support only 44.1 kHz and 48 kHz sample rates in McBSP DAI driver. Extend it now to 8 kHz - 96 kHz. With 96 kHz and 2*16 bits, bit clock is 3.072 MHz < 3.125 MHz (I2S max?).
Tested on Nokia N810 with TVL320AIC33 from rates 8 - 96 kHz and on Texas Instruments Beagle with TWL4030 from rates 8 - 48 kHz.
--- sound/soc/omap/omap-mcbsp.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
sound/soc/omap/omap-mcbsp.c +1 -3
@@ -36,9 +36,7 @@#include "omap-mcbsp.h" #include "omap-pcm.h" -#define OMAP_MCBSP_RATES (SNDRV_PCM_RATE_44100 | \ - SNDRV_PCM_RATE_48000 | \ - SNDRV_PCM_RATE_KNOT) +#define OMAP_MCBSP_RATES (SNDRV_PCM_RATE_8000_96000)struct omap_mcbsp_data {unsigned int bus_id;
Signature · 1 line
1.5.6.5
PATCH 3/4 ASoC: Revert "ASoC: Add new parameter to s3c24xx_pcm_enqueue"
This reverts commit 8dc840f88d9c9f75f46d5dbe489242f8a114fab6. Christian Pellegrin <[email protected]> reported that on some systems the patch caused DMA to fail which is much more serious than the original skipped audio issue. Further investigation by Dave shows that the behaviour depends on the clock speed of the SoC - a better fix is neeeded.
--- sound/soc/s3c24xx/s3c24xx-pcm.c | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-)
sound/soc/s3c24xx/s3c24xx-pcm.c +4 -8
@@ -78,8 +78,7 @@ struct s3c24xx_runtime_data {* place a dma buffer onto the queue for the dma system * to handle. */ -static void s3c24xx_pcm_enqueue (struct snd_pcm_substream *substream, -int dma_max) +static void s3c24xx_pcm_enqueue (struct snd_pcm_substream *substream) {struct s3c24xx_runtime_data *prtd = substream->runtime->private_data;dma_addr_t pos = prtd->dma_pos;
@@ -87,10 +86,7 @@ static void s3c24xx_pcm_enqueue(struct snd_pcm_substream *substream,DBG ("Entered %s\n" , __func__); -if (!dma_max) - dma_max = prtd->dma_limit; - -while (prtd->dma_loaded < dma_max) { +while (prtd->dma_loaded < prtd->dma_limit) {unsigned long len = prtd->dma_period;DBG ("dma_loaded: %d\n" , prtd->dma_loaded);
@@ -136,7 +132,7 @@ static void s3c24xx_audio_buffdone(struct s3c2410_dma_chan *channel,spin_lock (&prtd->lock);if (prtd->state &ST_RUNNING ) { prtd->dma_loaded--; -s3c24xx_pcm_enqueue (substream,0 ); +s3c24xx_pcm_enqueue (substream); }spin_unlock (&prtd->lock);
@@ -253,7 +249,7 @@ static int s3c24xx_pcm_prepare(struct snd_pcm_substream *substream) prtd->dma_pos = prtd->dma_start;/* enqueue dma buffers */ -s3c24xx_pcm_enqueue (substream,1 ); +s3c24xx_pcm_enqueue (substream);return ret; }
Signature · 1 line
1.5.6.5
PATCH 4/4 ASoC: Add WM8728 codec driver
The WM8728 is a high performance stereo DAC designed for applications such as DVD, home theatre and digital TV.
--- sound/soc/codecs/Kconfig | 4 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/wm8728.c | 574 +++++++++++++++++++++++++++++++++++++++++++++ sound/soc/codecs/wm8728.h | 30 +++ 4 files changed, 610 insertions(+), 0 deletions(-) create mode 100644 sound/soc/codecs/wm8728.c create mode 100644 sound/soc/codecs/wm8728.h
sound/soc/codecs/Kconfig +4 -0
@@ -13,6 +13,7 @@ config SND_SOC_ALL_CODECS select SND_SOC_UDA1380 if I2C select SND_SOC_WM8510 if (I2C || SPI_MASTER) select SND_SOC_WM8580 if I2C + select SND_SOC_WM8728 if (I2C || SPI_MASTER) select SND_SOC_WM8731 if (I2C || SPI_MASTER) select SND_SOC_WM8750 if (I2C || SPI_MASTER) select SND_SOC_WM8753 if (I2C || SPI_MASTER)
@@ -93,6 +94,9 @@ config SND_SOC_WM8510 config SND_SOC_WM8580 tristate +config SND_SOC_WM8728 + tristate + config SND_SOC_WM8731 tristate
sound/soc/codecs/Makefile +2 -0
@@ -11,6 +11,7 @@ snd-soc-twl4030-objs := twl4030.o snd-soc-uda1380-objs := uda1380.o snd-soc-wm8510-objs := wm8510.o snd-soc-wm8580-objs := wm8580.o +snd-soc-wm8728-objs := wm8728.o snd-soc-wm8731-objs := wm8731.o snd-soc-wm8750-objs := wm8750.o snd-soc-wm8753-objs := wm8753.o
@@ -34,6 +35,7 @@ obj-$(CONFIG_SND_SOC_TWL4030) += snd-soc-twl4030.o obj-$(CONFIG_SND_SOC_UDA1380) += snd-soc-uda1380.o obj-$(CONFIG_SND_SOC_WM8510) += snd-soc-wm8510.o obj-$(CONFIG_SND_SOC_WM8580) += snd-soc-wm8580.o +obj-$(CONFIG_SND_SOC_WM8728) += snd-soc-wm8728.o obj-$(CONFIG_SND_SOC_WM8731) += snd-soc-wm8731.o obj-$(CONFIG_SND_SOC_WM8750) += snd-soc-wm8750.o obj-$(CONFIG_SND_SOC_WM8753) += snd-soc-wm8753.o
sound/soc/codecs/wm8728.c new file +574 -0
574 lines not on this page · raw message
sound/soc/codecs/wm8728.h new file +30 -0
@@ -0,0 +1,30 @@ +/* +* wm8728.h -- WM8728 ASoC codec driver +* +* Copyright 2008 Wolfson Microelectronics plc +* +* Author: Mark Brown <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#ifndef _WM8728_H +#define _WM8728_H + +#define WM8728_DACLVOL 0x00 +#define WM8728_DACRVOL 0x01 +#define WM8728_DACCTL 0x02 +#define WM8728_IFCTL 0x03 + +struct wm8728_setup_data { +int spi; +int i2c_bus; +unsigned short i2c_address; +}; + +extern struct snd_soc_dai wm8728_dai; +extern struct snd_soc_codec_device soc_codec_dev_wm8728; + +#endif
Signature · 1 line
1.5.6.5
Takashi Iwai
AppliedAt Fri, 14 Nov 2008 14:57:06 +0000,
Quoted 8 lines · Mark Brown
The following changes since commit
fb0ef645f2c546f8297b2fbf9b2b8fff4a7455e8:
Naresh Medisetty (1):
ASoC: DaVinci: Audio: Fix swapping of channels at start of stereo playbackare available in the git repository at:
git://opensource.wolfsonmicro.com/linux-2.6-asocfor-tiwai
Thanks, applied now.
Takashi