On 08/05/2013 06:19 AM, bardliao@realtek.com wrote:
From: Bard Liao bardliao@realtek.com
Add mute/unmute control in widget event and modify the power on/off sequence to avoid pop noise.
Signed-off-by: Bard Liao bardliao@realtek.com
Please ignore the previous patch. I have tested speaker and headphone playback on this patch.
sound/soc/codecs/rt5640.c | 389 +++++++++++++++++++++++++++++++++++++++------- sound/soc/codecs/rt5640.h | 15 ++ 2 files changed, 352 insertions(+), 52 deletions(-)
diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c index 4db7314..cae3f46 100644 --- a/sound/soc/codecs/rt5640.c +++ b/sound/soc/codecs/rt5640.c @@ -50,8 +50,6 @@ static const struct regmap_range_cfg rt5640_ranges[] = {
static struct reg_default init_list[] = { {RT5640_PR_BASE + 0x3d, 0x3600},
- {RT5640_PR_BASE + 0x1c, 0x0D21},
- {RT5640_PR_BASE + 0x1b, 0x0000}, {RT5640_PR_BASE + 0x12, 0x0aa8}, {RT5640_PR_BASE + 0x14, 0x0aaa}, {RT5640_PR_BASE + 0x20, 0x6110},
@@ -378,21 +376,119 @@ static const SOC_ENUM_SINGLE_DECL(rt5640_if2_adc_enum, RT5640_DIG_INF_DATA, static const char * const rt5640_clsd_spk_ratio[] = {"1.66x", "1.83x", "1.94x", "2x", "2.11x", "2.22x", "2.33x", "2.44x", "2.55x", "2.66x", "2.77x"};
+static const char * const rt5640_mute_mode[] = {"mute", "unmute"};
+static const SOC_ENUM_SINGLE_DECL(rt5640_hp_enum, 0, 0, rt5640_mute_mode); +static const SOC_ENUM_SINGLE_DECL(rt5640_spo_enum, 0, 0, rt5640_mute_mode);
These enums seem to be unused. (And switches should be used for mutes and enums)
- Lars