From patchwork Fri Oct 29 17:14:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brent Lu X-Patchwork-Id: 12593131 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 E6DDFC433EF for ; Fri, 29 Oct 2021 17:17:46 +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 6482A60FED for ; Fri, 29 Oct 2021 17:17:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6482A60FED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=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 A98C0170B; Fri, 29 Oct 2021 19:16:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A98C0170B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1635527864; bh=BT00wpcPWcMl1sOMENTgoHr3mtdLdY7I0MPkf8EDmGc=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=blNqM4OPvN6B6aDP78JOA+zEZDGwNt6/NBfSbs9JaTA8sVE9pOayxn3z9msa5EykV la6xjCOrLbGR350aM6dKgbclzTFxDlVPPg0X46lAk1481LWyLSKmRIXCHk4xSBgKsz SBu1ffpUCuFC5hDs3XpKvVg8n/xgEz8JXFvJ8Yi4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 330A0F8027B; Fri, 29 Oct 2021 19:16:16 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9C5AAF8032B; Fri, 29 Oct 2021 19:16:14 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 0AB78F800F4 for ; Fri, 29 Oct 2021 19:16:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0AB78F800F4 X-IronPort-AV: E=McAfee;i="6200,9189,10152"; a="291543895" X-IronPort-AV: E=Sophos;i="5.87,193,1631602800"; d="scan'208";a="291543895" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2021 10:16:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,193,1631602800"; d="scan'208";a="598276458" Received: from brentlu-brix.itwn.intel.com ([10.5.253.1]) by orsmga004.jf.intel.com with ESMTP; 29 Oct 2021 10:15:57 -0700 From: Brent Lu To: alsa-devel@alsa-project.org Subject: [PATCH v5 1/6] ASoC: soc-acpi: add comp_ids field for machine driver matching Date: Sat, 30 Oct 2021 01:14:04 +0800 Message-Id: <20211029171409.611600-2-brent.lu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211029171409.611600-1-brent.lu@intel.com> References: <20211029171409.611600-1-brent.lu@intel.com> MIME-Version: 1.0 Cc: Guennadi Liakhovetski , Cezary Rojewski , Liam Girdwood , Rander Wang , Jie Yang , Takashi Iwai , Liam Girdwood , Mac Chiang , Bard Liao , Bard Liao , Gongjun Song , Pierre-Louis Bossart , Vamshi Krishna Gopal , Rander Wang , Yong Zhi , Charles Keepax , Hans de Goede , Mark Brown , Christophe JAILLET , Paul Olaru , Brent Lu , Libin Yang , Malik_Hsu , Kai Vehmanen , linux-kernel@vger.kernel.org, Curtis Malainey 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" A machine driver needs to be enumerated by more than one ACPI HID if it supports second headphone driver (i.e. rt5682 and rt5682s). However, the id field in snd_soc_acpi_mach structure could contain only one HID. By adding a 'comp_ids' field which can contain several HIDs, we can enumerate a machine driver by multiple ACPI HIDs. Signed-off-by: Brent Lu --- include/sound/soc-acpi.h | 3 +++ sound/soc/soc-acpi.c | 24 ++++++++++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/include/sound/soc-acpi.h b/include/sound/soc-acpi.h index 2f3fa385c092..31f4c4f9aeea 100644 --- a/include/sound/soc-acpi.h +++ b/include/sound/soc-acpi.h @@ -129,6 +129,8 @@ struct snd_soc_acpi_link_adr { * all firmware/topology related fields. * * @id: ACPI ID (usually the codec's) used to find a matching machine driver. + * @comp_ids: list of compatible audio codecs using the same machine driver, + * firmware and topology * @link_mask: describes required board layout, e.g. for SoundWire. * @links: array of link _ADR descriptors, null terminated. * @drv_name: machine driver name @@ -146,6 +148,7 @@ struct snd_soc_acpi_link_adr { /* Descriptor for SST ASoC machine driver */ struct snd_soc_acpi_mach { const u8 id[ACPI_ID_LEN]; + const struct snd_soc_acpi_codecs *comp_ids; const u32 link_mask; const struct snd_soc_acpi_link_adr *links; const char *drv_name; diff --git a/sound/soc/soc-acpi.c b/sound/soc/soc-acpi.c index 395229bf5c51..2ae99b49d3f5 100644 --- a/sound/soc/soc-acpi.c +++ b/sound/soc/soc-acpi.c @@ -8,14 +8,34 @@ #include #include +static bool snd_soc_acpi_id_present(struct snd_soc_acpi_mach *machine) +{ + const struct snd_soc_acpi_codecs *comp_ids = machine->comp_ids; + int i; + + if (machine->id[0]) { + if (acpi_dev_present(machine->id, NULL, -1)) + return true; + } + + if (comp_ids) { + for (i = 0; i < comp_ids->num_codecs; i++) { + if (acpi_dev_present(comp_ids->codecs[i], NULL, -1)) + return true; + } + } + + return false; +} + struct snd_soc_acpi_mach * snd_soc_acpi_find_machine(struct snd_soc_acpi_mach *machines) { struct snd_soc_acpi_mach *mach; struct snd_soc_acpi_mach *mach_alt; - for (mach = machines; mach->id[0]; mach++) { - if (acpi_dev_present(mach->id, NULL, -1)) { + for (mach = machines; mach->id[0] || mach->comp_ids; mach++) { + if (snd_soc_acpi_id_present(mach)) { if (mach->machine_quirk) { mach_alt = mach->machine_quirk(mach); if (!mach_alt) From patchwork Fri Oct 29 17:14:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brent Lu X-Patchwork-Id: 12593133 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 BA220C433F5 for ; Fri, 29 Oct 2021 17:17:54 +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 C009860FED for ; Fri, 29 Oct 2021 17:17:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C009860FED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=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 C7BD41718; Fri, 29 Oct 2021 19:17:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C7BD41718 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1635527871; bh=tvhL9AkPkzwBze5gsTF7QWDQKe+9+MeVZCHlqzBjNbo=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=edSEkKpOakWUREOawtqMMABegPGPL3jQQYfgqtU/nhoJ/fXRTcVg4fnuogNPKswLP bB6XhA1u63lBxrGZv1PAlMWLuT5CHXOmag+Ln1Vxfo/JjiG0inUIncRnRgcbhLKvm0 7RfpeTmkWrJR4s/ZJ10uBhZPrBOkumwlDxEIG6WQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 325B6F804E3; Fri, 29 Oct 2021 19:16:17 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1B57EF8027B; Fri, 29 Oct 2021 19:16:15 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 7949BF800D1 for ; Fri, 29 Oct 2021 19:16:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7949BF800D1 X-IronPort-AV: E=McAfee;i="6200,9189,10152"; a="291543918" X-IronPort-AV: E=Sophos;i="5.87,193,1631602800"; d="scan'208";a="291543918" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2021 10:16:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,193,1631602800"; d="scan'208";a="598276498" Received: from brentlu-brix.itwn.intel.com ([10.5.253.1]) by orsmga004.jf.intel.com with ESMTP; 29 Oct 2021 10:16:02 -0700 From: Brent Lu To: alsa-devel@alsa-project.org Subject: [PATCH v5 2/6] ASoC: Intel: sof_rt5682: detect codec variant in probe function Date: Sat, 30 Oct 2021 01:14:05 +0800 Message-Id: <20211029171409.611600-3-brent.lu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211029171409.611600-1-brent.lu@intel.com> References: <20211029171409.611600-1-brent.lu@intel.com> MIME-Version: 1.0 Cc: Guennadi Liakhovetski , Cezary Rojewski , Liam Girdwood , Rander Wang , Jie Yang , Takashi Iwai , Liam Girdwood , Mac Chiang , Bard Liao , Bard Liao , Gongjun Song , Pierre-Louis Bossart , Vamshi Krishna Gopal , Rander Wang , Yong Zhi , Charles Keepax , Hans de Goede , Mark Brown , Christophe JAILLET , Paul Olaru , Brent Lu , Libin Yang , Malik_Hsu , Kai Vehmanen , linux-kernel@vger.kernel.org, Curtis Malainey 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" Detect whether the headphone codec is ALC5682I-VS or not in probe function so we don't need to duplicate all board configs for this new variant. Signed-off-by: Brent Lu --- sound/soc/intel/boards/sof_rt5682.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sound/soc/intel/boards/sof_rt5682.c b/sound/soc/intel/boards/sof_rt5682.c index 613662eedd0d..c41c584379d9 100644 --- a/sound/soc/intel/boards/sof_rt5682.c +++ b/sound/soc/intel/boards/sof_rt5682.c @@ -864,6 +864,10 @@ static int sof_audio_probe(struct platform_device *pdev) if ((sof_rt5682_quirk & SOF_SPEAKER_AMP_PRESENT) && !mach->quirk_data) sof_rt5682_quirk &= ~SOF_SPEAKER_AMP_PRESENT; + /* Detect the headset codec variant */ + if (acpi_dev_present("RTL5682", NULL, -1)) + sof_rt5682_quirk |= SOF_RT5682S_HEADPHONE_CODEC_PRESENT; + if (soc_intel_is_byt() || soc_intel_is_cht()) { is_legacy_cpu = 1; dmic_be_num = 0; From patchwork Fri Oct 29 17:14:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brent Lu X-Patchwork-Id: 12593145 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 53BA1C433EF for ; Fri, 29 Oct 2021 17:18:20 +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 D079261038 for ; Fri, 29 Oct 2021 17:18:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D079261038 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=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 3581F1714; Fri, 29 Oct 2021 19:17:28 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3581F1714 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1635527898; bh=Rocql50eTeFsWCsGCIoAYaNIPWP0MiCgz9mD0ygFSNw=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=HJh+74mQhTMhchuPONCrqo0BBZvSZuf1st0ANvGfGP8OJjJtYUX/Rk8ngwJ8jXSZQ WxYqPh00xMw4g/QzOByYoPfZ1U5JkxD5NzOKgW4Q52dIjNMQX0TsS0pHTlABfn+A8S WmPDb2DKlDdxCuA3xqdu4hhjd4bHmuaikAG9qVzw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 013F8F804E7; Fri, 29 Oct 2021 19:16:20 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id BD525F804EB; Fri, 29 Oct 2021 19:16:18 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 D708DF800F4 for ; Fri, 29 Oct 2021 19:16:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D708DF800F4 X-IronPort-AV: E=McAfee;i="6200,9189,10152"; a="291543950" X-IronPort-AV: E=Sophos;i="5.87,193,1631602800"; d="scan'208";a="291543950" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2021 10:16:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,193,1631602800"; d="scan'208";a="598276528" Received: from brentlu-brix.itwn.intel.com ([10.5.253.1]) by orsmga004.jf.intel.com with ESMTP; 29 Oct 2021 10:16:07 -0700 From: Brent Lu To: alsa-devel@alsa-project.org Subject: [PATCH v5 3/6] ASoC: Intel: sof_rt5682: use comp_ids to enumerate rt5682s Date: Sat, 30 Oct 2021 01:14:06 +0800 Message-Id: <20211029171409.611600-4-brent.lu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211029171409.611600-1-brent.lu@intel.com> References: <20211029171409.611600-1-brent.lu@intel.com> MIME-Version: 1.0 Cc: Guennadi Liakhovetski , Cezary Rojewski , Liam Girdwood , Rander Wang , Jie Yang , Takashi Iwai , Liam Girdwood , Mac Chiang , Bard Liao , Bard Liao , Gongjun Song , Pierre-Louis Bossart , Vamshi Krishna Gopal , Rander Wang , Yong Zhi , Charles Keepax , Hans de Goede , Mark Brown , Christophe JAILLET , Paul Olaru , Brent Lu , Libin Yang , Malik_Hsu , Kai Vehmanen , linux-kernel@vger.kernel.org, Curtis Malainey 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" Use comp_ids field to enumerate rt5682/rt5682s headphone codec for JSL/TGL/ADL devices and remove redundant entries in tables. Signed-off-by: Brent Lu --- sound/soc/intel/boards/sof_rt5682.c | 30 ---------------- .../intel/common/soc-acpi-intel-adl-match.c | 11 ++++-- .../intel/common/soc-acpi-intel-jsl-match.c | 35 +++++-------------- .../intel/common/soc-acpi-intel-tgl-match.c | 11 ++++-- 4 files changed, 24 insertions(+), 63 deletions(-) diff --git a/sound/soc/intel/boards/sof_rt5682.c b/sound/soc/intel/boards/sof_rt5682.c index c41c584379d9..c41f386b4138 100644 --- a/sound/soc/intel/boards/sof_rt5682.c +++ b/sound/soc/intel/boards/sof_rt5682.c @@ -1050,36 +1050,6 @@ static const struct platform_device_id board_ids[] = { SOF_RT5682_SSP_AMP(2) | SOF_RT5682_NUM_HDMIDEV(4)), }, - { - .name = "jsl_rt5682s_rt1015", - .driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN | - SOF_RT5682_MCLK_24MHZ | - SOF_RT5682_SSP_CODEC(0) | - SOF_RT5682S_HEADPHONE_CODEC_PRESENT | - SOF_SPEAKER_AMP_PRESENT | - SOF_RT1015_SPEAKER_AMP_PRESENT | - SOF_RT5682_SSP_AMP(1)), - }, - { - .name = "jsl_rt5682s_rt1015p", - .driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN | - SOF_RT5682_MCLK_24MHZ | - SOF_RT5682_SSP_CODEC(0) | - SOF_RT5682S_HEADPHONE_CODEC_PRESENT | - SOF_SPEAKER_AMP_PRESENT | - SOF_RT1015P_SPEAKER_AMP_PRESENT | - SOF_RT5682_SSP_AMP(1)), - }, - { - .name = "jsl_rt5682s_mx98360", - .driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN | - SOF_RT5682_MCLK_24MHZ | - SOF_RT5682_SSP_CODEC(0) | - SOF_RT5682S_HEADPHONE_CODEC_PRESENT | - SOF_SPEAKER_AMP_PRESENT | - SOF_MAX98360A_SPEAKER_AMP_PRESENT | - SOF_RT5682_SSP_AMP(1)), - }, { .name = "adl_mx98360_rt5682", .driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN | diff --git a/sound/soc/intel/common/soc-acpi-intel-adl-match.c b/sound/soc/intel/common/soc-acpi-intel-adl-match.c index f5b21a95d222..06f503452aa5 100644 --- a/sound/soc/intel/common/soc-acpi-intel-adl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-adl-match.c @@ -285,9 +285,14 @@ static const struct snd_soc_acpi_codecs adl_max98360a_amp = { .codecs = {"MX98360A"} }; +static const struct snd_soc_acpi_codecs adl_rt5682_rt5682s_hp = { + .num_codecs = 2, + .codecs = {"10EC5682", "RTL5682"}, +}; + struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = { { - .id = "10EC5682", + .comp_ids = &adl_rt5682_rt5682s_hp, .drv_name = "adl_mx98373_rt5682", .machine_quirk = snd_soc_acpi_codec_list, .quirk_data = &adl_max98373_amp, @@ -295,7 +300,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = { .sof_tplg_filename = "sof-adl-max98373-rt5682.tplg", }, { - .id = "10EC5682", + .comp_ids = &adl_rt5682_rt5682s_hp, .drv_name = "adl_mx98357_rt5682", .machine_quirk = snd_soc_acpi_codec_list, .quirk_data = &adl_max98357a_amp, @@ -303,7 +308,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = { .sof_tplg_filename = "sof-adl-max98357a-rt5682.tplg", }, { - .id = "10EC5682", + .comp_ids = &adl_rt5682_rt5682s_hp, .drv_name = "adl_mx98360_rt5682", .machine_quirk = snd_soc_acpi_codec_list, .quirk_data = &adl_max98360a_amp, diff --git a/sound/soc/intel/common/soc-acpi-intel-jsl-match.c b/sound/soc/intel/common/soc-acpi-intel-jsl-match.c index e7d22e397299..ee703701bff2 100644 --- a/sound/soc/intel/common/soc-acpi-intel-jsl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-jsl-match.c @@ -29,6 +29,11 @@ static struct snd_soc_acpi_codecs mx98360a_spk = { .codecs = {"MX98360A"} }; +static const struct snd_soc_acpi_codecs rt5682_rt5682s_hp = { + .num_codecs = 2, + .codecs = {"10EC5682", "RTL5682"}, +}; + /* * When adding new entry to the snd_soc_acpi_intel_jsl_machines array, * use .quirk_data member to distinguish different machine driver, @@ -50,7 +55,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = { .sof_tplg_filename = "sof-jsl-da7219-mx98360a.tplg", }, { - .id = "10EC5682", + .comp_ids = &rt5682_rt5682s_hp, .drv_name = "jsl_rt5682_rt1015", .sof_fw_filename = "sof-jsl.ri", .machine_quirk = snd_soc_acpi_codec_list, @@ -58,7 +63,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = { .sof_tplg_filename = "sof-jsl-rt5682-rt1015.tplg", }, { - .id = "10EC5682", + .comp_ids = &rt5682_rt5682s_hp, .drv_name = "jsl_rt5682_rt1015p", .sof_fw_filename = "sof-jsl.ri", .machine_quirk = snd_soc_acpi_codec_list, @@ -66,7 +71,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = { .sof_tplg_filename = "sof-jsl-rt5682-rt1015.tplg", }, { - .id = "10EC5682", + .comp_ids = &rt5682_rt5682s_hp, .drv_name = "jsl_rt5682_mx98360", .sof_fw_filename = "sof-jsl.ri", .machine_quirk = snd_soc_acpi_codec_list, @@ -81,30 +86,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = { .quirk_data = &mx98360a_spk, .sof_tplg_filename = "sof-jsl-cs42l42-mx98360a.tplg", }, - { - .id = "RTL5682", - .drv_name = "jsl_rt5682s_rt1015", - .sof_fw_filename = "sof-jsl.ri", - .machine_quirk = snd_soc_acpi_codec_list, - .quirk_data = &rt1015_spk, - .sof_tplg_filename = "sof-jsl-rt5682-rt1015.tplg", - }, - { - .id = "RTL5682", - .drv_name = "jsl_rt5682s_rt1015p", - .sof_fw_filename = "sof-jsl.ri", - .machine_quirk = snd_soc_acpi_codec_list, - .quirk_data = &rt1015p_spk, - .sof_tplg_filename = "sof-jsl-rt5682-rt1015.tplg", - }, - { - .id = "RTL5682", - .drv_name = "jsl_rt5682s_mx98360", - .sof_fw_filename = "sof-jsl.ri", - .machine_quirk = snd_soc_acpi_codec_list, - .quirk_data = &mx98360a_spk, - .sof_tplg_filename = "sof-jsl-rt5682-mx98360a.tplg", - }, { .id = "ESSX8336", .drv_name = "sof-essx8336", diff --git a/sound/soc/intel/common/soc-acpi-intel-tgl-match.c b/sound/soc/intel/common/soc-acpi-intel-tgl-match.c index 9d89f01d6b84..da31bb3cca17 100644 --- a/sound/soc/intel/common/soc-acpi-intel-tgl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-tgl-match.c @@ -358,9 +358,14 @@ static const struct snd_soc_acpi_codecs tgl_rt1011_amp = { .codecs = {"10EC1011"} }; +static const struct snd_soc_acpi_codecs tgl_rt5682_rt5682s_hp = { + .num_codecs = 2, + .codecs = {"10EC5682", "RTL5682"}, +}; + struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_machines[] = { { - .id = "10EC5682", + .comp_ids = &tgl_rt5682_rt5682s_hp, .drv_name = "tgl_mx98357_rt5682", .machine_quirk = snd_soc_acpi_codec_list, .quirk_data = &tgl_codecs, @@ -368,7 +373,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_machines[] = { .sof_tplg_filename = "sof-tgl-max98357a-rt5682.tplg", }, { - .id = "10EC5682", + .comp_ids = &tgl_rt5682_rt5682s_hp, .drv_name = "tgl_mx98373_rt5682", .machine_quirk = snd_soc_acpi_codec_list, .quirk_data = &tgl_max98373_amp, @@ -376,7 +381,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_machines[] = { .sof_tplg_filename = "sof-tgl-max98373-rt5682.tplg", }, { - .id = "10EC5682", + .comp_ids = &tgl_rt5682_rt5682s_hp, .drv_name = "tgl_rt1011_rt5682", .machine_quirk = snd_soc_acpi_codec_list, .quirk_data = &tgl_rt1011_amp, From patchwork Fri Oct 29 17:14:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brent Lu X-Patchwork-Id: 12593147 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 7B8FEC433F5 for ; Fri, 29 Oct 2021 17:18:46 +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 CBA0761039 for ; Fri, 29 Oct 2021 17:18:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CBA0761039 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=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 0A5CE172A; Fri, 29 Oct 2021 19:17:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0A5CE172A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1635527924; bh=ing5XypK+p7sIqoGu2cmGHpA7eioFOHwzrTwPO+NBqo=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=adT3nZilDci08qBr/yjLB5bfJOPbX4BpITx+FlBI4aaVsES46+wTV9Q81IO2W/NEg arJZklOnd0L3wqBk5LGuAqaKwskm1ZHTgNpAs3g5BbCL78BsoVzTnuI3G6v1fzVtHX FaZhqqlZA4m2aJl5XR+K4ZSjk///+CwRVDkCaafs= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 1D108F804F3; Fri, 29 Oct 2021 19:16:22 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3595EF804FC; Fri, 29 Oct 2021 19:16:21 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 CE212F804E0 for ; Fri, 29 Oct 2021 19:16:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CE212F804E0 X-IronPort-AV: E=McAfee;i="6200,9189,10152"; a="291543982" X-IronPort-AV: E=Sophos;i="5.87,193,1631602800"; d="scan'208";a="291543982" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2021 10:16:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,193,1631602800"; d="scan'208";a="598276551" Received: from brentlu-brix.itwn.intel.com ([10.5.253.1]) by orsmga004.jf.intel.com with ESMTP; 29 Oct 2021 10:16:12 -0700 From: Brent Lu To: alsa-devel@alsa-project.org Subject: [PATCH v5 4/6] ASoC: Intel: soc-acpi-byt: shrink tables using compatible IDs Date: Sat, 30 Oct 2021 01:14:07 +0800 Message-Id: <20211029171409.611600-5-brent.lu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211029171409.611600-1-brent.lu@intel.com> References: <20211029171409.611600-1-brent.lu@intel.com> MIME-Version: 1.0 Cc: Guennadi Liakhovetski , Cezary Rojewski , Liam Girdwood , Rander Wang , Jie Yang , Takashi Iwai , Liam Girdwood , Mac Chiang , Bard Liao , Bard Liao , Gongjun Song , Pierre-Louis Bossart , Vamshi Krishna Gopal , Rander Wang , Yong Zhi , Charles Keepax , Hans de Goede , Mark Brown , Christophe JAILLET , Paul Olaru , Brent Lu , Libin Yang , Malik_Hsu , Kai Vehmanen , linux-kernel@vger.kernel.org, Curtis Malainey 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" From: Pierre-Louis Bossart We have multiple entries for the same codecs, use the new compatible IDs to have a single entry. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Brent Lu --- .../intel/common/soc-acpi-intel-byt-match.c | 68 +++++++------------ 1 file changed, 24 insertions(+), 44 deletions(-) diff --git a/sound/soc/intel/common/soc-acpi-intel-byt-match.c b/sound/soc/intel/common/soc-acpi-intel-byt-match.c index 510a5f38b7f1..142000991813 100644 --- a/sound/soc/intel/common/soc-acpi-intel-byt-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-byt-match.c @@ -120,9 +120,29 @@ static struct snd_soc_acpi_mach *byt_quirk(void *arg) } } +static const struct snd_soc_acpi_codecs rt5640_comp_ids = { + .num_codecs = 3, + .codecs = { "10EC5640", "10EC5642", "INTCCFFD"}, +}; + +static const struct snd_soc_acpi_codecs wm5102_comp_ids = { + .num_codecs = 2, + .codecs = { "WM510204", "WM510205"}, +}; + +static const struct snd_soc_acpi_codecs da7213_comp_ids = { + .num_codecs = 2, + .codecs = { "DGLS7212", "DGLS7213"}, +}; + +static const struct snd_soc_acpi_codecs rt5645_comp_ids = { + .num_codecs = 2, + .codecs = { "10EC5645", "10EC5648"}, +}; + struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_machines[] = { { - .id = "10EC5640", + .comp_ids = &rt5640_comp_ids, .drv_name = "bytcr_rt5640", .fw_filename = "intel/fw_sst_0f28.bin", .board = "bytcr_rt5640", @@ -130,22 +150,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_machines[] = { .sof_fw_filename = "sof-byt.ri", .sof_tplg_filename = "sof-byt-rt5640.tplg", }, - { - .id = "10EC5642", - .drv_name = "bytcr_rt5640", - .fw_filename = "intel/fw_sst_0f28.bin", - .board = "bytcr_rt5640", - .sof_fw_filename = "sof-byt.ri", - .sof_tplg_filename = "sof-byt-rt5640.tplg", - }, - { - .id = "INTCCFFD", - .drv_name = "bytcr_rt5640", - .fw_filename = "intel/fw_sst_0f28.bin", - .board = "bytcr_rt5640", - .sof_fw_filename = "sof-byt.ri", - .sof_tplg_filename = "sof-byt-rt5640.tplg", - }, { .id = "10EC5651", .drv_name = "bytcr_rt5651", @@ -155,7 +159,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_machines[] = { .sof_tplg_filename = "sof-byt-rt5651.tplg", }, { - .id = "WM510204", + .comp_ids = &wm5102_comp_ids, .drv_name = "bytcr_wm5102", .fw_filename = "intel/fw_sst_0f28.bin", .board = "bytcr_wm5102", @@ -163,23 +167,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_machines[] = { .sof_tplg_filename = "sof-byt-wm5102.tplg", }, { - .id = "WM510205", - .drv_name = "bytcr_wm5102", - .fw_filename = "intel/fw_sst_0f28.bin", - .board = "bytcr_wm5102", - .sof_fw_filename = "sof-byt.ri", - .sof_tplg_filename = "sof-byt-wm5102.tplg", - }, - { - .id = "DLGS7212", - .drv_name = "bytcht_da7213", - .fw_filename = "intel/fw_sst_0f28.bin", - .board = "bytcht_da7213", - .sof_fw_filename = "sof-byt.ri", - .sof_tplg_filename = "sof-byt-da7213.tplg", - }, - { - .id = "DLGS7213", + .comp_ids = &da7213_comp_ids, .drv_name = "bytcht_da7213", .fw_filename = "intel/fw_sst_0f28.bin", .board = "bytcht_da7213", @@ -202,15 +190,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_machines[] = { }, /* some Baytrail platforms rely on RT5645, use CHT machine driver */ { - .id = "10EC5645", - .drv_name = "cht-bsw-rt5645", - .fw_filename = "intel/fw_sst_0f28.bin", - .board = "cht-bsw", - .sof_fw_filename = "sof-byt.ri", - .sof_tplg_filename = "sof-byt-rt5645.tplg", - }, - { - .id = "10EC5648", + .comp_ids = &rt5645_comp_ids, .drv_name = "cht-bsw-rt5645", .fw_filename = "intel/fw_sst_0f28.bin", .board = "cht-bsw", From patchwork Fri Oct 29 17:14:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brent Lu X-Patchwork-Id: 12593149 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 C10E1C433EF for ; Fri, 29 Oct 2021 17:19:06 +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 1DFAD61038 for ; Fri, 29 Oct 2021 17:19:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1DFAD61038 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=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 6B0D816EB; Fri, 29 Oct 2021 19:18:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6B0D816EB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1635527944; bh=1rg7rmtXbAiNm1j6/E64sya7NLWQUC1U5wgFuy9lcWs=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=QBfUTlIavG7Mlm/tSkK4jBR/CSomheGT5l72HMz1quvkINEFHUT7RFNWH8SEJEYez uWpDRoryLEi/cUnVQsFyFtMKuhbqoQHfYeqkokOJPncwUJSvfjQt+ibJr9tg2N1Szh hb8Wvi9c4hXvc9Zj5AnKRCaVDTmia7W7hHBIf38Q= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D1511F804FD; Fri, 29 Oct 2021 19:16:36 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 47ECAF8050F; Fri, 29 Oct 2021 19:16:36 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 A7278F80506 for ; Fri, 29 Oct 2021 19:16:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A7278F80506 X-IronPort-AV: E=McAfee;i="6200,9189,10152"; a="228166444" X-IronPort-AV: E=Sophos;i="5.87,193,1631602800"; d="scan'208";a="228166444" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2021 10:16:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,193,1631602800"; d="scan'208";a="598276583" Received: from brentlu-brix.itwn.intel.com ([10.5.253.1]) by orsmga004.jf.intel.com with ESMTP; 29 Oct 2021 10:16:17 -0700 From: Brent Lu To: alsa-devel@alsa-project.org Subject: [PATCH v5 5/6] ASoC: Intel: soc-acpi-cht: shrink tables using compatible IDs Date: Sat, 30 Oct 2021 01:14:08 +0800 Message-Id: <20211029171409.611600-6-brent.lu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211029171409.611600-1-brent.lu@intel.com> References: <20211029171409.611600-1-brent.lu@intel.com> MIME-Version: 1.0 Cc: Guennadi Liakhovetski , Cezary Rojewski , Liam Girdwood , Rander Wang , Jie Yang , Takashi Iwai , Liam Girdwood , Mac Chiang , Bard Liao , Bard Liao , Gongjun Song , Pierre-Louis Bossart , Vamshi Krishna Gopal , Rander Wang , Yong Zhi , Charles Keepax , Hans de Goede , Mark Brown , Christophe JAILLET , Paul Olaru , Brent Lu , Libin Yang , Malik_Hsu , Kai Vehmanen , linux-kernel@vger.kernel.org, Curtis Malainey 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" From: Pierre-Louis Bossart We have multiple entries for the same codecs, use the new compatible IDs to have a single entry. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Brent Lu --- .../intel/common/soc-acpi-intel-cht-match.c | 69 +++++++------------ 1 file changed, 25 insertions(+), 44 deletions(-) diff --git a/sound/soc/intel/common/soc-acpi-intel-cht-match.c b/sound/soc/intel/common/soc-acpi-intel-cht-match.c index 227424236fd5..c60a5e8e7bc9 100644 --- a/sound/soc/intel/common/soc-acpi-intel-cht-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-cht-match.c @@ -51,18 +51,31 @@ static struct snd_soc_acpi_mach *cht_quirk(void *arg) return mach; } +static const struct snd_soc_acpi_codecs rt5640_comp_ids = { + .num_codecs = 2, + .codecs = { "10EC5640", "10EC3276" }, +}; + +static const struct snd_soc_acpi_codecs rt5670_comp_ids = { + .num_codecs = 2, + .codecs = { "10EC5670", "10EC5672" }, +}; + +static const struct snd_soc_acpi_codecs rt5645_comp_ids = { + .num_codecs = 3, + .codecs = { "10EC5645", "10EC5650", "10EC3270" }, +}; + +static const struct snd_soc_acpi_codecs da7213_comp_ids = { + .num_codecs = 2, + .codecs = { "DGLS7212", "DGLS7213"}, + +}; + /* Cherryview-based platforms: CherryTrail and Braswell */ struct snd_soc_acpi_mach snd_soc_acpi_intel_cherrytrail_machines[] = { { - .id = "10EC5670", - .drv_name = "cht-bsw-rt5672", - .fw_filename = "intel/fw_sst_22a8.bin", - .board = "cht-bsw", - .sof_fw_filename = "sof-cht.ri", - .sof_tplg_filename = "sof-cht-rt5670.tplg", - }, - { - .id = "10EC5672", + .comp_ids = &rt5670_comp_ids, .drv_name = "cht-bsw-rt5672", .fw_filename = "intel/fw_sst_22a8.bin", .board = "cht-bsw", @@ -70,23 +83,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cherrytrail_machines[] = { .sof_tplg_filename = "sof-cht-rt5670.tplg", }, { - .id = "10EC5645", - .drv_name = "cht-bsw-rt5645", - .fw_filename = "intel/fw_sst_22a8.bin", - .board = "cht-bsw", - .sof_fw_filename = "sof-cht.ri", - .sof_tplg_filename = "sof-cht-rt5645.tplg", - }, - { - .id = "10EC5650", - .drv_name = "cht-bsw-rt5645", - .fw_filename = "intel/fw_sst_22a8.bin", - .board = "cht-bsw", - .sof_fw_filename = "sof-cht.ri", - .sof_tplg_filename = "sof-cht-rt5645.tplg", - }, - { - .id = "10EC3270", + .comp_ids = &rt5645_comp_ids, .drv_name = "cht-bsw-rt5645", .fw_filename = "intel/fw_sst_22a8.bin", .board = "cht-bsw", @@ -110,15 +107,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cherrytrail_machines[] = { .sof_tplg_filename = "sof-cht-nau8824.tplg", }, { - .id = "DLGS7212", - .drv_name = "bytcht_da7213", - .fw_filename = "intel/fw_sst_22a8.bin", - .board = "bytcht_da7213", - .sof_fw_filename = "sof-cht.ri", - .sof_tplg_filename = "sof-cht-da7213.tplg", - }, - { - .id = "DLGS7213", + .comp_ids = &da7213_comp_ids, .drv_name = "bytcht_da7213", .fw_filename = "intel/fw_sst_22a8.bin", .board = "bytcht_da7213", @@ -135,7 +124,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cherrytrail_machines[] = { }, /* some CHT-T platforms rely on RT5640, use Baytrail machine driver */ { - .id = "10EC5640", + .comp_ids = &rt5640_comp_ids, .drv_name = "bytcr_rt5640", .fw_filename = "intel/fw_sst_22a8.bin", .board = "bytcr_rt5640", @@ -143,14 +132,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cherrytrail_machines[] = { .sof_fw_filename = "sof-cht.ri", .sof_tplg_filename = "sof-cht-rt5640.tplg", }, - { - .id = "10EC3276", - .drv_name = "bytcr_rt5640", - .fw_filename = "intel/fw_sst_22a8.bin", - .board = "bytcr_rt5640", - .sof_fw_filename = "sof-cht.ri", - .sof_tplg_filename = "sof-cht-rt5640.tplg", - }, { .id = "10EC5682", .drv_name = "sof_rt5682", From patchwork Fri Oct 29 17:14:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brent Lu X-Patchwork-Id: 12593151 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 6B9A6C433F5 for ; Fri, 29 Oct 2021 17:19:20 +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 DCB5061038 for ; Fri, 29 Oct 2021 17:19:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org DCB5061038 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=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 2E9AA170E; Fri, 29 Oct 2021 19:18:28 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2E9AA170E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1635527958; bh=eulpuoQ0NBqoCHvM2zxSxdS0pms0Z6LneU/1pKMc9rU=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ZKkb6V1qgl50oILxnTxQH4Nb068B9seiTHwoBQk7QFLysTP2gSnqhe+KCAHPO8HzF bQZkqMm/dvymNKx1r53QWqANpq4TiUrqsMU2Spp+pP9iCV6rPTXZGt5SwEk49hzOKF gt4YuEN04itdLPARAiQjrUl0ziFGyt21Cmrtmot0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 83B15F80507; Fri, 29 Oct 2021 19:16:43 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CFACCF80515; Fri, 29 Oct 2021 19:16:41 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 04890F80507 for ; Fri, 29 Oct 2021 19:16:29 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 04890F80507 X-IronPort-AV: E=McAfee;i="6200,9189,10152"; a="228166468" X-IronPort-AV: E=Sophos;i="5.87,193,1631602800"; d="scan'208";a="228166468" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2021 10:16:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,193,1631602800"; d="scan'208";a="598276597" Received: from brentlu-brix.itwn.intel.com ([10.5.253.1]) by orsmga004.jf.intel.com with ESMTP; 29 Oct 2021 10:16:22 -0700 From: Brent Lu To: alsa-devel@alsa-project.org Subject: [PATCH v5 6/6] ASoC: Intel: soc-acpi: use const for all uses of snd_soc_acpi_codecs Date: Sat, 30 Oct 2021 01:14:09 +0800 Message-Id: <20211029171409.611600-7-brent.lu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211029171409.611600-1-brent.lu@intel.com> References: <20211029171409.611600-1-brent.lu@intel.com> MIME-Version: 1.0 Cc: Guennadi Liakhovetski , Cezary Rojewski , Liam Girdwood , Rander Wang , Jie Yang , Takashi Iwai , Liam Girdwood , Mac Chiang , Bard Liao , Bard Liao , Gongjun Song , Pierre-Louis Bossart , Vamshi Krishna Gopal , Rander Wang , Yong Zhi , Charles Keepax , Hans de Goede , Mark Brown , Christophe JAILLET , Paul Olaru , Brent Lu , Libin Yang , Malik_Hsu , Kai Vehmanen , linux-kernel@vger.kernel.org, Curtis Malainey 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" From: Pierre-Louis Bossart 'const' qualifiers are missing on some platforms, add as needed. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Brent Lu --- sound/soc/intel/common/soc-acpi-intel-bxt-match.c | 2 +- sound/soc/intel/common/soc-acpi-intel-cml-match.c | 8 ++++---- sound/soc/intel/common/soc-acpi-intel-glk-match.c | 2 +- sound/soc/intel/common/soc-acpi-intel-jsl-match.c | 8 ++++---- sound/soc/intel/common/soc-acpi-intel-kbl-match.c | 12 ++++++------ sound/soc/intel/common/soc-acpi-intel-skl-match.c | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/sound/soc/intel/common/soc-acpi-intel-bxt-match.c b/sound/soc/intel/common/soc-acpi-intel-bxt-match.c index 78cfdc48ad45..342d34052204 100644 --- a/sound/soc/intel/common/soc-acpi-intel-bxt-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-bxt-match.c @@ -41,7 +41,7 @@ static struct snd_soc_acpi_mach *apl_quirk(void *arg) return mach; } -static struct snd_soc_acpi_codecs bxt_codecs = { +static const struct snd_soc_acpi_codecs bxt_codecs = { .num_codecs = 1, .codecs = {"MX98357A"} }; diff --git a/sound/soc/intel/common/soc-acpi-intel-cml-match.c b/sound/soc/intel/common/soc-acpi-intel-cml-match.c index b591c6fd13fd..b4eb0c97edf1 100644 --- a/sound/soc/intel/common/soc-acpi-intel-cml-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-cml-match.c @@ -9,22 +9,22 @@ #include #include -static struct snd_soc_acpi_codecs rt1011_spk_codecs = { +static const struct snd_soc_acpi_codecs rt1011_spk_codecs = { .num_codecs = 1, .codecs = {"10EC1011"} }; -static struct snd_soc_acpi_codecs rt1015_spk_codecs = { +static const struct snd_soc_acpi_codecs rt1015_spk_codecs = { .num_codecs = 1, .codecs = {"10EC1015"} }; -static struct snd_soc_acpi_codecs max98357a_spk_codecs = { +static const struct snd_soc_acpi_codecs max98357a_spk_codecs = { .num_codecs = 1, .codecs = {"MX98357A"} }; -static struct snd_soc_acpi_codecs max98390_spk_codecs = { +static const struct snd_soc_acpi_codecs max98390_spk_codecs = { .num_codecs = 1, .codecs = {"MX98390"} }; diff --git a/sound/soc/intel/common/soc-acpi-intel-glk-match.c b/sound/soc/intel/common/soc-acpi-intel-glk-match.c index 3900e3dbae30..8492b7e2a945 100644 --- a/sound/soc/intel/common/soc-acpi-intel-glk-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-glk-match.c @@ -9,7 +9,7 @@ #include #include -static struct snd_soc_acpi_codecs glk_codecs = { +static const struct snd_soc_acpi_codecs glk_codecs = { .num_codecs = 1, .codecs = {"MX98357A"} }; diff --git a/sound/soc/intel/common/soc-acpi-intel-jsl-match.c b/sound/soc/intel/common/soc-acpi-intel-jsl-match.c index ee703701bff2..278ec196da7b 100644 --- a/sound/soc/intel/common/soc-acpi-intel-jsl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-jsl-match.c @@ -9,22 +9,22 @@ #include #include -static struct snd_soc_acpi_codecs jsl_7219_98373_codecs = { +static const struct snd_soc_acpi_codecs jsl_7219_98373_codecs = { .num_codecs = 1, .codecs = {"MX98373"} }; -static struct snd_soc_acpi_codecs rt1015_spk = { +static const struct snd_soc_acpi_codecs rt1015_spk = { .num_codecs = 1, .codecs = {"10EC1015"} }; -static struct snd_soc_acpi_codecs rt1015p_spk = { +static const struct snd_soc_acpi_codecs rt1015p_spk = { .num_codecs = 1, .codecs = {"RTL1015"} }; -static struct snd_soc_acpi_codecs mx98360a_spk = { +static const struct snd_soc_acpi_codecs mx98360a_spk = { .num_codecs = 1, .codecs = {"MX98360A"} }; diff --git a/sound/soc/intel/common/soc-acpi-intel-kbl-match.c b/sound/soc/intel/common/soc-acpi-intel-kbl-match.c index 741bf2f9e081..4e817f559d38 100644 --- a/sound/soc/intel/common/soc-acpi-intel-kbl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-kbl-match.c @@ -12,32 +12,32 @@ static struct skl_machine_pdata skl_dmic_data; -static struct snd_soc_acpi_codecs kbl_codecs = { +static const struct snd_soc_acpi_codecs kbl_codecs = { .num_codecs = 1, .codecs = {"10508825"} }; -static struct snd_soc_acpi_codecs kbl_poppy_codecs = { +static const struct snd_soc_acpi_codecs kbl_poppy_codecs = { .num_codecs = 1, .codecs = {"10EC5663"} }; -static struct snd_soc_acpi_codecs kbl_5663_5514_codecs = { +static const struct snd_soc_acpi_codecs kbl_5663_5514_codecs = { .num_codecs = 2, .codecs = {"10EC5663", "10EC5514"} }; -static struct snd_soc_acpi_codecs kbl_7219_98357_codecs = { +static const struct snd_soc_acpi_codecs kbl_7219_98357_codecs = { .num_codecs = 1, .codecs = {"MX98357A"} }; -static struct snd_soc_acpi_codecs kbl_7219_98927_codecs = { +static const struct snd_soc_acpi_codecs kbl_7219_98927_codecs = { .num_codecs = 1, .codecs = {"MX98927"} }; -static struct snd_soc_acpi_codecs kbl_7219_98373_codecs = { +static const struct snd_soc_acpi_codecs kbl_7219_98373_codecs = { .num_codecs = 1, .codecs = {"MX98373"} }; diff --git a/sound/soc/intel/common/soc-acpi-intel-skl-match.c b/sound/soc/intel/common/soc-acpi-intel-skl-match.c index 961df8d6b5e4..75302e956742 100644 --- a/sound/soc/intel/common/soc-acpi-intel-skl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-skl-match.c @@ -12,7 +12,7 @@ static struct skl_machine_pdata skl_dmic_data; -static struct snd_soc_acpi_codecs skl_codecs = { +static const struct snd_soc_acpi_codecs skl_codecs = { .num_codecs = 1, .codecs = {"10508825"} };