ASoC: Intel: sof-rt5682: fix AMP quirk support [Linux 5.2]

ASoC: Intel: sof-rt5682: fix AMP quirk support [Linux 5.2]

This Linux kernel change "ASoC: Intel: sof-rt5682: fix AMP quirk support" is included in the Linux 5.2 release. This change is authored by Sathya Prakash M R <sathya.prakash.m.r [at] intel.com> on Mon May 20 14:46:42 2019 -0500. The commit for this change in Linux stable tree is df93661 (patch).

ASoC: Intel: sof-rt5682: fix AMP quirk support

The use of BIT/GENMASK was incorrect, fix.

Signed-off-by: Sathya Prakash M R <[email protected]>
Signed-off-by: Pierre-Louis Bossart <[email protected]>
Signed-off-by: Mark Brown <[email protected]>

There are 5 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 sound/soc/intel/boards/sof_rt5682.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/intel/boards/sof_rt5682.c b/sound/soc/intel/boards/sof_rt5682.c
index 39ddefe..3343dbc 100644
--- a/sound/soc/intel/boards/sof_rt5682.c
+++ b/sound/soc/intel/boards/sof_rt5682.c
@@ -29,9 +29,10 @@
 #define SOF_RT5682_MCLK_EN         BIT(3)
 #define SOF_RT5682_MCLK_24MHZ          BIT(4)
 #define SOF_SPEAKER_AMP_PRESENT        BIT(5)
-#define SOF_RT5682_SSP_AMP(quirk)      ((quirk) & GENMASK(8, 6))
-#define SOF_RT5682_SSP_AMP_MASK            (GENMASK(8, 6))
 #define SOF_RT5682_SSP_AMP_SHIFT       6
+#define SOF_RT5682_SSP_AMP_MASK                 (GENMASK(8, 6))
+#define SOF_RT5682_SSP_AMP(quirk)  \
+   (((quirk) << SOF_RT5682_SSP_AMP_SHIFT) & SOF_RT5682_SSP_AMP_MASK)

 /* Default: MCLK on, MCLK 19.2M, SSP0  */
 static unsigned long sof_rt5682_quirk = SOF_RT5682_MCLK_EN |

Leave a Reply

Your email address will not be published. Required fields are marked *