ALSA ASOC Adds DSP DAI format support for platform driver
RFC PATCH 3/5 ALSA ASOC Adds DSP DAI format support for platform driver
Enables DSP DAI format for mcbsp in omap platform driver
--- sound/soc/omap/omap-mcbsp.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
sound/soc/omap/omap-mcbsp.c +0 -0
@@ -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;
Signature · 1 line
1.5.3.4
Quoted 3 lines · Arun KS
Enables DSP DAI format for mcbsp in omap platform driver
Signed-off-by Arun KS <[email protected]>
Thanks!
Quoted 13 lines · On Mon, 29 Sep 2008 15:20:12 +0530 "ext Arun KS" <[email protected]>…
Enables DSP DAI format for mcbsp in omap platform driver
Signed-off-by Arun KS <[email protected]>--- sound/soc/omap/omap-mcbsp.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)sound/soc/omap/omap-mcbsp.c +0
-0@@ -292,6 +292,12 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai,
sound/soc/omap/omap-mcbsp.c static int omap_mcbsp_dai_set_dai_fmt(struct · line 302
Quoted 10 lines
sound/soc/omap/omap-mcbsp.c +6
-0regs->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
Quoted 13 lines · On Mon, 29 Sep 2008 15:20:12 +0530 "ext Arun KS" <[email protected]>…
Enables DSP DAI format for mcbsp in omap platform driver
Signed-off-by Arun KS <[email protected]>--- sound/soc/omap/omap-mcbsp.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)sound/soc/omap/omap-mcbsp.c +0
-0@@ -292,6 +292,12 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai,
sound/soc/omap/omap-mcbsp.c static int omap_mcbsp_dai_set_dai_fmt(struct · line 302
Quoted 10 lines
sound/soc/omap/omap-mcbsp.c +6
-0regs->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
Thanks all for the comments.
I will incorporate and send the patches again.
Quoted 37 lines · Jarkko Nikula
Quoted 13 lines · On Mon, 29 Sep 2008 15:20:12 +0530 "ext Arun KS" <[email protected]>…
Enables DSP DAI format for mcbsp in omap platform driver
Signed-off-by Arun KS <[email protected]>--- sound/soc/omap/omap-mcbsp.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)sound/soc/omap/omap-mcbsp.c +0
-0@@ -292,6 +292,12 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai,sound/soc/omap/omap-mcbsp.c static int omap_mcbsp_dai_set_dai_fmt(struct · line 302
Quoted 10 lines
sound/soc/omap/omap-mcbsp.c +6
-0regs->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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Thanks all for the comments.
I will incorporate and send the patches again.
Quoted 37 lines · Jarkko Nikula
Quoted 13 lines · On Mon, 29 Sep 2008 15:20:12 +0530 "ext Arun KS" <[email protected]>…
Enables DSP DAI format for mcbsp in omap platform driver
Signed-off-by Arun KS <[email protected]>--- sound/soc/omap/omap-mcbsp.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)sound/soc/omap/omap-mcbsp.c +0
-0@@ -292,6 +292,12 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai,sound/soc/omap/omap-mcbsp.c static int omap_mcbsp_dai_set_dai_fmt(struct · line 302
Quoted 10 lines
sound/soc/omap/omap-mcbsp.c +6
-0regs->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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 21 lines · Jarkko Nikula
Quoted 18 lines · On Mon, 29 Sep 2008 15:20:12 +0530 "ext Arun KS" <[email protected]>…
Enables DSP DAI format for mcbsp in omap platform driver
Signed-off-by Arun KS <[email protected]>--- sound/soc/omap/omap-mcbsp.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)sound/soc/omap/omap-mcbsp.c +2
-0@@ -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 */
Quoted 9 lines
sound/soc/omap/omap-mcbsp.c static int omap_mcbsp_dai_set_dai_fmt(struct · line 302
Quoted 5 lines
sound/soc/omap/omap-mcbsp.c +4
-0+ 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 ?
Quoted 7 lines
Jarkko
--
To unsubscribe from this list: send the line "unsubscribe alsa-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 21 lines · Jarkko Nikula
Quoted 18 lines · On Mon, 29 Sep 2008 15:20:12 +0530 "ext Arun KS" <[email protected]>…
Enables DSP DAI format for mcbsp in omap platform driver
Signed-off-by Arun KS <[email protected]>--- sound/soc/omap/omap-mcbsp.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)sound/soc/omap/omap-mcbsp.c +2
-0@@ -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 */
Quoted 9 lines
sound/soc/omap/omap-mcbsp.c static int omap_mcbsp_dai_set_dai_fmt(struct · line 302
Quoted 5 lines
sound/soc/omap/omap-mcbsp.c +4
-0+ 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 ?
Quoted 7 lines
Jarkko
--
To unsubscribe from this list: send the line "unsubscribe alsa-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 7 lines · On Tue, 30 Sep 2008 12:11:45 +0530 "ext Arun KS" <[email protected]>…
Quoted 3 lines
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
Quoted 7 lines · On Tue, 30 Sep 2008 12:11:45 +0530 "ext Arun KS" <[email protected]>…
Quoted 3 lines
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