ASoC: wcd9310: Correct the mixer controls for Compander switches
- Compander1 never gets enabled though the user space sets the corresponding mixer control. - Compander switch kcontrols are configured wrongly as integer type with max value as 0. - Correct kcontrol creation to fix the issue. CRs-Fixed: 441091 Change-Id: Iad99b44c9226da3bcc1132e61ea989a0543ae56e Signed-off-by: Ravi Kumar Alamanda <ralama@codeaurora.org>
This commit is contained in:
committed by
Stephen Boyd
parent
389e86d7a1
commit
4352c5326c
@@ -819,7 +819,7 @@ static int tabla_set_compander(struct snd_kcontrol *kcontrol,
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct tabla_priv *tabla = snd_soc_codec_get_drvdata(codec);
|
||||
int comp = ((struct soc_multi_mixer_control *)
|
||||
kcontrol->private_value)->max;
|
||||
kcontrol->private_value)->shift;
|
||||
int value = ucontrol->value.integer.value[0];
|
||||
|
||||
if (value == tabla->comp_enabled[comp]) {
|
||||
@@ -1136,9 +1136,9 @@ static const struct snd_kcontrol_new tabla_snd_controls[] = {
|
||||
tabla_get_iir_band_audio_mixer, tabla_put_iir_band_audio_mixer),
|
||||
SOC_SINGLE_MULTI_EXT("IIR2 Band5", IIR2, BAND5, 255, 0, 5,
|
||||
tabla_get_iir_band_audio_mixer, tabla_put_iir_band_audio_mixer),
|
||||
SOC_SINGLE_EXT("COMP1 Switch", SND_SOC_NOPM, 1, COMPANDER_1, 0,
|
||||
SOC_SINGLE_EXT("COMP1 Switch", SND_SOC_NOPM, COMPANDER_1, 1, 0,
|
||||
tabla_get_compander, tabla_set_compander),
|
||||
SOC_SINGLE_EXT("COMP2 Switch", SND_SOC_NOPM, 0, COMPANDER_2, 0,
|
||||
SOC_SINGLE_EXT("COMP2 Switch", SND_SOC_NOPM, COMPANDER_2, 1, 0,
|
||||
tabla_get_compander, tabla_set_compander),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user