[alsa-devel] [PATCH 3/5] [RFC] ALSA ASOC Adds DSP DAI format support for platform driver
Enables DSP DAI format for mcbsp in omap platform driver
Signed-off-by: Arun KS arunks@mistralsolutions.com --- sound/soc/omap/omap-mcbsp.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index 3a4cc4b..1c024aa 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c @@ -292,6 +292,12 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, regs->rcr2 |= RDATDLY(1); regs->xcr2 |= XDATDLY(1); break; + case SND_SOC_DAIFMT_DSP_A: + /* 0-bit data delay */ + regs->rcr2 |= RDATDLY(0); + regs->xcr2 |= XDATDLY(0); + break; + default: /* Unsupported data format */ return -EINVAL;
On Mon, Sep 29, 2008 at 03:20:12PM +0530, Arun KS wrote:
Enables DSP DAI format for mcbsp in omap platform driver
Signed-off-by: Arun KS arunks@mistralsolutions.com
Acked-by: Mark Brown broonie@opensource.wolfsonmicro.com
Thanks!
On Mon, 29 Sep 2008 15:20:12 +0530 "ext Arun KS" arunks@mistralsolutions.com wrote:
Enables DSP DAI format for mcbsp in omap platform driver
Signed-off-by: Arun KS arunks@mistralsolutions.com
sound/soc/omap/omap-mcbsp.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index 3a4cc4b..1c024aa 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c @@ -292,6 +292,12 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, regs->rcr2 |= RDATDLY(1); regs->xcr2 |= XDATDLY(1); break;
- case SND_SOC_DAIFMT_DSP_A:
/* 0-bit data delay */
regs->rcr2 |= RDATDLY(0);
regs->xcr2 |= XDATDLY(0);
break;
- default:
I think this is not enough. The word clock length equals to one BCLK cycle in DSP mode. Not n channel bit BCLK cycles like in I2S.
Jarkko -- To unsubscribe from this list: send the line "unsubscribe alsa-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Thanks all for the comments. I will incorporate and send the patches again.
On Mon, Sep 29, 2008 at 4:45 PM, Jarkko Nikula jarkko.nikula@nokia.com wrote:
On Mon, 29 Sep 2008 15:20:12 +0530 "ext Arun KS" arunks@mistralsolutions.com wrote:
Enables DSP DAI format for mcbsp in omap platform driver
Signed-off-by: Arun KS arunks@mistralsolutions.com
sound/soc/omap/omap-mcbsp.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index 3a4cc4b..1c024aa 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c @@ -292,6 +292,12 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, regs->rcr2 |= RDATDLY(1); regs->xcr2 |= XDATDLY(1); break;
case SND_SOC_DAIFMT_DSP_A:
/* 0-bit data delay */
regs->rcr2 |= RDATDLY(0);
regs->xcr2 |= XDATDLY(0);
break;
default:
I think this is not enough. The word clock length equals to one BCLK cycle in DSP mode. Not n channel bit BCLK cycles like in I2S.
Jarkko
To unsubscribe from this list: send the line "unsubscribe alsa-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
-- To unsubscribe from this list: send the line "unsubscribe alsa-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Sep 29, 2008 at 4:45 PM, Jarkko Nikula jarkko.nikula@nokia.com wrote:
On Mon, 29 Sep 2008 15:20:12 +0530 "ext Arun KS" arunks@mistralsolutions.com wrote:
Enables DSP DAI format for mcbsp in omap platform driver
Signed-off-by: Arun KS arunks@mistralsolutions.com
sound/soc/omap/omap-mcbsp.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index 3a4cc4b..1c024aa 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c @@ -292,6 +292,12 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, regs->rcr2 |= RDATDLY(1); regs->xcr2 |= XDATDLY(1); break;
case SND_SOC_DAIFMT_DSP_A:
/* 0-bit data delay */
regs->rcr2 |= RDATDLY(0);
regs->xcr2 |= XDATDLY(0);
break;
default:
I think this is not enough. The word clock length equals to one BCLK cycle in DSP mode. Not n channel bit BCLK cycles like in I2S.
In DSP Mode, Frame sync is followed by two data words. I tested this patch and its working. Am i missing something ?
Jarkko
To unsubscribe from this list: send the line "unsubscribe alsa-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
-- To unsubscribe from this list: send the line "unsubscribe alsa-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, 30 Sep 2008 12:11:45 +0530 "ext Arun KS" arunks@mistralsolutions.com wrote:
I think this is not enough. The word clock length equals to one BCLK cycle in DSP mode. Not n channel bit BCLK cycles like in I2S.
In DSP Mode, Frame sync is followed by two data words. I tested this patch and its working. Am i missing something ?
I meant length of FS/LRC[IN | OUT] signal itself. E.g. see figures 3-7 and 3-8 in AIC23 data manual:
http://www.ti.com/lit/gpn/tlv320aic23
Now omap-mcbsp.c sets this FS length to 16 BCLK periods in omap_mcbsp_dai_hw_params. Currently code is pretty much tailored for 16-bit stereo I2S so probably some McBSP configuration bits are better set in another function than currently :-)
Jarkko -- To unsubscribe from this list: send the line "unsubscribe alsa-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
participants (3)
-
Arun KS
-
Jarkko Nikula
-
Mark Brown