ALSA: hda - Add a workaround for invalid line-out setups
Some BIOS set up the pin config wrongly as line-out although it's supposed to be a speaker out. In most cases, though, we can judge the validity by checking the connection type -- when it's FIXED, mostly it's an invalid line-out but a speaker. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
f9a09e003f
commit
1af7c5f0d4
1 changed files with 12 additions and 3 deletions
|
@ -4590,7 +4590,7 @@ int snd_hda_parse_pin_def_config(struct hda_codec *codec,
|
||||||
unsigned int wid_caps = get_wcaps(codec, nid);
|
unsigned int wid_caps = get_wcaps(codec, nid);
|
||||||
unsigned int wid_type = get_wcaps_type(wid_caps);
|
unsigned int wid_type = get_wcaps_type(wid_caps);
|
||||||
unsigned int def_conf;
|
unsigned int def_conf;
|
||||||
short assoc, loc;
|
short assoc, loc, conn, dev;
|
||||||
|
|
||||||
/* read all default configuration for pin complex */
|
/* read all default configuration for pin complex */
|
||||||
if (wid_type != AC_WID_PIN)
|
if (wid_type != AC_WID_PIN)
|
||||||
|
@ -4600,10 +4600,19 @@ int snd_hda_parse_pin_def_config(struct hda_codec *codec,
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
def_conf = snd_hda_codec_get_pincfg(codec, nid);
|
def_conf = snd_hda_codec_get_pincfg(codec, nid);
|
||||||
if (get_defcfg_connect(def_conf) == AC_JACK_PORT_NONE)
|
conn = get_defcfg_connect(def_conf);
|
||||||
|
if (conn == AC_JACK_PORT_NONE)
|
||||||
continue;
|
continue;
|
||||||
loc = get_defcfg_location(def_conf);
|
loc = get_defcfg_location(def_conf);
|
||||||
switch (get_defcfg_device(def_conf)) {
|
dev = get_defcfg_device(def_conf);
|
||||||
|
|
||||||
|
/* workaround for buggy BIOS setups */
|
||||||
|
if (dev == AC_JACK_LINE_OUT) {
|
||||||
|
if (conn == AC_JACK_PORT_FIXED)
|
||||||
|
dev = AC_JACK_SPEAKER;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (dev) {
|
||||||
case AC_JACK_LINE_OUT:
|
case AC_JACK_LINE_OUT:
|
||||||
seq = get_defcfg_sequence(def_conf);
|
seq = get_defcfg_sequence(def_conf);
|
||||||
assoc = get_defcfg_association(def_conf);
|
assoc = get_defcfg_association(def_conf);
|
||||||
|
|
Loading…
Add table
Reference in a new issue