From ebdb9ddf8dc7f66735af41a4d36950051a7eecd7 Mon Sep 17 00:00:00 2001 From: David Rhodes Date: Wed, 6 Jun 2018 08:35:09 -0500 Subject: [PATCH] ASoC: cs35l41: Support mute on Digital PCM Volume control Add mute item to volume control Change-Id: Ic46b2bf1e680f16d37bebd49683b79cfc9fac1a4 Signed-off-by: David Rhodes Signed-off-by: Ravi Vembu Mot-CRs-Fixed: (CR) Reviewed-on: https://gerrit.mot.com/1202253 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Submit-Approved: Jira Key --- sound/soc/codecs/cs35l41.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/cs35l41.c b/sound/soc/codecs/cs35l41.c index 75f08314c432..aedd308eb091 100644 --- a/sound/soc/codecs/cs35l41.c +++ b/sound/soc/codecs/cs35l41.c @@ -209,7 +209,9 @@ static int cs35l41_halo_booted_put(struct snd_kcontrol *kcontrol, return 0; } -static DECLARE_TLV_DB_SCALE(dig_vol_tlv, -10200, 25, 0); +static const DECLARE_TLV_DB_RANGE(dig_vol_tlv, + 0, 0, TLV_DB_SCALE_ITEM(TLV_DB_GAIN_MUTE, 0, 1), + 1, 913, TLV_DB_SCALE_ITEM(-10200, 25, 0)); static DECLARE_TLV_DB_SCALE(amp_gain_tlv, 0, 1, 1); static const struct snd_kcontrol_new dre_ctrl = @@ -284,7 +286,7 @@ static const struct snd_kcontrol_new asp_tx4_mux = static const struct snd_kcontrol_new cs35l41_aud_controls[] = { SOC_SINGLE_SX_TLV("Digital PCM Volume", CS35L41_AMP_DIG_VOL_CTRL, - 3, 0x4D0, 0x390, dig_vol_tlv), + 3, 0x4CF, 0x391, dig_vol_tlv), SOC_SINGLE_TLV("AMP PCM Gain", CS35L41_AMP_GAIN_CTRL, 5, 0x14, 0, amp_gain_tlv), SOC_SINGLE_RANGE("ASPTX1 Slot Position", CS35L41_SP_FRAME_TX_SLOT, 0,