From patchwork Mon Dec 12 08:48:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: You-Sheng Yang X-Patchwork-Id: 1714860 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NVwKc5PfZz240L for ; Mon, 12 Dec 2022 19:49:24 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1p4eUs-0007Sv-0k; Mon, 12 Dec 2022 08:49:14 +0000 Received: from mail-pj1-f47.google.com ([209.85.216.47]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1p4eUo-0007Js-4M for kernel-team@lists.ubuntu.com; Mon, 12 Dec 2022 08:49:10 +0000 Received: by mail-pj1-f47.google.com with SMTP id k88-20020a17090a4ce100b00219d0b857bcso11468498pjh.1 for ; Mon, 12 Dec 2022 00:49:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SHcjjkOmEWJXujv2iEcJqjXxRPhH1rYKwbfJkRPNKyc=; b=1511f53wZY05FLK2nM4WzK07VVwcDAFFGDJEVjNJAdV48dp4uwQb+Un3JjilhJSfCF 6y2p5K7NEg4YNQa83t64Qk0E2B7TEE9EhPT/z8bdmAbxI492PvMESrCFFLNFmZYiuvcR nLh/2wFucsK/9oR/uwkeDDZXxxpngfIOGnOdAxYIhY8JSg+Hr6MtkGKarrR+rGdVQAlV x/l/zdGFYtvIswPCDEK+kkQpD5sT4wbr7QyJ3Im9zpbx6fbw1CsYwxPgDSoDXpHn5OYu 7GCQhmTtJJyyep/B6DWjNOksL7+yfDQ2PzGjOXap3QqGEBaBd8z9fcDViEm+wMkNrd0v 8CZw== X-Gm-Message-State: ANoB5pliINjNTsOO1z60SreqrW0dLLaIs9vmmDKzn+BaGQd5PxuzK+/q CKlB4dCRWn/Ez6BkXvK0E6e16rIGXok= X-Google-Smtp-Source: AA0mqf6JiqyFeGHMgi8B87zTKsIYj6xppSpoJ+VFc+E2NaBFOHJnFdWi3gsk6roTRuvSgm9VsrM+QQ== X-Received: by 2002:a17:902:cccf:b0:187:2f28:bfd6 with SMTP id z15-20020a170902cccf00b001872f28bfd6mr19408450ple.21.1670834946343; Mon, 12 Dec 2022 00:49:06 -0800 (PST) Received: from yewun.. (61-227-116-5.dynamic-ip.hinet.net. [61.227.116.5]) by smtp.gmail.com with ESMTPSA id ja9-20020a170902efc900b001870dc3b4c0sm5732950plb.74.2022.12.12.00.49.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Dec 2022 00:49:05 -0800 (PST) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH v2 05/12][SRU][Lunar] ASoC: Intel: soc-acpi: add SKU 0C40 SoundWire configuration Date: Mon, 12 Dec 2022 16:48:49 +0800 Message-Id: <20221212084856.3252684-6-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20221212084856.3252684-1-vicamo.yang@canonical.com> References: <20221212084856.3252684-1-vicamo.yang@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.216.47; envelope-from=vicamo@gmail.com; helo=mail-pj1-f47.google.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: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Gongjun Song BugLink: https://bugs.launchpad.net/bugs/1997944 Audio hardware configuration of SKU 0C40 product is rt711 on link2, two rt1316s on link0 and link1, rt714 on link 3. Reviewed-by: Kai Vehmanen Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Signed-off-by: Gongjun Song Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20221110225432.144184-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown (cherry picked from commit 97b5fbf44c001a1c575550e4b40c4abd9d7db175 linux-next) Signed-off-by: You-Sheng Yang (vicamo) --- .../intel/common/soc-acpi-intel-rpl-match.c | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/sound/soc/intel/common/soc-acpi-intel-rpl-match.c b/sound/soc/intel/common/soc-acpi-intel-rpl-match.c index 371333ed8c16..7c2e94dcf8fc 100644 --- a/sound/soc/intel/common/soc-acpi-intel-rpl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-rpl-match.c @@ -56,6 +56,15 @@ static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr[] = { } }; +static const struct snd_soc_acpi_adr_device rt711_sdca_2_adr[] = { + { + .adr = 0x000230025D071101ull, + .num_endpoints = 1, + .endpoints = &single_endpoint, + .name_prefix = "rt711" + } +}; + static const struct snd_soc_acpi_adr_device rt1316_1_group1_adr[] = { { .adr = 0x000131025D131601ull, /* unique ID is set for some reason */ @@ -83,6 +92,24 @@ static const struct snd_soc_acpi_adr_device rt1316_3_group1_adr[] = { } }; +static const struct snd_soc_acpi_adr_device rt1316_0_group2_adr[] = { + { + .adr = 0x000030025D131601ull, + .num_endpoints = 1, + .endpoints = &spk_l_endpoint, + .name_prefix = "rt1316-1" + } +}; + +static const struct snd_soc_acpi_adr_device rt1316_1_group2_adr[] = { + { + .adr = 0x000131025D131601ull, + .num_endpoints = 1, + .endpoints = &spk_r_endpoint, + .name_prefix = "rt1316-2" + } +}; + static const struct snd_soc_acpi_adr_device rt714_0_adr[] = { { .adr = 0x000030025D071401ull, @@ -101,6 +128,15 @@ static const struct snd_soc_acpi_adr_device rt714_2_adr[] = { } }; +static const struct snd_soc_acpi_adr_device rt714_3_adr[] = { + { + .adr = 0x000330025D071401ull, + .num_endpoints = 1, + .endpoints = &single_endpoint, + .name_prefix = "rt714" + } +}; + static const struct snd_soc_acpi_link_adr rpl_sdca_3_in_1[] = { { .mask = BIT(0), @@ -125,6 +161,30 @@ static const struct snd_soc_acpi_link_adr rpl_sdca_3_in_1[] = { {} }; +static const struct snd_soc_acpi_link_adr rpl_sdw_rt711_link2_rt1316_link01_rt714_link3[] = { + { + .mask = BIT(2), + .num_adr = ARRAY_SIZE(rt711_sdca_2_adr), + .adr_d = rt711_sdca_2_adr, + }, + { + .mask = BIT(0), + .num_adr = ARRAY_SIZE(rt1316_0_group2_adr), + .adr_d = rt1316_0_group2_adr, + }, + { + .mask = BIT(1), + .num_adr = ARRAY_SIZE(rt1316_1_group2_adr), + .adr_d = rt1316_1_group2_adr, + }, + { + .mask = BIT(3), + .num_adr = ARRAY_SIZE(rt714_3_adr), + .adr_d = rt714_3_adr, + }, + {} +}; + static const struct snd_soc_acpi_link_adr rpl_sdw_rt1316_link12_rt714_link0[] = { { .mask = BIT(1), @@ -157,6 +217,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_rpl_sdw_machines[] = { .drv_name = "sof_sdw", .sof_tplg_filename = "sof-rpl-rt711-l0-rt1316-l13-rt714-l2.tplg", }, + { + .link_mask = 0xF, /* 4 active links required */ + .links = rpl_sdw_rt711_link2_rt1316_link01_rt714_link3, + .drv_name = "sof_sdw", + .sof_tplg_filename = "sof-rpl-rt711-l2-rt1316-l01-rt714-l3.tplg", + }, { .link_mask = 0x7, /* rt714 on link0 & two rt1316s on link1 and link2 */ .links = rpl_sdw_rt1316_link12_rt714_link0,