Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1225877 > unrolled thread
| Started by | Adam Thomson <Adam.Thomson.Opensource@diasemi.com> |
|---|---|
| First post | 2015-09-16 11:20 +0200 |
| Last post | 2015-09-19 02:40 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[RESEND PATCH 1/1] ASoC: fsl_ssi: Fix checking of dai format for AC97 mode Adam Thomson <Adam.Thomson.Opensource@diasemi.com> - 2015-09-16 11:20 +0200
Re: [RESEND PATCH 1/1] ASoC: fsl_ssi: Fix checking of dai format for AC97 mode undefined@vger.kernel.org - 2015-09-19 02:40 +0200
| From | Adam Thomson <Adam.Thomson.Opensource@diasemi.com> |
|---|---|
| Date | 2015-09-16 11:20 +0200 |
| Subject | [RESEND PATCH 1/1] ASoC: fsl_ssi: Fix checking of dai format for AC97 mode |
| Message-ID | <q9h2H-7W-39@gated-at.bofh.it> |
Current code incorrectly treats dai format for AC97 as bit mask
whereas it's actually an integer value. This causes DAI formats
other than AC97 (e.g. DSP_B) to trigger AC97 related code,
which is incorrect and breaks functionality. This patch fixes
the code to correctly compare values to determine AC97 or not.
Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
---
Patch based on v4.3-rc1.
sound/soc/fsl/fsl_ssi.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 8ec6fb2..37c5cd4 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -249,7 +249,8 @@ MODULE_DEVICE_TABLE(of, fsl_ssi_ids);
static bool fsl_ssi_is_ac97(struct fsl_ssi_private *ssi_private)
{
- return !!(ssi_private->dai_fmt & SND_SOC_DAIFMT_AC97);
+ return (ssi_private->dai_fmt & SND_SOC_DAIFMT_FORMAT_MASK) ==
+ SND_SOC_DAIFMT_AC97;
}
static bool fsl_ssi_is_i2s_master(struct fsl_ssi_private *ssi_private)
@@ -947,7 +948,7 @@ static int _fsl_ssi_set_dai_fmt(struct device *dev,
CCSR_SSI_SCR_TCH_EN);
}
- if (fmt & SND_SOC_DAIFMT_AC97)
+ if ((fmt & SND_SOC_DAIFMT_FORMAT_MASK) == SND_SOC_DAIFMT_AC97)
fsl_ssi_setup_ac97(ssi_private);
return 0;
--
1.9.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | undefined@vger.kernel.org |
|---|---|
| Date | 2015-09-19 02:40 +0200 |
| Subject | Re: [RESEND PATCH 1/1] ASoC: fsl_ssi: Fix checking of dai format for AC97 mode |
| Message-ID | <qaem5-2ak-3@gated-at.bofh.it> |
| In reply to | #1225877 |
Adam Thomson wrote: > Current code incorrectly treats dai format for AC97 as bit mask > whereas it's actually an integer value. This causes DAI formats > other than AC97 (e.g. DSP_B) to trigger AC97 related code, > which is incorrect and breaks functionality. This patch fixes > the code to correctly compare values to determine AC97 or not. > > Signed-off-by: Adam Thomson<Adam.Thomson.Opensource@diasemi.com> Acked-by: Timur Tabi <timur@tabi.org> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web