* [PATCH v2 1/1] ASoC: fsl_ssi: add CCSR_SSI_SOR to volatile register list
@ 2016-04-25 18:36 Caleb Crome
2016-04-29 3:41 ` [alsa-devel] " Fabio Estevam
2016-04-29 3:45 ` Nicolin Chen
0 siblings, 2 replies; 3+ messages in thread
From: Caleb Crome @ 2016-04-25 18:36 UTC (permalink / raw)
To: Timur Tabi, Nicolin Chen, Xiubo Li, Liam Girdwood, Mark Brown,
Jaroslav Kysela, Takashi Iwai, alsa-devel, linuxppc-dev,
linux-kernel
Cc: Caleb Crome
The CCSR_SSI_SOR is a register that clears the TX and/or the RX fifo
on the i.MX SSI port. The fsl_ssi_trigger writes this register in
order to clear the fifo at trigger time.
However, since the CCSR_SSI_SOR register is not in the volatile list,
the caching mechanism prevented the register write in the trigger
function. This caused the fifo to not be cleared (because the value
was unchanged from the last time the register was written), and thus
causes the channels in both TDM or simple I2S mode to slip and be in
the wrong time slots on SSI restart.
This has gone unnoticed for so long because with simple stereo mode,
the consequence is that left and right are swapped, which isn't that
noticeable. However, it's catestrophic in some systems that
require the channels to be in the right slots.
Signed-off-by: Caleb Crome <caleb@crome.org>
Suggested-by: Arnaud Mouiche <arnaud.mouiche@invoxia.com>
---
sound/soc/fsl/fsl_ssi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 216e3cb..2f3bf9c 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -151,6 +151,7 @@ static bool fsl_ssi_volatile_reg(struct device *dev, unsigned int reg)
case CCSR_SSI_SACDAT:
case CCSR_SSI_SATAG:
case CCSR_SSI_SACCST:
+ case CCSR_SSI_SOR:
return true;
default:
return false;
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [alsa-devel] [PATCH v2 1/1] ASoC: fsl_ssi: add CCSR_SSI_SOR to volatile register list
2016-04-25 18:36 [PATCH v2 1/1] ASoC: fsl_ssi: add CCSR_SSI_SOR to volatile register list Caleb Crome
@ 2016-04-29 3:41 ` Fabio Estevam
2016-04-29 3:45 ` Nicolin Chen
1 sibling, 0 replies; 3+ messages in thread
From: Fabio Estevam @ 2016-04-29 3:41 UTC (permalink / raw)
To: Caleb Crome
Cc: Timur Tabi, Nicolin Chen, Xiubo Li, Liam Girdwood, Mark Brown,
Jaroslav Kysela, Takashi Iwai, alsa-devel@alsa-project.org,
linuxppc-dev@lists.ozlabs.org, linux-kernel
On Mon, Apr 25, 2016 at 3:36 PM, Caleb Crome <caleb@crome.org> wrote:
> The CCSR_SSI_SOR is a register that clears the TX and/or the RX fifo
> on the i.MX SSI port. The fsl_ssi_trigger writes this register in
> order to clear the fifo at trigger time.
>
> However, since the CCSR_SSI_SOR register is not in the volatile list,
> the caching mechanism prevented the register write in the trigger
> function. This caused the fifo to not be cleared (because the value
> was unchanged from the last time the register was written), and thus
> causes the channels in both TDM or simple I2S mode to slip and be in
> the wrong time slots on SSI restart.
>
> This has gone unnoticed for so long because with simple stereo mode,
> the consequence is that left and right are swapped, which isn't that
> noticeable. However, it's catestrophic in some systems that
> require the channels to be in the right slots.
>
> Signed-off-by: Caleb Crome <caleb@crome.org>
> Suggested-by: Arnaud Mouiche <arnaud.mouiche@invoxia.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2 1/1] ASoC: fsl_ssi: add CCSR_SSI_SOR to volatile register list
2016-04-25 18:36 [PATCH v2 1/1] ASoC: fsl_ssi: add CCSR_SSI_SOR to volatile register list Caleb Crome
2016-04-29 3:41 ` [alsa-devel] " Fabio Estevam
@ 2016-04-29 3:45 ` Nicolin Chen
1 sibling, 0 replies; 3+ messages in thread
From: Nicolin Chen @ 2016-04-29 3:45 UTC (permalink / raw)
To: Caleb Crome
Cc: Timur Tabi, Xiubo Li, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, alsa-devel, linuxppc-dev, linux-kernel
On Mon, Apr 25, 2016 at 11:36:18AM -0700, Caleb Crome wrote:
> The CCSR_SSI_SOR is a register that clears the TX and/or the RX fifo
> on the i.MX SSI port. The fsl_ssi_trigger writes this register in
> order to clear the fifo at trigger time.
>
> However, since the CCSR_SSI_SOR register is not in the volatile list,
> the caching mechanism prevented the register write in the trigger
> function. This caused the fifo to not be cleared (because the value
> was unchanged from the last time the register was written), and thus
> causes the channels in both TDM or simple I2S mode to slip and be in
> the wrong time slots on SSI restart.
>
> This has gone unnoticed for so long because with simple stereo mode,
> the consequence is that left and right are swapped, which isn't that
> noticeable. However, it's catestrophic in some systems that
> require the channels to be in the right slots.
>
> Signed-off-by: Caleb Crome <caleb@crome.org>
> Suggested-by: Arnaud Mouiche <arnaud.mouiche@invoxia.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Thanks
>
> ---
> sound/soc/fsl/fsl_ssi.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
> index 216e3cb..2f3bf9c 100644
> --- a/sound/soc/fsl/fsl_ssi.c
> +++ b/sound/soc/fsl/fsl_ssi.c
> @@ -151,6 +151,7 @@ static bool fsl_ssi_volatile_reg(struct device *dev, unsigned int reg)
> case CCSR_SSI_SACDAT:
> case CCSR_SSI_SATAG:
> case CCSR_SSI_SACCST:
> + case CCSR_SSI_SOR:
> return true;
> default:
> return false;
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-04-29 3:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-25 18:36 [PATCH v2 1/1] ASoC: fsl_ssi: add CCSR_SSI_SOR to volatile register list Caleb Crome
2016-04-29 3:41 ` [alsa-devel] " Fabio Estevam
2016-04-29 3:45 ` Nicolin Chen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).