* [PATCH] ALSA: ASoC: McASP: Fix data rotation for playback. Enables 24bit audio playback
@ 2013-01-15 14:41 Michal Bachraty
2013-01-18 8:22 ` [alsa-devel] " Hebbar, Gururaja
0 siblings, 1 reply; 4+ messages in thread
From: Michal Bachraty @ 2013-01-15 14:41 UTC (permalink / raw)
To: tiwai, perex; +Cc: lrg, linux-kernel, alsa-devel, broonie, Michal Bachraty
Signed-off-by: Michal Bachraty <michal.bachraty@streamunlimited.com>
---
sound/soc/davinci/davinci-mcasp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
index 13f8d73..a03bece 100644
--- a/sound/soc/davinci/davinci-mcasp.c
+++ b/sound/soc/davinci/davinci-mcasp.c
@@ -626,7 +626,7 @@ static int davinci_config_channel_size(struct davinci_audio_dev *dev,
int word_length)
{
u32 fmt;
- u32 rotate = (32 - word_length) / 4;
+ u32 rotate = (word_length / 4) & 0x7;
u32 mask = (1ULL << word_length) - 1;
/*
--
1.7.9.5
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [alsa-devel] [PATCH] ALSA: ASoC: McASP: Fix data rotation for playback. Enables 24bit audio playback
2013-01-15 14:41 [PATCH] ALSA: ASoC: McASP: Fix data rotation for playback. Enables 24bit audio playback Michal Bachraty
@ 2013-01-18 8:22 ` Hebbar, Gururaja
2013-01-18 8:43 ` Michal Bachraty
0 siblings, 1 reply; 4+ messages in thread
From: Hebbar, Gururaja @ 2013-01-18 8:22 UTC (permalink / raw)
To: Michal Bachraty, tiwai, perex
Cc: alsa-devel, broonie, Girdwood, Liam, linux-kernel
On Tue, Jan 15, 2013 at 20:11:00, Michal Bachraty wrote:
> Signed-off-by: Michal Bachraty <michal.bachraty@streamunlimited.com>
Even simple patches need a simple changelog.
Add a brief description about what & why it is done?
> ---
> sound/soc/davinci/davinci-mcasp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
> index 13f8d73..a03bece 100644
> --- a/sound/soc/davinci/davinci-mcasp.c
> +++ b/sound/soc/davinci/davinci-mcasp.c
> @@ -626,7 +626,7 @@ static int davinci_config_channel_size(struct davinci_audio_dev *dev,
> int word_length)
> {
> u32 fmt;
> - u32 rotate = (32 - word_length) / 4;
> + u32 rotate = (word_length / 4) & 0x7;
> u32 mask = (1ULL << word_length) - 1;
>
> /*
> --
> 1.7.9.5
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
Regards,
Gururaja
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [alsa-devel] [PATCH] ALSA: ASoC: McASP: Fix data rotation for playback. Enables 24bit audio playback
2013-01-18 8:22 ` [alsa-devel] " Hebbar, Gururaja
@ 2013-01-18 8:43 ` Michal Bachraty
2013-01-18 8:48 ` Hebbar, Gururaja
0 siblings, 1 reply; 4+ messages in thread
From: Michal Bachraty @ 2013-01-18 8:43 UTC (permalink / raw)
To: Hebbar, Gururaja
Cc: tiwai, perex, alsa-devel, broonie, Girdwood, Liam, linux-kernel
On Friday, January 18, 2013 08:22:53 Hebbar, Gururaja wrote:
> On Tue, Jan 15, 2013 at 20:11:00, Michal Bachraty wrote:
> > Signed-off-by: Michal Bachraty <michal.bachraty@streamunlimited.com>
>
> Even simple patches need a simple changelog.
> Add a brief description about what & why it is done?
>
Hi Gurujaja,
> > - u32 rotate = (32 - word_length) / 4;
This implementation is wrong, but it works only for 16, or 32 bit audio data.
(rotation for 16 or 32 bit is same as in code I present) Mcasp rotated data in
4 bits (max value 0x7)and then masks them . That data are sended to i2s bus.
For 24 bit or 20 bit or other data formats, this code rotates data badly and
you hear somethink like noise. You need to use
> > + u32 rotate = (word_length / 4) & 0x7;
to proper data rotation.
Regards,
Michal
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [alsa-devel] [PATCH] ALSA: ASoC: McASP: Fix data rotation for playback. Enables 24bit audio playback
2013-01-18 8:43 ` Michal Bachraty
@ 2013-01-18 8:48 ` Hebbar, Gururaja
0 siblings, 0 replies; 4+ messages in thread
From: Hebbar, Gururaja @ 2013-01-18 8:48 UTC (permalink / raw)
To: Michal Bachraty
Cc: tiwai, perex, alsa-devel, broonie, Girdwood, Liam, linux-kernel
On Fri, Jan 18, 2013 at 14:13:40, Michal Bachraty wrote:
> On Friday, January 18, 2013 08:22:53 Hebbar, Gururaja wrote:
> > On Tue, Jan 15, 2013 at 20:11:00, Michal Bachraty wrote:
> > > Signed-off-by: Michal Bachraty <michal.bachraty@streamunlimited.com>
> >
> > Even simple patches need a simple changelog.
> > Add a brief description about what & why it is done?
> >
>
> Hi Gurujaja,
>
> > > - u32 rotate = (32 - word_length) / 4;
> This implementation is wrong, but it works only for 16, or 32 bit audio data.
> (rotation for 16 or 32 bit is same as in code I present) Mcasp rotated data in
> 4 bits (max value 0x7)and then masks them . That data are sended to i2s bus.
> For 24 bit or 20 bit or other data formats, this code rotates data badly and
> you hear somethink like noise. You need to use
> > > + u32 rotate = (word_length / 4) & 0x7;
> to proper data rotation.
Correct. Now can you add the above info into the patch and re-submit.
That way when users sees this patch, they will get all the info needed.
>
> Regards,
> Michal
>
>
Regards,
Gururaja
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-01-18 8:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-15 14:41 [PATCH] ALSA: ASoC: McASP: Fix data rotation for playback. Enables 24bit audio playback Michal Bachraty
2013-01-18 8:22 ` [alsa-devel] " Hebbar, Gururaja
2013-01-18 8:43 ` Michal Bachraty
2013-01-18 8:48 ` Hebbar, Gururaja
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®