From patchwork Mon Dec 5 15:10:12 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: 1712328 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 4NQn706QsMz23yl for ; Tue, 6 Dec 2022 02:10:52 +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 1p2D7F-0001Rx-4A; Mon, 05 Dec 2022 15:10:45 +0000 Received: from mail-pg1-f172.google.com ([209.85.215.172]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1p2D7A-0001Ev-Uj for kernel-team@lists.ubuntu.com; Mon, 05 Dec 2022 15:10:41 +0000 Received: by mail-pg1-f172.google.com with SMTP id f9so10739202pgf.7 for ; Mon, 05 Dec 2022 07:10:37 -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=rzq/FtOWHOFXu1ih1F9etRkaaovMNgirFdTU5Z0G5tZheCCH9zBaj4RY0lHobdHWXz Hq7rb2N5K5fcEXmGBwHmUckJeSOkSMa5nWtyU9XA/ByoqotXB7KPRd3qZ7+nNPD5/VsM JoWXBWkK2yww+poOtrRQqABx5CR1ZVLFmKPm4cUq2KWXskYsfGUkLkUaXILOSEkzP8Sq oyiw99amH7r+Ya1db1yIWzsMamImnjRTjUo7fOmqapyOaNXN7nnvprGnE7xEImudO/Fh q+5RE0BGSFck5syqSigwbRZH5k7EEwycMZ05xbOX6JW26tm5wQ9Iyxrrdz8z4XztSI2Q U+rg== X-Gm-Message-State: ANoB5pm7k369bFgt+mRLYYsj8UDviAOy/md9WctF2xIGYGrIfQbnU+NK I5pLfQrwTIMtIVQeR2MoamHSb0OhrF0= X-Google-Smtp-Source: AA0mqf5XxdNQj5W1NOLpzqlnZMAUvmVJdqo4qvl6Dvj88OAtux8yPnapKgvD+tys6wmlFKHKm/mRGw== X-Received: by 2002:a05:6a00:4210:b0:56c:b8c2:ee89 with SMTP id cd16-20020a056a00421000b0056cb8c2ee89mr64241191pfb.21.1670253035437; Mon, 05 Dec 2022 07:10:35 -0800 (PST) Received: from yewun.. (61-227-122-159.dynamic-ip.hinet.net. [61.227.122.159]) by smtp.gmail.com with ESMTPSA id a14-20020a170902ecce00b00186b1bfbe79sm10780487plh.66.2022.12.05.07.10.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Dec 2022 07:10:34 -0800 (PST) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 05/11][SRU][Lunar/OEM-6.0] ASoC: Intel: soc-acpi: add SKU 0C40 SoundWire configuration Date: Mon, 5 Dec 2022 23:10:12 +0800 Message-Id: <20221205151020.122547-8-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20221205151020.122547-1-vicamo.yang@canonical.com> References: <20221205151020.122547-1-vicamo.yang@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.215.172; envelope-from=vicamo@gmail.com; helo=mail-pg1-f172.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,