ASoC: rt5682s Minor modifications to look more sensibly
Subsystems (3)
PATCH 1/1 ASoC: rt5682s Minor modifications to look more sensibly
From: Derek Fang <[email protected]>
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.
--- sound/soc/codecs/rt5682s.c | 3 +-- sound/soc/codecs/rt5682s.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-)
sound/soc/codecs/rt5682s.c +1 -2
@@ -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 :
sound/soc/codecs/rt5682s.h +1 -1
@@ -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)
Signature · 1 line
2.17.1
Mark Brown
maintainerQuoted 9 lines · On Wed, Sep 29, 2021 at 07:18:20PM +0800, [email protected] wrote:
From: Derek Fang <[email protected]>
These modifications wouldn't affect the driver's behavior, but the code could look more sensibly.
1. Remove the volatile reg (
0x0000) inreg_default.
2. Usedev_dbginstead ofpr_debug.
3. Revise the macroRT5682S_PLLB_SRC_MASKto0x1because the mux is only two-source.
This should be three separate patches as they're three different changes which don't really overlap.