Procházet zdrojové kódy

asoc: wcd938x: add more ADC volume support

ADC volume can support upto 27 different gain.
Current driver only supports 20. Make this change
to add more ADC volume support.

Change-Id: Ia315e15465affd5430d36637efb0cf3a12bb7b7e
Signed-off-by: Meng Wang <[email protected]>
Meng Wang před 3 roky
rodič
revize
bae0770e2b
1 změnil soubory, kde provedl 5 přidání a 5 odebrání
  1. 5 5
      asoc/codecs/wcd938x/wcd938x.c

+ 5 - 5
asoc/codecs/wcd938x/wcd938x.c

@@ -105,7 +105,7 @@ static u8 tx_mode_bit[] = {
 };
 
 static const DECLARE_TLV_DB_SCALE(line_gain, 0, 7, 1);
-static const DECLARE_TLV_DB_SCALE(analog_gain, 0, 25, 1);
+static const DECLARE_TLV_DB_SCALE(analog_gain, 0, 27, 1);
 
 static int wcd938x_handle_post_irq(void *data);
 static int wcd938x_reset(struct device *dev);
@@ -3130,13 +3130,13 @@ static const struct snd_kcontrol_new wcd938x_snd_controls[] = {
 
 	SOC_SINGLE_TLV("HPHL Volume", WCD938X_HPH_L_EN, 0, 20, 1, line_gain),
 	SOC_SINGLE_TLV("HPHR Volume", WCD938X_HPH_R_EN, 0, 20, 1, line_gain),
-	SOC_SINGLE_TLV("ADC1 Volume", WCD938X_ANA_TX_CH1, 0, 20, 0,
+	SOC_SINGLE_TLV("ADC1 Volume", WCD938X_ANA_TX_CH1, 0, 26, 0,
 			analog_gain),
-	SOC_SINGLE_TLV("ADC2 Volume", WCD938X_ANA_TX_CH2, 0, 20, 0,
+	SOC_SINGLE_TLV("ADC2 Volume", WCD938X_ANA_TX_CH2, 0, 26, 0,
 			analog_gain),
-	SOC_SINGLE_TLV("ADC3 Volume", WCD938X_ANA_TX_CH3, 0, 20, 0,
+	SOC_SINGLE_TLV("ADC3 Volume", WCD938X_ANA_TX_CH3, 0, 26, 0,
 			analog_gain),
-	SOC_SINGLE_TLV("ADC4 Volume", WCD938X_ANA_TX_CH4, 0, 20, 0,
+	SOC_SINGLE_TLV("ADC4 Volume", WCD938X_ANA_TX_CH4, 0, 26, 0,
 			analog_gain),
 
 	SOC_ENUM_EXT("ADC1 ChMap", tx_master_ch_enum,