From patchwork Tue Apr 7 07:14:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hui Wang X-Patchwork-Id: 1267275 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48xJbL6JgDz9sSj; Tue, 7 Apr 2020 17:15:42 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1jLiSP-000719-BT; Tue, 07 Apr 2020 07:15:37 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jLiS9-0006my-Je for kernel-team@lists.ubuntu.com; Tue, 07 Apr 2020 07:15:21 +0000 Received: from [114.254.47.51] (helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jLiS8-0001HR-0g for kernel-team@lists.ubuntu.com; Tue, 07 Apr 2020 07:15:20 +0000 From: Hui Wang To: kernel-team@lists.ubuntu.com Subject: [SRU][F][PATCH 2/6] ALSA: hda: fix intel DSP config Date: Tue, 7 Apr 2020 15:14:44 +0800 Message-Id: <20200407071448.16335-9-hui.wang@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200407071448.16335-1-hui.wang@canonical.com> References: <20200407071448.16335-1-hui.wang@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Pierre-Louis Bossart BugLink: https://bugs.launchpad.net/bugs/1871284 Reshuffle list of devices by historical order and add correct information as needed. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20191022174313.29087-2-perex@perex.cz Signed-off-by: Takashi Iwai (cherry picked from commit cc8f81c7e625168a60843b2b39e3a327cf5170fe) Signed-off-by: Hui Wang --- sound/hda/intel-dsp-config.c | 220 ++++++++++++++++++++++++++--------- 1 file changed, 164 insertions(+), 56 deletions(-) diff --git a/sound/hda/intel-dsp-config.c b/sound/hda/intel-dsp-config.c index d9f6d9e872b4..0b2a7201a46a 100644 --- a/sound/hda/intel-dsp-config.c +++ b/sound/hda/intel-dsp-config.c @@ -30,45 +30,98 @@ struct config_entry { * - the first successful match will win */ static const struct config_entry config_table[] = { -/* Cometlake-LP */ -#if IS_ENABLED(CONFIG_SND_SOC_INTEL_CML_LP) +/* Merrifield */ +#if IS_ENABLED(CONFIG_SND_SOC_SOF_MERRIFIELD) { - /* prefer SST */ - .flags = FLAG_SST, - .device = 0x02c8, + .flags = FLAG_SOF, + .device = 0x119a, }, -#elif IS_ENABLED(CONFIG_SND_SOC_SOF_COMETLAKE_LP) +#endif +/* Broxton-T */ +#if IS_ENABLED(CONFIG_SND_SOC_SOF_APOLLOLAKE) { .flags = FLAG_SOF, - .device = 0x02c8, + .device = 0x1a98, }, #endif -/* Cometlake-H */ -#if IS_ENABLED(CONFIG_SND_SOC_INTEL_CML_H) +/* + * Apollolake (Broxton-P) + * the legacy HDaudio driver is used except on Up Squared (SOF) and + * Chromebooks (SST) + */ +#if IS_ENABLED(CONFIG_SND_SOC_SOF_APOLLOLAKE) { - .flags = FLAG_SST, - .device = 0x06c8, + .flags = FLAG_SOF, + .device = 0x5a98, + .dmi_table = (const struct dmi_system_id []) { + { + .ident = "Up Squared", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "AAEON"), + DMI_MATCH(DMI_BOARD_NAME, "UP-APL01"), + } + }, + {} + } }, -#elif IS_ENABLED(CONFIG_SND_SOC_SOF_COMETLAKE_H) +#endif +#if IS_ENABLED(CONFIG_SND_SOC_INTEL_APL) { - .flags = FLAG_SOF, - .device = 0x06c8, + .flags = FLAG_SST, + .device = 0x5a98, + .dmi_table = (const struct dmi_system_id []) { + { + .ident = "Google Chromebooks", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Google"), + } + }, + {} + } }, #endif -/* Merrifield */ -#if IS_ENABLED(CONFIG_SND_SOC_SOF_MERRIFIELD) +/* + * Skylake and Kabylake use legacy HDaudio driver except for Google + * Chromebooks (SST) + */ + +/* Sunrise Point-LP */ +#if IS_ENABLED(CONFIG_SND_SOC_INTEL_SKL) { - .flags = FLAG_SOF, - .device = 0x119a, + .flags = FLAG_SST, + .device = 0x9d70, + .dmi_table = (const struct dmi_system_id []) { + { + .ident = "Google Chromebooks", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Google"), + } + }, + {} + } }, #endif -/* Broxton-T */ -#if IS_ENABLED(CONFIG_SND_SOC_SOF_APOLLOLAKE) +/* Kabylake-LP */ +#if IS_ENABLED(CONFIG_SND_SOC_INTEL_KBL) { - .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC, - .device = 0x1a98, + .flags = FLAG_SST, + .device = 0x9d71, + .dmi_table = (const struct dmi_system_id []) { + { + .ident = "Google Chromebooks", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Google"), + } + }, + {} + } }, #endif + +/* + * Geminilake uses legacy HDaudio driver except for Google + * Chromebooks + */ /* Geminilake */ #if IS_ENABLED(CONFIG_SND_SOC_SOF_GEMINILAKE) { @@ -85,84 +138,139 @@ static const struct config_entry config_table[] = { } }, #endif -#if IS_ENABLED(CONFIG_SND_SOC_INTEL_GLK) + +/* + * CoffeeLake, CannonLake, CometLake, IceLake, TigerLake use legacy + * HDaudio driver except for Google Chromebooks and when DMICs are + * present. Two cases are required since Coreboot does not expose NHLT + * tables. + * + * When the Chromebook quirk is not present, it's based on information + * that no such device exists. When the quirk is present, it could be + * either based on product information or a placeholder. + */ + +/* Cannonlake */ +#if IS_ENABLED(CONFIG_SND_SOC_SOF_CANNONLAKE) { - .flags = FLAG_SST, - .device = 0x3198, + .flags = FLAG_SOF, + .device = 0x9dc8, + .dmi_table = (const struct dmi_system_id []) { + { + .ident = "Google Chromebooks", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Google"), + } + }, + {} + } }, -#endif -/* Icelake */ -#if IS_ENABLED(CONFIG_SND_SOC_SOF_ICELAKE) { .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC, - .device = 0x34c8, + .device = 0x9dc8, }, #endif -/* Elkhart Lake */ -#if IS_ENABLED(CONFIG_SND_SOC_SOF_ELKHARTLAKE) + +/* Coffelake */ +#if IS_ENABLED(CONFIG_SND_SOC_SOF_COFFEELAKE) + { + .flags = FLAG_SOF, + .device = 0xa348, + .dmi_table = (const struct dmi_system_id []) { + { + .ident = "Google Chromebooks", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Google"), + } + }, + {} + } + }, { .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC, - .device = 0x4b55, + .device = 0xa348, }, #endif -/* Appololake (Broxton-P) */ -#if IS_ENABLED(CONFIG_SND_SOC_SOF_APOLLOLAKE) + +/* Cometlake-LP */ +#if IS_ENABLED(CONFIG_SND_SOC_SOF_COMETLAKE_LP) { .flags = FLAG_SOF, - .device = 0x5a98, + .device = 0x02c8, .dmi_table = (const struct dmi_system_id []) { { - .ident = "Up Squared", + .ident = "Google Chromebooks", .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "AAEON"), - DMI_MATCH(DMI_BOARD_NAME, "UP-APL01"), + DMI_MATCH(DMI_SYS_VENDOR, "Google"), } }, {} } }, -#endif -#if IS_ENABLED(CONFIG_SND_SOC_INTEL_APL) { - .flags = FLAG_SST, - .device = 0x5a98, + .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC, + .device = 0x02c8, }, #endif -/* Cannonlake */ -#if IS_ENABLED(CONFIG_SND_SOC_SOF_CANNONLAKE) +/* Cometlake-H */ +#if IS_ENABLED(CONFIG_SND_SOC_SOF_COMETLAKE_H) { .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC, - .device = 0x9dc8, + .device = 0x06c8, }, #endif -/* Sunrise Point-LP */ -#if IS_ENABLED(CONFIG_SND_SOC_SOF_SKYLAKE) + +/* Icelake */ +#if IS_ENABLED(CONFIG_SND_SOC_SOF_ICELAKE) { - .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC, - .device = 0x9d70, + .flags = FLAG_SOF, + .device = 0x34c8, + .dmi_table = (const struct dmi_system_id []) { + { + .ident = "Google Chromebooks", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Google"), + } + }, + {} + } }, -#endif -/* Kabylake-LP */ -#if IS_ENABLED(CONFIG_SND_SOC_SOF_KABYLAKE) { .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC, - .device = 0x9d71, + .device = 0x34c8, }, #endif + /* Tigerlake */ #if IS_ENABLED(CONFIG_SND_SOC_SOF_TIGERLAKE) + { + .flags = FLAG_SOF, + .device = 0xa0c8, + .dmi_table = (const struct dmi_system_id []) { + { + .ident = "Google Chromebooks", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Google"), + } + }, + {} + } + }, + { .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC, .device = 0xa0c8, }, #endif -/* Coffelake */ -#if IS_ENABLED(CONFIG_SND_SOC_SOF_COFFEELAKE) + +/* Elkhart Lake */ +#if IS_ENABLED(CONFIG_SND_SOC_SOF_ELKHARTLAKE) { .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC, - .device = 0xa348, + .device = 0x4b55, }, #endif + }; static const struct config_entry *snd_intel_dsp_find_config