diff options
Diffstat (limited to 'sound/pci/hda')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index e2cf02387289..d3ac7530ec89 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -1541,8 +1541,11 @@ int snd_hda_check_board_config(struct hda_codec *codec, const struct hda_board_c | |||
1541 | for (c = tbl; c->modelname || c->pci_subvendor; c++) { | 1541 | for (c = tbl; c->modelname || c->pci_subvendor; c++) { |
1542 | if (c->pci_subvendor == subsystem_vendor && | 1542 | if (c->pci_subvendor == subsystem_vendor && |
1543 | (! c->pci_subdevice /* all match */|| | 1543 | (! c->pci_subdevice /* all match */|| |
1544 | (c->pci_subdevice == subsystem_device))) | 1544 | (c->pci_subdevice == subsystem_device))) { |
1545 | snd_printdd(KERN_INFO "hda_codec: PCI %x:%x, codec config %d is selected\n", | ||
1546 | subsystem_vendor, subsystem_device, c->config); | ||
1545 | return c->config; | 1547 | return c->config; |
1548 | } | ||
1546 | } | 1549 | } |
1547 | } | 1550 | } |
1548 | return -1; | 1551 | return -1; |
@@ -1803,11 +1806,25 @@ int snd_hda_parse_pin_def_config(struct hda_codec *codec, struct auto_pin_cfg *c | |||
1803 | cfg->line_out_pins[j] = nid; | 1806 | cfg->line_out_pins[j] = nid; |
1804 | } | 1807 | } |
1805 | 1808 | ||
1806 | /* Swap surround and CLFE: the association order is front/CLFE/surr/back */ | 1809 | /* Reorder the surround channels |
1807 | if (cfg->line_outs >= 3) { | 1810 | * ALSA sequence is front/surr/clfe/side |
1811 | * HDA sequence is: | ||
1812 | * 4-ch: front/surr => OK as it is | ||
1813 | * 6-ch: front/clfe/surr | ||
1814 | * 8-ch: front/clfe/side/surr | ||
1815 | */ | ||
1816 | switch (cfg->line_outs) { | ||
1817 | case 3: | ||
1808 | nid = cfg->line_out_pins[1]; | 1818 | nid = cfg->line_out_pins[1]; |
1809 | cfg->line_out_pins[1] = cfg->line_out_pins[2]; | 1819 | cfg->line_out_pins[1] = cfg->line_out_pins[2]; |
1810 | cfg->line_out_pins[2] = nid; | 1820 | cfg->line_out_pins[2] = nid; |
1821 | break; | ||
1822 | case 4: | ||
1823 | nid = cfg->line_out_pins[1]; | ||
1824 | cfg->line_out_pins[1] = cfg->line_out_pins[3]; | ||
1825 | cfg->line_out_pins[3] = cfg->line_out_pins[2]; | ||
1826 | cfg->line_out_pins[2] = nid; | ||
1827 | break; | ||
1811 | } | 1828 | } |
1812 | 1829 | ||
1813 | return 0; | 1830 | return 0; |