@@ -511,11 +511,11 @@ static const struct snd_soc_dapm_route adcx140_audio_map[] = {
511511static const struct snd_kcontrol_new adcx140_snd_controls [] = {
512512 SOC_SINGLE_TLV ("Analog CH1 Mic Gain Volume" , ADCX140_CH1_CFG1 , 2 , 42 , 0 ,
513513 adc_tlv ),
514- SOC_SINGLE_TLV ("Analog CH2 Mic Gain Volume" , ADCX140_CH1_CFG2 , 2 , 42 , 0 ,
514+ SOC_SINGLE_TLV ("Analog CH2 Mic Gain Volume" , ADCX140_CH2_CFG1 , 2 , 42 , 0 ,
515515 adc_tlv ),
516- SOC_SINGLE_TLV ("Analog CH3 Mic Gain Volume" , ADCX140_CH1_CFG3 , 2 , 42 , 0 ,
516+ SOC_SINGLE_TLV ("Analog CH3 Mic Gain Volume" , ADCX140_CH3_CFG1 , 2 , 42 , 0 ,
517517 adc_tlv ),
518- SOC_SINGLE_TLV ("Analog CH4 Mic Gain Volume" , ADCX140_CH1_CFG4 , 2 , 42 , 0 ,
518+ SOC_SINGLE_TLV ("Analog CH4 Mic Gain Volume" , ADCX140_CH4_CFG1 , 2 , 42 , 0 ,
519519 adc_tlv ),
520520
521521 SOC_SINGLE_TLV ("DRE Threshold" , ADCX140_DRE_CFG0 , 4 , 9 , 0 ,
@@ -739,11 +739,12 @@ static int adcx140_codec_probe(struct snd_soc_component *component)
739739{
740740 struct adcx140_priv * adcx140 = snd_soc_component_get_drvdata (component );
741741 int sleep_cfg_val = ADCX140_WAKE_DEV ;
742- u8 bias_source ;
743- u8 vref_source ;
742+ u32 bias_source ;
743+ u32 vref_source ;
744+ u8 bias_cfg ;
744745 int ret ;
745746
746- ret = device_property_read_u8 (adcx140 -> dev , "ti,mic-bias-source" ,
747+ ret = device_property_read_u32 (adcx140 -> dev , "ti,mic-bias-source" ,
747748 & bias_source );
748749 if (ret )
749750 bias_source = ADCX140_MIC_BIAS_VAL_VREF ;
@@ -754,7 +755,7 @@ static int adcx140_codec_probe(struct snd_soc_component *component)
754755 return - EINVAL ;
755756 }
756757
757- ret = device_property_read_u8 (adcx140 -> dev , "ti,vref-source" ,
758+ ret = device_property_read_u32 (adcx140 -> dev , "ti,vref-source" ,
758759 & vref_source );
759760 if (ret )
760761 vref_source = ADCX140_MIC_BIAS_VREF_275V ;
@@ -765,7 +766,7 @@ static int adcx140_codec_probe(struct snd_soc_component *component)
765766 return - EINVAL ;
766767 }
767768
768- bias_source |= vref_source ;
769+ bias_cfg = bias_source << ADCX140_MIC_BIAS_SHIFT | vref_source ;
769770
770771 ret = adcx140_reset (adcx140 );
771772 if (ret )
@@ -785,7 +786,7 @@ static int adcx140_codec_probe(struct snd_soc_component *component)
785786
786787 ret = regmap_update_bits (adcx140 -> regmap , ADCX140_BIAS_CFG ,
787788 ADCX140_MIC_BIAS_VAL_MSK |
788- ADCX140_MIC_BIAS_VREF_MSK , bias_source );
789+ ADCX140_MIC_BIAS_VREF_MSK , bias_cfg );
789790 if (ret )
790791 dev_err (adcx140 -> dev , "setting MIC bias failed %d\n" , ret );
791792out :
0 commit comments