]> www.infradead.org Git - linux-platform-drivers-x86.git/commitdiff
ASoC: rt1011: remove pack_id check in rt1011
authorJack Yu <jack.yu@realtek.com>
Thu, 8 Apr 2021 08:32:40 +0000 (08:32 +0000)
committerMark Brown <broonie@kernel.org>
Thu, 8 Apr 2021 14:08:49 +0000 (15:08 +0100)
For latest design, different package could use the same setting,
therefore the check of pack_id will no longer be used.

Signed-off-by: Jack Yu <jack.yu@realtek.com>
Link: https://lore.kernel.org/r/4cbe1cd3b8664140889132464c7dee7b@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt1011.c
sound/soc/codecs/rt1011.h

index 098ecf13814d6b527af63ef11ed3d2f06e07e7a6..bfe045367db3addb14a82a1bf3f722e62fe70c62 100644 (file)
@@ -2239,18 +2239,9 @@ static int rt1011_calibrate(struct rt1011_priv *rt1011, unsigned char cali_flag)
        dc_offset |= (value & 0xffff);
        dev_info(dev, "Gain1 offset=0x%x\n", dc_offset);
 
-       /* check the package info. */
-       regmap_read(rt1011->regmap, RT1011_EFUSE_MATCH_DONE, &value);
-       if (value & 0x4)
-               rt1011->pack_id = 1;
-
        if (cali_flag) {
 
-               if (rt1011->pack_id)
-                       regmap_write(rt1011->regmap, RT1011_ADC_SET_1, 0x292c);
-               else
-                       regmap_write(rt1011->regmap, RT1011_ADC_SET_1, 0x2925);
-
+               regmap_write(rt1011->regmap, RT1011_ADC_SET_1, 0x2925);
                /* Class D on */
                regmap_write(rt1011->regmap, RT1011_CLASS_D_POS, 0x010e);
                regmap_write(rt1011->regmap,
@@ -2376,10 +2367,7 @@ static void rt1011_calibration_work(struct work_struct *work)
                rt1011_r0_load(rt1011);
        }
 
-       if (rt1011->pack_id)
-               snd_soc_component_write(component, RT1011_ADC_SET_1, 0x292c);
-       else
-               snd_soc_component_write(component, RT1011_ADC_SET_1, 0x2925);
+       snd_soc_component_write(component, RT1011_ADC_SET_1, 0x2925);
 }
 
 static int rt1011_parse_dp(struct rt1011_priv *rt1011, struct device *dev)
index f3a9a96640f114ea4f691c295318b0226a34c822..68fadc15fa8c1c061523156dae87151f75745cc0 100644 (file)
@@ -692,7 +692,6 @@ struct rt1011_priv {
        unsigned int r0_reg, cali_done;
        unsigned int r0_calib, temperature_calib;
        int recv_spk_mode;
-       unsigned int pack_id; /* 0: WLCSP; 1: QFN */
 };
 
 #endif         /* end of _RT1011_H_ */