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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8473EC433EF for ; Wed, 6 Oct 2021 16:57:42 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id EEE7261056 for ; Wed, 6 Oct 2021 16:57:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org EEE7261056 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-project.org 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 9152B83B; Wed, 6 Oct 2021 18:56:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9152B83B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1633539460; bh=khuzzno4oYauIOQdvGOLTQ+ANrjOxPLorS4p2cIUK/I=; h=Subject:To:References:From:Date:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=RqQVpo4xDLJC7bu1nCRZ8fTDG1m4O7UO/11toNMc2bA8Jwnso6J/l+NrRKQc4ZC0F hNltsWeRINSEVanrJKyj3xKwvMPqIA7frrgZ8gHpV6ptd5d9aYjGic/t2SOFJyjwVT QXesDkMaJWdsn+fcloZDPs75yLvsWln0V88+Ard4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 3CD8EF80302; Wed, 6 Oct 2021 18:56:50 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1A97EF804E2; Wed, 6 Oct 2021 18:56:48 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 9BDADF8032D for ; Wed, 6 Oct 2021 18:56:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9BDADF8032D X-IronPort-AV: E=McAfee;i="6200,9189,10129"; a="226357130" X-IronPort-AV: E=Sophos;i="5.85,352,1624345200"; d="scan'208";a="226357130" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2021 09:53:00 -0700 X-IronPort-AV: E=Sophos;i="5.85,352,1624345200"; d="scan'208";a="439186795" Received: from nbasa-mobl2.amr.corp.intel.com (HELO [10.213.170.135]) ([10.213.170.135]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2021 09:52:58 -0700 Subject: Re: [PATCH 1/3] ASoC: soc-acpi: add alternative id field for machine driver matching To: Brent Lu , alsa-devel@alsa-project.org References: <20211006161805.938950-1-brent.lu@intel.com> <20211006161805.938950-2-brent.lu@intel.com> From: Pierre-Louis Bossart Message-ID: <9067ad51-11e1-a51c-4201-a8f0449dca68@linux.intel.com> Date: Wed, 6 Oct 2021 11:50:59 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20211006161805.938950-2-brent.lu@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Cc: Libin Yang , Guennadi Liakhovetski , Cezary Rojewski , Malik_Hsu , Charles Keepax , Kai Vehmanen , Liam Girdwood , linux-kernel@vger.kernel.org, Jie Yang , Takashi Iwai , Rander Wang , Hans de Goede , Mac Chiang , Mark Brown , Vamshi Krishna Gopal , Paul Olaru , Curtis Malainey , Gongjun Song , Bard Liao , Yong Zhi 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" > +static bool snd_soc_acpi_id_present(struct snd_soc_acpi_mach *machine) > +{ > + struct snd_soc_acpi_codecs *id_alt = machine->id_alt; > + int i; > + > + if (acpi_dev_present(machine->id, NULL, -1)) > + return true; > + > + if (id_alt == NULL) if (!id_alt) > + return false; > + > + for (i = 0; i < id_alt->num_codecs; i++) { > + if (acpi_dev_present(id_alt->codecs[i], NULL, -1)) > + return true; > + } > + > + return false; > +}