[PATCH] ASoC: rt5682s Minor modifications to look more sensibly
derek.fang at realtek.com
derek.fang at realtek.com
Wed Sep 29 13:18:20 CEST 2021
From: Derek Fang <derek.fang at realtek.com>
These modifications wouldn't affect the driver's behavior,
but the code could look more sensibly.
1. Remove the volatile reg (0x0000) in reg_default.
2. Use dev_dbg instead of pr_debug.
3. Revise the macro RT5682S_PLLB_SRC_MASK to 0x1
because the mux is only two-source.
Signed-off-by: Derek Fang <derek.fang at realtek.com>
---
sound/soc/codecs/rt5682s.c | 3 +--
sound/soc/codecs/rt5682s.h | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/rt5682s.c b/sound/soc/codecs/rt5682s.c
index d3e965b2e707..122adeb7beb1 100644
--- a/sound/soc/codecs/rt5682s.c
+++ b/sound/soc/codecs/rt5682s.c
@@ -72,7 +72,6 @@ static void rt5682s_apply_patch_list(struct rt5682s_priv *rt5682s,
}
const struct reg_default rt5682s_reg[] = {
- {0x0000, 0x0001},
{0x0002, 0x8080},
{0x0003, 0x0001},
{0x0005, 0x0000},
@@ -769,7 +768,7 @@ static int rt5682s_headset_detect(struct snd_soc_component *component, int jack_
count++;
} while (val == 0 && count < 50);
- pr_debug("%s, val=%d, count=%d\n", __func__, val, count);
+ dev_dbg(component->dev, "%s, val=%d, count=%d\n", __func__, val, count);
switch (val) {
case 0x1:
diff --git a/sound/soc/codecs/rt5682s.h b/sound/soc/codecs/rt5682s.h
index 7c755e5efb81..55f1febb81e9 100644
--- a/sound/soc/codecs/rt5682s.h
+++ b/sound/soc/codecs/rt5682s.h
@@ -1094,7 +1094,7 @@
#define RT5682S_PLLA_K_BP_SFT 6
/* PLL M/N/K Code Control 7 (0x009e) */
-#define RT5682S_PLLB_SRC_MASK (0x3 << 0)
+#define RT5682S_PLLB_SRC_MASK (0x1)
#define RT5682S_PLLB_SRC_DFIN (0x1)
#define RT5682S_PLLB_SRC_PLLA (0x0)
--
2.17.1
More information about the Alsa-devel
mailing list