From patchwork Mon Oct 28 07:26:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bard Liao X-Patchwork-Id: 13853115 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 42BBE524C for ; Mon, 28 Oct 2024 07:26:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.10 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100403; cv=none; b=Rvl1wp0+6KvGFNYI0T7bmdh5sMNfgJSB6vAqHNyvLgw++jdnH5ZJMPx26hfn5o/05GxeVdxRhW3ZOPODjWBwO3lY0rB1xo5HeCINiSeoyW15L6Eco7w5o4XK8gVsLk89j7xhz9l3wC5KEDMyt7AjZn0kweo8nyS00AHxg6XZZDQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100403; c=relaxed/simple; bh=ePH03o+NpbhX9YGcM2QEtJHU+L4LR83LYspOT2sL5yY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HcYIiVXPwwzVJ2n2bXWnWqCQjrTp4jpu7cgZVOqL9SyvFKQMzeaTejOSsPI6nrsde0/DaaiqtmJWYHwNiPQ6hDIHsqIM6Q7broFilasi3vZKrf/m8ju6dRkzoVNK/Zv0v4JTEDb0IxETj+F9JXF4hU3kSWb8IKMELM/IcZlDhH0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=RhYNKD8Z; arc=none smtp.client-ip=198.175.65.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="RhYNKD8Z" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1730100402; x=1761636402; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ePH03o+NpbhX9YGcM2QEtJHU+L4LR83LYspOT2sL5yY=; b=RhYNKD8ZLQU7o/q82PJ+rXO1fPfhkK3h+l9WeXahdfE201mWmTqfGZhF NTLa6yudY1iz2o0CdpEdU8/0FpykKKk+5pg7ZGoV4PTRAUTsXKzCW4kwZ ohB7D2dCkMiQgbJ7ZeudYc3tlD9ZtG9cgc2/Ib/ceBD3eglA2sI8BbFgA NdkjqAMP1cdTxU4A8gTi1n0PmzwYyEsgVP4xeGALnWIKdJ/tps4NcMDf8 +KUxIOKJr+dDSvqf+E5zzrC+qu6aa50ozTwyC/hcaylZ/gvLWErxdglwZ +7ntCBkJRmydvIR1vjKv4pJLYhrnwEYPdBwtoEqeigH2wCdCJ2mKE+3Pc Q==; X-CSE-ConnectionGUID: kBW+4k+DRLWfiK9zQ/U/aQ== X-CSE-MsgGUID: 2e2OVsddRNuwHSJalVnxRg== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="47145527" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="47145527" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2024 00:26:41 -0700 X-CSE-ConnectionGUID: i38RYHI3TPGxu/jks+AKSg== X-CSE-MsgGUID: kCZnXZ2hRF+fQLKv1gIirQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,238,1725346800"; d="scan'208";a="81975572" Received: from mdroper-mobl2.amr.corp.intel.com (HELO yungchua-desk.intel.com) ([10.124.222.159]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2024 00:26:40 -0700 From: Bard Liao To: broonie@kernel.org, tiwai@suse.de Cc: linux-sound@vger.kernel.org, pierre-louis.bossart@linux.dev, bard.liao@intel.com Subject: [PATCH 1/3] ASoC: sdw_utils: Add quirk to exclude amplifier function Date: Mon, 28 Oct 2024 15:26:29 +0800 Message-ID: <20241028072631.15536-2-yung-chuan.liao@linux.intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241028072631.15536-1-yung-chuan.liao@linux.intel.com> References: <20241028072631.15536-1-yung-chuan.liao@linux.intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Mac Chiang When SKUs use the multi-function codec, which integrates Headset, Amplifier and DMIC. The corresponding quirks provide options to support internal amplifier/DMIC or not. In the case of RT722, this SKU excludes the internal amplifier and use an additional amplifier instead. Signed-off-by: Mac Chiang Signed-off-by: Bard Liao --- sound/soc/sdw_utils/soc_sdw_utils.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/sdw_utils/soc_sdw_utils.c b/sound/soc/sdw_utils/soc_sdw_utils.c index 8196177ff5e7..6610efe8af18 100644 --- a/sound/soc/sdw_utils/soc_sdw_utils.c +++ b/sound/soc/sdw_utils/soc_sdw_utils.c @@ -418,6 +418,8 @@ struct asoc_sdw_codec_info codec_info_list[] = { .num_controls = ARRAY_SIZE(generic_spk_controls), .widgets = generic_spk_widgets, .num_widgets = ARRAY_SIZE(generic_spk_widgets), + .quirk = SOC_SDW_CODEC_SPKR, + .quirk_exclude = true, }, { .direction = {false, true}, From patchwork Mon Oct 28 07:26:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bard Liao X-Patchwork-Id: 13853116 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8CE4918FDC6 for ; Mon, 28 Oct 2024 07:26:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.10 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100404; cv=none; b=HdCDBk8XWZqOja0FJDmPyhXJa/6HP1h9nAKeYKtFCHaaVdnrZ93fCCfCIEabchhYY0lcWiaJCeveovd+WwIdZqc7EjOLCyZyJkjEbMjE2PJR3QKx0O7cQPbgzrcJmKSY+OU5fvk4bGP3fXACMtKfmEIZG3P33g8nDE6cs2DV584= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100404; c=relaxed/simple; bh=TymxpPajPsQj2xkkQFK4tbiMDrDpujDJhIEskniPUeQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JQQN1Jm6C6MLuL3belMPO7/AyQSebC8ZJcW8TgsSvuQjzeSYPctk6wTkgVjueEkQaspSKcK3aByDIZtTjhGs2p3UTfNWjy2S3liVebPYDDuGAAnv2kfF9FvbliIamaR9qzyYe87IVUtq7Xm7LPI1Z012of5+vAuwBMMGtZwRmuE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=imwKOV+E; arc=none smtp.client-ip=198.175.65.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="imwKOV+E" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1730100403; x=1761636403; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=TymxpPajPsQj2xkkQFK4tbiMDrDpujDJhIEskniPUeQ=; b=imwKOV+EIDSPJo32gU8b4WGnZQUaTKS8JpZqKIMdEpu8u2ryN/XMpRFg TDBw+Kkf93zsjeTKZMbmNWLrs52r3CkDZQBRmMvN5YZ0AaWQ9gvWXrGMr jRQsxPGPzRZP5c2qXmV293KuFaSVYWLrDMEuvFUbNbbYTpMVPritHqZ+A hSezrenurs6YYS+D9FPDDfmrD+wyAACvsz8cR4oIFCRdHe+Xwhe/T0YfP YqAgH2bthpqacEXCqspkZZ6/pSrqtxmMIvRM33cevPxWJwrfSpwivSmDq Jd6ugdKQhR9hPQ77822dcc6cHCGARBzannvDp8S23X72WsuRSBfz9ESOh A==; X-CSE-ConnectionGUID: kHizhZ0MR2CFRNoFM/ielg== X-CSE-MsgGUID: b8ndOAPGR1arS47W5VYdwQ== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="47145531" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="47145531" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2024 00:26:43 -0700 X-CSE-ConnectionGUID: QX7qeCmpQMiF/B84gx6EgQ== X-CSE-MsgGUID: 4m7H/94wR0alviiJlpUzyQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,238,1725346800"; d="scan'208";a="81975576" Received: from mdroper-mobl2.amr.corp.intel.com (HELO yungchua-desk.intel.com) ([10.124.222.159]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2024 00:26:41 -0700 From: Bard Liao To: broonie@kernel.org, tiwai@suse.de Cc: linux-sound@vger.kernel.org, pierre-louis.bossart@linux.dev, bard.liao@intel.com Subject: [PATCH 2/3] ASoC: intel: sof_sdw: add quirk for Dell SKU Date: Mon, 28 Oct 2024 15:26:30 +0800 Message-ID: <20241028072631.15536-3-yung-chuan.liao@linux.intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241028072631.15536-1-yung-chuan.liao@linux.intel.com> References: <20241028072631.15536-1-yung-chuan.liao@linux.intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Mac Chiang This patch adds a quirk to include the codec amplifier function for this Dell SKU. Note: In this SKU '0CF0', the RT722 codec amplifier is excluded, and an external amplifier is used instead. Signed-off-by: Mac Chiang Signed-off-by: Bard Liao --- sound/soc/intel/boards/sof_sdw.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index a6e391791bad..5614e706a0bb 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -639,6 +639,14 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { }, .driver_data = (void *)(SOC_SDW_CODEC_SPKR), }, + { + .callback = sof_sdw_quirk_cb, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CF0") + }, + .driver_data = (void *)(SOC_SDW_CODEC_SPKR), + }, /* Pantherlake devices*/ { .callback = sof_sdw_quirk_cb, From patchwork Mon Oct 28 07:26:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bard Liao X-Patchwork-Id: 13853117 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D5D3E524C for ; Mon, 28 Oct 2024 07:26:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.10 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100405; cv=none; b=XzOvi7dnc5yKQ9/BAMC26aPfaIxxklZcvBn2boI1CLhq1RzM+V97j4jNjTq35fsWNNslFBae9iAAKrfjW8lPTY5EQedkOFCuH2CajKNWPe0zqA32pWr1zlrRmVUR/qhXZrZR7uk7k8zK77j4mvbQBOnQt3Mn8gEKOCj/FxdzGmY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100405; c=relaxed/simple; bh=yCnW0kKk3ZB8E5q68pO9C1sOicID16a1zWhpKzNYj+U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nM9Gwsh1eGbdrPKIuR3/uKzerwdyBXt9RZ9XdCZLrbOC+o1J/yN2KIYY1D+AazDTZ7Ol2l0Osggj2lLOJjkiV6xGa2yhpS3oyS1yDyc6IsOiUzuiDBG8pRxWShNGJKcZLYMMNXxpOoZCLP+p8e50j2zKh/j++HvnXo5S/qUBsOo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=kz0vrWrl; arc=none smtp.client-ip=198.175.65.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="kz0vrWrl" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1730100404; x=1761636404; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=yCnW0kKk3ZB8E5q68pO9C1sOicID16a1zWhpKzNYj+U=; b=kz0vrWrl/Hdk8WQt2qSNtx1VwB5CscQRy97mczKvlsOiJ4AhP8PnCyjf OjGOxx9KPcDXXmRR5JtIXCIoFZE391XXkNX1XuLp8Jd1EhSksFxJfQsk2 gv6l823lMdLG95/lRtNYgJl2XwL3WPNp6rNqT44ZSmY6QET1K5XdC7oLo hC5LEvGmUWptkUrk3tbXrNxur91QREsWLQIae7HUZVKms+2vQk8BocAss 7JBTCOk/nzgCJNe5Uo6zJ10yDNpAV3TlRXZl42h9y664fpmcS9v4SglLO EmUw0aAP2ZSFVGViOs/NKKs+/vDWQK6v13RahAVPvfNsQbR2tyirgwvmg A==; X-CSE-ConnectionGUID: Lpel3xjgQOymkZr55lbZlA== X-CSE-MsgGUID: 380N09VQRcGdl1xmHE85eg== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="47145536" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="47145536" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2024 00:26:44 -0700 X-CSE-ConnectionGUID: DlbDxSbvRjWZwjggBcJrJQ== X-CSE-MsgGUID: Y706sTVrSvKCa8xMdqcUFQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,238,1725346800"; d="scan'208";a="81975590" Received: from mdroper-mobl2.amr.corp.intel.com (HELO yungchua-desk.intel.com) ([10.124.222.159]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2024 00:26:43 -0700 From: Bard Liao To: broonie@kernel.org, tiwai@suse.de Cc: linux-sound@vger.kernel.org, pierre-louis.bossart@linux.dev, bard.liao@intel.com Subject: [PATCH 3/3] ASoC: Intel: soc-acpi-intel-arl-match: Add rt722 and rt1320 support Date: Mon, 28 Oct 2024 15:26:31 +0800 Message-ID: <20241028072631.15536-4-yung-chuan.liao@linux.intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241028072631.15536-1-yung-chuan.liao@linux.intel.com> References: <20241028072631.15536-1-yung-chuan.liao@linux.intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Mac Chiang This patch adds support for the rt722 multi-function codec and the rt1320 amplifier in the ARL board configuration. Link 0: RT722 codec with three endpoints: Headset, Speaker, and DMIC. Link 2: RT1320 amplifier. Note: The Speaker endpoint on the RT722 codec is not used. Signed-off-by: Mac Chiang Signed-off-by: Bard Liao --- .../intel/common/soc-acpi-intel-arl-match.c | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/sound/soc/intel/common/soc-acpi-intel-arl-match.c b/sound/soc/intel/common/soc-acpi-intel-arl-match.c index 072b8486d072..24d850df77ca 100644 --- a/sound/soc/intel/common/soc-acpi-intel-arl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-arl-match.c @@ -44,6 +44,31 @@ static const struct snd_soc_acpi_endpoint spk_3_endpoint = { .group_id = 1, }; +/* + * RT722 is a multi-function codec, three endpoints are created for + * its headset, amp and dmic functions. + */ +static const struct snd_soc_acpi_endpoint rt722_endpoints[] = { + { + .num = 0, + .aggregated = 0, + .group_position = 0, + .group_id = 0, + }, + { + .num = 1, + .aggregated = 0, + .group_position = 0, + .group_id = 0, + }, + { + .num = 2, + .aggregated = 0, + .group_position = 0, + .group_id = 0, + }, +}; + static const struct snd_soc_acpi_adr_device cs35l56_2_lr_adr[] = { { .adr = 0x00023001FA355601ull, @@ -185,6 +210,24 @@ static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr[] = { } }; +static const struct snd_soc_acpi_adr_device rt722_0_single_adr[] = { + { + .adr = 0x000030025D072201ull, + .num_endpoints = ARRAY_SIZE(rt722_endpoints), + .endpoints = rt722_endpoints, + .name_prefix = "rt722" + } +}; + +static const struct snd_soc_acpi_adr_device rt1320_2_single_adr[] = { + { + .adr = 0x000230025D132001ull, + .num_endpoints = 1, + .endpoints = &single_endpoint, + .name_prefix = "rt1320-1" + } +}; + static const struct snd_soc_acpi_link_adr arl_cs42l43_l0[] = { { .mask = BIT(0), @@ -287,6 +330,20 @@ static const struct snd_soc_acpi_link_adr arl_sdca_rvp[] = { {} }; +static const struct snd_soc_acpi_link_adr arl_rt722_l0_rt1320_l2[] = { + { + .mask = BIT(0), + .num_adr = ARRAY_SIZE(rt722_0_single_adr), + .adr_d = rt722_0_single_adr, + }, + { + .mask = BIT(2), + .num_adr = ARRAY_SIZE(rt1320_2_single_adr), + .adr_d = rt1320_2_single_adr, + }, + {} +}; + static const struct snd_soc_acpi_codecs arl_essx_83x6 = { .num_codecs = 3, .codecs = { "ESSX8316", "ESSX8326", "ESSX8336"}, @@ -385,6 +442,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_arl_sdw_machines[] = { .drv_name = "sof_sdw", .sof_tplg_filename = "sof-arl-rt711-l0.tplg", }, + { + .link_mask = BIT(0) | BIT(2), + .links = arl_rt722_l0_rt1320_l2, + .drv_name = "sof_sdw", + .sof_tplg_filename = "sof-arl-rt722-l0_rt1320-l2.tplg", + }, {}, }; EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_arl_sdw_machines);