Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp26343397rwd; Mon, 3 Jul 2023 08:26:37 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7pNuA4Jt1x7g5qlMQeq/tZhhCgieCVNfm4QJbeAL8TsiaRXolW1IrMvDIiiddTTK4rjKED X-Received: by 2002:a05:6808:2202:b0:3a1:cb5c:44fd with SMTP id bd2-20020a056808220200b003a1cb5c44fdmr13479056oib.57.1688397997432; Mon, 03 Jul 2023 08:26:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688397997; cv=none; d=google.com; s=arc-20160816; b=aWvQi3ntbmBQ/EVQdepYrjl4H8v87Brg1Szob4XEXMOCbRgotvbn50MabJJqycLBKs WYGHZ94i/xDyvMF/G/AvjHcclur9SZ8jdqldih4AbtwlXVnh2Nhk5JkB6shYukH48E2E vpZBuXVC87CnMSaIj4nfUIn24PvBxabNeKNXDfSw6zg+sbxKJlEv8zi1xPfTHAWLPNN3 q3NQcIKj7a8B5gDn/EqrMP9BE41xBxdxPhB/WSfaMFUP1w1BArv9qMr6yPWvhE7WTDEs 0iNE9jyxp3onU80VX8KJ31IKEJiZJV6M18s+fJN6cUdMiJprGfYjl7DxpxsuGYkMfQJo b5NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature:dkim-signature; bh=1XYK3JhaJ5qtklFAcL4Ab0ZphGfyNSKUJRl9bXh8Qy4=; fh=etWXnzTu70itHYDyJ5vJK2/qYX7tY49+0sbBR/v4gDE=; b=ffmckmVM2hnoLc4/DHjoYD8ZcsRdWDvTCmGTaR9LFlaiBduWwv2rfK4WjA+gTH3ttZ VZ2fYydKC37ucIdUFZrKX4hBMrDXmpcAyKMl/Vopo5v20DJTjEax8pvEWkb/HLHW2Rg+ j4H392GiaE519XgAPaPaAIOtHxT+dGM5o6utLhTjdlZPyYCCFOQnRVQXgI0+RSZjdxLy iwyHIeljfzYLPdqisnY7RDnxhTAU0h4SoEuaZzO/uCVrSDmYWxh5zTQPmIHtm5077EO2 VpLvyS200V+B9VceOwIkrSlbk24aqLruhGgcu6gFniPKoEPcRav3j1QBdMtobOwK9We1 splg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=QeARC4sb; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nv9-20020a17090b1b4900b00262f30ae90asi17091043pjb.118.2023.07.03.08.26.24; Mon, 03 Jul 2023 08:26:37 -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; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=QeARC4sb; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231336AbjGCPNg (ORCPT + 99 others); Mon, 3 Jul 2023 11:13:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229885AbjGCPNf (ORCPT ); Mon, 3 Jul 2023 11:13:35 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70D6DEE; Mon, 3 Jul 2023 08:13:33 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 157D21FEE2; Mon, 3 Jul 2023 15:13:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1688397212; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1XYK3JhaJ5qtklFAcL4Ab0ZphGfyNSKUJRl9bXh8Qy4=; b=QeARC4sb7YbOE+ALTChd9oaZA8hY9iv5xC38X5FoNJmV+o4mDkYfyLUdxAEA53Rkf+aTfH ftJNjdXD4iSJT8TJNqq2Of4ByFWe4tc6ntnKmRydnp8Gqkij4RoKxGdvTZWSy1zE+VhTdm AHB3Aga0lAYwOK7aEqJCsfVuib4zhSY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1688397212; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1XYK3JhaJ5qtklFAcL4Ab0ZphGfyNSKUJRl9bXh8Qy4=; b=y8e7fSN/9HksPzkl1REx3A8LCD+/eOHDCXc06HcfDANJBzndAGA3sxwwCZU1TFnPptAwld lLx2rBLFRlqY7cCw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id B9C451358E; Mon, 3 Jul 2023 15:13:31 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id wpZmLJvlomTlVgAAMHmgww (envelope-from ); Mon, 03 Jul 2023 15:13:31 +0000 Date: Mon, 03 Jul 2023 17:13:31 +0200 Message-ID: <87o7kt3u5g.wl-tiwai@suse.de> From: Takashi Iwai To: Shenghao Ding <13916275206@139.com> Cc: broonie@kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, lgirdwood@gmail.com, perex@perex.cz, pierre-louis.bossart@linux.intel.com, kevin-lu@ti.com, shenghao-ding@ti.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, x1077012@ti.com, peeyush@ti.com, navada@ti.com Subject: Re: [PATCH v1 1/3] ALSA: hda/tas2781: Add tas2781 HDA driver In-Reply-To: <20230702081857.799693-1-13916275206@139.com> References: <20230702081857.799693-1-13916275206@139.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On Sun, 02 Jul 2023 10:18:55 +0200, Shenghao Ding wrote: > > Integrate tas2781 configs for Lenovo Laptops. All of the tas2781s in the > laptop will be aggregated as one speaker. The code support realtek as the > primary codec. It's not only that -- you changed the struct name used in the code, too. Please describe it, too. > @@ -5883,7 +5883,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); > } This change is irrelevant with your code, and should be fixed individually. Please drop the hunk. > @@ -9255,6 +9317,12 @@ static const struct hda_fixup alc269_fixups[] = { > .chained = true, > .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, > }, > + [ALC287_FIXUP_TAS2781_I2C] = { > + .type = HDA_FIXUP_FUNC, > + .v.func = tas2781_fixup_i2c, > + .chained = true, > + .chain_id = ALC269_FIXUP_THINKPAD_ACPI, > + }, So this is supposed to be Lenovo-specific, and maybe better to rename, e.g. ALC287_FIXUP_LENOVO_TAS2781_I2C or such? > @@ -9813,6 +9881,33 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { > SND_PCI_QUIRK(0x17aa, 0x3853, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), > SND_PCI_QUIRK(0x17aa, 0x3855, "Legion 7 16ITHG6", ALC287_FIXUP_LEGION_16ITHG6), > SND_PCI_QUIRK(0x17aa, 0x3869, "Lenovo Yoga7 14IAL7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN), > + SND_PCI_QUIRK(0x17aa, 0x387d, "Yoga S780-16 pro Quad AAC", > + ALC287_FIXUP_TAS2781_I2C), > + SND_PCI_QUIRK(0x17aa, 0x387e, "Yoga S780-16 pro Quad YC", > + ALC287_FIXUP_TAS2781_I2C), > + SND_PCI_QUIRK(0x17aa, 0x3881, "YB9 dual powe mode2 YC", > + ALC287_FIXUP_TAS2781_I2C), > + SND_PCI_QUIRK(0x17aa, 0x3884, "Y780 YG DUAL", > + ALC287_FIXUP_TAS2781_I2C), > + SND_PCI_QUIRK(0x17aa, 0x3886, "Y780 VECO DUAL", > + ALC287_FIXUP_TAS2781_I2C), > + SND_PCI_QUIRK(0x17aa, 0x38a7, "Y780P AMD YG dual", > + ALC287_FIXUP_TAS2781_I2C), > + SND_PCI_QUIRK(0x17aa, 0x38a8, "Y780P AMD VECO dual", > + ALC287_FIXUP_TAS2781_I2C), > + SND_PCI_QUIRK(0x17aa, 0x38ba, "Yoga S780-14.5 Air AMD quad YC", > + ALC287_FIXUP_TAS2781_I2C), > + SND_PCI_QUIRK(0x17aa, 0x38bb, "Yoga S780-14.5 Air AMD quad AAC", > + ALC287_FIXUP_TAS2781_I2C), > + SND_PCI_QUIRK(0x17aa, 0x38be, "Yoga S980-14.5 proX YC Dual", > + ALC287_FIXUP_TAS2781_I2C), > + SND_PCI_QUIRK(0x17aa, 0x38bf, "Yoga S980-14.5 proX LX Dual", > + ALC287_FIXUP_TAS2781_I2C), > + SND_PCI_QUIRK(0x17aa, 0x38c3, "Y980 DUAL", ALC287_FIXUP_TAS2781_I2C), > + SND_PCI_QUIRK(0x17aa, 0x38cb, "Y790 YG DUAL", > + ALC287_FIXUP_TAS2781_I2C), > + SND_PCI_QUIRK(0x17aa, 0x38cd, "Y790 VECO DUAL", > + ALC287_FIXUP_TAS2781_I2C), Please keep one entry per line. Let's ignore the checkpatch complaints. > @@ -10728,6 +10823,17 @@ static int patch_alc269(struct hda_codec *codec) > codec->fixup_id = HDA_FIXUP_ID_NOT_SET; > } > > + /* FIXME: Laptop 0x17aa38be will get the wrong fixup_id and > + * enter into the wrong entry. > + * Correct the wrong entry. > + */ > + if (codec->fixup_id == ALC287_FIXUP_YOGA7_14ITL_SPEAKERS && > + codec->core.vendor_id == 0x10ec0287 && > + codec->core.subsystem_id == 0x17aa38be) { > + codec_dbg(codec, "Clear wrong fixup for 17aa38be\n"); > + codec->fixup_id = ALC287_FIXUP_TAS2781_I2C; > + } Why this is needed at all? IOW, which entry causes this wrong attribute? thanks, Takashi