diff mbox

[pulseaudio-discuss] Strange hardware: XFX nForce 780i SLI MCP

Message ID CAN8ccibpEkOPMH57tBQkTXBvf5Fcf3Jx0cCt3_v_rkt4RkkvTw@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Raymond Yau July 11, 2015, 2:25 a.m. UTC
> Yesterday I got an interesting email related to dcaenc support.
>
> The person has an "XFX nForce 780i SLI" MCP board:
> http://www.nvidia.com/object/product_nforce_780i_sli_us.html ,
> http://www.evga.com/support/manuals/files/132-CK-NF78.pdf
>
> As you see on page 18 of the manual, this board has no HDMI output, but
> there is an optical SPDIF. Strangely enough, this SPDIF is his
> "hdmi:CARD=NVidia,DEV=0" device.
>
> Given the recent discussions related to dynamically creating PCM devices
> for HDMI, I think you will be interested in this alsa-info output.
>
> Is there anything here that would need special treatment by ALSA or
> PulseAudio? Or, is this just a misnumbered/misnamed codec?
>

swap dig_out_pins of autocfg when type are different



>
>
diff mbox

Patch

diff --git a/sound/pci/hda/hda_auto_parser.c
b/sound/pci/hda/hda_auto_parser.c
index 03b7399..3ff16e8 100644
--- a/sound/pci/hda/hda_auto_parser.c
+++ 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
      */