Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp23418301rwd; Sat, 1 Jul 2023 01:11:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4jBuAenBf97O8zwRPmvgNxWisazUMAO7oHkD1f/Djj6moeJBZPqmr7cCyeSzJPQChRWZio X-Received: by 2002:a05:6830:1611:b0:6b8:8696:5acd with SMTP id g17-20020a056830161100b006b886965acdmr5838973otr.26.1688199117431; Sat, 01 Jul 2023 01:11:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688199117; cv=none; d=google.com; s=arc-20160816; b=p2vqBUnoMgTPghD4Q3Usin5zkKRDUdsQyowhgSDMzSmgzHHQ/Qq2k/jm4udmAZDl0T Vm8fbSyiylDSRw8lf5GtM2W27CqMfhxHKfcAxpVaiiYXf4mOJeG9Y9y+sejXZx18U2X8 PTbI2KXpyaM2Nk7yLuNf76L1LRId+NldhLf7anU/RWGnuKx+CAchouyr4GbPLaQc7XZI jlrQj1GyUvm2PTmnzqTcOzBjwj8SbWWytrzeLybIKetLwFpWIg3TGRYr3pdt9V/jWIOR hb/X/AF/tdQ6yO+GLC4Tq0JWeq5xfwkCLPkdX325v+Ue3ccwjaB0B5A6E+IE49AIUkzP MvYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=ShdntigkVafD9NO/SzSq9EZPzy7cvI4iuLakj1U+5/Q=; fh=L6uRqLANR/53YUx/8NpjVoKE667aJCLOnawoivFEm2s=; b=WbjxNreHEc2xQBxFNHBf4zCotEljY00Ti1wHLBnQ+hXqzl/SpHYoH1a5211qDzfgeh ERPXB742FqCKWjBh1ZEPUq1gizkiTYuRvxyz7fn3XpiFzOzv+hJBe8hoRYdD8D6Gjx74 J501ruSawnGkLXUheVn7IP3LDNS4m7sM9L2KZ+RqwgRmzPp7feyRQl9vuPpeiqYtIYRn m/LQTTLagdLeQ+zmxl6BgLyQTpiZvNjezg821Y9r+F1Ji8ONpKuddHwWADd/rgVevCMR rHMNtpfaFKY7xlBHTwfyBOUu+yxV+ZjshZDHz5mM7TXpijCvRALD3LpvKFCcc7ltmAQX 6ofA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ha8-20020a17090af3c800b00259a3c7fb52si7403637pjb.27.2023.07.01.01.11.42; Sat, 01 Jul 2023 01:11:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229906AbjGAIEz (ORCPT + 99 others); Sat, 1 Jul 2023 04:04:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229665AbjGAIEv (ORCPT ); Sat, 1 Jul 2023 04:04:51 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 7E9901B0 for ; Sat, 1 Jul 2023 01:04:48 -0700 (PDT) Received: from localhost.localdomain (unknown [180.167.10.98]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id B37AE602A86E0; Sat, 1 Jul 2023 16:04:37 +0800 (CST) X-MD-Sfrom: dengxiang@nfschina.com X-MD-SrcIP: 180.167.10.98 From: dengxiang To: tiwai@suse.com, yangyingliang@huawei.com, perex@perex.cz Cc: linux-kernel@vger.kernel.org, dengxiang@nfschina.com Subject: [PATCH v4] ALSA: hda/realtek: Add quirks for Unis H3C Desktop B760 & Q760 Date: Sat, 1 Jul 2023 16:04:30 +0800 Message-Id: <20230701080430.2560118-1-dengxiang@nfschina.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,RDNS_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These models use NSIWAY amplifiers for internal speaker, but cannot put sound outside from these amplifiers. So eapd verbs are needed to initialize the amplifiers. They can be added during boot to get working sound out of internal speaker. --- V4: - put at the right position to keep the PCI SSID order for the whole. V3: - do some adjustment for eapd verbs and keep the capital letters for ALC_* enums. v2: - remove warning about unused variable 'spec'. Signed-off-by: dengxiang --- sound/pci/hda/patch_realtek.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index afe8253f9a4f..20b10b996fc2 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -11286,6 +11286,7 @@ enum { ALC897_FIXUP_HP_HSMIC_VERB, ALC897_FIXUP_LENOVO_HEADSET_MODE, ALC897_FIXUP_HEADSET_MIC_PIN2, + ALC897_FIXUP_UNIS_H3C_X500S, }; static const struct hda_fixup alc662_fixups[] = { @@ -11725,6 +11726,13 @@ static const struct hda_fixup alc662_fixups[] = { .chained = true, .chain_id = ALC897_FIXUP_LENOVO_HEADSET_MODE }, + [ALC897_FIXUP_UNIS_H3C_X500S] = { + .type = HDA_FIXUP_VERBS, + .v.verbs = (const struct hda_verb[]) { + { 0x14, AC_VERB_SET_EAPD_BTLENABLE, 0 }, + {} + }, + }, }; static const struct snd_pci_quirk alc662_fixup_tbl[] = { @@ -11772,6 +11780,7 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = { SND_PCI_QUIRK(0x1043, 0x1bf3, "ASUS N76VZ", ALC662_FIXUP_BASS_MODE4_CHMAP), SND_PCI_QUIRK(0x1043, 0x8469, "ASUS mobo", ALC662_FIXUP_NO_JACK_DETECT), SND_PCI_QUIRK(0x105b, 0x0cd6, "Foxconn", ALC662_FIXUP_ASUS_MODE2), + SND_PCI_QUIRK(0x10ec, 0x0897, "UNIS H3C X500S", ALC897_FIXUP_UNIS_H3C_X500S), SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD), SND_PCI_QUIRK(0x14cd, 0x5003, "USI", ALC662_FIXUP_USI_HEADSET_MODE), SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC662_FIXUP_LENOVO_MULTI_CODECS), @@ -11886,6 +11895,7 @@ static const struct hda_model_fixup alc662_fixup_models[] = { {.id = ALC662_FIXUP_USI_HEADSET_MODE, .name = "usi-headset"}, {.id = ALC662_FIXUP_LENOVO_MULTI_CODECS, .name = "dual-codecs"}, {.id = ALC669_FIXUP_ACER_ASPIRE_ETHOS, .name = "aspire-ethos"}, + {.id = ALC897_FIXUP_UNIS_H3C_X500S, .name = "unis-h3c-x500s"}, {} }; -- 2.30.2