b/sound/pci/hda/hda_auto_parser.c
@@ -405,6 +405,19 @@ int snd_hda_parse_pin_defcfg(struct hda_codec *codec,
sort(cfg->inputs, cfg->num_inputs, sizeof(cfg->inputs[0]),
compare_input_type, NULL);
+ if (cfg->dig_outs == 2) {
+ if (cfg->dig_out_type[0] != cfg->dig_out_type[1]) {
+ if (cfg->dig_out_type[0] == HDA_PCM_TYPE_HDMI) {
+ hda_nid_t temp = cfg->dig_out_pins[0];
+ int temp_type = cfg->dig_out_type[0];
+ cfg->dig_out_pins[0] = cfg->dig_out_pins[1];
+ cfg->dig_out_type[0] = cfg->dig_out_type[1];
+ cfg->dig_out_pins[1] = temp;
+ cfg->dig_out_type[1] = temp_type;
+ }
+ }
+ }
+
/*
* debug prints of the parsed results
*/