From mboxrd@z Thu Jan 1 00:00:00 1970 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 ED1BBC433EF for ; Tue, 14 Jun 2022 05:35:19 +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 34AE81700; Tue, 14 Jun 2022 07:34:27 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 34AE81700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1655184917; bh=AxRXiS9VNt6hnchU3ve2cpT2/tKNekodqdsznrwF4hk=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=nFQ4cTcGeeZ2S/naJ57wUIg4nVjKRIv2VUhxUHoMamHdn4X8fQQF4OSkcRX8xwb3v 2U+D/HsxlWO4ujmP6IzUqjkPY5Ett0wn1RB8cA2JIpHJ2i0dn9rs16aWIa7tp+xhjf fAMGvaOF/LI/qaehb3JM+TCJGld5CrcSylUjy8f8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id A2D5DF80137; Tue, 14 Jun 2022 07:34:26 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6CABBF80139; Tue, 14 Jun 2022 07:34:25 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A0753F800D8 for ; Tue, 14 Jun 2022 07:34:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A0753F800D8 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="UDdRtR4m"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="P7Zbo5ZR" 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-out1.suse.de (Postfix) with ESMTPS id D6A9621B1E; Tue, 14 Jun 2022 05:34:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1655184857; 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=Hg86Ck1HwfrZkZzHR/xQUxFcJtXxy5iACMD6ydjCxvs=; b=UDdRtR4mRzvaNFfivxIFU8qvVNQc56jWCj2H41hOcWxlmRwdbtMagLWc3TroWM9WU0su6b qfVTkvF57eJ8Rnq5J5ORL6y1+B5ZfYFjB/ZuKVTS6QwIxfBm5UVsT62Cl1OX1gqFfev9uv UkZqo9g2zALeHiBjSURdzT77gtjpKRo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1655184857; 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=Hg86Ck1HwfrZkZzHR/xQUxFcJtXxy5iACMD6ydjCxvs=; b=P7Zbo5ZRlwPGhJBuZ1a/jhPiBwAVOhOZ6PsMvyx2nM/ef26aAS7zOq7XZnMUszYdLNSrZs pQYAt+MPhTByYtAg== 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 B863613524; Tue, 14 Jun 2022 05:34:17 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id m0pDLNkdqGL3VwAAMHmgww (envelope-from ); Tue, 14 Jun 2022 05:34:17 +0000 Date: Tue, 14 Jun 2022 07:34:17 +0200 Message-ID: <87edzr7qqu.wl-tiwai@suse.de> From: Takashi Iwai To: Hans de Goede Subject: Re: How to add 2 different SND_PCI_QUIRKs for 2 models with the same PCI subsys vend + prod ids? In-Reply-To: <632db5d6-e978-08b7-5fc2-e09988f66c85@redhat.com> References: <7e3aa97a-77c9-3367-8929-a86049286d75@redhat.com> <87k09l7ys7.wl-tiwai@suse.de> <5ca147d1-3a2d-60c6-c491-8aa844183222@redhat.com> <87ilp57wpa.wl-tiwai@suse.de> <632db5d6-e978-08b7-5fc2-e09988f66c85@redhat.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 Cc: "nikitashvets@flyium.com" , "alsa-devel@alsa-project.org" 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" On Mon, 13 Jun 2022 22:53:54 +0200, Hans de Goede wrote: > > Hi, > > On 6/13/22 11:13, Takashi Iwai wrote: > > On Mon, 13 Jun 2022 10:46:28 +0200, > > Hans de Goede wrote: > >> > >> Hi, > >> > >> On 6/13/22 10:28, Takashi Iwai wrote: > >>> On Mon, 13 Jun 2022 09:54:47 +0200, > >>> Hans de Goede wrote: > >>>> > >>>> Hi All, > >>>> > >>>> There is a problem with the sound on the Lenovo Yoga Duet 7 13IML05, which > >>>> requires a SND_PCI_QUIRK to fix. But there already is an existing quirk > >>>> for another Lenovo laptop using the same PCI subsys vend + prod ids. > >>>> > >>>> For more details see: > >>>> https://wiki.archlinux.org/title/Lenovo_Yoga_Duet_7_13IML05#Audio > >>>> > >>>> So I guess this means that we need to add a way to also include a DMI match > >>>> for SND_PCI_QUIRKs ? > >>>> > >>>> Maybe add a: > >>>> > >>>> const struct dmi_systemid *dmi_ids; > >>>> > >>>> member to struct snd_pci_quirk and a new > >>>> SND_PCI_QUIRK_DMI macro to set this? > >>> > >>> Do both machines have the very same codec? I couldn't find > >>> alsa-info.sh output for Duet 7, but at least, C940 seems with ALC298 > >>> (0x10ec0298), judging from > >>> https://bugzilla.kernel.org/show_bug.cgi?id=205755 > >>> If Duet 7 has a different codec (e.g. ALC287 0x10ec0287), we can > >>> distinguish from that. > >> > >> I've just asked the reporter of this for alsa-info.sh output. > >> > >> So assuming the codec is indeed different how would I go about > >> fixing this ? > > > > It'll be something like below. > > Thanks. > > The alsa-info.sh output for the Yoga Duet 7 is here: > > http://alsa-project.org/db/?f=5500aa1b489d2ef4ee6ac3ee613f11f3ed8ecfa8 > > This confirms that the codec is different, so I've asked > @nikitashvets to test the below patch you suggested and > he has confirmed that this fixes things (thank you @nikitashvets). > > Takashi, if you can turn this into a proper patch (-series?) > and merge it that would be great! Sure, thanks for quick testing! Takashi