diff options
Diffstat (limited to 'sound/pci/hda')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 6a705a81de35..74b496b0d179 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -469,9 +469,7 @@ static bool found_in_nid_list(hda_nid_t nid, const hda_nid_t *list, int nums) | |||
469 | * 7 ~ 0 : Assembly ID | 469 | * 7 ~ 0 : Assembly ID |
470 | * port-A --> pin 39/41, port-E --> pin 14/15, port-D --> pin 35/36 | 470 | * port-A --> pin 39/41, port-E --> pin 14/15, port-D --> pin 35/36 |
471 | */ | 471 | */ |
472 | static int alc_subsystem_id(struct hda_codec *codec, | 472 | static int alc_subsystem_id(struct hda_codec *codec, const hda_nid_t *ports) |
473 | hda_nid_t porta, hda_nid_t porte, | ||
474 | hda_nid_t portd, hda_nid_t porti) | ||
475 | { | 473 | { |
476 | unsigned int ass, tmp, i; | 474 | unsigned int ass, tmp, i; |
477 | unsigned nid; | 475 | unsigned nid; |
@@ -561,14 +559,7 @@ do_sku: | |||
561 | spec->gen.autocfg.line_out_type == AUTO_PIN_HP_OUT)) { | 559 | spec->gen.autocfg.line_out_type == AUTO_PIN_HP_OUT)) { |
562 | hda_nid_t nid; | 560 | hda_nid_t nid; |
563 | tmp = (ass >> 11) & 0x3; /* HP to chassis */ | 561 | tmp = (ass >> 11) & 0x3; /* HP to chassis */ |
564 | if (tmp == 0) | 562 | nid = ports[tmp]; |
565 | nid = porta; | ||
566 | else if (tmp == 1) | ||
567 | nid = porte; | ||
568 | else if (tmp == 2) | ||
569 | nid = portd; | ||
570 | else if (tmp == 3) | ||
571 | nid = porti; | ||
572 | if (found_in_nid_list(nid, spec->gen.autocfg.line_out_pins, | 563 | if (found_in_nid_list(nid, spec->gen.autocfg.line_out_pins, |
573 | spec->gen.autocfg.line_outs)) | 564 | spec->gen.autocfg.line_outs)) |
574 | return 1; | 565 | return 1; |
@@ -581,7 +572,7 @@ do_sku: | |||
581 | * ports contains an array of 4 pin NIDs for port-A, E, D and I */ | 572 | * ports contains an array of 4 pin NIDs for port-A, E, D and I */ |
582 | static void alc_ssid_check(struct hda_codec *codec, const hda_nid_t *ports) | 573 | static void alc_ssid_check(struct hda_codec *codec, const hda_nid_t *ports) |
583 | { | 574 | { |
584 | if (!alc_subsystem_id(codec, ports[0], ports[1], ports[2], ports[3])) { | 575 | if (!alc_subsystem_id(codec, ports)) { |
585 | struct alc_spec *spec = codec->spec; | 576 | struct alc_spec *spec = codec->spec; |
586 | snd_printd("realtek: " | 577 | snd_printd("realtek: " |
587 | "Enable default setup for auto mode as fallback\n"); | 578 | "Enable default setup for auto mode as fallback\n"); |