From patchwork Mon May 23 20:20:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dag B X-Patchwork-Id: 575421 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E8D7EC433EF for ; Mon, 23 May 2022 20:21:29 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 31EB61721; Mon, 23 May 2022 22:20:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 31EB61721 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1653337287; bh=qqdB5XyceMBmLezXwtyOqUE8qZ+J16/esNriv1Ztjq0=; h=Date:From:Subject:To:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=cl3uR12UZhY4oAIKiq41vXx7s+UBlncudQ1wA2KRdsfK2I10AhHE3X6y48dD6FcL6 egnYeESxzqM0JtRvw5TzTvn54FHbtXysCL57LyiuX8Z/k89hEXsb2YogTcSueP8jwh Iwonv1ajElWCljTof91w+DWnruDKY9svLJ9CLOqc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9DF73F80158; Mon, 23 May 2022 22:20:36 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E0683F80236; Mon, 23 May 2022 22:20:33 +0200 (CEST) Received: from relay5.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 0BA1CF800CB for ; Mon, 23 May 2022 22:20:27 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0BA1CF800CB Received: from omf19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 3885835065 for ; Mon, 23 May 2022 20:20:25 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: dag@bakke.com) by omf19.hostedemail.com (Postfix) with ESMTPA id 96C9020028 for ; Mon, 23 May 2022 20:20:19 +0000 (UTC) Message-ID: <5d5924ee-a52a-04f0-5080-2b8d91bce5ba@bakke.com> Date: Mon, 23 May 2022 22:20:51 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Content-Language: en-US From: Dag B Subject: [PATCH] Enable SPDIF output on Intel Hades Canyon To: ALSA development X-Stat-Signature: u15tuf7wk11au4ux1zz196pfzicjw3ga X-Rspamd-Server: rspamout03 X-Rspamd-Queue-Id: 96C9020028 X-Session-Marker: 6461674062616B6B652E636F6D X-Session-ID: U2FsdGVkX1/hvDshtNWQ6KDQkOnoHOAXzwL0lwfu2tU= X-HE-Tag: 1653337219-983810 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Without the attached patch, the s/pdif output on the Hades Canyon NUC does not work. "Well known" issue, less known fix. As far as I can tell, there is no risk of any averse side-effects. But a bonus fix is enabling on-wire headset microphone, by chaining the right 'model' choice for the hardware. If I should Cc: someone directly for this patch to be picked up, please let me know. I have been running with this patch for half a year or so. Patch passes checkpatch.pl Patch is based on what 'cyber4o' posted on the insanelymac forum [1]. All the glory to this person, any error is likely mine. Some other users with issues: [2] [3] Dag Bakke [1] https://www.insanelymac.com/forum/topic/339291-guide-hac-mini-osx-mojave-on-intel-hades-canyon-nuc8i7hvknuc8i7hnk/page/8/ 2] https://bbs.archlinux.org/viewtopic.php?id=270917 [3] https://www.reddit.com/r/intelnuc/comments/9ft9x8/any_linux_users_got_the_spdif_toslink_to_work_on/ diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index ad292df7d805..1c4c7435b705 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -4752,6 +4752,12 @@ static void alc280_fixup_hp_gpio2_mic_hotkey(struct hda_codec *codec, } } +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 */ @@ -5792,7 +5798,7 @@ static void alc_fixup_headset_mode_alc255_no_hp_mic(struct hda_codec *codec, struct alc_spec *spec = codec->spec; spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; alc255_set_default_jack_type(codec); - } + } else alc_fixup_headset_mode(codec, fix, action); } @@ -6939,6 +6945,7 @@ enum { 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, @@ -7260,6 +7267,12 @@ static const struct hda_fixup alc269_fixups[] = { .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[]) { @@ -9159,6 +9172,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { 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, 0x1252, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), @@ -9445,6 +9459,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = { {.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"},