* [PATCH] ASoC: fsl_sai: initialize is_dsp_mode flag
@ 2023-01-16 7:07 Shengjiu Wang
2023-01-16 9:10 ` Iuliana Prodan
2023-01-16 14:48 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Shengjiu Wang @ 2023-01-16 7:07 UTC (permalink / raw)
To: nicoleotsuka, Xiubo.Lee, festevam, shengjiu.wang, lgirdwood,
broonie, perex, tiwai, alsa-devel
Cc: linuxppc-dev, linux-kernel
Initialize is_dsp_mode flag in the beginning of function
fsl_sai_set_dai_fmt_tr().
When the DAIFMT is DAIFMT_DSP_B the first time, is_dsp_mode is
true, then the second time DAIFMT is DAIFMT_I2S, is_dsp_mode
still true, which is a wrong state. So need to initialize
is_dsp_mode flag every time.
Fixes: a3f7dcc9cc03 ("ASoC: fsl-sai: Add SND_SOC_DAIFMT_DSP_A/B support.")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
sound/soc/fsl/fsl_sai.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index 1c9be8a5dcb1..355ef29af48c 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -281,6 +281,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai *cpu_dai,
val_cr4 |= FSL_SAI_CR4_MF;
sai->is_pdm_mode = false;
+ sai->is_dsp_mode = false;
/* DAI mode */
switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
case SND_SOC_DAIFMT_I2S:
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: fsl_sai: initialize is_dsp_mode flag
2023-01-16 7:07 [PATCH] ASoC: fsl_sai: initialize is_dsp_mode flag Shengjiu Wang
@ 2023-01-16 9:10 ` Iuliana Prodan
2023-01-16 14:48 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Iuliana Prodan @ 2023-01-16 9:10 UTC (permalink / raw)
To: Shengjiu Wang, nicoleotsuka, Xiubo.Lee, festevam, shengjiu.wang,
lgirdwood, broonie, perex, tiwai, alsa-devel
Cc: linuxppc-dev, linux-kernel
On 1/16/2023 9:07 AM, Shengjiu Wang wrote:
> Initialize is_dsp_mode flag in the beginning of function
> fsl_sai_set_dai_fmt_tr().
>
> When the DAIFMT is DAIFMT_DSP_B the first time, is_dsp_mode is
> true, then the second time DAIFMT is DAIFMT_I2S, is_dsp_mode
> still true, which is a wrong state. So need to initialize
> is_dsp_mode flag every time.
>
> Fixes: a3f7dcc9cc03 ("ASoC: fsl-sai: Add SND_SOC_DAIFMT_DSP_A/B support.")
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Thanks,
Iulia
> ---
> sound/soc/fsl/fsl_sai.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
> index 1c9be8a5dcb1..355ef29af48c 100644
> --- a/sound/soc/fsl/fsl_sai.c
> +++ b/sound/soc/fsl/fsl_sai.c
> @@ -281,6 +281,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai *cpu_dai,
> val_cr4 |= FSL_SAI_CR4_MF;
>
> sai->is_pdm_mode = false;
> + sai->is_dsp_mode = false;
> /* DAI mode */
> switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
> case SND_SOC_DAIFMT_I2S:
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: fsl_sai: initialize is_dsp_mode flag
2023-01-16 7:07 [PATCH] ASoC: fsl_sai: initialize is_dsp_mode flag Shengjiu Wang
2023-01-16 9:10 ` Iuliana Prodan
@ 2023-01-16 14:48 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2023-01-16 14:48 UTC (permalink / raw)
To: nicoleotsuka, Xiubo.Lee, festevam, shengjiu.wang, lgirdwood,
perex, tiwai, alsa-devel, Shengjiu Wang
Cc: linuxppc-dev, linux-kernel
On Mon, 16 Jan 2023 15:07:54 +0800, Shengjiu Wang wrote:
> Initialize is_dsp_mode flag in the beginning of function
> fsl_sai_set_dai_fmt_tr().
>
> When the DAIFMT is DAIFMT_DSP_B the first time, is_dsp_mode is
> true, then the second time DAIFMT is DAIFMT_I2S, is_dsp_mode
> still true, which is a wrong state. So need to initialize
> is_dsp_mode flag every time.
>
> [...]
Applied to
broonie/sound.git for-next
Thanks!
[1/1] ASoC: fsl_sai: initialize is_dsp_mode flag
commit: a23924b7dd7b748fff8e305e1daf590fed2af21b
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-01-16 14:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-16 7:07 [PATCH] ASoC: fsl_sai: initialize is_dsp_mode flag Shengjiu Wang
2023-01-16 9:10 ` Iuliana Prodan
2023-01-16 14:48 ` Mark Brown
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®