提交 f8fdd495 编写于 作者: H Harald Welte 提交者: Jaroslav Kysela

ALSA: HDA VIA: Fix crash on codecs without Headphone

Don't enumerate via_hp_mixer while hp_mux is null (headphone does not exist),
to fix the crash of via_independent_hp_info (via_hp_mixer's .info), which will
reference hp_mux.
Signed-off-by: NLogan Li <LoganLi@viatech.com.cn>
Signed-off-by: NHarald Welte <HaraldWelte@viatech.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
Signed-off-by: NJaroslav Kysela <perex@perex.cz>
上级 a6d77317
......@@ -1303,6 +1303,7 @@ static int vt1708_parse_auto_config(struct hda_codec *codec)
spec->input_mux = &spec->private_imux[0];
if (spec->hp_mux)
spec->mixers[spec->num_mixers++] = via_hp_mixer;
return 1;
......@@ -1773,6 +1774,9 @@ static int vt1709_parse_auto_config(struct hda_codec *codec)
spec->input_mux = &spec->private_imux[0];
if (spec->hp_mux)
spec->mixers[spec->num_mixers++] = via_hp_mixer;
return 1;
}
......@@ -2314,6 +2318,7 @@ static int vt1708B_parse_auto_config(struct hda_codec *codec)
spec->input_mux = &spec->private_imux[0];
if (spec->hp_mux)
spec->mixers[spec->num_mixers++] = via_hp_mixer;
return 1;
......@@ -2770,6 +2775,7 @@ static int vt1708S_parse_auto_config(struct hda_codec *codec)
spec->input_mux = &spec->private_imux[0];
if (spec->hp_mux)
spec->mixers[spec->num_mixers++] = via_hp_mixer;
return 1;
......@@ -3100,6 +3106,7 @@ static int vt1702_parse_auto_config(struct hda_codec *codec)
spec->input_mux = &spec->private_imux[0];
if (spec->hp_mux)
spec->mixers[spec->num_mixers++] = via_hp_mixer;
return 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册