Skip to content

Commit bb30e8d

Browse files
Lydia WangKali-
Lydia Wang
authored andcommitted
ALSA: hda - VIA: Fix stereo mixer recording no sound issue
commit bff5fbf50bd498c217994bd2d41a53ac3141185a upstream. Modify function via_mux_enum_put() to fix stereo mixer recording no sound issue. Signed-off-by: Lydia Wang <[email protected]> Signed-off-by: Takashi Iwai <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Andi Kleen <[email protected]>
1 parent 54527ba commit bb30e8d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

sound/pci/hda/patch_via.c

+6-3
Original file line numberDiff line numberDiff line change
@@ -1091,6 +1091,7 @@ static int via_mux_enum_put(struct snd_kcontrol *kcontrol,
10911091
struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
10921092
struct via_spec *spec = codec->spec;
10931093
unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
1094+
int ret;
10941095

10951096
if (!spec->mux_nids[adc_idx])
10961097
return -EINVAL;
@@ -1099,12 +1100,14 @@ static int via_mux_enum_put(struct snd_kcontrol *kcontrol,
10991100
AC_VERB_GET_POWER_STATE, 0x00) != AC_PWRST_D0)
11001101
snd_hda_codec_write(codec, spec->mux_nids[adc_idx], 0,
11011102
AC_VERB_SET_POWER_STATE, AC_PWRST_D0);
1102-
/* update jack power state */
1103-
set_jack_power_state(codec);
11041103

1105-
return snd_hda_input_mux_put(codec, spec->input_mux, ucontrol,
1104+
ret = snd_hda_input_mux_put(codec, spec->input_mux, ucontrol,
11061105
spec->mux_nids[adc_idx],
11071106
&spec->cur_mux[adc_idx]);
1107+
/* update jack power state */
1108+
set_jack_power_state(codec);
1109+
1110+
return ret;
11081111
}
11091112

11101113
static int via_independent_hp_info(struct snd_kcontrol *kcontrol,

0 commit comments

Comments
 (0)