Skip to content

Instantly share code, notes, and snippets.

@dagbdagb
Created May 23, 2024 15:38
Show Gist options
  • Save dagbdagb/ea9f9588e73ad0e0e94900f367b793e5 to your computer and use it in GitHub Desktop.
Save dagbdagb/ea9f9588e73ad0e0e94900f367b793e5 to your computer and use it in GitHub Desktop.
patch for linux kernel - enable SPDIF for Hades Canyon
--- linux-6.9.1-gentoo/sound/pci/hda/patch_realtek.c 2024-05-23 17:29:07.122754646 +0200
+++ linux-6.9.1-gentoo-hadescanyon-audio/sound/pci/hda/patch_realtek.c 2024-05-23 17:30:34.768957600 +0200
@@ -4885,6 +4885,12 @@
}
}
+static void alc700_fixup_nuc_spdif(struct hda_codec *codec,
+ const struct hda_fixup *fix, int action)
+{
+ snd_hda_override_wcaps(codec, 0x6, 0x611);
+}
+
/* Line2 = mic mute hotkey
* GPIO2 = mic mute LED
*/
@@ -7363,6 +7369,7 @@
ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE,
ALC225_FIXUP_S3_POP_NOISE,
ALC700_FIXUP_INTEL_REFERENCE,
+ ALC700_FIXUP_NUC_SPDIF,
ALC274_FIXUP_DELL_BIND_DACS,
ALC274_FIXUP_DELL_AIO_LINEOUT_VERB,
ALC298_FIXUP_TPT470_DOCK_FIX,
@@ -7813,6 +7820,12 @@
.chained = true,
.chain_id = ALC269_FIXUP_THINKPAD_ACPI,
},
+ [ALC700_FIXUP_NUC_SPDIF] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = alc700_fixup_nuc_spdif,
+ .chained = true,
+ .chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
+ },
[ALC269_FIXUP_DELL1_MIC_NO_PRESENCE] = {
.type = HDA_FIXUP_PINS,
.v.pins = (const struct hda_pintbl[]) {
@@ -10313,6 +10326,7 @@
SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN),
SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC),
SND_PCI_QUIRK(0x10ec, 0x10f2, "Intel Reference board", ALC700_FIXUP_INTEL_REFERENCE),
+ SND_PCI_QUIRK(0x10ec, 0x2073, "Intel NUC8 Hades Canyon", ALC700_FIXUP_NUC_SPDIF),
SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE),
SND_PCI_QUIRK(0x10ec, 0x1230, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
SND_PCI_QUIRK(0x10ec, 0x124c, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
@@ -10673,6 +10687,7 @@
{.id = ALC298_FIXUP_TPT470_DOCK, .name = "tpt470-dock"},
{.id = ALC233_FIXUP_LENOVO_MULTI_CODECS, .name = "dual-codecs"},
{.id = ALC700_FIXUP_INTEL_REFERENCE, .name = "alc700-ref"},
+ {.id = ALC700_FIXUP_NUC_SPDIF, .name = "nuc-hc"},
{.id = ALC269_FIXUP_SONY_VAIO, .name = "vaio"},
{.id = ALC269_FIXUP_DELL_M101Z, .name = "dell-m101z"},
{.id = ALC269_FIXUP_ASUS_G73JW, .name = "asus-g73jw"},
@docop
Copy link

docop commented Jul 22, 2024

Hi your code look quite good. But is there a file to directly put in a folder or so .. or a modified driver to put in sbin ?
-for the hades vk..
thanks in advance

@dagbdagb
Copy link
Author

No, kernel drivers are not executables. Google "patching the kernel sources" for further instructions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment