From patchwork Mon Dec 5 16:37:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Jungkamp X-Patchwork-Id: 13065843 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 18A46C352A1 for ; Tue, 6 Dec 2022 13:58:56 +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 55DC918E8; Tue, 6 Dec 2022 14:58:04 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 55DC918E8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1670335134; bh=TDMtuIw66n1/32kerpv7wVaqyX5b8LRtqB1sttnaodg=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=lcyyGaV331TT+y1tNKDCqwZavlfRqG6eFgJylGlkb3UV2TMQx+0OY1JgJ12K2tmYF zDArgWxIiy6Rx2jw40pBzlpzOcYQlWbmpqQGgoOSfbxwSzr+s4Lj4uCqFib6UZuVCY WP6sNrLgoXfDASq5m0okhyEaoW0XpXO+njH6iFdA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 62311F805E6; Tue, 6 Dec 2022 14:53:36 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9970AF80236; Mon, 5 Dec 2022 17:37:42 +0100 (CET) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 474FDF800BD for ; Mon, 5 Dec 2022 17:37:39 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 474FDF800BD Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmx.net header.i=@gmx.net header.b="G8cxqjXg" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1670258256; bh=TDMtuIw66n1/32kerpv7wVaqyX5b8LRtqB1sttnaodg=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=G8cxqjXgJYTsALawOim/atZZlgv+aNJVQHvDBAWTG94qiapYt7EHeTXjgRcZfL5i5 6ZisZDJeouMdgyPfaL6Va/aCTTitkhsTHdK4wSYh3b2VNEy1srQF4ybtn5ntwV4k10 hZpCL/djGKjXmJVSiff8WcSPX60GSJc2Dw987Et04D+GXDoqtNEDKVBBrrwmF/jF+t EqGV8suyiOxlaqyoAFKl4k8zWQnXEDRsddpMwuNCkEpd3tjDRXM4i7TygnjNSXpOZc Wn6Fe/kl4QFBymlyAGKdTcRiIm5eq5I0QGSgtEzxhjFZy9pnSn5OAqYVCAN5OrRkgE xRQ6BS0qPrlVQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from yoga9 ([46.114.196.142]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M8QS8-1p6cBz3XZg-004TXg; Mon, 05 Dec 2022 17:37:36 +0100 From: Philipp Jungkamp To: Takashi Iwai Subject: [PATCH v2] ALSA: patch_realtek: Fix Dell Inspiron Plus 16 Date: Mon, 5 Dec 2022 17:37:13 +0100 Message-Id: <20221205163713.7476-1-p.jungkamp@gmx.net> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Provags-ID: V03:K1:Xn+yN3D8E3H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BrUpxv6BzIOaLXElBWSQfgcpWy6PG3K9aNZS6sdv2ph7n2yaOFVC5AYgo8tKK1lS TOkn6oriCDtRt6FUtSK65QfkN3LvHQud4xoCJYPXJMXvgM9q+tyiVc9H5/op/gyuoynlImM+H caM3Bg== X-Mailman-Approved-At: Tue, 06 Dec 2022 14:53:24 +0100 Cc: Philipp Jungkamp , alsa-devel@alsa-project.org, lakotamm@gmail.com, tom@tlvince.com 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" The Dell Inspiron Plus 16, in both laptop and 2in1 form factor, has top speakers connected on NID 0x17, which the codec reports as unconnected. These speakers should be connected to the DAC on NID 0x03. Signed-off-by: Philipp Jungkamp --- This is a pretty late follow up to the v1 in september. Two people have tested this patch, one for each subsystem id. The popping sound on the headphone jack after audio playback stopped was gone after adding the suggested alc_fixup_no_shutup. Regards, Philipp Jungkamp v2: - add 'Signed-off-by' to commit - add subsystem of the 2-in-1 version of the laptop - add alc_fixup_no_shutup to stop headphone jack popping sound on audio suspend sound/pci/hda/patch_realtek.c | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) -- 2.38.1 diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index cf7c825078dc..5f51f8fc7fdc 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -6903,6 +6903,34 @@ static void alc287_fixup_yoga9_14iap7_bass_spk_pin(struct hda_codec *codec, } } +static void alc295_fixup_dell_inspiron_top_speakers(struct hda_codec *codec, + const struct hda_fixup *fix, int action) +{ + static const struct hda_pintbl pincfgs[] = { + { 0x14, 0x90170151 }, + { 0x17, 0x90170150 }, + { } + }; + static const hda_nid_t conn[] = { 0x02, 0x03 }; + static const hda_nid_t preferred_pairs[] = { + 0x14, 0x02, + 0x17, 0x03, + 0x21, 0x02, + 0 + }; + struct alc_spec *spec = codec->spec; + + alc_fixup_no_shutup(codec, fix, action); + + switch (action) { + case HDA_FIXUP_ACT_PRE_PROBE: + snd_hda_apply_pincfgs(codec, pincfgs); + snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); + spec->gen.preferred_dacs = preferred_pairs; + break; + } +} + enum { ALC269_FIXUP_GPIO2, ALC269_FIXUP_SONY_VAIO, @@ -7146,6 +7174,7 @@ enum { ALC287_FIXUP_LEGION_16ITHG6, ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK, ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN, + ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS, }; /* A special fixup for Lenovo C940 and Yoga Duet 7; @@ -9095,6 +9124,12 @@ static const struct hda_fixup alc269_fixups[] = { .chained = true, .chain_id = ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK, }, + [ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc295_fixup_dell_inspiron_top_speakers, + .chained = true, + .chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, + }, }; static const struct snd_pci_quirk alc269_fixup_tbl[] = { @@ -9195,6 +9230,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x1028, 0x0a9e, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x0b19, "Dell XPS 15 9520", ALC289_FIXUP_DUAL_SPK), SND_PCI_QUIRK(0x1028, 0x0b1a, "Dell Precision 5570", ALC289_FIXUP_DUAL_SPK), + SND_PCI_QUIRK(0x1028, 0x0b37, "Dell Inspiron 16 Plus 7620 2-in-1", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS), + SND_PCI_QUIRK(0x1028, 0x0b71, "Dell Inspiron 16 Plus 7620", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS), SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),