summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorDaniel Baluta <daniel.baluta@nxp.com>2019-04-21 19:39:08 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-31 06:44:59 -0700
commitd50a3cd0a0cc7e4b6f8dd622e526cbd1413855f2 (patch)
tree63e66aa3b5cc98ed0eaf1a7f6fec1871e0b037b7 /sound
parent976c828c229b9d5dcd972a8fd264600475d2080b (diff)
downloadlinux-stable-d50a3cd0a0cc7e4b6f8dd622e526cbd1413855f2.tar.gz
linux-stable-d50a3cd0a0cc7e4b6f8dd622e526cbd1413855f2.tar.bz2
linux-stable-d50a3cd0a0cc7e4b6f8dd622e526cbd1413855f2.zip
ASoC: fsl_sai: Update is_slave_mode with correct value
[ Upstream commit ddb351145a967ee791a0fb0156852ec2fcb746ba ] 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>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/fsl/fsl_sai.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index 4163f2cfc06f..bfc5b21d0c3f 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -268,12 +268,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;