Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp216445pxb; Tue, 19 Oct 2021 01:05:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvfOgYT1U7KfDLq6R6kLUHf7fsZggUS1BLFe5eRGQpLzYZ2Ro3tGtvGRALcjZ9VvwljAqE X-Received: by 2002:a17:902:d50f:b0:13f:ac51:29b4 with SMTP id b15-20020a170902d50f00b0013fac5129b4mr16152432plg.51.1634630753720; Tue, 19 Oct 2021 01:05:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634630753; cv=none; d=google.com; s=arc-20160816; b=YX2nzmlAx7Bp/obS5pUO/a8I/hZtfUMF9NK64JtQrBy4uqKpMc5g6SJommSc9ybZ4d aTmIclUl74Ag5L8zJxk+2z4Q3X1dEb98vz9ozqDSuRGvrBy4Fxt1LS2dC0tkZPAvf9yd erPu0V7EQqhDgCzmNqlGObqt0cBqfjDBjwYQFF1gwYZsGCLS4J2PNOZ92M7AuMP73zNw TPRhIxaS4dxWgkjpNJB6rS/X1b+hIclgpEDVfqo6JSfcBUxNqaX8NWsgGtf2fXDaz77A b2Ih7hrQiss2MZHekRVtvr0gnUYZxg04WaX13fdF90NVgpuq7oekEbbU0NvQvZ6CLuok NriQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=JUukH6eKDbK9FHo+7Kl4qqDoQ/uroJ17qZuowxEMrW8=; b=nN4535XijQHAUt5V9W6YUkJfhFMSoPY6l0p5POGEOIa3I+hThhwKpzm+og5+VbdQ/Z rbgp2gNh/Mxg4qu76+yaPclWGw6CqkZMgN2iCNVNPR+MXZTeKBFNRGXIu0SaQETZ4vq9 z3WyaSXzsBsGHpjgPd/ZaoERJgOUvT1o2HNzB9bC6hb+I1Y6skbDTchX8rZrnIkhG0HO XlCeFG/LTxWOXzB4lju7mqfZz+LT/hFUaSbYwO0j11qvJvJXiRY67zkNKoKHpSgGiDHB aZfY2Cq+UACLSLEhQQhDvLYAtL9yUzmg1vr1qE7VzA2bBaNBwl1hPpq1LcYAtd/r+9Lu dcVw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l3si31058777plg.171.2021.10.19.01.05.41; Tue, 19 Oct 2021 01:05:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234685AbhJSIGF (ORCPT + 99 others); Tue, 19 Oct 2021 04:06:05 -0400 Received: from mga12.intel.com ([192.55.52.136]:60470 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234684AbhJSIGE (ORCPT ); Tue, 19 Oct 2021 04:06:04 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10141"; a="208550969" X-IronPort-AV: E=Sophos;i="5.85,383,1624345200"; d="scan'208";a="208550969" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2021 01:03:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,383,1624345200"; d="scan'208";a="493984698" Received: from brentlu-brix.itwn.intel.com ([10.5.253.56]) by orsmga008.jf.intel.com with ESMTP; 19 Oct 2021 01:03:05 -0700 From: Brent Lu To: alsa-devel@alsa-project.org Cc: Cezary Rojewski , Pierre-Louis Bossart , Liam Girdwood , Jie Yang , Mark Brown , Jaroslav Kysela , Takashi Iwai , Kai Vehmanen , Rander Wang , Paul Olaru , Guennadi Liakhovetski , Brent Lu , Mac Chiang , Curtis Malainey , linux-kernel@vger.kernel.org, Yong Zhi , Vamshi Krishna Gopal , Bard Liao , Libin Yang , Christophe JAILLET , Gongjun Song , Liam Girdwood , Rander Wang , Hans de Goede Subject: [PATCH v3 4/6] ASoC: Intel: soc-acpi-byt: shrink tables using compatible IDs Date: Tue, 19 Oct 2021 15:59:39 +0800 Message-Id: <20211019075941.2037787-5-brent.lu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211019075941.2037787-1-brent.lu@intel.com> References: <20211019075941.2037787-1-brent.lu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- .../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", -- 2.25.1