From: 宋秀杰 Date: Tue, 4 Sep 2012 15:18:20 +0000 (+0800) Subject: phonepad: rt3261 add IN3 mode、IN3 boost and LOUT differential mixer. X-Git-Tag: firefly_0821_release~8737 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=675caf375538026cbb63bff26b6c05ac250cff20;p=firefly-linux-kernel-4.4.55.git phonepad: rt3261 add IN3 mode、IN3 boost and LOUT differential mixer. --- diff --git a/sound/soc/codecs/rt3261.c b/sound/soc/codecs/rt3261.c index af97d6a89d53..8dd98c71ba21 100644 --- a/sound/soc/codecs/rt3261.c +++ b/sound/soc/codecs/rt3261.c @@ -809,6 +809,19 @@ static const SOC_ENUM_SINGLE_DECL( rt3261_in2_mode_enum, RT3261_IN3_IN4, RT3261_IN_SFT2, rt3261_input_mode); +static const SOC_ENUM_SINGLE_DECL( + rt3261_in3_mode_enum, RT3261_IN1_IN2, + RT3261_IN_SFT2, rt3261_input_mode); + +//output type +static const char *rt3261_output_mode[] = { + "Single ended", "Differential"}; + +static const SOC_ENUM_SINGLE_DECL( + rt3261_lout_mode_enum, RT3261_GEN_CTRL1, + RT3261_LOUT_DF, rt3261_output_mode); + + /* Interface data select */ static const char *rt3261_data_select[] = { "Normal", "left copy to right", "right copy to left", "Swap"}; @@ -969,6 +982,11 @@ static const struct snd_kcontrol_new rt3261_snd_controls[] = { SOC_ENUM("IN2 Mode Control", rt3261_in2_mode_enum), SOC_SINGLE_TLV("IN2 Boost", RT3261_IN3_IN4, RT3261_BST_SFT2, 8, 0, bst_tlv), + SOC_ENUM("IN3 Mode Control", rt3261_in3_mode_enum), + SOC_SINGLE_TLV("IN3 Boost", RT3261_IN1_IN2, + RT3261_BST_SFT2, 8, 0, bst_tlv), + + SOC_ENUM("LOUT Mode Control", rt3261_lout_mode_enum), /* INL/INR Volume Control */ SOC_DOUBLE_TLV("IN Capture Volume", RT3261_INL_INR_VOL, RT3261_INL_VOL_SFT, RT3261_INR_VOL_SFT, diff --git a/sound/soc/codecs/rt3261.h b/sound/soc/codecs/rt3261.h index 5f4b3e887d01..d0c19dab0778 100644 --- a/sound/soc/codecs/rt3261.h +++ b/sound/soc/codecs/rt3261.h @@ -2040,6 +2040,7 @@ enum { #define RT3261_EQ_PST_VOL_SFT 0 /* General Control1 (0xfa) */ +#define RT3261_LOUT_DF 14 #define RT3261_M_MAMIX_L (0x1 << 13) #define RT3261_M_MAMIX_R (0x1 << 12)