mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 18:19:28 +09:00
ASoC: fsl_sai: Update is_slave_mode with correct value
[ Upstream commit ddb351145a ]
is_slave_mode defaults to false because sai structure
that contains it is kzalloc'ed.
Anyhow, if we decide to set the following configuration
SAI slave -> SAI master, is_slave_mode will remain set on true
although SAI being master it should be set to false.
Fix this by updating is_slave_mode for each call of
fsl_sai_set_dai_fmt.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a0356372f4
commit
0d7325abe2
@@ -274,12 +274,14 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai *cpu_dai,
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
val_cr2 |= FSL_SAI_CR2_BCD_MSTR;
|
||||
val_cr4 |= FSL_SAI_CR4_FSD_MSTR;
|
||||
sai->is_slave_mode = false;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFM:
|
||||
sai->is_slave_mode = true;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBS_CFM:
|
||||
val_cr2 |= FSL_SAI_CR2_BCD_MSTR;
|
||||
sai->is_slave_mode = false;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_CBM_CFS:
|
||||
val_cr4 |= FSL_SAI_CR4_FSD_MSTR;
|
||||
|
||||
Reference in New Issue
Block a user