All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: fsl-ssi: Fix bitclock calculation for master mode
@ 2015-07-03 10:39 ` Juergen Borleis
  0 siblings, 0 replies; 5+ messages in thread
From: Juergen Borleis @ 2015-07-03 10:39 UTC (permalink / raw)
  To: linux-kernel
  Cc: linuxppc-dev, alsa-devel, Takashi Iwai, Jaroslav Kysela,
	Mark Brown, Liam Girdwood, Xiubo Li, Nicolin Chen, Timur Tabi,
	kernel, linux-arm-kernel

According to the datasheet 'pm', 'psr' and 'div2' should never be all 0.
Since commit 541b03ad6cfe ("ASoC: fsl_ssi: Fix the incorrect limitation of
the bit clock rate") this can happen, because for some bitclock rates
'pm' = 0 seems to be a valid choice but does not work due to hardware
restrictions. This results into a bad hardware behaviour (slow audio for
example). Feature tested on a i.MX25.

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
---
 sound/soc/fsl/fsl_ssi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index c7647e0..c0b940e 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -633,7 +633,7 @@ static int fsl_ssi_set_bclk(struct snd_pcm_substream *substream,
 		sub *= 100000;
 		do_div(sub, freq);
 
-		if (sub < savesub) {
+		if (sub < savesub && !(i == 0 && psr == 0 && div2 == 0)) {
 			baudrate = tmprate;
 			savesub = sub;
 			pm = i;
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] ASoC: fsl-ssi: Fix bitclock calculation for master mode
@ 2015-07-03 10:39 ` Juergen Borleis
  0 siblings, 0 replies; 5+ messages in thread
From: Juergen Borleis @ 2015-07-03 10:39 UTC (permalink / raw)
  To: linux-arm-kernel

According to the datasheet 'pm', 'psr' and 'div2' should never be all 0.
Since commit 541b03ad6cfe ("ASoC: fsl_ssi: Fix the incorrect limitation of
the bit clock rate") this can happen, because for some bitclock rates
'pm' = 0 seems to be a valid choice but does not work due to hardware
restrictions. This results into a bad hardware behaviour (slow audio for
example). Feature tested on a i.MX25.

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
---
 sound/soc/fsl/fsl_ssi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index c7647e0..c0b940e 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -633,7 +633,7 @@ static int fsl_ssi_set_bclk(struct snd_pcm_substream *substream,
 		sub *= 100000;
 		do_div(sub, freq);
 
-		if (sub < savesub) {
+		if (sub < savesub && !(i == 0 && psr == 0 && div2 == 0)) {
 			baudrate = tmprate;
 			savesub = sub;
 			pm = i;
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [alsa-devel] [PATCH] ASoC: fsl-ssi: Fix bitclock calculation for master mode
  2015-07-03 10:39 ` Juergen Borleis
@ 2015-07-03 17:44   ` Nicolin Chen
  -1 siblings, 0 replies; 5+ messages in thread
From: Nicolin Chen @ 2015-07-03 17:44 UTC (permalink / raw)
  To: Juergen Borleis
  Cc: linux-kernel, alsa-devel, Timur Tabi, Xiubo Li, Takashi Iwai,
	Liam Girdwood, Mark Brown, kernel, linuxppc-dev,
	linux-arm-kernel

On Fri, Jul 03, 2015 at 12:39:36PM +0200, Juergen Borleis wrote:
> According to the datasheet 'pm', 'psr' and 'div2' should never be all 0.
> Since commit 541b03ad6cfe ("ASoC: fsl_ssi: Fix the incorrect limitation of
> the bit clock rate") this can happen, because for some bitclock rates
> 'pm' = 0 seems to be a valid choice but does not work due to hardware
> restrictions. This results into a bad hardware behaviour (slow audio for
> example). Feature tested on a i.MX25.
> 
> Signed-off-by: Juergen Borleis <jbe@pengutronix.de>

Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>

Thank you!

> ---
>  sound/soc/fsl/fsl_ssi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
> index c7647e0..c0b940e 100644
> --- a/sound/soc/fsl/fsl_ssi.c
> +++ b/sound/soc/fsl/fsl_ssi.c
> @@ -633,7 +633,7 @@ static int fsl_ssi_set_bclk(struct snd_pcm_substream *substream,
>  		sub *= 100000;
>  		do_div(sub, freq);
>  
> -		if (sub < savesub) {
> +		if (sub < savesub && !(i == 0 && psr == 0 && div2 == 0)) {
>  			baudrate = tmprate;
>  			savesub = sub;
>  			pm = i;
> -- 
> 2.1.4
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [alsa-devel] [PATCH] ASoC: fsl-ssi: Fix bitclock calculation for master mode
@ 2015-07-03 17:44   ` Nicolin Chen
  0 siblings, 0 replies; 5+ messages in thread
From: Nicolin Chen @ 2015-07-03 17:44 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jul 03, 2015 at 12:39:36PM +0200, Juergen Borleis wrote:
> According to the datasheet 'pm', 'psr' and 'div2' should never be all 0.
> Since commit 541b03ad6cfe ("ASoC: fsl_ssi: Fix the incorrect limitation of
> the bit clock rate") this can happen, because for some bitclock rates
> 'pm' = 0 seems to be a valid choice but does not work due to hardware
> restrictions. This results into a bad hardware behaviour (slow audio for
> example). Feature tested on a i.MX25.
> 
> Signed-off-by: Juergen Borleis <jbe@pengutronix.de>

Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>

Thank you!

> ---
>  sound/soc/fsl/fsl_ssi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
> index c7647e0..c0b940e 100644
> --- a/sound/soc/fsl/fsl_ssi.c
> +++ b/sound/soc/fsl/fsl_ssi.c
> @@ -633,7 +633,7 @@ static int fsl_ssi_set_bclk(struct snd_pcm_substream *substream,
>  		sub *= 100000;
>  		do_div(sub, freq);
>  
> -		if (sub < savesub) {
> +		if (sub < savesub && !(i == 0 && psr == 0 && div2 == 0)) {
>  			baudrate = tmprate;
>  			savesub = sub;
>  			pm = i;
> -- 
> 2.1.4
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Applied "ASoC: fsl-ssi: Fix bitclock calculation for master mode" to the asoc tree
  2015-07-03 10:39 ` Juergen Borleis
  (?)
  (?)
@ 2015-07-07 13:57 ` Mark Brown
  -1 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2015-07-07 13:57 UTC (permalink / raw)
  To: Juergen Borleis, Nicolin Chen, Mark Brown; +Cc: alsa-devel

The patch

   ASoC: fsl-ssi: Fix bitclock calculation for master mode

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From ebac95a9208e6b5f134df8518df1bfd1b3fee354 Mon Sep 17 00:00:00 2001
From: Juergen Borleis <jbe@pengutronix.de>
Date: Fri, 3 Jul 2015 12:39:36 +0200
Subject: [PATCH] ASoC: fsl-ssi: Fix bitclock calculation for master mode

According to the datasheet 'pm', 'psr' and 'div2' should never be all 0.
Since commit 541b03ad6cfe ("ASoC: fsl_ssi: Fix the incorrect limitation of
the bit clock rate") this can happen, because for some bitclock rates
'pm' = 0 seems to be a valid choice but does not work due to hardware
restrictions. This results into a bad hardware behaviour (slow audio for
example). Feature tested on a i.MX25.

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/fsl/fsl_ssi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index c7647e0..c0b940e 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -633,7 +633,7 @@ static int fsl_ssi_set_bclk(struct snd_pcm_substream *substream,
 		sub *= 100000;
 		do_div(sub, freq);
 
-		if (sub < savesub) {
+		if (sub < savesub && !(i == 0 && psr == 0 && div2 == 0)) {
 			baudrate = tmprate;
 			savesub = sub;
 			pm = i;
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-07-07 13:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-03 10:39 [PATCH] ASoC: fsl-ssi: Fix bitclock calculation for master mode Juergen Borleis
2015-07-03 10:39 ` Juergen Borleis
2015-07-03 17:44 ` [alsa-devel] " Nicolin Chen
2015-07-03 17:44   ` Nicolin Chen
2015-07-07 13:57 ` Applied "ASoC: fsl-ssi: Fix bitclock calculation for master mode" to the asoc tree Mark Brown

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.