From patchwork Wed Dec 9 15:31:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai Vehmanen X-Patchwork-Id: 11961763 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC062C4361B for ; Wed, 9 Dec 2020 15:34:47 +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 E477420784 for ; Wed, 9 Dec 2020 15:34:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E477420784 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-devel-bounces@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 ED75C16BA; Wed, 9 Dec 2020 16:33:54 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz ED75C16BA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1607528085; bh=hJ245MOQBeVT9s38mJmkIKsFj+TVlKqh72bMIXIMkz4=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=ZkFThEkG6SQhdgE1QWAovP8T7fg7Bxees0a3uWa6U5ItO6wTgEWoXgssFnVG0SIx9 gL5WQzF+/GoBNQYgZLU/ciBFWMPj3pCZSYXOxYebNdSbrwIYtUdRKMAdc3vnb5IbXX JgBTYhvTqhQwb8E1rwhywaxXN/M2dBL29+HcP4mE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 7446CF8020D; Wed, 9 Dec 2020 16:33:54 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 71DE2F80217; Wed, 9 Dec 2020 16:33:53 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 F3C7EF801D8 for ; Wed, 9 Dec 2020 16:33:44 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz F3C7EF801D8 IronPort-SDR: 1ralnZWGmB2p2hNj3JwhSVflfoZSnLWcI94ThZG45YFVlVWSW6UCj+Rm+G8nVsL8EMng0Y5fDF omgPOScFiL1w== X-IronPort-AV: E=McAfee;i="6000,8403,9829"; a="171521091" X-IronPort-AV: E=Sophos;i="5.78,405,1599548400"; d="scan'208";a="171521091" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Dec 2020 07:33:41 -0800 IronPort-SDR: Wt/6npHi0edOcFtvfgtZg0zms7SXDIWHaa2mnn0aC6dYrivzdW2G7wySOJZjdnMbW7PsvE+610 PrjdhWf7qPRw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,405,1599548400"; d="scan'208";a="552668737" Received: from eliteleevi.tm.intel.com ([10.237.54.20]) by orsmga005.jf.intel.com with ESMTP; 09 Dec 2020 07:33:39 -0800 From: Kai Vehmanen To: alsa-devel@alsa-project.org, broonie@kernel.org Subject: [PATCH 1/2] ASoC: Intel: common: add ACPI matching tables for Alder Lake Date: Wed, 9 Dec 2020 17:31:01 +0200 Message-Id: <20201209153102.3028310-1-kai.vehmanen@linux.intel.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Cc: kai.vehmanen@linux.intel.com, daniel.baluta@nxp.com, lgirdwood@gmail.com, pierre-louis.bossart@linux.intel.com, ranjani.sridharan@linux.intel.com, Bard Liao 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" Initial support for ADL w/ RT711 Signed-off-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao --- include/sound/soc-acpi-intel-match.h | 2 + sound/soc/intel/common/Makefile | 2 +- .../intel/common/soc-acpi-intel-adl-match.c | 52 +++++++++++++++++++ 3 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 sound/soc/intel/common/soc-acpi-intel-adl-match.c diff --git a/include/sound/soc-acpi-intel-match.h b/include/sound/soc-acpi-intel-match.h index 5c49e7d78002..59551b1f22f3 100644 --- a/include/sound/soc-acpi-intel-match.h +++ b/include/sound/soc-acpi-intel-match.h @@ -29,12 +29,14 @@ extern struct snd_soc_acpi_mach snd_soc_acpi_intel_icl_machines[]; extern struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_machines[]; extern struct snd_soc_acpi_mach snd_soc_acpi_intel_ehl_machines[]; extern struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[]; +extern struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[]; extern struct snd_soc_acpi_mach snd_soc_acpi_intel_cnl_sdw_machines[]; extern struct snd_soc_acpi_mach snd_soc_acpi_intel_cfl_sdw_machines[]; extern struct snd_soc_acpi_mach snd_soc_acpi_intel_cml_sdw_machines[]; extern struct snd_soc_acpi_mach snd_soc_acpi_intel_icl_sdw_machines[]; extern struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_sdw_machines[]; +extern struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_sdw_machines[]; /* * generic table used for HDA codec-based platforms, possibly with diff --git a/sound/soc/intel/common/Makefile b/sound/soc/intel/common/Makefile index 64468fe9c513..12a205ccdeeb 100644 --- a/sound/soc/intel/common/Makefile +++ b/sound/soc/intel/common/Makefile @@ -8,7 +8,7 @@ snd-soc-acpi-intel-match-objs := soc-acpi-intel-byt-match.o soc-acpi-intel-cht-m soc-acpi-intel-cnl-match.o soc-acpi-intel-cfl-match.o \ soc-acpi-intel-cml-match.o soc-acpi-intel-icl-match.o \ soc-acpi-intel-tgl-match.o soc-acpi-intel-ehl-match.o \ - soc-acpi-intel-jsl-match.o \ + soc-acpi-intel-jsl-match.o soc-acpi-intel-adl-match.o \ soc-acpi-intel-hda-match.o obj-$(CONFIG_SND_SOC_INTEL_SST) += snd-soc-sst-dsp.o snd-soc-sst-ipc.o diff --git a/sound/soc/intel/common/soc-acpi-intel-adl-match.c b/sound/soc/intel/common/soc-acpi-intel-adl-match.c new file mode 100644 index 000000000000..06b233d63b73 --- /dev/null +++ b/sound/soc/intel/common/soc-acpi-intel-adl-match.c @@ -0,0 +1,52 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * soc-apci-intel-adl-match.c - tables and support for ADL ACPI enumeration. + * + * Copyright (c) 2020, Intel Corporation. + */ + +#include +#include + +static const struct snd_soc_acpi_endpoint single_endpoint = { + .num = 0, + .aggregated = 0, + .group_position = 0, + .group_id = 0, +}; + +static const struct snd_soc_acpi_adr_device rt711_0_adr[] = { + { + .adr = 0x000020025D071100, + .num_endpoints = 1, + .endpoints = &single_endpoint, + .name_prefix = "rt711" + } +}; + +static const struct snd_soc_acpi_link_adr adl_rvp[] = { + { + .mask = BIT(0), + .num_adr = ARRAY_SIZE(rt711_0_adr), + .adr_d = rt711_0_adr, + }, + {} +}; + +struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = { + {}, +}; +EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_adl_machines); + +/* this table is used when there is no I2S codec present */ +struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_sdw_machines[] = { + { + .link_mask = 0x1, /* link0 required */ + .links = adl_rvp, + .drv_name = "sof_sdw", + .sof_fw_filename = "sof-adl.ri", + .sof_tplg_filename = "sof-adl-rt711.tplg", + }, + {}, +}; +EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_adl_sdw_machines); From patchwork Wed Dec 9 15:31:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai Vehmanen X-Patchwork-Id: 11961765 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A313C433FE for ; Wed, 9 Dec 2020 15:35:38 +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 DC39920784 for ; Wed, 9 Dec 2020 15:35:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DC39920784 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-devel-bounces@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 ED35E16CF; Wed, 9 Dec 2020 16:34:45 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz ED35E16CF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1607528136; bh=GWHSJ6Lsy6h0SmeehrLlQ3w8D+oN1kjTUYwP7aXrHH0=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=V5jUpMZe7EWxktfBI1iuZJWTghlemN1sDLQF5PnUhtPTzvWo1gG04/FZHIfRrRQD3 bGIHX2SqgQtsWdoNGEQDi6xSHfi2R8vIwjJ/OC/JJwDejgQQ/YTwFNy9Rt8cTu/UPz 6Il79rZLv+693KmpGld1+NBKWhJJVZTlD+7VmRJ0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 3DE43F80217; Wed, 9 Dec 2020 16:34:11 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 42CBFF80227; Wed, 9 Dec 2020 16:34:09 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 F0556F800EF for ; Wed, 9 Dec 2020 16:33:47 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz F0556F800EF IronPort-SDR: hlfN6jnYqENraFEugpcdpjcyE55pAMAlHAJyqqQKaGci4W/+k9PWt37QYiqOCjZuXFUE7U1YJ4 9Sz7/bZjDVtQ== X-IronPort-AV: E=McAfee;i="6000,8403,9829"; a="171521107" X-IronPort-AV: E=Sophos;i="5.78,405,1599548400"; d="scan'208";a="171521107" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Dec 2020 07:33:46 -0800 IronPort-SDR: +DE2UZulBVsz/d8pW3KHX+fi1IK9cqz3rPVKcGMgsqmW19EVcE0NYJUJWvcrdiNYY/FlH2gQ7H /S3kFBWKtXTA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,405,1599548400"; d="scan'208";a="552668758" Received: from eliteleevi.tm.intel.com ([10.237.54.20]) by orsmga005.jf.intel.com with ESMTP; 09 Dec 2020 07:33:44 -0800 From: Kai Vehmanen To: alsa-devel@alsa-project.org, broonie@kernel.org Subject: [PATCH 2/2] ASoC: SOF: Intel: add SoundWire support for ADL-S Date: Wed, 9 Dec 2020 17:31:02 +0200 Message-Id: <20201209153102.3028310-2-kai.vehmanen@linux.intel.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201209153102.3028310-1-kai.vehmanen@linux.intel.com> References: <20201209153102.3028310-1-kai.vehmanen@linux.intel.com> MIME-Version: 1.0 Cc: kai.vehmanen@linux.intel.com, daniel.baluta@nxp.com, lgirdwood@gmail.com, pierre-louis.bossart@linux.intel.com, ranjani.sridharan@linux.intel.com, Bard Liao 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" Expand SOF support for Alder Lake by adding ACPI machine tables for ADL-S systems with SoundWire codecs. Modify kernel config to choose SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE for these platforms. Signed-off-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao --- sound/soc/sof/intel/Kconfig | 1 + sound/soc/sof/sof-pci-dev.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sound/soc/sof/intel/Kconfig b/sound/soc/sof/intel/Kconfig index e6302bb03c55..d306c370e5d1 100644 --- a/sound/soc/sof/intel/Kconfig +++ b/sound/soc/sof/intel/Kconfig @@ -282,6 +282,7 @@ config SND_SOC_SOF_ALDERLAKE_SUPPORT config SND_SOC_SOF_ALDERLAKE tristate select SND_SOC_SOF_HDA_COMMON + select SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE help This option is not user-selectable but automagically handled by 'select' statements at a higher level diff --git a/sound/soc/sof/sof-pci-dev.c b/sound/soc/sof/sof-pci-dev.c index 153d66d5c948..63b989e3ec40 100644 --- a/sound/soc/sof/sof-pci-dev.c +++ b/sound/soc/sof/sof-pci-dev.c @@ -286,7 +286,8 @@ static const struct sof_dev_desc jsl_desc = { #if IS_ENABLED(CONFIG_SND_SOC_SOF_ALDERLAKE) static const struct sof_dev_desc adls_desc = { - .machines = snd_soc_acpi_intel_hda_machines, + .machines = snd_soc_acpi_intel_adl_machines, + .alt_machines = snd_soc_acpi_intel_adl_sdw_machines, .resindex_lpe_base = 0, .resindex_pcicfg_base = -1, .resindex_imr_base = -1,