* [2.6.30-rc2][PATCH 0/2] Yet another DSP format fix into OMAP McBSP DAI @ 2009-04-15 10:48 Jarkko Nikula 2009-04-15 10:48 ` [2.6.30-rc2][PATCH 1/2] ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver Jarkko Nikula 2009-04-15 10:48 ` [2.6.30-rc2][PATCH 2/2] ASoC: OMAP: Fix FS polarity in OSK5912 machine driver Jarkko Nikula 0 siblings, 2 replies; 26+ messages in thread From: Jarkko Nikula @ 2009-04-15 10:48 UTC (permalink / raw) To: alsa-devel; +Cc: Mark Brown Hopefully this is the last fourth DSP format fix into McBSP DAI... Tested with N810 modified to use DSP_B and with AIC33 codec. Also with Beagle by using McBSP3 routed to expansion pin header and using scope. Luckily TLV320AIC23 and TLV320AIC33 codec drivers seems to be correct but machine driver for OSK5912 must be corrected to not use inverted FS polarity since AIC23 doesn't have support for it. -- Jarkko ^ permalink raw reply [flat|nested] 26+ messages in thread
* [2.6.30-rc2][PATCH 1/2] ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver 2009-04-15 10:48 [2.6.30-rc2][PATCH 0/2] Yet another DSP format fix into OMAP McBSP DAI Jarkko Nikula @ 2009-04-15 10:48 ` Jarkko Nikula 2009-04-15 11:04 ` Peter Ujfalusi 2009-04-15 10:48 ` [2.6.30-rc2][PATCH 2/2] ASoC: OMAP: Fix FS polarity in OSK5912 machine driver Jarkko Nikula 1 sibling, 1 reply; 26+ messages in thread From: Jarkko Nikula @ 2009-04-15 10:48 UTC (permalink / raw) To: alsa-devel; +Cc: Peter Ujfalusi, Jarkko Nikula, Mark Brown The DSP format wasn't still correct in OMAP McBSP DAI even after the commit bd25867a6cbe7a00ef7dbe8d9ddebc91b00b9b3f. Thanks to Peter Ujfalusi <peter.ujfalusi@nokia.com> for noticing and being part of the fix. Now the FS length definition is more clear by defining it with FWID(0). Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> Cc: Peter Ujfalusi <peter.ujfalusi@nokia.com> --- sound/soc/omap/omap-mcbsp.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index 9c09b94..90f4df7 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c @@ -283,7 +283,7 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream, break; case SND_SOC_DAIFMT_DSP_B: regs->srgr2 |= FPER(wlen * channels - 1); - regs->srgr1 |= FWID(wlen * channels - 2); + regs->srgr1 |= FWID(0); break; } @@ -302,6 +302,7 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, { struct omap_mcbsp_data *mcbsp_data = to_mcbsp(cpu_dai->private_data); struct omap_mcbsp_reg_cfg *regs = &mcbsp_data->regs; + unsigned int temp_fmt = fmt; if (mcbsp_data->configured) return 0; @@ -328,6 +329,8 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, /* 0-bit data delay */ regs->rcr2 |= RDATDLY(0); regs->xcr2 |= XDATDLY(0); + /* Invert FS polarity configuration */ + temp_fmt ^= SND_SOC_DAIFMT_NB_IF; break; default: /* Unsupported data format */ @@ -351,7 +354,7 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, } /* Set bit clock (CLKX/CLKR) and FS polarities */ - switch (fmt & SND_SOC_DAIFMT_INV_MASK) { + switch (temp_fmt & SND_SOC_DAIFMT_INV_MASK) { case SND_SOC_DAIFMT_NB_NF: /* * Normal BCLK + FS. -- 1.6.2.1 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [2.6.30-rc2][PATCH 1/2] ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver 2009-04-15 10:48 ` [2.6.30-rc2][PATCH 1/2] ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver Jarkko Nikula @ 2009-04-15 11:04 ` Peter Ujfalusi 2009-04-15 11:56 ` Mark Brown 0 siblings, 1 reply; 26+ messages in thread From: Peter Ujfalusi @ 2009-04-15 11:04 UTC (permalink / raw) To: Nikula Jarkko (Nokia-D/Helsinki); +Cc: alsa-devel@alsa-project.org, Mark Brown On Wednesday 15 April 2009 13:48:16 Nikula Jarkko (Nokia-D/Helsinki) wrote: > The DSP format wasn't still correct in OMAP McBSP DAI even after the commit > bd25867a6cbe7a00ef7dbe8d9ddebc91b00b9b3f. > > Thanks to Peter Ujfalusi <peter.ujfalusi@nokia.com> for noticing and being > part of the fix. Now the FS length definition is more clear by defining > it with FWID(0). > > Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> > Cc: Peter Ujfalusi <peter.ujfalusi@nokia.com> > --- > sound/soc/omap/omap-mcbsp.c | 7 +++++-- > 1 files changed, 5 insertions(+), 2 deletions(-) I believe this is correct. Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [2.6.30-rc2][PATCH 1/2] ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver 2009-04-15 11:04 ` Peter Ujfalusi @ 2009-04-15 11:56 ` Mark Brown 2009-04-16 10:08 ` Arun KS 0 siblings, 1 reply; 26+ messages in thread From: Mark Brown @ 2009-04-15 11:56 UTC (permalink / raw) To: Peter Ujfalusi Cc: alsa-devel@alsa-project.org, Nikula Jarkko (Nokia-D/Helsinki) On Wed, Apr 15, 2009 at 02:04:36PM +0300, Peter Ujfalusi wrote: > I believe this is correct. > Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Excellent! I'll apply both, thanks. ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [2.6.30-rc2][PATCH 1/2] ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver 2009-04-15 11:56 ` Mark Brown @ 2009-04-16 10:08 ` Arun KS 2009-04-16 10:12 ` Mark Brown 0 siblings, 1 reply; 26+ messages in thread From: Arun KS @ 2009-04-16 10:08 UTC (permalink / raw) To: Mark Brown Cc: Nikula Jarkko (Nokia-D/Helsinki), alsa-devel@alsa-project.org, Peter Ujfalusi On Wed, Apr 15, 2009 at 5:26 PM, Mark Brown <broonie@sirena.org.uk> wrote: > On Wed, Apr 15, 2009 at 02:04:36PM +0300, Peter Ujfalusi wrote: > >> I believe this is correct. > >> Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> > > Excellent! I'll apply both, thanks. This patch is working(tested on osk5912), but with SND_SOC_DAIFMT_NB_IF in the machine driver. When SND_SOC_DAIFMT_NB_NF used, noise on Right channel. > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@alsa-project.org > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel > ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [2.6.30-rc2][PATCH 1/2] ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver 2009-04-16 10:08 ` Arun KS @ 2009-04-16 10:12 ` Mark Brown 2009-04-16 10:17 ` Arun KS 0 siblings, 1 reply; 26+ messages in thread From: Mark Brown @ 2009-04-16 10:12 UTC (permalink / raw) To: Arun KS Cc: Nikula Jarkko (Nokia-D/Helsinki), alsa-devel@alsa-project.org, Peter Ujfalusi On Thu, Apr 16, 2009 at 03:38:07PM +0530, Arun KS wrote: > This patch is working(tested on osk5912), but with > SND_SOC_DAIFMT_NB_IF in the machine driver. When SND_SOC_DAIFMT_NB_NF > used, noise on Right channel. What sort of noise are you getting - is it just noise or is there some signal underneath the noise? Can you try playing a signal with no data on the left channel and see what effect that has? The CODEC doesn't support inverted frame so a configuration with inverted frame clock can't be correct. ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [2.6.30-rc2][PATCH 1/2] ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver 2009-04-16 10:12 ` Mark Brown @ 2009-04-16 10:17 ` Arun KS 2009-04-16 10:19 ` Mark Brown 2009-04-16 10:36 ` Peter Ujfalusi 0 siblings, 2 replies; 26+ messages in thread From: Arun KS @ 2009-04-16 10:17 UTC (permalink / raw) To: Mark Brown Cc: Nikula Jarkko (Nokia-D/Helsinki), alsa-devel@alsa-project.org, Peter Ujfalusi On Thu, Apr 16, 2009 at 3:42 PM, Mark Brown <broonie@sirena.org.uk> wrote: > On Thu, Apr 16, 2009 at 03:38:07PM +0530, Arun KS wrote: > >> This patch is working(tested on osk5912), but with >> SND_SOC_DAIFMT_NB_IF in the machine driver. When SND_SOC_DAIFMT_NB_NF >> used, noise on Right channel. > > What sort of noise are you getting - is it just noise or is there some > signal underneath the noise? Can you try playing a signal with no data > on the left channel and see what effect that has? Its not just noise, signal is there underneath. > > The CODEC doesn't support inverted frame so a configuration with > inverted frame clock can't be correct. > ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [2.6.30-rc2][PATCH 1/2] ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver 2009-04-16 10:17 ` Arun KS @ 2009-04-16 10:19 ` Mark Brown 2009-04-16 10:23 ` Arun KS 2009-04-16 10:31 ` Jarkko Nikula 2009-04-16 10:36 ` Peter Ujfalusi 1 sibling, 2 replies; 26+ messages in thread From: Mark Brown @ 2009-04-16 10:19 UTC (permalink / raw) To: Arun KS Cc: Nikula Jarkko (Nokia-D/Helsinki), alsa-devel@alsa-project.org, Peter Ujfalusi On Thu, Apr 16, 2009 at 03:47:03PM +0530, Arun KS wrote: > On Thu, Apr 16, 2009 at 3:42 PM, Mark Brown <broonie@sirena.org.uk> wrote: > > What sort of noise are you getting - is it just noise or is there some > > signal underneath the noise? ?Can you try playing a signal with no data > > on the left channel and see what effect that has? > Its not just noise, signal is there underneath. Could you try the test with no data on the left channel? I suspect that the LSB of the left channel may be being processed as the MSB of the right channel. ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [2.6.30-rc2][PATCH 1/2] ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver 2009-04-16 10:19 ` Mark Brown @ 2009-04-16 10:23 ` Arun KS 2009-04-16 10:31 ` Jarkko Nikula 1 sibling, 0 replies; 26+ messages in thread From: Arun KS @ 2009-04-16 10:23 UTC (permalink / raw) To: Mark Brown Cc: Nikula Jarkko (Nokia-D/Helsinki), alsa-devel@alsa-project.org, Peter Ujfalusi On Thu, Apr 16, 2009 at 3:49 PM, Mark Brown <broonie@sirena.org.uk> wrote: > On Thu, Apr 16, 2009 at 03:47:03PM +0530, Arun KS wrote: >> On Thu, Apr 16, 2009 at 3:42 PM, Mark Brown <broonie@sirena.org.uk> wrote: > >> > What sort of noise are you getting - is it just noise or is there some >> > signal underneath the noise? ?Can you try playing a signal with no data >> > on the left channel and see what effect that has? > >> Its not just noise, signal is there underneath. > > Could you try the test with no data on the left channel? I suspect that > the LSB of the left channel may be being processed as the MSB of the > right channel. I have to create one. > ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [2.6.30-rc2][PATCH 1/2] ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver 2009-04-16 10:19 ` Mark Brown 2009-04-16 10:23 ` Arun KS @ 2009-04-16 10:31 ` Jarkko Nikula 2009-04-16 10:33 ` Mark Brown 1 sibling, 1 reply; 26+ messages in thread From: Jarkko Nikula @ 2009-04-16 10:31 UTC (permalink / raw) To: ext Mark Brown Cc: Arun KS, Ujfalusi Peter (Nokia-D/Tampere), alsa-devel@alsa-project.org On Thu, 16 Apr 2009 12:19:45 +0200 ext Mark Brown <broonie@sirena.org.uk> wrote: > > > What sort of noise are you getting - is it just noise or is there > > > some signal underneath the noise? ?Can you try playing a signal > > > with no data on the left channel and see what effect that has? > > > Its not just noise, signal is there underneath. > > Could you try the test with no data on the left channel? I suspect > that the LSB of the left channel may be being processed as the MSB of > the right channel. > I'm wondering why the left channel is still playing fine? Jarkko ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [2.6.30-rc2][PATCH 1/2] ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver 2009-04-16 10:31 ` Jarkko Nikula @ 2009-04-16 10:33 ` Mark Brown 2009-04-16 10:47 ` Jarkko Nikula 0 siblings, 1 reply; 26+ messages in thread From: Mark Brown @ 2009-04-16 10:33 UTC (permalink / raw) To: Jarkko Nikula Cc: Arun KS, Ujfalusi Peter (Nokia-D/Tampere), alsa-devel@alsa-project.org On Thu, Apr 16, 2009 at 01:31:43PM +0300, Jarkko Nikula wrote: > ext Mark Brown <broonie@sirena.org.uk> wrote: > > Could you try the test with no data on the left channel? I suspect > > that the LSB of the left channel may be being processed as the MSB of > > the right channel. > I'm wondering why the left channel is still playing fine? If you drop the LSB of data it will normally sound fine but the signal level will be reduced - the effects are much less obvious when testing by ear than errors in the MSB. ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [2.6.30-rc2][PATCH 1/2] ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver 2009-04-16 10:33 ` Mark Brown @ 2009-04-16 10:47 ` Jarkko Nikula 2009-04-16 11:20 ` Arun KS 0 siblings, 1 reply; 26+ messages in thread From: Jarkko Nikula @ 2009-04-16 10:47 UTC (permalink / raw) To: ext Mark Brown Cc: Arun KS, Ujfalusi Peter (Nokia-D/Tampere), alsa-devel@alsa-project.org On Thu, 16 Apr 2009 12:33:58 +0200 ext Mark Brown <broonie@sirena.org.uk> wrote: > On Thu, Apr 16, 2009 at 01:31:43PM +0300, Jarkko Nikula wrote: > > ext Mark Brown <broonie@sirena.org.uk> wrote: > > > > Could you try the test with no data on the left channel? I > > > suspect that the LSB of the left channel may be being processed > > > as the MSB of the right channel. > > > I'm wondering why the left channel is still playing fine? > > If you drop the LSB of data it will normally sound fine but the signal > level will be reduced - the effects are much less obvious when testing > by ear than errors in the MSB. I meant if there is one bit difference or bit clock polarity is wrong then the both channels should be corrupted? At least the AIC33 is behaving so. I was thinking can the codec go out-of-sync during bit transmission of left followed by right channel data and resynchronize back after next FS change but this really sounds bit too far reason to me. Jarkko ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [2.6.30-rc2][PATCH 1/2] ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver 2009-04-16 10:47 ` Jarkko Nikula @ 2009-04-16 11:20 ` Arun KS 2009-04-16 11:27 ` Peter Ujfalusi ` (2 more replies) 0 siblings, 3 replies; 26+ messages in thread From: Arun KS @ 2009-04-16 11:20 UTC (permalink / raw) To: Jarkko Nikula Cc: alsa-devel@alsa-project.org, Ujfalusi Peter (Nokia-D/Tampere), ext Mark Brown On Thu, Apr 16, 2009 at 4:17 PM, Jarkko Nikula <jarkko.nikula@nokia.com> wrote: > On Thu, 16 Apr 2009 12:33:58 +0200 > ext Mark Brown <broonie@sirena.org.uk> wrote: > >> On Thu, Apr 16, 2009 at 01:31:43PM +0300, Jarkko Nikula wrote: >> > ext Mark Brown <broonie@sirena.org.uk> wrote: >> >> > > Could you try the test with no data on the left channel? I >> > > suspect that the LSB of the left channel may be being processed >> > > as the MSB of the right channel. >> >> > I'm wondering why the left channel is still playing fine? >> >> If you drop the LSB of data it will normally sound fine but the signal >> level will be reduced - the effects are much less obvious when testing >> by ear than errors in the MSB. > > I meant if there is one bit difference or bit clock polarity is wrong > then the both channels should be corrupted? At least the AIC33 is > behaving so. > > I was thinking can the codec go out-of-sync during bit transmission > of left followed by right channel data and resynchronize back after next > FS change but this really sounds bit too far reason to me. Hi Guys, I had done some mistake while applying the Jarkko's patch previously. Now its working fine. Sorry for the confusion caused. Arun > > > Jarkko > ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [2.6.30-rc2][PATCH 1/2] ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver 2009-04-16 11:20 ` Arun KS @ 2009-04-16 11:27 ` Peter Ujfalusi 2009-04-16 13:05 ` Arun KS 2009-04-16 11:35 ` Jarkko Nikula 2009-04-16 11:37 ` Mark Brown 2 siblings, 1 reply; 26+ messages in thread From: Peter Ujfalusi @ 2009-04-16 11:27 UTC (permalink / raw) To: ext Arun KS Cc: alsa-devel@alsa-project.org, Nikula Jarkko (Nokia-D/Helsinki), ext Mark Brown On Thursday 16 April 2009 14:20:36 ext Arun KS wrote: > Hi Guys, > > I had done some mistake while applying the Jarkko's patch previously. > Now its working fine. > Sorry for the confusion caused. :) I have digged out an old omap1510 TRM to see what is going on... Still, while you have the setup, can you give my two patch a try on OMAP1 to see if it is working correctly? > > Arun > > > Jarkko -- Péter ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [2.6.30-rc2][PATCH 1/2] ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver 2009-04-16 11:27 ` Peter Ujfalusi @ 2009-04-16 13:05 ` Arun KS 2009-04-16 13:42 ` Peter Ujfalusi 2009-04-16 21:35 ` Troy Kisky 0 siblings, 2 replies; 26+ messages in thread From: Arun KS @ 2009-04-16 13:05 UTC (permalink / raw) To: Peter Ujfalusi Cc: alsa-devel@alsa-project.org, Nikula Jarkko (Nokia-D/Helsinki), ext Mark Brown On Thu, Apr 16, 2009 at 4:57 PM, Peter Ujfalusi <peter.ujfalusi@nokia.com> wrote: > On Thursday 16 April 2009 14:20:36 ext Arun KS wrote: >> Hi Guys, >> >> I had done some mistake while applying the Jarkko's patch previously. >> Now its working fine. >> Sorry for the confusion caused. > > :) > I have digged out an old omap1510 TRM to see what is going on... > > Still, while you have the setup, can you give my two patch a try on OMAP1 to > see if it is working correctly? Your patches are working. I tested for DSP_A and DSP_B. Both works fine on osk5912 board. But when I2S is used there is no audio on Right channel(left channel is working fine). Thinks something is missing on tlv320aic23 driver. Arun > >> >> Arun >> >> > Jarkko > > -- > Péter ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [2.6.30-rc2][PATCH 1/2] ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver 2009-04-16 13:05 ` Arun KS @ 2009-04-16 13:42 ` Peter Ujfalusi 2009-04-16 13:53 ` Arun KS 2009-04-16 21:35 ` Troy Kisky 1 sibling, 1 reply; 26+ messages in thread From: Peter Ujfalusi @ 2009-04-16 13:42 UTC (permalink / raw) To: ext Arun KS Cc: alsa-devel@alsa-project.org, Nikula Jarkko (Nokia-D/Helsinki), ext Mark Brown On Thursday 16 April 2009 16:05:34 ext Arun KS wrote: > > Your patches are working. > I tested for DSP_A and DSP_B. Both works fine on osk5912 board. Thank you very much for testing it! > But when I2S is used there is no audio on Right channel(left channel > is working fine). > Thinks something is missing on tlv320aic23 driver. I have tested the patch, which changes the way how the I2S mode is configured and it was working. Also the end result is the same in I2S mode as it was before... And an obvious question: was the I2S mode worked before my patches? I suppose you used the SND_SOC_DAIFMT_NB_NF with the I2S mode as well (which should be the correct one)? > Arun -- Péter ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [2.6.30-rc2][PATCH 1/2] ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver 2009-04-16 13:42 ` Peter Ujfalusi @ 2009-04-16 13:53 ` Arun KS 0 siblings, 0 replies; 26+ messages in thread From: Arun KS @ 2009-04-16 13:53 UTC (permalink / raw) To: Peter Ujfalusi Cc: alsa-devel@alsa-project.org, Nikula Jarkko (Nokia-D/Helsinki), ext Mark Brown On Thu, Apr 16, 2009 at 7:12 PM, Peter Ujfalusi <peter.ujfalusi@nokia.com> wrote: > On Thursday 16 April 2009 16:05:34 ext Arun KS wrote: >> >> Your patches are working. >> I tested for DSP_A and DSP_B. Both works fine on osk5912 board. > > Thank you very much for testing it! > >> But when I2S is used there is no audio on Right channel(left channel >> is working fine). >> Thinks something is missing on tlv320aic23 driver. > > I have tested the patch, which changes the way how the I2S mode is > configured and it was working. Also the end result is the same in I2S mode > as it was before... > And an obvious question: was the I2S mode worked before my patches? No. Have to figure it out. > > I suppose you used the SND_SOC_DAIFMT_NB_NF with the I2S mode as well (which > should be the correct one)? Yes. > >> Arun > > -- > Péter ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [2.6.30-rc2][PATCH 1/2] ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver 2009-04-16 13:05 ` Arun KS 2009-04-16 13:42 ` Peter Ujfalusi @ 2009-04-16 21:35 ` Troy Kisky 2009-04-17 6:59 ` Jarkko Nikula 1 sibling, 1 reply; 26+ messages in thread From: Troy Kisky @ 2009-04-16 21:35 UTC (permalink / raw) To: Arun KS Cc: Nikula Jarkko (Nokia-D/Helsinki), alsa-devel@alsa-project.org, Peter Ujfalusi, ext Mark Brown Arun KS wrote: > On Thu, Apr 16, 2009 at 4:57 PM, Peter Ujfalusi > <peter.ujfalusi@nokia.com> wrote: >> On Thursday 16 April 2009 14:20:36 ext Arun KS wrote: >>> Hi Guys, >>> >>> I had done some mistake while applying the Jarkko's patch previously. >>> Now its working fine. >>> Sorry for the confusion caused. >> :) >> I have digged out an old omap1510 TRM to see what is going on... >> >> Still, while you have the setup, can you give my two patch a try on OMAP1 to >> see if it is working correctly? > > Your patches are working. > I tested for DSP_A and DSP_B. Both works fine on osk5912 board. > > But when I2S is used there is no audio on Right channel(left channel > is working fine). > Thinks something is missing on tlv320aic23 driver. > > Arun > >>> Arun >>> >>>> Jarkko This sounds like the same problem Davinci has. From a comment in davinci-i2s.c case SND_SOC_DAIFMT_I2S: /* Davinci doesn't support TRUE I2S, but some codecs will have * the left and right channels contiguous. This allows * dsp_a mode to be used with an inverted normal frame clk. * If your codec is master and does not have contiguous * channels, then you will have sound on only one channel. * Try using a different mode, or codec as slave. * * The TLV320AIC33 is an example of a codec where this works. * It has a variable bit clock frequency allowing it to have * valid data on every bit clock. * * The TLV320AIC23 is an example of a codec where this does not * work. It has a fixed bit clock frequency with progressively * more empty bit clock slots between channels as the sample * rate is lowered. */ Troy ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [2.6.30-rc2][PATCH 1/2] ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver 2009-04-16 21:35 ` Troy Kisky @ 2009-04-17 6:59 ` Jarkko Nikula 2009-04-17 9:16 ` Arun KS 0 siblings, 1 reply; 26+ messages in thread From: Jarkko Nikula @ 2009-04-17 6:59 UTC (permalink / raw) To: ext Troy Kisky Cc: Arun KS, Ujfalusi Peter (Nokia-D/Tampere), alsa-devel@alsa-project.org, ext Mark Brown On Thu, 16 Apr 2009 23:35:20 +0200 ext Troy Kisky <troy.kisky@boundarydevices.com> wrote: > Arun KS wrote: > > But when I2S is used there is no audio on Right channel(left channel > > is working fine). > > Thinks something is missing on tlv320aic23 driver. > > > This sounds like the same problem Davinci has. From a comment in > davinci-i2s.c > > case SND_SOC_DAIFMT_I2S: > /* Davinci doesn't support TRUE I2S, but some codecs will have > * the left and right channels contiguous. This allows > * dsp_a mode to be used with an inverted normal frame clk. > * If your codec is master and does not have contiguous > * channels, then you will have sound on only one channel. > * Try using a different mode, or codec as slave. > * > * The TLV320AIC33 is an example of a codec where this works. > * It has a variable bit clock frequency allowing it to have > * valid data on every bit clock. > * > * The TLV320AIC23 is an example of a codec where this does > not > * work. It has a fixed bit clock frequency with progressively > * more empty bit clock slots between channels as the sample > * rate is lowered. > */ Interesting codec. Arun, how is the right channel working with I2S if you try to run with higher rate? E.g. aplay -r [48000 | 96000] /dev/urandom The I2S mode setup in tlv320aic23_set_dai_fmt looks correct. Jarkko ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [2.6.30-rc2][PATCH 1/2] ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver 2009-04-17 6:59 ` Jarkko Nikula @ 2009-04-17 9:16 ` Arun KS 2009-04-17 9:43 ` Jarkko Nikula 0 siblings, 1 reply; 26+ messages in thread From: Arun KS @ 2009-04-17 9:16 UTC (permalink / raw) To: Jarkko Nikula Cc: alsa-devel@alsa-project.org, Ujfalusi Peter (Nokia-D/Tampere), ext Mark Brown, ext Troy Kisky On Fri, Apr 17, 2009 at 12:29 PM, Jarkko Nikula <jarkko.nikula@nokia.com> wrote: > On Thu, 16 Apr 2009 23:35:20 +0200 > ext Troy Kisky <troy.kisky@boundarydevices.com> wrote: > >> Arun KS wrote: >> > But when I2S is used there is no audio on Right channel(left channel >> > is working fine). >> > Thinks something is missing on tlv320aic23 driver. >> > >> This sounds like the same problem Davinci has. From a comment in >> davinci-i2s.c >> >> case SND_SOC_DAIFMT_I2S: >> /* Davinci doesn't support TRUE I2S, but some codecs will have >> * the left and right channels contiguous. This allows >> * dsp_a mode to be used with an inverted normal frame clk. >> * If your codec is master and does not have contiguous >> * channels, then you will have sound on only one channel. >> * Try using a different mode, or codec as slave. >> * >> * The TLV320AIC33 is an example of a codec where this works. >> * It has a variable bit clock frequency allowing it to have >> * valid data on every bit clock. >> * >> * The TLV320AIC23 is an example of a codec where this does >> not >> * work. It has a fixed bit clock frequency with progressively >> * more empty bit clock slots between channels as the sample >> * rate is lowered. >> */ > > Interesting codec. Arun, how is the right channel working with I2S if > you try to run with higher rate? E.g. aplay -r [48000 | > 96000] /dev/urandom Its the same. Right channel remains blank and left channel is playing. > > The I2S mode setup in tlv320aic23_set_dai_fmt looks correct. > > > Jarkko > ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [2.6.30-rc2][PATCH 1/2] ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver 2009-04-17 9:16 ` Arun KS @ 2009-04-17 9:43 ` Jarkko Nikula 0 siblings, 0 replies; 26+ messages in thread From: Jarkko Nikula @ 2009-04-17 9:43 UTC (permalink / raw) To: ext Arun KS Cc: alsa-devel@alsa-project.org, Ujfalusi Peter (Nokia-D/Tampere), ext Mark Brown, ext Troy Kisky On Fri, 17 Apr 2009 11:16:34 +0200 ext Arun KS <getarunks@gmail.com> wrote: > > Interesting codec. Arun, how is the right channel working with I2S > > if you try to run with higher rate? E.g. aplay -r [48000 | > > 96000] /dev/urandom > > Its the same. Right channel remains blank and left channel is playing. > There is a note for the register "Digital Audio Interface Format (Address: 0000111)" but I cannot find is this true for all formats or probably only for I2S. If it's only for I2S then this would explain as MCLK is 12 MHz in OSK5912. "2. In master mode, BCLK = MCLK/4 for all sample rates except for 88.2 kHz and 96 kHz. For 88.2 kHz and 96 kHz sample rate, BCLK = MCLK." Do you have possibility to measure this with an oscilloscope that are there more bit clock cycles than 32? Jarkko ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [2.6.30-rc2][PATCH 1/2] ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver 2009-04-16 11:20 ` Arun KS 2009-04-16 11:27 ` Peter Ujfalusi @ 2009-04-16 11:35 ` Jarkko Nikula 2009-04-16 11:37 ` Mark Brown 2 siblings, 0 replies; 26+ messages in thread From: Jarkko Nikula @ 2009-04-16 11:35 UTC (permalink / raw) To: ext Arun KS Cc: alsa-devel@alsa-project.org, Ujfalusi Peter (Nokia-D/Tampere), ext Mark Brown On Thu, 16 Apr 2009 13:20:36 +0200 ext Arun KS <getarunks@gmail.com> wrote: > Hi Guys, > > I had done some mistake while applying the Jarkko's patch previously. > Now its working fine. > Sorry for the confusion caused. > Thanks for letting us know! We were privately discussing with Peter that can there be some difference in OMAP1 causing this. Even McBSP is quite compatible across different OMAPs there are some differencies between them and those are not so easy to point out from number different TRM's... Jarkko ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [2.6.30-rc2][PATCH 1/2] ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver 2009-04-16 11:20 ` Arun KS 2009-04-16 11:27 ` Peter Ujfalusi 2009-04-16 11:35 ` Jarkko Nikula @ 2009-04-16 11:37 ` Mark Brown 2 siblings, 0 replies; 26+ messages in thread From: Mark Brown @ 2009-04-16 11:37 UTC (permalink / raw) To: Arun KS Cc: Ujfalusi Peter (Nokia-D/Tampere), alsa-devel@alsa-project.org, Jarkko Nikula On Thu, Apr 16, 2009 at 04:50:36PM +0530, Arun KS wrote: > I had done some mistake while applying the Jarkko's patch previously. > Now its working fine. > Sorry for the confusion caused. Ah, that's a relief! ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [2.6.30-rc2][PATCH 1/2] ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver 2009-04-16 10:17 ` Arun KS 2009-04-16 10:19 ` Mark Brown @ 2009-04-16 10:36 ` Peter Ujfalusi 1 sibling, 0 replies; 26+ messages in thread From: Peter Ujfalusi @ 2009-04-16 10:36 UTC (permalink / raw) To: ext Arun KS Cc: alsa-devel@alsa-project.org, Nikula Jarkko (Nokia-D/Helsinki), Mark Brown On Thursday 16 April 2009 13:17:03 ext Arun KS wrote: > On Thu, Apr 16, 2009 at 3:42 PM, Mark Brown <broonie@sirena.org.uk> wrote: > > On Thu, Apr 16, 2009 at 03:38:07PM +0530, Arun KS wrote: > >> This patch is working(tested on osk5912), but with > >> SND_SOC_DAIFMT_NB_IF in the machine driver. When SND_SOC_DAIFMT_NB_NF > >> used, noise on Right channel. > > > > What sort of noise are you getting - is it just noise or is there some > > signal underneath the noise? Can you try playing a signal with no data > > on the left channel and see what effect that has? > > Its not just noise, signal is there underneath. Do you have Jarkko's two patches only? Can you give a try to my two patches on top of that? Can be the problem in the dual/single phase mode? > > > The CODEC doesn't support inverted frame so a configuration with > > inverted frame clock can't be correct. -- Péter ^ permalink raw reply [flat|nested] 26+ messages in thread
* [2.6.30-rc2][PATCH 2/2] ASoC: OMAP: Fix FS polarity in OSK5912 machine driver 2009-04-15 10:48 [2.6.30-rc2][PATCH 0/2] Yet another DSP format fix into OMAP McBSP DAI Jarkko Nikula 2009-04-15 10:48 ` [2.6.30-rc2][PATCH 1/2] ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver Jarkko Nikula @ 2009-04-15 10:48 ` Jarkko Nikula 2009-04-16 11:24 ` Arun KS 1 sibling, 1 reply; 26+ messages in thread From: Jarkko Nikula @ 2009-04-15 10:48 UTC (permalink / raw) To: alsa-devel; +Cc: Arun KS, Jarkko Nikula, Mark Brown Using inverted FS polarity in OSK5912 must be an error since TLV320AIC23 do not have support for inverted polarities. This is mostly due the hassle with the DSP formats in OMAP McBSP DAI and inversion on OMAP side probably just made this configuration working at some point. Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> Cc: Arun KS <arunks@mistralsolutions.com> --- sound/soc/omap/osk5912.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/omap/osk5912.c b/sound/soc/omap/osk5912.c index a952a4e..a4e149b 100644 --- a/sound/soc/omap/osk5912.c +++ b/sound/soc/omap/osk5912.c @@ -62,7 +62,7 @@ static int osk_hw_params(struct snd_pcm_substream *substream, /* Set codec DAI configuration */ err = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_DSP_B | - SND_SOC_DAIFMT_NB_IF | + SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM); if (err < 0) { printk(KERN_ERR "can't set codec DAI configuration\n"); @@ -72,7 +72,7 @@ static int osk_hw_params(struct snd_pcm_substream *substream, /* Set cpu DAI configuration */ err = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_DSP_B | - SND_SOC_DAIFMT_NB_IF | + SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM); if (err < 0) { printk(KERN_ERR "can't set cpu DAI configuration\n"); -- 1.6.2.1 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [2.6.30-rc2][PATCH 2/2] ASoC: OMAP: Fix FS polarity in OSK5912 machine driver 2009-04-15 10:48 ` [2.6.30-rc2][PATCH 2/2] ASoC: OMAP: Fix FS polarity in OSK5912 machine driver Jarkko Nikula @ 2009-04-16 11:24 ` Arun KS 0 siblings, 0 replies; 26+ messages in thread From: Arun KS @ 2009-04-16 11:24 UTC (permalink / raw) To: Jarkko Nikula; +Cc: alsa-devel, Mark Brown On Wed, Apr 15, 2009 at 4:18 PM, Jarkko Nikula <jarkko.nikula@nokia.com> wrote: > Using inverted FS polarity in OSK5912 must be an error since TLV320AIC23 > do not have support for inverted polarities. This is mostly due the hassle > with the DSP formats in OMAP McBSP DAI and inversion on OMAP side probably > just made this configuration working at some point. > > Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> > Cc: Arun KS <arunks@mistralsolutions.com> > --- > sound/soc/omap/osk5912.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/sound/soc/omap/osk5912.c b/sound/soc/omap/osk5912.c > index a952a4e..a4e149b 100644 > --- a/sound/soc/omap/osk5912.c > +++ b/sound/soc/omap/osk5912.c > @@ -62,7 +62,7 @@ static int osk_hw_params(struct snd_pcm_substream *substream, > /* Set codec DAI configuration */ > err = snd_soc_dai_set_fmt(codec_dai, > SND_SOC_DAIFMT_DSP_B | > - SND_SOC_DAIFMT_NB_IF | > + SND_SOC_DAIFMT_NB_NF | > SND_SOC_DAIFMT_CBM_CFM); > if (err < 0) { > printk(KERN_ERR "can't set codec DAI configuration\n"); > @@ -72,7 +72,7 @@ static int osk_hw_params(struct snd_pcm_substream *substream, > /* Set cpu DAI configuration */ > err = snd_soc_dai_set_fmt(cpu_dai, > SND_SOC_DAIFMT_DSP_B | > - SND_SOC_DAIFMT_NB_IF | > + SND_SOC_DAIFMT_NB_NF | > SND_SOC_DAIFMT_CBM_CFM); > if (err < 0) { > printk(KERN_ERR "can't set cpu DAI configuration\n"); > -- > 1.6.2.1 Tested on osk5912. Acked-by: Arun KS <arunks@mistralsolutions.com> > > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@alsa-project.org > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel > ^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2009-04-17 9:42 UTC | newest] Thread overview: 26+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-04-15 10:48 [2.6.30-rc2][PATCH 0/2] Yet another DSP format fix into OMAP McBSP DAI Jarkko Nikula 2009-04-15 10:48 ` [2.6.30-rc2][PATCH 1/2] ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver Jarkko Nikula 2009-04-15 11:04 ` Peter Ujfalusi 2009-04-15 11:56 ` Mark Brown 2009-04-16 10:08 ` Arun KS 2009-04-16 10:12 ` Mark Brown 2009-04-16 10:17 ` Arun KS 2009-04-16 10:19 ` Mark Brown 2009-04-16 10:23 ` Arun KS 2009-04-16 10:31 ` Jarkko Nikula 2009-04-16 10:33 ` Mark Brown 2009-04-16 10:47 ` Jarkko Nikula 2009-04-16 11:20 ` Arun KS 2009-04-16 11:27 ` Peter Ujfalusi 2009-04-16 13:05 ` Arun KS 2009-04-16 13:42 ` Peter Ujfalusi 2009-04-16 13:53 ` Arun KS 2009-04-16 21:35 ` Troy Kisky 2009-04-17 6:59 ` Jarkko Nikula 2009-04-17 9:16 ` Arun KS 2009-04-17 9:43 ` Jarkko Nikula 2009-04-16 11:35 ` Jarkko Nikula 2009-04-16 11:37 ` Mark Brown 2009-04-16 10:36 ` Peter Ujfalusi 2009-04-15 10:48 ` [2.6.30-rc2][PATCH 2/2] ASoC: OMAP: Fix FS polarity in OSK5912 machine driver Jarkko Nikula 2009-04-16 11:24 ` Arun KS
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.