From patchwork Wed Mar 27 16:23:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 13607040 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (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 CBD8F130A7E for ; Wed, 27 Mar 2024 16:24:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556669; cv=none; b=poyHOfHzTt0j8PN5MvmT5TvVqAYr9p4LMm3WWf/17o2qqrafG2wmRgvmN2HuoXOFLLCW/o4AB8SepZ+JMILKGnMkCIMGH+cdMChvJLIe5ryNZAfuaz9tYu1xLeckZFXyf7sdbRPLSWmesc+2rQMb9sHO8WiVCuDgHplTsXqJsLc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556669; c=relaxed/simple; bh=ixlpjYepMerL+sZkIlATdm9JZRvwdM7F4qct3s4El6w=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=lFGVZc7AiZvFtXRCi3kXbwLqImUg9DTgjzJcZa4wiWdD14N9McfQjPkO5+T86F3l4Q2fabuz98u/oCGq1JO/n5hMQBs0u4xpY2yOKzNu/kpPgcQSNRxvOjvvd61idSI0Y8vbBKRkv1Y2cR3GIeS6Ub0RGIMliWuofrsntVwsBaM= 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=V5c8CyGE; arc=none smtp.client-ip=198.175.65.11 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="V5c8CyGE" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711556668; x=1743092668; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ixlpjYepMerL+sZkIlATdm9JZRvwdM7F4qct3s4El6w=; b=V5c8CyGEn7STQXhdpsILQ5KOpA6wnZhr3ek2yzoyuZMIgO5RHn8OYviV Toj86PBd6W3aOcNQYCI+3jTTr3HAGW0wkbPzqZ/JtGVrtPBY9Zg5B+hH0 gn7I1HE5ga2sVlnFCuXNgq9txocHRMwDWLjU2o9Gxacl0RFjjEAkKJtcF CBjiwF91PMf4ZgL3ImCOHUYZ68I6CLW5VsbgC/uPgSwlrTwanIxpX0QaS C/kFSguAeXFQRyI8fq7bmsEnEZmCtzOrQhLKnG7S+yQCXt97+rPY1hgBh zQSoihPPkSsQXXZ6qliv/hizRFSlnArq3ZP8rOR91HSM0GQSXlDUD7ZzF g==; X-CSE-ConnectionGUID: 5i4d4bihRQSCtIVZKxk7bA== X-CSE-MsgGUID: dU6atmeNSTCQZRQOmDGekA== X-IronPort-AV: E=McAfee;i="6600,9927,11026"; a="17221480" X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="17221480" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="53821247" Received: from ssherman-mobl.amr.corp.intel.com (HELO pbossart-mobl6.intel.com) ([10.212.117.1]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:26 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Brent Lu , Bard Liao , Pierre-Louis Bossart Subject: [PATCH 01/18] ASoC: Intel: ssp-common: relocate source file Date: Wed, 27 Mar 2024 11:23:51 -0500 Message-Id: <20240327162408.63953-2-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> References: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Brent Lu Moving ssp-common source and header files from sound/soc/intel/boards directory to sound/soc/intel/common directory and rename the source file. Keep file content unchanged for tracking purpose. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart --- sound/soc/intel/boards/Makefile | 3 --- sound/soc/intel/boards/sof_board_helpers.h | 2 +- sound/soc/intel/boards/sof_cirrus_common.h | 2 +- sound/soc/intel/boards/sof_maxim_common.h | 2 +- sound/soc/intel/boards/sof_nuvoton_common.h | 2 +- sound/soc/intel/boards/sof_realtek_common.h | 2 +- sound/soc/intel/common/Makefile | 3 +++ .../sof_ssp_common.c => common/soc-acpi-intel-ssp-common.c} | 0 sound/soc/intel/{boards => common}/sof_ssp_common.h | 0 9 files changed, 8 insertions(+), 8 deletions(-) rename sound/soc/intel/{boards/sof_ssp_common.c => common/soc-acpi-intel-ssp-common.c} (100%) rename sound/soc/intel/{boards => common}/sof_ssp_common.h (100%) diff --git a/sound/soc/intel/boards/Makefile b/sound/soc/intel/boards/Makefile index 8f711be46c43..a93b658ed672 100644 --- a/sound/soc/intel/boards/Makefile +++ b/sound/soc/intel/boards/Makefile @@ -101,8 +101,5 @@ obj-$(CONFIG_SND_SOC_INTEL_SOF_CIRRUS_COMMON) += snd-soc-intel-sof-cirrus-common snd-soc-intel-sof-nuvoton-common-objs += sof_nuvoton_common.o obj-$(CONFIG_SND_SOC_INTEL_SOF_NUVOTON_COMMON) += snd-soc-intel-sof-nuvoton-common.o -snd-soc-intel-sof-ssp-common-objs += sof_ssp_common.o -obj-$(CONFIG_SND_SOC_INTEL_SOF_SSP_COMMON) += snd-soc-intel-sof-ssp-common.o - snd-soc-intel-sof-board-helpers-objs += sof_board_helpers.o obj-$(CONFIG_SND_SOC_INTEL_SOF_BOARD_HELPERS) += snd-soc-intel-sof-board-helpers.o diff --git a/sound/soc/intel/boards/sof_board_helpers.h b/sound/soc/intel/boards/sof_board_helpers.h index b6a83ca14fa8..bd5c48cd0649 100644 --- a/sound/soc/intel/boards/sof_board_helpers.h +++ b/sound/soc/intel/boards/sof_board_helpers.h @@ -8,7 +8,7 @@ #include #include "sof_hdmi_common.h" -#include "sof_ssp_common.h" +#include "../common/sof_ssp_common.h" /* * Common board quirks: from bit 8 to 31, LSB 8 bits reserved for machine diff --git a/sound/soc/intel/boards/sof_cirrus_common.h b/sound/soc/intel/boards/sof_cirrus_common.h index d4ecf8d023d1..445621466f05 100644 --- a/sound/soc/intel/boards/sof_cirrus_common.h +++ b/sound/soc/intel/boards/sof_cirrus_common.h @@ -9,7 +9,7 @@ #define __SOF_CIRRUS_COMMON_H #include -#include "sof_ssp_common.h" +#include "../common/sof_ssp_common.h" /* * Cirrus Logic CS35L41/CS35L53 diff --git a/sound/soc/intel/boards/sof_maxim_common.h b/sound/soc/intel/boards/sof_maxim_common.h index fe0212fbad8e..63054bcd287b 100644 --- a/sound/soc/intel/boards/sof_maxim_common.h +++ b/sound/soc/intel/boards/sof_maxim_common.h @@ -11,7 +11,7 @@ #define __SOF_MAXIM_COMMON_H #include -#include "sof_ssp_common.h" +#include "../common/sof_ssp_common.h" /* * Maxim MAX98373 diff --git a/sound/soc/intel/boards/sof_nuvoton_common.h b/sound/soc/intel/boards/sof_nuvoton_common.h index 53a84f9a67c0..af2e58b1d393 100644 --- a/sound/soc/intel/boards/sof_nuvoton_common.h +++ b/sound/soc/intel/boards/sof_nuvoton_common.h @@ -9,7 +9,7 @@ #define __SOF_NUVOTON_COMMON_H #include -#include "sof_ssp_common.h" +#include "../common/sof_ssp_common.h" /* * Nuvoton NAU8318 diff --git a/sound/soc/intel/boards/sof_realtek_common.h b/sound/soc/intel/boards/sof_realtek_common.h index e3fa2924c1c1..99b23d96521a 100644 --- a/sound/soc/intel/boards/sof_realtek_common.h +++ b/sound/soc/intel/boards/sof_realtek_common.h @@ -11,7 +11,7 @@ #define __SOF_REALTEK_COMMON_H #include -#include "sof_ssp_common.h" +#include "../common/sof_ssp_common.h" /* * Realtek ALC1011 diff --git a/sound/soc/intel/common/Makefile b/sound/soc/intel/common/Makefile index f7370e5b4e9e..15c8a64368c5 100644 --- a/sound/soc/intel/common/Makefile +++ b/sound/soc/intel/common/Makefile @@ -17,3 +17,6 @@ snd-soc-acpi-intel-match-objs := soc-acpi-intel-byt-match.o soc-acpi-intel-cht-m obj-$(CONFIG_SND_SOC_INTEL_SST) += snd-soc-sst-dsp.o snd-soc-sst-ipc.o obj-$(CONFIG_SND_SOC_ACPI_INTEL_MATCH) += snd-soc-acpi-intel-match.o + +snd-soc-intel-sof-ssp-common-objs += soc-acpi-intel-ssp-common.o +obj-$(CONFIG_SND_SOC_INTEL_SOF_SSP_COMMON) += snd-soc-intel-sof-ssp-common.o diff --git a/sound/soc/intel/boards/sof_ssp_common.c b/sound/soc/intel/common/soc-acpi-intel-ssp-common.c similarity index 100% rename from sound/soc/intel/boards/sof_ssp_common.c rename to sound/soc/intel/common/soc-acpi-intel-ssp-common.c diff --git a/sound/soc/intel/boards/sof_ssp_common.h b/sound/soc/intel/common/sof_ssp_common.h similarity index 100% rename from sound/soc/intel/boards/sof_ssp_common.h rename to sound/soc/intel/common/sof_ssp_common.h From patchwork Wed Mar 27 16:23:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 13607039 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (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 E3AA1130ADA for ; Wed, 27 Mar 2024 16:24:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556669; cv=none; b=gopJcwjmBH5lMZ1JK3PudlBTK4eulcgtex5lWy6HYZkQhhd4wFZ/x0rlu5VLOpt0ZGM8Moe8d2KOAdRvDNuFIOcsKPI+K5GKrnxTNAsyRrQAv1BUDxU9qasXM8YlNn7IEJrsoFtBVLE85ziNN+QMfJ9MvEWYZ5kMzY+t6LxV64w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556669; c=relaxed/simple; bh=3kkrMBxxqe8gX3azfqO+74/qGoMD7vgBEGBNeX8kchM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=QXesFrfjLi4KAqMk4fdPRaqaJY7cWZ4PPSZzRgJ4GE+jfTqRALbD4lXoh60RQZFgptqPDjoTNs3YQc3NEiZw5CkviG9ha2XjfefVKO1I8JLMFLS4RpsNrcJ0pyKs4AnXYSC2Wc7va+bw/xBC8xUWrkuuDG0QPwlcp/o2gFioCeg= 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=nraTdopp; arc=none smtp.client-ip=198.175.65.11 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="nraTdopp" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711556668; x=1743092668; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3kkrMBxxqe8gX3azfqO+74/qGoMD7vgBEGBNeX8kchM=; b=nraTdoppicybkQ/rK6onT1TJGR7uiN08st9sobqLWqoF/Xd0qNR5ZOBB qdG/sD9jAfQEXeFJySsy2og8kLPi+/UAb2PrgGOUw8U83H4OoivtOrgvT TnsqkFrJqlihsweUhx8rQZ/FP9SmPXzJiTe2vbNn18GoJZwzHuLtYcO60 tKzgs4qSJvnJf7sU7iEyTvBXzksUQCyBkqvHevm4DrY+hezAJeiqbAvKD /XNjE/scw0t0iaw9aC4LAT+zVl6BzWIsA7mQlec8iMJxT+G9BHrlwn1fJ hwrkfrDQsp/tCIEvB555O7yb0RnvHYTA686FAKHwcHThegW7z5dQYhyP2 Q==; X-CSE-ConnectionGUID: KM1mVbTvS9aRAUtdeDCKAg== X-CSE-MsgGUID: VOWXAlETSaSmFjIDrZdZQQ== X-IronPort-AV: E=McAfee;i="6600,9927,11026"; a="17221484" X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="17221484" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="53821251" Received: from ssherman-mobl.amr.corp.intel.com (HELO pbossart-mobl6.intel.com) ([10.212.117.1]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:27 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Brent Lu , Bard Liao , Pierre-Louis Bossart Subject: [PATCH 02/18] ASoC: Intel: ssp-common: relocate header file Date: Wed, 27 Mar 2024 11:23:52 -0500 Message-Id: <20240327162408.63953-3-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> References: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Brent Lu Moving ssp-common header file from sound/soc/intel/common directory to include/sound directory and rename the file. Keep file content unchanged for tracking purpose. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart --- .../sound/soc-acpi-intel-ssp-common.h | 0 sound/soc/intel/boards/sof_board_helpers.h | 2 +- sound/soc/intel/boards/sof_cirrus_common.h | 2 +- sound/soc/intel/boards/sof_maxim_common.h | 2 +- sound/soc/intel/boards/sof_nuvoton_common.h | 2 +- sound/soc/intel/boards/sof_realtek_common.h | 2 +- sound/soc/intel/common/soc-acpi-intel-ssp-common.c | 2 +- 7 files changed, 6 insertions(+), 6 deletions(-) rename sound/soc/intel/common/sof_ssp_common.h => include/sound/soc-acpi-intel-ssp-common.h (100%) diff --git a/sound/soc/intel/common/sof_ssp_common.h b/include/sound/soc-acpi-intel-ssp-common.h similarity index 100% rename from sound/soc/intel/common/sof_ssp_common.h rename to include/sound/soc-acpi-intel-ssp-common.h diff --git a/sound/soc/intel/boards/sof_board_helpers.h b/sound/soc/intel/boards/sof_board_helpers.h index bd5c48cd0649..34ea974c8493 100644 --- a/sound/soc/intel/boards/sof_board_helpers.h +++ b/sound/soc/intel/boards/sof_board_helpers.h @@ -7,8 +7,8 @@ #define __SOF_INTEL_BOARD_HELPERS_H #include +#include #include "sof_hdmi_common.h" -#include "../common/sof_ssp_common.h" /* * Common board quirks: from bit 8 to 31, LSB 8 bits reserved for machine diff --git a/sound/soc/intel/boards/sof_cirrus_common.h b/sound/soc/intel/boards/sof_cirrus_common.h index 445621466f05..1c87637b9ef7 100644 --- a/sound/soc/intel/boards/sof_cirrus_common.h +++ b/sound/soc/intel/boards/sof_cirrus_common.h @@ -9,7 +9,7 @@ #define __SOF_CIRRUS_COMMON_H #include -#include "../common/sof_ssp_common.h" +#include /* * Cirrus Logic CS35L41/CS35L53 diff --git a/sound/soc/intel/boards/sof_maxim_common.h b/sound/soc/intel/boards/sof_maxim_common.h index 63054bcd287b..8886f985de68 100644 --- a/sound/soc/intel/boards/sof_maxim_common.h +++ b/sound/soc/intel/boards/sof_maxim_common.h @@ -11,7 +11,7 @@ #define __SOF_MAXIM_COMMON_H #include -#include "../common/sof_ssp_common.h" +#include /* * Maxim MAX98373 diff --git a/sound/soc/intel/boards/sof_nuvoton_common.h b/sound/soc/intel/boards/sof_nuvoton_common.h index af2e58b1d393..8a0f283260e7 100644 --- a/sound/soc/intel/boards/sof_nuvoton_common.h +++ b/sound/soc/intel/boards/sof_nuvoton_common.h @@ -9,7 +9,7 @@ #define __SOF_NUVOTON_COMMON_H #include -#include "../common/sof_ssp_common.h" +#include /* * Nuvoton NAU8318 diff --git a/sound/soc/intel/boards/sof_realtek_common.h b/sound/soc/intel/boards/sof_realtek_common.h index 99b23d96521a..289e85b61660 100644 --- a/sound/soc/intel/boards/sof_realtek_common.h +++ b/sound/soc/intel/boards/sof_realtek_common.h @@ -11,7 +11,7 @@ #define __SOF_REALTEK_COMMON_H #include -#include "../common/sof_ssp_common.h" +#include /* * Realtek ALC1011 diff --git a/sound/soc/intel/common/soc-acpi-intel-ssp-common.c b/sound/soc/intel/common/soc-acpi-intel-ssp-common.c index 96072790e9c0..37758f4e3f32 100644 --- a/sound/soc/intel/common/soc-acpi-intel-ssp-common.c +++ b/sound/soc/intel/common/soc-acpi-intel-ssp-common.c @@ -4,7 +4,7 @@ #include #include -#include "sof_ssp_common.h" +#include /* * Codec probe function From patchwork Wed Mar 27 16:23:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 13607042 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (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 4D9E1130E32 for ; Wed, 27 Mar 2024 16:24:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556671; cv=none; b=kiwWf66+DzfPaw/Uu29gLXwicSMTrh+XNbLw9v4KDRJEx2c1EyaHL/ukvKZMUvC2qBYdkqRaGeu6CID3fCIGrFr5Q6tlY3FaKzdZBExcPDpx2+ZVVyqQeTmVXQXqtbOZ85zAGhLKSk6YeZutCScezxplvKDgTXpHgaELnkEUcP0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556671; c=relaxed/simple; bh=BJ7HzRmQEbYAxjspN0Di11yQZZpfAoPKaesEvkARWl4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=rwkHW7w6cCWQsIQHk2xdGoMy5nGSZZiYcVur70CnE+usbpbDKMpS+9/Fw1SnoRQrTrNoyHTl7tOVuQZQytLysvkBZRaxWaNsRc8/mTI6BbpiYF44Aa986YIlWwZkVMWxAQy0amQSZ0j/dpDdfV1MSwEdwqGqgpADZEYP+2hLuFA= 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=F4cwf9xK; arc=none smtp.client-ip=198.175.65.11 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="F4cwf9xK" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711556670; x=1743092670; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=BJ7HzRmQEbYAxjspN0Di11yQZZpfAoPKaesEvkARWl4=; b=F4cwf9xKx77e+sF27cp1lt1Psw2fhnaF23PSeCPC3D6BPGgf6A0MULZQ e77NP2MhnLBdFwvuFfJPD1aGNc63BxU3FKH34qhnOzsOVGGqzSGFtcu8O uE/ssWbM5xQSostSmR4fSYIM9uDp4XqxxBzGXJiZ9k0UMPDVqn0yCheVN RPn3eUWLX1xLmbs3fnWChwNJFb+Lv2dZ6i4d2h5BCK3R+vp788MJVBXlz Qrv3G5L+D6ul8VKFEYsFOnSXc0Xn70tMiva6vHY33mUrIdIV+kOiUVpFG apDky43H49GQPW6zEoo/+X17L+hGl1Iytsxj5dX3ZkQOwZhFROhA/+NNc w==; X-CSE-ConnectionGUID: A/ujxxEFTs26yfsR+yV1zg== X-CSE-MsgGUID: zPFfkNRuQcelzqDpL03JjA== X-IronPort-AV: E=McAfee;i="6600,9927,11026"; a="17221490" X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="17221490" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="53821256" Received: from ssherman-mobl.amr.corp.intel.com (HELO pbossart-mobl6.intel.com) ([10.212.117.1]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:27 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Brent Lu , Pierre-Louis Bossart Subject: [PATCH 03/18] ASoC: Intel: ssp-common: naming convention change Date: Wed, 27 Mar 2024 11:23:53 -0500 Message-Id: <20240327162408.63953-4-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> References: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Brent Lu As we moved ssp-common files to new locations with new names, changing the naming convention from sof_ssp_ to snd_soc_acpi_intel_. Reviewed-by: Pierre-Louis Bossart Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart --- include/sound/soc-acpi-intel-ssp-common.h | 17 ++++++++++------- sound/soc/intel/boards/sof_board_helpers.c | 13 +++++++------ sound/soc/intel/boards/sof_board_helpers.h | 4 ++-- .../intel/common/soc-acpi-intel-ssp-common.c | 17 ++++++++++------- 4 files changed, 29 insertions(+), 22 deletions(-) diff --git a/include/sound/soc-acpi-intel-ssp-common.h b/include/sound/soc-acpi-intel-ssp-common.h index ff84154ce60a..b568cda11051 100644 --- a/include/sound/soc-acpi-intel-ssp-common.h +++ b/include/sound/soc-acpi-intel-ssp-common.h @@ -3,8 +3,8 @@ * Copyright(c) 2023 Intel Corporation. */ -#ifndef __SOF_SSP_COMMON_H -#define __SOF_SSP_COMMON_H +#ifndef __LINUX_SND_SOC_ACPI_INTEL_SSP_COMMON_H +#define __LINUX_SND_SOC_ACPI_INTEL_SSP_COMMON_H /* Cirrus Logic */ #define CS35L41_ACPI_HID "CSC3541" @@ -37,7 +37,7 @@ #define RT5682_ACPI_HID "10EC5682" #define RT5682S_ACPI_HID "RTL5682" -enum sof_ssp_codec { +enum snd_soc_acpi_intel_codec { CODEC_NONE, /* headphone codec */ @@ -65,9 +65,12 @@ enum sof_ssp_codec { CODEC_RT1308, }; -enum sof_ssp_codec sof_ssp_detect_codec_type(struct device *dev); -enum sof_ssp_codec sof_ssp_detect_amp_type(struct device *dev); +enum snd_soc_acpi_intel_codec +snd_soc_acpi_intel_detect_codec_type(struct device *dev); +enum snd_soc_acpi_intel_codec +snd_soc_acpi_intel_detect_amp_type(struct device *dev); -const char *sof_ssp_get_codec_name(enum sof_ssp_codec codec_type); +const char * +snd_soc_acpi_intel_get_codec_name(enum snd_soc_acpi_intel_codec codec_type); -#endif /* __SOF_SSP_COMMON_H */ +#endif /* __LINUX_SND_SOC_ACPI_INTEL_SSP_COMMON_H */ diff --git a/sound/soc/intel/boards/sof_board_helpers.c b/sound/soc/intel/boards/sof_board_helpers.c index 586600680e84..8819ab5694bf 100644 --- a/sound/soc/intel/boards/sof_board_helpers.c +++ b/sound/soc/intel/boards/sof_board_helpers.c @@ -103,13 +103,13 @@ static struct snd_soc_dai_link_component platform_component[] = { }; static int set_ssp_codec_link(struct device *dev, struct snd_soc_dai_link *link, - int be_id, enum sof_ssp_codec codec_type, + int be_id, enum snd_soc_acpi_intel_codec codec_type, int ssp_codec) { struct snd_soc_dai_link_component *cpus; dev_dbg(dev, "link %d: ssp codec %s, ssp %d\n", be_id, - sof_ssp_get_codec_name(codec_type), ssp_codec); + snd_soc_acpi_intel_get_codec_name(codec_type), ssp_codec); /* link name */ link->name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d-Codec", ssp_codec); @@ -259,12 +259,13 @@ static int set_idisp_hdmi_link(struct device *dev, struct snd_soc_dai_link *link } static int set_ssp_amp_link(struct device *dev, struct snd_soc_dai_link *link, - int be_id, enum sof_ssp_codec amp_type, int ssp_amp) + int be_id, enum snd_soc_acpi_intel_codec amp_type, + int ssp_amp) { struct snd_soc_dai_link_component *cpus; dev_dbg(dev, "link %d: ssp amp %s, ssp %d\n", be_id, - sof_ssp_get_codec_name(amp_type), ssp_amp); + snd_soc_acpi_intel_get_codec_name(amp_type), ssp_amp); /* link name */ link->name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d-Codec", ssp_amp); @@ -598,8 +599,8 @@ sof_intel_board_get_ctx(struct device *dev, unsigned long board_quirk) if (!ctx) return NULL; - ctx->codec_type = sof_ssp_detect_codec_type(dev); - ctx->amp_type = sof_ssp_detect_amp_type(dev); + ctx->codec_type = snd_soc_acpi_intel_detect_codec_type(dev); + ctx->amp_type = snd_soc_acpi_intel_detect_amp_type(dev); ctx->dmic_be_num = 2; ctx->hdmi_num = (board_quirk & SOF_NUM_IDISP_HDMI_MASK) >> diff --git a/sound/soc/intel/boards/sof_board_helpers.h b/sound/soc/intel/boards/sof_board_helpers.h index 34ea974c8493..644f6b4a1b7b 100644 --- a/sound/soc/intel/boards/sof_board_helpers.h +++ b/sound/soc/intel/boards/sof_board_helpers.h @@ -132,8 +132,8 @@ struct sof_card_private { struct snd_soc_jack headset_jack; struct sof_hdmi_private hdmi; - enum sof_ssp_codec codec_type; - enum sof_ssp_codec amp_type; + enum snd_soc_acpi_intel_codec codec_type; + enum snd_soc_acpi_intel_codec amp_type; int dmic_be_num; int hdmi_num; diff --git a/sound/soc/intel/common/soc-acpi-intel-ssp-common.c b/sound/soc/intel/common/soc-acpi-intel-ssp-common.c index 37758f4e3f32..716243a4fc9a 100644 --- a/sound/soc/intel/common/soc-acpi-intel-ssp-common.c +++ b/sound/soc/intel/common/soc-acpi-intel-ssp-common.c @@ -19,7 +19,7 @@ struct codec_map { const char *name; const char *acpi_hid; - enum sof_ssp_codec codec_type; + enum snd_soc_acpi_intel_codec codec_type; }; static const struct codec_map codecs[] = { @@ -64,7 +64,8 @@ static const struct codec_map amps[] = { CODEC_MAP_ENTRY("RT1308", RT1308_ACPI_HID, CODEC_RT1308), }; -enum sof_ssp_codec sof_ssp_detect_codec_type(struct device *dev) +enum snd_soc_acpi_intel_codec +snd_soc_acpi_intel_detect_codec_type(struct device *dev) { int i; @@ -78,9 +79,10 @@ enum sof_ssp_codec sof_ssp_detect_codec_type(struct device *dev) return CODEC_NONE; } -EXPORT_SYMBOL_NS(sof_ssp_detect_codec_type, SND_SOC_INTEL_SOF_SSP_COMMON); +EXPORT_SYMBOL_NS(snd_soc_acpi_intel_detect_codec_type, SND_SOC_INTEL_SOF_SSP_COMMON); -enum sof_ssp_codec sof_ssp_detect_amp_type(struct device *dev) +enum snd_soc_acpi_intel_codec +snd_soc_acpi_intel_detect_amp_type(struct device *dev) { int i; @@ -94,9 +96,10 @@ enum sof_ssp_codec sof_ssp_detect_amp_type(struct device *dev) return CODEC_NONE; } -EXPORT_SYMBOL_NS(sof_ssp_detect_amp_type, SND_SOC_INTEL_SOF_SSP_COMMON); +EXPORT_SYMBOL_NS(snd_soc_acpi_intel_detect_amp_type, SND_SOC_INTEL_SOF_SSP_COMMON); -const char *sof_ssp_get_codec_name(enum sof_ssp_codec codec_type) +const char * +snd_soc_acpi_intel_get_codec_name(enum snd_soc_acpi_intel_codec codec_type) { int i; @@ -115,7 +118,7 @@ const char *sof_ssp_get_codec_name(enum sof_ssp_codec codec_type) return NULL; } -EXPORT_SYMBOL_NS(sof_ssp_get_codec_name, SND_SOC_INTEL_SOF_SSP_COMMON); +EXPORT_SYMBOL_NS(snd_soc_acpi_intel_get_codec_name, SND_SOC_INTEL_SOF_SSP_COMMON); MODULE_DESCRIPTION("ASoC Intel SOF Common Machine Driver Helpers"); MODULE_AUTHOR("Brent Lu "); From patchwork Wed Mar 27 16:23:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 13607041 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (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 8342C130E3C for ; Wed, 27 Mar 2024 16:24:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556671; cv=none; b=BCUJryJn0yrUsf5oCX9i4UfPxsHt87kd+ISqvN7/16CAU8Pp3AdKojSY/Ns4y39WQ8v4ibCThFsGVJDQoMfccu/w8X+x41wfWfx4DhsiWFomU29eqk5AX63am1ZyZgrCDj4qO+LYjDvig5tEHwcfI+pb2B+QeOqzfHp3zTu34o8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556671; c=relaxed/simple; bh=yDo56YJ3v65nLiVuWN5tkYux0pyhJETH/nfYDD7sK1k=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ttAf8V1fel7lZOdpylVsxRelUv6aaIaRyVeRItn3zdAjyTC4hM/YN6m9ZQAqsn4XzZDc2MBGpxUcvCLt/VxesNJRA4ma6k1eQiH15TXKgYaTAe3l0jPVuC+4I31EliRC85/m9WGhwK4cDwZ+17ebpVPriBMyBjbKk3Y/QGDNU+c= 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=FUK7eq+D; arc=none smtp.client-ip=198.175.65.11 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="FUK7eq+D" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711556670; x=1743092670; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=yDo56YJ3v65nLiVuWN5tkYux0pyhJETH/nfYDD7sK1k=; b=FUK7eq+DRO81wfYFGlIr9vTeJWhHukzEfNwRp6iYdaIpf5h9IqXUOuiS 7KrdX5gmjFvN2YObFMmv+C+FonF7+uCvSjjSZHKIuW2LJTjClD8Pr/INe W91GTKeS0PYEIx1pMV5qInKtfyynrm1cxeG6GNI3Iu7TroHCEkLvT+aOu RiR0UO9fcgf8yFdWLLBuzqx2BztIkmDmsAkrKVXeaqabCwHm5a4aH+uo9 56h1jevQSdDXIuN3ojwj9QSzM3MgbpnB+zl8KeZx+4X2NA+d+2CLhNA/Z Ooh851nKB4keKx+u9LaaK6R2hZYcPoarPCI4sU2H1jIn3AkvQ+BeaQox3 A==; X-CSE-ConnectionGUID: 2Rrrsv5YSTmcNvrDpT6S5Q== X-CSE-MsgGUID: drvcnkKZRg2pDb37+LZFQQ== X-IronPort-AV: E=McAfee;i="6600,9927,11026"; a="17221496" X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="17221496" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="53821266" Received: from ssherman-mobl.amr.corp.intel.com (HELO pbossart-mobl6.intel.com) ([10.212.117.1]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:28 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Brent Lu , Bard Liao , Pierre-Louis Bossart Subject: [PATCH 04/18] ASoC: Intel: ssp-common: module name change Date: Wed, 27 Mar 2024 11:23:54 -0500 Message-Id: <20240327162408.63953-5-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> References: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Brent Lu As we applied new naming convention to functions and structures, changing module name as well to reflect the new naming. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart --- sound/soc/intel/Kconfig | 6 ++++++ sound/soc/intel/boards/Kconfig | 13 +++++-------- sound/soc/intel/boards/sof_board_helpers.c | 2 +- sound/soc/intel/common/Makefile | 4 ++-- sound/soc/intel/common/soc-acpi-intel-ssp-common.c | 6 +++--- 5 files changed, 17 insertions(+), 14 deletions(-) diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig index 4b9e498e3303..e17d1a517567 100644 --- a/sound/soc/intel/Kconfig +++ b/sound/soc/intel/Kconfig @@ -197,6 +197,12 @@ config SND_SOC_ACPI_INTEL_MATCH # this option controls the compilation of ACPI matching tables and # helpers and is not meant to be selected by the user. +config SND_SOC_ACPI_INTEL_SSP_COMMON + tristate + select SND_SOC_ACPI if ACPI + # this option provides helpers to detect codec type and is not meant + # to be selected by the user. + endif ## SND_SOC_INTEL_SST_TOPLEVEL || SND_SOC_SOF_INTEL_TOPLEVEL config SND_SOC_INTEL_KEEMBAY diff --git a/sound/soc/intel/boards/Kconfig b/sound/soc/intel/boards/Kconfig index b7a6ac4b6c0c..4d6ef68da130 100644 --- a/sound/soc/intel/boards/Kconfig +++ b/sound/soc/intel/boards/Kconfig @@ -41,9 +41,6 @@ config SND_SOC_INTEL_SOF_CIRRUS_COMMON config SND_SOC_INTEL_SOF_NUVOTON_COMMON tristate -config SND_SOC_INTEL_SOF_SSP_COMMON - tristate - config SND_SOC_INTEL_SOF_BOARD_HELPERS tristate @@ -503,7 +500,7 @@ config SND_SOC_INTEL_SOF_RT5682_MACH select SND_SOC_INTEL_SOF_BOARD_HELPERS select SND_SOC_INTEL_SOF_MAXIM_COMMON select SND_SOC_INTEL_SOF_REALTEK_COMMON - select SND_SOC_INTEL_SOF_SSP_COMMON + select SND_SOC_ACPI_INTEL_SSP_COMMON help This adds support for ASoC machine driver for SOF platforms with rt5650 or rt5682 codec. @@ -521,7 +518,7 @@ config SND_SOC_INTEL_SOF_CS42L42_MACH select SND_SOC_INTEL_HDA_DSP_COMMON select SND_SOC_INTEL_SOF_BOARD_HELPERS select SND_SOC_INTEL_SOF_MAXIM_COMMON - select SND_SOC_INTEL_SOF_SSP_COMMON + select SND_SOC_ACPI_INTEL_SSP_COMMON help This adds support for ASoC machine driver for SOF platforms with cs42l42 codec. @@ -574,7 +571,7 @@ config SND_SOC_INTEL_SOF_NAU8825_MACH select SND_SOC_INTEL_SOF_MAXIM_COMMON select SND_SOC_INTEL_SOF_NUVOTON_COMMON select SND_SOC_INTEL_SOF_REALTEK_COMMON - select SND_SOC_INTEL_SOF_SSP_COMMON + select SND_SOC_ACPI_INTEL_SSP_COMMON help This adds support for ASoC machine driver for SOF platforms with nau8825 codec. @@ -626,7 +623,7 @@ config SND_SOC_INTEL_SOF_DA7219_MACH select SND_SOC_DMIC select SND_SOC_INTEL_SOF_BOARD_HELPERS select SND_SOC_INTEL_SOF_MAXIM_COMMON - select SND_SOC_INTEL_SOF_SSP_COMMON + select SND_SOC_ACPI_INTEL_SSP_COMMON help This adds support for ASoC machine driver for SOF platforms with Dialog DA7219 I2S audio codec. @@ -646,7 +643,7 @@ config SND_SOC_INTEL_SOF_SSP_AMP_MACH select SND_SOC_INTEL_SOF_BOARD_HELPERS select SND_SOC_INTEL_SOF_REALTEK_COMMON select SND_SOC_INTEL_SOF_CIRRUS_COMMON - select SND_SOC_INTEL_SOF_SSP_COMMON + select SND_SOC_ACPI_INTEL_SSP_COMMON help This adds support for ASoC machine driver for SOF platforms with RT1308/CS35L41 I2S audio codec. diff --git a/sound/soc/intel/boards/sof_board_helpers.c b/sound/soc/intel/boards/sof_board_helpers.c index 8819ab5694bf..ba5be5423626 100644 --- a/sound/soc/intel/boards/sof_board_helpers.c +++ b/sound/soc/intel/boards/sof_board_helpers.c @@ -635,4 +635,4 @@ MODULE_DESCRIPTION("ASoC Intel SOF Machine Driver Board Helpers"); MODULE_AUTHOR("Brent Lu "); MODULE_LICENSE("GPL"); MODULE_IMPORT_NS(SND_SOC_INTEL_HDA_DSP_COMMON); -MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_SSP_COMMON); +MODULE_IMPORT_NS(SND_SOC_ACPI_INTEL_SSP_COMMON); diff --git a/sound/soc/intel/common/Makefile b/sound/soc/intel/common/Makefile index 15c8a64368c5..dcd552d815a2 100644 --- a/sound/soc/intel/common/Makefile +++ b/sound/soc/intel/common/Makefile @@ -18,5 +18,5 @@ snd-soc-acpi-intel-match-objs := soc-acpi-intel-byt-match.o soc-acpi-intel-cht-m obj-$(CONFIG_SND_SOC_INTEL_SST) += snd-soc-sst-dsp.o snd-soc-sst-ipc.o obj-$(CONFIG_SND_SOC_ACPI_INTEL_MATCH) += snd-soc-acpi-intel-match.o -snd-soc-intel-sof-ssp-common-objs += soc-acpi-intel-ssp-common.o -obj-$(CONFIG_SND_SOC_INTEL_SOF_SSP_COMMON) += snd-soc-intel-sof-ssp-common.o +snd-soc-acpi-intel-ssp-common-objs += soc-acpi-intel-ssp-common.o +obj-$(CONFIG_SND_SOC_ACPI_INTEL_SSP_COMMON) += snd-soc-acpi-intel-ssp-common.o diff --git a/sound/soc/intel/common/soc-acpi-intel-ssp-common.c b/sound/soc/intel/common/soc-acpi-intel-ssp-common.c index 716243a4fc9a..40b68c20a12a 100644 --- a/sound/soc/intel/common/soc-acpi-intel-ssp-common.c +++ b/sound/soc/intel/common/soc-acpi-intel-ssp-common.c @@ -79,7 +79,7 @@ snd_soc_acpi_intel_detect_codec_type(struct device *dev) return CODEC_NONE; } -EXPORT_SYMBOL_NS(snd_soc_acpi_intel_detect_codec_type, SND_SOC_INTEL_SOF_SSP_COMMON); +EXPORT_SYMBOL_NS(snd_soc_acpi_intel_detect_codec_type, SND_SOC_ACPI_INTEL_SSP_COMMON); enum snd_soc_acpi_intel_codec snd_soc_acpi_intel_detect_amp_type(struct device *dev) @@ -96,7 +96,7 @@ snd_soc_acpi_intel_detect_amp_type(struct device *dev) return CODEC_NONE; } -EXPORT_SYMBOL_NS(snd_soc_acpi_intel_detect_amp_type, SND_SOC_INTEL_SOF_SSP_COMMON); +EXPORT_SYMBOL_NS(snd_soc_acpi_intel_detect_amp_type, SND_SOC_ACPI_INTEL_SSP_COMMON); const char * snd_soc_acpi_intel_get_codec_name(enum snd_soc_acpi_intel_codec codec_type) @@ -118,7 +118,7 @@ snd_soc_acpi_intel_get_codec_name(enum snd_soc_acpi_intel_codec codec_type) return NULL; } -EXPORT_SYMBOL_NS(snd_soc_acpi_intel_get_codec_name, SND_SOC_INTEL_SOF_SSP_COMMON); +EXPORT_SYMBOL_NS(snd_soc_acpi_intel_get_codec_name, SND_SOC_ACPI_INTEL_SSP_COMMON); MODULE_DESCRIPTION("ASoC Intel SOF Common Machine Driver Helpers"); MODULE_AUTHOR("Brent Lu "); From patchwork Wed Mar 27 16:23:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 13607043 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (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 D4B7B131189 for ; Wed, 27 Mar 2024 16:24:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556671; cv=none; b=MXp07aOOx3qI3gDCpKWZncFHv5cx6gSoAQgKzlMzAPABxKnu7wu8vwpAZ+yEIbD12tJpA5IVyd/2NbNX/x2cqQeenirRewvhcqmLXhiBxxhV/MRi7TUBSTtyHn6oHz+N28YROo8Wxwgdy8rLh9vg1qrOQGAzng+g/Vl4iqiQ3OI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556671; c=relaxed/simple; bh=E/Sw6yfNhO+wiLFHbAf7k9G0lNRo/XtctqLltSqgEeQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=d4DabXZ4qh8gzfxuJZ5xJ4AgHbcJian9bEXb60WqOEV9pDkazaXp8qKZTSDCxKcanLFcNGIKz4oCitoEWVLH3VpBbnSlrSxcoULOawmr6ZqCLSt+3N6aiwF5UCygbh+5bsSfXeHUjFK4FMUzPUud8ux9FFFjPRvCJScbM9Nknqk= 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=mZEtUc/K; arc=none smtp.client-ip=198.175.65.11 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="mZEtUc/K" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711556670; x=1743092670; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=E/Sw6yfNhO+wiLFHbAf7k9G0lNRo/XtctqLltSqgEeQ=; b=mZEtUc/K29XvXpK9vmCS5L8btuIWGLXTrcvBC+jXFn8QI7c9uOYUPKxy cTTxvGftnGcBeDjQxtgS3yXi7s97suQGmBsP6xZJoRaYNXrKUjVZC0tkX rRwVLWrJH19JQbsQxyxlh2ZaJVewFN7Eiauk99FI+6NKicZZI+w5fXUUR 7z8k7etl7eiarVCpDeCh7VqY1X4yet5KuG59ez0b38SdsnpxFDjfBfzd9 2/1fPNfxHOrAHcfnBXlaFYhpy2Ty86+iQDltOTQqAcgPq2RM6ZexIaOJd aVFch2jtG525K4qjS9guKBgbIqOFz57Cn3LO/qOjOLUAWrqTJ7QVycsOn Q==; X-CSE-ConnectionGUID: 4vjLAeP5RJaz49qXpAuTzg== X-CSE-MsgGUID: gBwUhVAbQL6tfT9LBYZqNQ== X-IronPort-AV: E=McAfee;i="6600,9927,11026"; a="17221502" X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="17221502" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="53821271" Received: from ssherman-mobl.amr.corp.intel.com (HELO pbossart-mobl6.intel.com) ([10.212.117.1]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:29 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Brent Lu , Bard Liao , Pierre-Louis Bossart Subject: [PATCH 05/18] ASoC: Intel: ssp-common: delete module Date: Wed, 27 Mar 2024 11:23:55 -0500 Message-Id: <20240327162408.63953-6-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> References: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Brent Lu Moving all code to snd-soc-acpi-intel-match module and remove the snd-soc-acpi-intel-ssp-common module. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart --- sound/soc/intel/Kconfig | 6 ------ sound/soc/intel/boards/Kconfig | 10 +++++----- sound/soc/intel/boards/sof_board_helpers.c | 2 +- sound/soc/intel/common/Makefile | 5 ++--- sound/soc/intel/common/soc-acpi-intel-ssp-common.c | 6 +++--- 5 files changed, 11 insertions(+), 18 deletions(-) diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig index e17d1a517567..4b9e498e3303 100644 --- a/sound/soc/intel/Kconfig +++ b/sound/soc/intel/Kconfig @@ -197,12 +197,6 @@ config SND_SOC_ACPI_INTEL_MATCH # this option controls the compilation of ACPI matching tables and # helpers and is not meant to be selected by the user. -config SND_SOC_ACPI_INTEL_SSP_COMMON - tristate - select SND_SOC_ACPI if ACPI - # this option provides helpers to detect codec type and is not meant - # to be selected by the user. - endif ## SND_SOC_INTEL_SST_TOPLEVEL || SND_SOC_SOF_INTEL_TOPLEVEL config SND_SOC_INTEL_KEEMBAY diff --git a/sound/soc/intel/boards/Kconfig b/sound/soc/intel/boards/Kconfig index 4d6ef68da130..9f4a85513702 100644 --- a/sound/soc/intel/boards/Kconfig +++ b/sound/soc/intel/boards/Kconfig @@ -500,7 +500,7 @@ config SND_SOC_INTEL_SOF_RT5682_MACH select SND_SOC_INTEL_SOF_BOARD_HELPERS select SND_SOC_INTEL_SOF_MAXIM_COMMON select SND_SOC_INTEL_SOF_REALTEK_COMMON - select SND_SOC_ACPI_INTEL_SSP_COMMON + select SND_SOC_ACPI_INTEL_MATCH help This adds support for ASoC machine driver for SOF platforms with rt5650 or rt5682 codec. @@ -518,7 +518,7 @@ config SND_SOC_INTEL_SOF_CS42L42_MACH select SND_SOC_INTEL_HDA_DSP_COMMON select SND_SOC_INTEL_SOF_BOARD_HELPERS select SND_SOC_INTEL_SOF_MAXIM_COMMON - select SND_SOC_ACPI_INTEL_SSP_COMMON + select SND_SOC_ACPI_INTEL_MATCH help This adds support for ASoC machine driver for SOF platforms with cs42l42 codec. @@ -571,7 +571,7 @@ config SND_SOC_INTEL_SOF_NAU8825_MACH select SND_SOC_INTEL_SOF_MAXIM_COMMON select SND_SOC_INTEL_SOF_NUVOTON_COMMON select SND_SOC_INTEL_SOF_REALTEK_COMMON - select SND_SOC_ACPI_INTEL_SSP_COMMON + select SND_SOC_ACPI_INTEL_MATCH help This adds support for ASoC machine driver for SOF platforms with nau8825 codec. @@ -623,7 +623,7 @@ config SND_SOC_INTEL_SOF_DA7219_MACH select SND_SOC_DMIC select SND_SOC_INTEL_SOF_BOARD_HELPERS select SND_SOC_INTEL_SOF_MAXIM_COMMON - select SND_SOC_ACPI_INTEL_SSP_COMMON + select SND_SOC_ACPI_INTEL_MATCH help This adds support for ASoC machine driver for SOF platforms with Dialog DA7219 I2S audio codec. @@ -643,7 +643,7 @@ config SND_SOC_INTEL_SOF_SSP_AMP_MACH select SND_SOC_INTEL_SOF_BOARD_HELPERS select SND_SOC_INTEL_SOF_REALTEK_COMMON select SND_SOC_INTEL_SOF_CIRRUS_COMMON - select SND_SOC_ACPI_INTEL_SSP_COMMON + select SND_SOC_ACPI_INTEL_MATCH help This adds support for ASoC machine driver for SOF platforms with RT1308/CS35L41 I2S audio codec. diff --git a/sound/soc/intel/boards/sof_board_helpers.c b/sound/soc/intel/boards/sof_board_helpers.c index ba5be5423626..eb140e13153f 100644 --- a/sound/soc/intel/boards/sof_board_helpers.c +++ b/sound/soc/intel/boards/sof_board_helpers.c @@ -635,4 +635,4 @@ MODULE_DESCRIPTION("ASoC Intel SOF Machine Driver Board Helpers"); MODULE_AUTHOR("Brent Lu "); MODULE_LICENSE("GPL"); MODULE_IMPORT_NS(SND_SOC_INTEL_HDA_DSP_COMMON); -MODULE_IMPORT_NS(SND_SOC_ACPI_INTEL_SSP_COMMON); +MODULE_IMPORT_NS(SND_SOC_ACPI_INTEL_MATCH); diff --git a/sound/soc/intel/common/Makefile b/sound/soc/intel/common/Makefile index dcd552d815a2..a86457674726 100644 --- a/sound/soc/intel/common/Makefile +++ b/sound/soc/intel/common/Makefile @@ -15,8 +15,7 @@ snd-soc-acpi-intel-match-objs := soc-acpi-intel-byt-match.o soc-acpi-intel-cht-m soc-acpi-intel-hda-match.o \ soc-acpi-intel-sdw-mockup-match.o +snd-soc-acpi-intel-match-objs += soc-acpi-intel-ssp-common.o + obj-$(CONFIG_SND_SOC_INTEL_SST) += snd-soc-sst-dsp.o snd-soc-sst-ipc.o obj-$(CONFIG_SND_SOC_ACPI_INTEL_MATCH) += snd-soc-acpi-intel-match.o - -snd-soc-acpi-intel-ssp-common-objs += soc-acpi-intel-ssp-common.o -obj-$(CONFIG_SND_SOC_ACPI_INTEL_SSP_COMMON) += snd-soc-acpi-intel-ssp-common.o diff --git a/sound/soc/intel/common/soc-acpi-intel-ssp-common.c b/sound/soc/intel/common/soc-acpi-intel-ssp-common.c index 40b68c20a12a..68da7260fb1d 100644 --- a/sound/soc/intel/common/soc-acpi-intel-ssp-common.c +++ b/sound/soc/intel/common/soc-acpi-intel-ssp-common.c @@ -79,7 +79,7 @@ snd_soc_acpi_intel_detect_codec_type(struct device *dev) return CODEC_NONE; } -EXPORT_SYMBOL_NS(snd_soc_acpi_intel_detect_codec_type, SND_SOC_ACPI_INTEL_SSP_COMMON); +EXPORT_SYMBOL_NS(snd_soc_acpi_intel_detect_codec_type, SND_SOC_ACPI_INTEL_MATCH); enum snd_soc_acpi_intel_codec snd_soc_acpi_intel_detect_amp_type(struct device *dev) @@ -96,7 +96,7 @@ snd_soc_acpi_intel_detect_amp_type(struct device *dev) return CODEC_NONE; } -EXPORT_SYMBOL_NS(snd_soc_acpi_intel_detect_amp_type, SND_SOC_ACPI_INTEL_SSP_COMMON); +EXPORT_SYMBOL_NS(snd_soc_acpi_intel_detect_amp_type, SND_SOC_ACPI_INTEL_MATCH); const char * snd_soc_acpi_intel_get_codec_name(enum snd_soc_acpi_intel_codec codec_type) @@ -118,7 +118,7 @@ snd_soc_acpi_intel_get_codec_name(enum snd_soc_acpi_intel_codec codec_type) return NULL; } -EXPORT_SYMBOL_NS(snd_soc_acpi_intel_get_codec_name, SND_SOC_ACPI_INTEL_SSP_COMMON); +EXPORT_SYMBOL_NS(snd_soc_acpi_intel_get_codec_name, SND_SOC_ACPI_INTEL_MATCH); MODULE_DESCRIPTION("ASoC Intel SOF Common Machine Driver Helpers"); MODULE_AUTHOR("Brent Lu "); From patchwork Wed Mar 27 16:23:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 13607044 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (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 2E7BA13118D for ; Wed, 27 Mar 2024 16:24:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556672; cv=none; b=s/uWWqGSyxCXnMRhGABUvKT4VFZneZ+NK0xX2AnH2ECCJbOxvg7p1cjbanf1KrufV/YXU/hHy12fSdUcm2Zg2ovT4n1Ysg6zPRK8CgueFB8mrCU0VcorW549ZKmiOay7vYRSwXQNiE1lPsqQPdypWpZmH0aYbEe3tTWza5m20R4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556672; c=relaxed/simple; bh=dl07m3XcYcWXk2Do65By1l1yivaLPt8dc/boG6KMMUc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Un8qQxWU8Gx0jiYk4czME3aJyALosVOoYiI6mnhzbXlmOJJim21wqoRcB1WCCuE8OUDzox7F4+nLx+6z9mQ16hMnxeyfd6NetAmtq8Ft5PSyZ6Z4x6MuDD7WaaisFLtp4lAP8HZJW6LrO7cSGnN4mooxVvJ+OOkXXkdukxe2X/c= 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=einwLdBW; arc=none smtp.client-ip=198.175.65.11 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="einwLdBW" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711556672; x=1743092672; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dl07m3XcYcWXk2Do65By1l1yivaLPt8dc/boG6KMMUc=; b=einwLdBWPCLlkT40kE2uWQoqoOjSqi1oAYw5hYBRgKfgT2KxymrBmcE3 T9Vcmg73/akJfvzy8OLFPl59YiuwrWLVT2oqCqvZHayGLeCA9hm5Z7+vE ssoNcgEmYH1wmIcBJTro0lOxzAof/afslTkMFDnZcXSab6OOZjzoLmINU yWbDQZELOTRB1+xogHIAtY+wgEZBplxcit5a/AiEk3cBBTXZy73pPSpPE UcuaWFLejFWii6ZkH9F6x0MtV5KxjQc+QHwQZJ86BcXVjqDWI6e7EoMDs WiAsFGgBJHEUL84xn09tCRCXNUWyqIrzWJnLQJKMbHq/Ki15f/pkG12w2 Q==; X-CSE-ConnectionGUID: RrybjgsQRAaD8tjjMw+3NA== X-CSE-MsgGUID: QgpRX4BcR8C7U7Uk7j2aBA== X-IronPort-AV: E=McAfee;i="6600,9927,11026"; a="17221511" X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="17221511" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="53821277" Received: from ssherman-mobl.amr.corp.intel.com (HELO pbossart-mobl6.intel.com) ([10.212.117.1]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:29 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Brent Lu , Bard Liao , Pierre-Louis Bossart Subject: [PATCH 06/18] ASoC: Intel: ssp-common: get codec tplg suffix function Date: Wed, 27 Mar 2024 11:23:56 -0500 Message-Id: <20240327162408.63953-7-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> References: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Brent Lu Add helper functions to get tplg suffix string for specific headphone codec or speaker amplifier. The string could be used to compose the default topology file name for specific headphone codec and speaker amplifier combination. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart --- include/sound/soc-acpi-intel-ssp-common.h | 5 ++ .../intel/common/soc-acpi-intel-ssp-common.c | 76 ++++++++++++++----- 2 files changed, 60 insertions(+), 21 deletions(-) diff --git a/include/sound/soc-acpi-intel-ssp-common.h b/include/sound/soc-acpi-intel-ssp-common.h index b568cda11051..b4597c8dac78 100644 --- a/include/sound/soc-acpi-intel-ssp-common.h +++ b/include/sound/soc-acpi-intel-ssp-common.h @@ -73,4 +73,9 @@ snd_soc_acpi_intel_detect_amp_type(struct device *dev); const char * snd_soc_acpi_intel_get_codec_name(enum snd_soc_acpi_intel_codec codec_type); +const char * +snd_soc_acpi_intel_get_codec_tplg_suffix(enum snd_soc_acpi_intel_codec codec_type); +const char * +snd_soc_acpi_intel_get_amp_tplg_suffix(enum snd_soc_acpi_intel_codec codec_type); + #endif /* __LINUX_SND_SOC_ACPI_INTEL_SSP_COMMON_H */ diff --git a/sound/soc/intel/common/soc-acpi-intel-ssp-common.c b/sound/soc/intel/common/soc-acpi-intel-ssp-common.c index 68da7260fb1d..a887f019afe2 100644 --- a/sound/soc/intel/common/soc-acpi-intel-ssp-common.c +++ b/sound/soc/intel/common/soc-acpi-intel-ssp-common.c @@ -9,59 +9,61 @@ /* * Codec probe function */ -#define CODEC_MAP_ENTRY(n, h, t) \ +#define CODEC_MAP_ENTRY(n, s, h, t) \ { \ .name = n, \ + .tplg_suffix = s, \ .acpi_hid = h, \ .codec_type = t, \ } struct codec_map { const char *name; + const char *tplg_suffix; const char *acpi_hid; enum snd_soc_acpi_intel_codec codec_type; }; static const struct codec_map codecs[] = { /* Cirrus Logic */ - CODEC_MAP_ENTRY("CS42L42", CS42L42_ACPI_HID, CODEC_CS42L42), + CODEC_MAP_ENTRY("CS42L42", "cs42l42", CS42L42_ACPI_HID, CODEC_CS42L42), /* Dialog */ - CODEC_MAP_ENTRY("DA7219", DA7219_ACPI_HID, CODEC_DA7219), + CODEC_MAP_ENTRY("DA7219", "da7219", DA7219_ACPI_HID, CODEC_DA7219), /* Everest */ - CODEC_MAP_ENTRY("ES8316", ES8316_ACPI_HID, CODEC_ES8316), - CODEC_MAP_ENTRY("ES8326", ES8326_ACPI_HID, CODEC_ES8326), - CODEC_MAP_ENTRY("ES8336", ES8336_ACPI_HID, CODEC_ES8336), + CODEC_MAP_ENTRY("ES8316", "es8336", ES8316_ACPI_HID, CODEC_ES8316), + CODEC_MAP_ENTRY("ES8326", "es8336", ES8326_ACPI_HID, CODEC_ES8326), + CODEC_MAP_ENTRY("ES8336", "es8336", ES8336_ACPI_HID, CODEC_ES8336), /* Nuvoton */ - CODEC_MAP_ENTRY("NAU8825", NAU8825_ACPI_HID, CODEC_NAU8825), + CODEC_MAP_ENTRY("NAU8825", "nau8825", NAU8825_ACPI_HID, CODEC_NAU8825), /* Realtek */ - CODEC_MAP_ENTRY("RT5650", RT5650_ACPI_HID, CODEC_RT5650), - CODEC_MAP_ENTRY("RT5682", RT5682_ACPI_HID, CODEC_RT5682), - CODEC_MAP_ENTRY("RT5682S", RT5682S_ACPI_HID, CODEC_RT5682S), + CODEC_MAP_ENTRY("RT5650", "rt5650", RT5650_ACPI_HID, CODEC_RT5650), + CODEC_MAP_ENTRY("RT5682", "rt5682", RT5682_ACPI_HID, CODEC_RT5682), + CODEC_MAP_ENTRY("RT5682S", "rt5682", RT5682S_ACPI_HID, CODEC_RT5682S), }; static const struct codec_map amps[] = { /* Cirrus Logic */ - CODEC_MAP_ENTRY("CS35L41", CS35L41_ACPI_HID, CODEC_CS35L41), + CODEC_MAP_ENTRY("CS35L41", "cs35l41", CS35L41_ACPI_HID, CODEC_CS35L41), /* Maxim */ - CODEC_MAP_ENTRY("MAX98357A", MAX_98357A_ACPI_HID, CODEC_MAX98357A), - CODEC_MAP_ENTRY("MAX98360A", MAX_98360A_ACPI_HID, CODEC_MAX98360A), - CODEC_MAP_ENTRY("MAX98373", MAX_98373_ACPI_HID, CODEC_MAX98373), - CODEC_MAP_ENTRY("MAX98390", MAX_98390_ACPI_HID, CODEC_MAX98390), + CODEC_MAP_ENTRY("MAX98357A", "max98357a", MAX_98357A_ACPI_HID, CODEC_MAX98357A), + CODEC_MAP_ENTRY("MAX98360A", "max98360a", MAX_98360A_ACPI_HID, CODEC_MAX98360A), + CODEC_MAP_ENTRY("MAX98373", "max98373", MAX_98373_ACPI_HID, CODEC_MAX98373), + CODEC_MAP_ENTRY("MAX98390", "max98390", MAX_98390_ACPI_HID, CODEC_MAX98390), /* Nuvoton */ - CODEC_MAP_ENTRY("NAU8318", NAU8318_ACPI_HID, CODEC_NAU8318), + CODEC_MAP_ENTRY("NAU8318", "nau8318", NAU8318_ACPI_HID, CODEC_NAU8318), /* Realtek */ - CODEC_MAP_ENTRY("RT1011", RT1011_ACPI_HID, CODEC_RT1011), - CODEC_MAP_ENTRY("RT1015", RT1015_ACPI_HID, CODEC_RT1015), - CODEC_MAP_ENTRY("RT1015P", RT1015P_ACPI_HID, CODEC_RT1015P), - CODEC_MAP_ENTRY("RT1019P", RT1019P_ACPI_HID, CODEC_RT1019P), - CODEC_MAP_ENTRY("RT1308", RT1308_ACPI_HID, CODEC_RT1308), + CODEC_MAP_ENTRY("RT1011", "rt1011", RT1011_ACPI_HID, CODEC_RT1011), + CODEC_MAP_ENTRY("RT1015", "rt1015", RT1015_ACPI_HID, CODEC_RT1015), + CODEC_MAP_ENTRY("RT1015P", "rt1015", RT1015P_ACPI_HID, CODEC_RT1015P), + CODEC_MAP_ENTRY("RT1019P", "rt1019", RT1019P_ACPI_HID, CODEC_RT1019P), + CODEC_MAP_ENTRY("RT1308", "rt1308", RT1308_ACPI_HID, CODEC_RT1308), }; enum snd_soc_acpi_intel_codec @@ -120,6 +122,38 @@ snd_soc_acpi_intel_get_codec_name(enum snd_soc_acpi_intel_codec codec_type) } EXPORT_SYMBOL_NS(snd_soc_acpi_intel_get_codec_name, SND_SOC_ACPI_INTEL_MATCH); +const char * +snd_soc_acpi_intel_get_codec_tplg_suffix(enum snd_soc_acpi_intel_codec codec_type) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(codecs); i++) { + if (codecs[i].codec_type != codec_type) + continue; + + return codecs[i].tplg_suffix; + } + + return NULL; +} +EXPORT_SYMBOL_NS(snd_soc_acpi_intel_get_codec_tplg_suffix, SND_SOC_ACPI_INTEL_MATCH); + +const char * +snd_soc_acpi_intel_get_amp_tplg_suffix(enum snd_soc_acpi_intel_codec codec_type) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(amps); i++) { + if (amps[i].codec_type != codec_type) + continue; + + return amps[i].tplg_suffix; + } + + return NULL; +} +EXPORT_SYMBOL_NS(snd_soc_acpi_intel_get_amp_tplg_suffix, SND_SOC_ACPI_INTEL_MATCH); + MODULE_DESCRIPTION("ASoC Intel SOF Common Machine Driver Helpers"); MODULE_AUTHOR("Brent Lu "); MODULE_LICENSE("GPL"); From patchwork Wed Mar 27 16:23:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 13607045 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (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 582A41311AD for ; Wed, 27 Mar 2024 16:24:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556672; cv=none; b=Y+sbAhZzmF4JW5uTReQ0e3AcXuk/sQp2NKS3IaeYNf6mqXJ1Bc7PlN3ZA4lfM+/2fg06UIMuaggjLJ5AvMhTjHo8pffE7VEtyuhqQe80djymA0E7pjXwOFIZI31t+GIAUL00gBqGhGJX/2ihJftEv2wLk2hKuNusJgeagQ66sec= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556672; c=relaxed/simple; bh=7mKkDHnpjVsMV+avsa/bSTvCScvxOlljZVffn/zZCXo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=s0a8QanAsAup2u53wYncyYBHGTflBePtAva+q7DF9jAjiAPTVT/cnog/Jit3DtF1q3iplm6khFcM/TWx5c68MLlVqV7nnkyByoDkmuW0GqDfEpj5dZ+BTQmRk8wC/rXPp6yIds9/ktDzlpYJnFHmUbljwM63Os3uwHhR6BzOJIg= 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=XnIBxqdu; arc=none smtp.client-ip=198.175.65.11 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="XnIBxqdu" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711556672; x=1743092672; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7mKkDHnpjVsMV+avsa/bSTvCScvxOlljZVffn/zZCXo=; b=XnIBxqdu0vH4AaYL+b6M6hTYTdFA0NZuFa/LPIm6S0Rt9gfbqQyFYt1p +s7iOiudIVJT2PnaDqLmy4VAmQ4IZBf8G5VvWMaSmXUBVLGj8eGVHbqvR 4YE5XJ4RaM3XiItGML44MSVtiVjGP4uSI8HIfyTisjK8ks3fC6JMjaZwo 4qeX601O78aa0PPxXb363IwWa64g6sDBtS73lS2+6dehjgq6mZszO7nja o4D9cIwA6v2V3Offd83RjD3Gc9+pCf3XdL3J91/vuGKBDGPSG6qANK2i7 lu4h+u40mk9maXU90G6ZI2LqsOSP3ck2Kb62dVNVDAcEs1Vg+VlCmEH+H g==; X-CSE-ConnectionGUID: UiWhfmCsTc+blWguKl6fHg== X-CSE-MsgGUID: eezqqF4JRjO81q8BH6XmPw== X-IronPort-AV: E=McAfee;i="6600,9927,11026"; a="17221519" X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="17221519" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="53821285" Received: from ssherman-mobl.amr.corp.intel.com (HELO pbossart-mobl6.intel.com) ([10.212.117.1]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:30 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Brent Lu , Bard Liao , Pierre-Louis Bossart Subject: [PATCH 07/18] ASoC: SOF: Intel: support tplg suffix detection Date: Wed, 27 Mar 2024 11:23:57 -0500 Message-Id: <20240327162408.63953-8-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> References: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Brent Lu Add new flags to tplg_quirk_mask to detect and append codec/amplifier tplg suffix to topology file name at runtime. With this feature we could implement an enumeration entry for all boards which implement same headphone codec regardless the speaker amplifier type. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart --- include/sound/soc-acpi.h | 12 ++++++ sound/soc/sof/intel/hda.c | 82 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+) diff --git a/include/sound/soc-acpi.h b/include/sound/soc-acpi.h index 23d6d6bfb073..1d8f35ca1d6f 100644 --- a/include/sound/soc-acpi.h +++ b/include/sound/soc-acpi.h @@ -151,6 +151,18 @@ struct snd_soc_acpi_link_adr { */ #define SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER BIT(2) +/* + * when set the speaker amplifier name suffix (i.e. "-max98360a") will be + * appended to topology file name + */ +#define SND_SOC_ACPI_TPLG_INTEL_AMP_NAME BIT(3) + +/* + * when set the headphone codec name suffix (i.e. "-rt5682") will be appended to + * topology file name + */ +#define SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME BIT(4) + /** * snd_soc_acpi_mach: ACPI-based machine descriptor. Most of the fields are * related to the hardware, except for the firmware and topology file names. diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c index 7fe72b065451..e26b8fd682e5 100644 --- a/sound/soc/sof/intel/hda.c +++ b/sound/soc/sof/intel/hda.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -1676,13 +1677,36 @@ void hda_set_mach_params(struct snd_soc_acpi_mach *mach, mach_params->dai_drivers = desc->ops->drv; } +static int check_tplg_quirk_mask(struct snd_soc_acpi_mach *mach) +{ + u32 dmic_ssp_quirk; + u32 codec_amp_name_quirk; + + /* + * In current implementation dmic and ssp quirks are designed for es8336 + * machine driver and could not be mixed with codec name and amp name + * quirks. + */ + dmic_ssp_quirk = mach->tplg_quirk_mask & + (SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER | SND_SOC_ACPI_TPLG_INTEL_SSP_NUMBER); + codec_amp_name_quirk = mach->tplg_quirk_mask & + (SND_SOC_ACPI_TPLG_INTEL_AMP_NAME | SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME); + + if (dmic_ssp_quirk && codec_amp_name_quirk) + return -EINVAL; + + return 0; +} + struct snd_soc_acpi_mach *hda_machine_select(struct snd_sof_dev *sdev) { u32 interface_mask = hda_get_interface_mask(sdev); struct snd_sof_pdata *sof_pdata = sdev->pdata; const struct sof_dev_desc *desc = sof_pdata->desc; struct snd_soc_acpi_mach *mach = NULL; + enum snd_soc_acpi_intel_codec codec_type; const char *tplg_filename; + const char *tplg_suffix; /* Try I2S or DMIC if it is supported */ if (interface_mask & (BIT(SOF_DAI_INTEL_SSP) | BIT(SOF_DAI_INTEL_DMIC))) @@ -1701,6 +1725,17 @@ struct snd_soc_acpi_mach *hda_machine_select(struct snd_sof_dev *sdev) tplg_fixup = true; } + /* + * Checking quirk mask integrity; some quirk flags could not be + * set concurrently. + */ + if (tplg_fixup && + check_tplg_quirk_mask(mach)) { + dev_err(sdev->dev, "Invalid tplg quirk mask 0x%x\n", + mach->tplg_quirk_mask); + return NULL; + } + /* report to machine driver if any DMICs are found */ mach->mach_params.dmic_num = check_dmic_num(sdev); @@ -1775,6 +1810,52 @@ struct snd_soc_acpi_mach *hda_machine_select(struct snd_sof_dev *sdev) } } + codec_type = snd_soc_acpi_intel_detect_amp_type(sdev->dev); + + if (tplg_fixup && + mach->tplg_quirk_mask & SND_SOC_ACPI_TPLG_INTEL_AMP_NAME && + codec_type != CODEC_NONE) { + tplg_suffix = snd_soc_acpi_intel_get_amp_tplg_suffix(codec_type); + if (!tplg_suffix) { + dev_err(sdev->dev, "no tplg suffix found, amp %d\n", + codec_type); + return NULL; + } + + tplg_filename = devm_kasprintf(sdev->dev, GFP_KERNEL, + "%s-%s", + sof_pdata->tplg_filename, + tplg_suffix); + if (!tplg_filename) + return NULL; + + sof_pdata->tplg_filename = tplg_filename; + add_extension = true; + } + + codec_type = snd_soc_acpi_intel_detect_codec_type(sdev->dev); + + if (tplg_fixup && + mach->tplg_quirk_mask & SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME && + codec_type != CODEC_NONE) { + tplg_suffix = snd_soc_acpi_intel_get_codec_tplg_suffix(codec_type); + if (!tplg_suffix) { + dev_err(sdev->dev, "no tplg suffix found, codec %d\n", + codec_type); + return NULL; + } + + tplg_filename = devm_kasprintf(sdev->dev, GFP_KERNEL, + "%s-%s", + sof_pdata->tplg_filename, + tplg_suffix); + if (!tplg_filename) + return NULL; + + sof_pdata->tplg_filename = tplg_filename; + add_extension = true; + } + if (tplg_fixup && add_extension) { tplg_filename = devm_kasprintf(sdev->dev, GFP_KERNEL, "%s%s", @@ -1842,3 +1923,4 @@ MODULE_IMPORT_NS(SND_INTEL_SOUNDWIRE_ACPI); MODULE_IMPORT_NS(SOUNDWIRE_INTEL_INIT); MODULE_IMPORT_NS(SOUNDWIRE_INTEL); MODULE_IMPORT_NS(SND_SOC_SOF_HDA_MLINK); +MODULE_IMPORT_NS(SND_SOC_ACPI_INTEL_MATCH); From patchwork Wed Mar 27 16:23:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 13607046 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (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 9FD02130AD9 for ; Wed, 27 Mar 2024 16:24:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556674; cv=none; b=E+11NEI/fxXNQ9z16g30M/pSgXtTqCYxGeIzqLymWzODYbl6XWo5f4oX132Mhv1ovQksH1tRl5yBYS016kna0oQ47Nw8IO3J9+RXBTrVri61pj2BpTdK/RWQlADOoqHevbiMP4eqGECMgURauY9ItYvf5piu9oDltN88gDB+ut8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556674; c=relaxed/simple; bh=7O66xi+xRTn70v7wSDGhlnfMnYCGKr0ry+FUMCrIqcA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=jVzjwMIIxl1rbOmgx/AM/0WDSoApFqRy1QooOIfkhciFyRqozBojlcdA7IWQt7ReOlrmnHt9jQQ/FxGAp3C27LkjYgZRikpzgf0Y8y7c9PYFozT8gXAEuYC65ci8nNrqnoTPnyAbA3Ne/RNkpKQ92c12ICu2vnUfZhJOpvLVEkA= 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=QmuxfjI6; arc=none smtp.client-ip=198.175.65.11 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="QmuxfjI6" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711556673; x=1743092673; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7O66xi+xRTn70v7wSDGhlnfMnYCGKr0ry+FUMCrIqcA=; b=QmuxfjI6D2aSR/mhwcP+L6oYW88gpO9rNO30SpXnJz7i2xmkTUQnha7E q71lpU0xwhjLehZnAzxlGNiDHugOBYNSakIqRAgZYNIR+Z8lXiXLtv0j0 yUAa3gk8S6yR1b0fINtm41WlJ6n7eYagcFAIslIprP7jRlu6eIW9lEexA fKYrHdO4gkWQYaMw6YjNEdG2lbZoW1ZD9zpJ4yBF5iUnyOB6JpUDwMjiJ 93PSCZQ5qbYhs3Zf0PEgNRPnXC+8QidSRXh66nV4Qb7jlkSRysaW/cgtH esMYi3iv/G2I0Kx7fw2debqpAOdIYGVBoUCx8qZHQBKKZQwaX+vfdX+4q g==; X-CSE-ConnectionGUID: baStUrTdRqqXlVJwp33tRQ== X-CSE-MsgGUID: r5dP1GTYTh2dpLJ8HsR5kA== X-IronPort-AV: E=McAfee;i="6600,9927,11026"; a="17221523" X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="17221523" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="53821291" Received: from ssherman-mobl.amr.corp.intel.com (HELO pbossart-mobl6.intel.com) ([10.212.117.1]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:31 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Brent Lu , Bard Liao , Pierre-Louis Bossart Subject: [PATCH 08/18] ASoC: Intel: sof_nau8825: mach cleanup for adl boards Date: Wed, 27 Mar 2024 11:23:58 -0500 Message-Id: <20240327162408.63953-9-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> References: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Brent Lu Add a common entry in enumeration table for all nau8825 boards with/without speaker amplifier. All other adl_nau8825_def entries become redundant so get removed. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart --- .../intel/common/soc-acpi-intel-adl-match.c | 54 ++++--------------- 1 file changed, 11 insertions(+), 43 deletions(-) diff --git a/sound/soc/intel/common/soc-acpi-intel-adl-match.c b/sound/soc/intel/common/soc-acpi-intel-adl-match.c index 7ce8aade07d7..f8b8864b5ec6 100644 --- a/sound/soc/intel/common/soc-acpi-intel-adl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-adl-match.c @@ -7,6 +7,7 @@ #include #include +#include static const struct snd_soc_acpi_codecs essx_83x6 = { .num_codecs = 3, @@ -467,11 +468,6 @@ static const struct snd_soc_acpi_codecs adl_rt5682_rt5682s_hp = { .codecs = {"10EC5682", "RTL5682"}, }; -static const struct snd_soc_acpi_codecs adl_rt1015p_amp = { - .num_codecs = 1, - .codecs = {"RTL1015"} -}; - static const struct snd_soc_acpi_codecs adl_rt1019p_amp = { .num_codecs = 1, .codecs = {"RTL1019"} @@ -487,11 +483,6 @@ static const struct snd_soc_acpi_codecs adl_lt6911_hdmi = { .codecs = {"INTC10B0"} }; -static const struct snd_soc_acpi_codecs adl_nau8318_amp = { - .num_codecs = 1, - .codecs = {"NVTN2012"} -}; - static struct snd_soc_acpi_codecs adl_rt5650_amp = { .num_codecs = 1, .codecs = {"10EC5650"} @@ -526,20 +517,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = { .quirk_data = &adl_rt1019p_amp, .sof_tplg_filename = "sof-adl-rt1019-nau8825.tplg", }, - { - .id = "10508825", - .drv_name = "adl_nau8825_def", - .machine_quirk = snd_soc_acpi_codec_list, - .quirk_data = &adl_max98373_amp, - .sof_tplg_filename = "sof-adl-max98373-nau8825.tplg", - }, - { - .id = "10508825", - .drv_name = "adl_nau8825_def", - .machine_quirk = snd_soc_acpi_codec_list, - .quirk_data = &adl_max98360a_amp, - .sof_tplg_filename = "sof-adl-max98360a-nau8825.tplg", - }, { .comp_ids = &adl_rt5682_rt5682s_hp, .drv_name = "adl_rt5682_def", @@ -547,25 +524,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = { .quirk_data = &adl_rt1019p_amp, .sof_tplg_filename = "sof-adl-rt1019-rt5682.tplg", }, - { - .id = "10508825", - .drv_name = "adl_nau8825_def", - .machine_quirk = snd_soc_acpi_codec_list, - .quirk_data = &adl_rt1015p_amp, - .sof_tplg_filename = "sof-adl-rt1015-nau8825.tplg", - }, - { - .id = "10508825", - .drv_name = "adl_nau8825_def", - .machine_quirk = snd_soc_acpi_codec_list, - .quirk_data = &adl_nau8318_amp, - .sof_tplg_filename = "sof-adl-nau8318-nau8825.tplg", - }, - { - .id = "10508825", - .drv_name = "adl_nau8825_def", - .sof_tplg_filename = "sof-adl-nau8825.tplg", - }, { .comp_ids = &adl_rt5682_rt5682s_hp, .drv_name = "adl_rt5682_def", @@ -621,6 +579,16 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = { .quirk_data = &adl_max98360a_amp, .sof_tplg_filename = "sof-adl-max98360a-da7219.tplg", }, + /* place boards for each headphone codec: sof driver will complete the + * tplg name and machine driver will detect the amp type + */ + { + .id = NAU8825_ACPI_HID, + .drv_name = "adl_nau8825_def", + .sof_tplg_filename = "sof-adl", /* the tplg suffix is added at run time */ + .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_AMP_NAME | + SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME, + }, /* place amp-only boards in the end of table */ { .id = "CSC3541", From patchwork Wed Mar 27 16:23:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 13607047 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (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 35BFC1304AD for ; Wed, 27 Mar 2024 16:24:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556675; cv=none; b=ejpEWSemIMxVrOEMgxJSIp6XhAtfO1EzqllFGGT9KhA9I+K1lMM8fVMhuWidOWU4xjou18C6PaDuToCsvWUxm0MbfVeW8xhv9HjlwVbftYWd/Nkw7sBMQfozdixmFC9uxesvs6UXU/2g0cOlCb8meshlAqjKwoIW0gy5NYmOn+Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556675; c=relaxed/simple; bh=bqI6k1vmLPj9eqdEJ9jrqBRuXrfpW9+m6fOT7gzV0Kw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=I6Ut06n+ZHk7Pxh+0GrTdYoiTQCoK67x2hs3bVqVSMGDOlR8hephWgEKM7xV+LthQU7Sa+0LzUHfIFf2msDQ4c7oGF7Eyfl4Yx2/EQYYzBdJmh7+WpgGjTUSEi1jOoB6kyfFok7rKoTCyxuLMDkZNPnNZChPZDwarJd7pnKmOLk= 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=OSfVDTJ0; arc=none smtp.client-ip=198.175.65.11 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="OSfVDTJ0" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711556675; x=1743092675; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bqI6k1vmLPj9eqdEJ9jrqBRuXrfpW9+m6fOT7gzV0Kw=; b=OSfVDTJ0m3ikQKysK3Cyq2jKE+Oh0qXS6qOd7Hc1LzEGZfggQgsXl9Lc 9zZsIWpMWDTY+AsWnB6gOT/QsBVi7xY6zP1o/7+j6iB1esPiMgGMaD9V6 GovEfOjq9ivb14vdhAwdXAP5PVBImgTdAzAOEXevaAajetkbb75UygeiY Tamqyak3HvYsURrfIQowF1x0JUCpsLW6aia0Kx56TjlzISGe14qwXVAKz PvtCD/Od66nNQoH8QSpOmJZuAQf2gnJgYftDl9bAhErkUHBQBhlC54U9T w0L5POCtlDcnl74XbFEPlQoHWdhiVSpi+OLBUej8RSenhPYsKP/01qYux g==; X-CSE-ConnectionGUID: XNBFtohkQu++9hgDiVJRvQ== X-CSE-MsgGUID: w1GlPZ7aRJmxFDg9nJeqOQ== X-IronPort-AV: E=McAfee;i="6600,9927,11026"; a="17221528" X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="17221528" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="53821300" Received: from ssherman-mobl.amr.corp.intel.com (HELO pbossart-mobl6.intel.com) ([10.212.117.1]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:32 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Brent Lu , Bard Liao , Pierre-Louis Bossart Subject: [PATCH 09/18] ASoC: Intel: sof_nau8825: mach cleanup for rpl boards Date: Wed, 27 Mar 2024 11:23:59 -0500 Message-Id: <20240327162408.63953-10-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> References: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Brent Lu Add a common entry in enumeration table for all nau8825 boards with/without speaker amplifier. All other rpl_nau8825_def entries become redundant so get removed. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart --- .../intel/common/soc-acpi-intel-rpl-match.c | 43 ++++++------------- 1 file changed, 12 insertions(+), 31 deletions(-) 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 77c917897c8d..44be9077b4e0 100644 --- a/sound/soc/intel/common/soc-acpi-intel-rpl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-rpl-match.c @@ -7,6 +7,7 @@ #include #include +#include static const struct snd_soc_acpi_endpoint single_endpoint = { .num = 0, @@ -365,21 +366,11 @@ static const struct snd_soc_acpi_codecs rpl_max98360a_amp = { .codecs = {"MX98360A"}, }; -static const struct snd_soc_acpi_codecs rpl_max98373_amp = { - .num_codecs = 1, - .codecs = {"MX98373"} -}; - static const struct snd_soc_acpi_codecs rpl_lt6911_hdmi = { .num_codecs = 1, .codecs = {"INTC10B0"} }; -static const struct snd_soc_acpi_codecs rpl_nau8318_amp = { - .num_codecs = 1, - .codecs = {"NVTN2012"} -}; - static const struct snd_soc_acpi_codecs rpl_rt1019p_amp = { .num_codecs = 1, .codecs = {"RTL1019"} @@ -400,27 +391,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_rpl_machines[] = { .quirk_data = &rpl_max98360a_amp, .sof_tplg_filename = "sof-rpl-max98360a-rt5682.tplg", }, - { - .id = "10508825", - .drv_name = "rpl_nau8825_def", - .machine_quirk = snd_soc_acpi_codec_list, - .quirk_data = &rpl_max98373_amp, - .sof_tplg_filename = "sof-rpl-max98373-nau8825.tplg", - }, - { - .id = "10508825", - .drv_name = "rpl_nau8825_def", - .machine_quirk = snd_soc_acpi_codec_list, - .quirk_data = &rpl_max98360a_amp, - .sof_tplg_filename = "sof-rpl-max98360a-nau8825.tplg", - }, - { - .id = "10508825", - .drv_name = "rpl_nau8825_def", - .machine_quirk = snd_soc_acpi_codec_list, - .quirk_data = &rpl_nau8318_amp, - .sof_tplg_filename = "sof-rpl-nau8318-nau8825.tplg", - }, { .comp_ids = &rpl_rt5682_hp, .drv_name = "rpl_rt5682_def", @@ -450,6 +420,17 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_rpl_machines[] = { SND_SOC_ACPI_TPLG_INTEL_SSP_MSB | SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER, }, + /* place boards for each headphone codec: sof driver will complete the + * tplg name and machine driver will detect the amp type + */ + { + .id = NAU8825_ACPI_HID, + .drv_name = "rpl_nau8825_def", + .sof_tplg_filename = "sof-rpl", /* the tplg suffix is added at run time */ + .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_AMP_NAME | + SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME, + }, + /* place amp-only boards in the end of table */ { .id = "INTC10B0", .drv_name = "rpl_lt6911_hdmi_ssp", From patchwork Wed Mar 27 16:24:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 13607048 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (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 862F313118D for ; Wed, 27 Mar 2024 16:24:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556675; cv=none; b=gb6QtjiVNx3BtAz1Z21ok8CMaG/SqzCLkOuBw+UcuyjugU2Qrmljtmu9Tk7nedpuUkepRh1bM0YkU0MkRl0k5dU/Qc9LR7VDp6j7tEL0MezkGuH/vhFSXevv6UvWdXiKNTlFII5yjdviof0KiP/4/vtkJ+X1agIblzrK9R8imjw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556675; c=relaxed/simple; bh=pTeryrvseJcCWI/DDqcKtsUMeDVdgeOAEB5bQ3J6A6U=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=L5TmLnGAMZQK2I1HKOvKmkuKoUb8erkSNbFvlI6FWcFj7+45+8jQ7QmDAOo9YMa33SVTUZFv970NbCQEVnaP2meC2L/rm0FIsF9uTW+OXi26Rz7lUMF6qUBnVcxcxLUYG2ucxKE9ElgTRLxNkWYKDt7ajE304xFXN8b9Z4Y7Vj8= 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=OMt5/O4P; arc=none smtp.client-ip=198.175.65.11 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="OMt5/O4P" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711556675; x=1743092675; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pTeryrvseJcCWI/DDqcKtsUMeDVdgeOAEB5bQ3J6A6U=; b=OMt5/O4PDOTawyE3GQVHSl59QEC2qPXNGx/k07gHcwUJbapCR5ew2pbX 4dYYh/NnOe4uBFvIjszAyMpoCM9g4IXY72gSW9jSVDQ088vabFbj4w7qZ GjATs8ersi6ecYL2kMcwL+A/cClkHtasWggnLv22Lw6Py4Yp86uqZlC9a 7KV63MqdYBsXgZKYvxdsF4YNk5zUfkacuq0W8OjaKY9mEFQrPG80iePeG ldkNWJ1PRf5bOnwYHSOY/QCpf5N4qu5xP90PXtl/3U7qEzUO72A/Ae7lq UkF5EqCDDhRNB6AbYO0JQSAd1yrdlrzBuNYkUsK94eC8GSBV//d8Oya0x Q==; X-CSE-ConnectionGUID: f19gjUW0QQGY7iXSuKVG9g== X-CSE-MsgGUID: z6Pf/+0STyigRTwIAZkN/Q== X-IronPort-AV: E=McAfee;i="6600,9927,11026"; a="17221534" X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="17221534" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="53821304" Received: from ssherman-mobl.amr.corp.intel.com (HELO pbossart-mobl6.intel.com) ([10.212.117.1]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:32 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Brent Lu , Bard Liao , Pierre-Louis Bossart Subject: [PATCH 10/18] ASoC: Intel: sof_nau8825: add mtl_nau8825_def for mtl boards Date: Wed, 27 Mar 2024 11:24:00 -0500 Message-Id: <20240327162408.63953-11-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> References: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Brent Lu Add the board config mtl_nau8825_def to nau8825 machine driver for all mtl boards using default SSP port allocation (headphone codec on SSP2, speaker amplifiers on SSP0, and BT offload on SSP1). Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart --- sound/soc/intel/boards/sof_nau8825.c | 7 +++++++ sound/soc/intel/common/soc-acpi-intel-mtl-match.c | 11 +++++++++++ 2 files changed, 18 insertions(+) diff --git a/sound/soc/intel/boards/sof_nau8825.c b/sound/soc/intel/boards/sof_nau8825.c index 23fe8b4015cc..fe5f9e8dd652 100644 --- a/sound/soc/intel/boards/sof_nau8825.c +++ b/sound/soc/intel/boards/sof_nau8825.c @@ -319,6 +319,13 @@ static const struct platform_device_id board_ids[] = { SOF_SSP_PORT_BT_OFFLOAD(2) | SOF_BT_OFFLOAD_PRESENT), }, + { + .name = "mtl_nau8825_def", + .driver_data = (kernel_ulong_t)(SOF_SSP_PORT_CODEC(2) | + SOF_SSP_PORT_AMP(0) | + SOF_SSP_PORT_BT_OFFLOAD(1) | + SOF_BT_OFFLOAD_PRESENT), + }, { } }; MODULE_DEVICE_TABLE(platform, board_ids); diff --git a/sound/soc/intel/common/soc-acpi-intel-mtl-match.c b/sound/soc/intel/common/soc-acpi-intel-mtl-match.c index 27d1313e6686..0125e81af9e1 100644 --- a/sound/soc/intel/common/soc-acpi-intel-mtl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-mtl-match.c @@ -8,6 +8,7 @@ #include #include +#include #include "soc-acpi-intel-sdw-mockup-match.h" static const struct snd_soc_acpi_codecs mtl_max98357a_amp = { @@ -89,6 +90,16 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_machines[] = { .quirk_data = &mtl_rt5650_amp, .sof_tplg_filename = "sof-mtl-rt5650.tplg", }, + /* place boards for each headphone codec: sof driver will complete the + * tplg name and machine driver will detect the amp type + */ + { + .id = NAU8825_ACPI_HID, + .drv_name = "mtl_nau8825_def", + .sof_tplg_filename = "sof-mtl", /* the tplg suffix is added at run time */ + .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_AMP_NAME | + SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME, + }, /* place amp-only boards in the end of table */ { .id = "INTC10B0", From patchwork Wed Mar 27 16:24:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 13607049 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (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 47E5C130E3C for ; Wed, 27 Mar 2024 16:24:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556676; cv=none; b=J7k52KTzlZf/fl3LZ1XBXx4b/4YWbu7TEHu7+JsGgK+2PaaREedwrBtrMievAU8R7uK2mWfrrjRqKEDoYvjM+A7LosNl3C6oloZAg8AL5ohT+z7wtSrXClHuFp66iZJi/ymgOEGijWb1QbHIjFqlZKPaicxsDFPURq6NfJIs6SM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556676; c=relaxed/simple; bh=9NGDWNO1OYr4eGh4Ij3kYUinuMCScDfWokDYzAgk5RI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=m8wyWw2BNTaLNM+umDY+VIvgCil5xHcfPe3zjT8N6qmFxj6zAH/ei2zttK6CRMeSxnzzp0xZoYo9yaJqvDoVsXwIksVQKjkuc8hX0+hGHqoczH0GV6VLETWd56vQh9loMKWBZk20O9XQA9VkqquNAXVw22urXuyYVmGk2owf/iA= 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=iO3Xvc+Y; arc=none smtp.client-ip=198.175.65.11 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="iO3Xvc+Y" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711556676; x=1743092676; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=9NGDWNO1OYr4eGh4Ij3kYUinuMCScDfWokDYzAgk5RI=; b=iO3Xvc+YbTmzuMUbvOnlXIxlzbpZe8jcI0Ozw+TFZAd0JPP4n1n8uKYS 8ZIun17CaRdxJ7eW6yaOfaYdnxZ7sKU1fRMuiubSGUogmo6Dm3D0Gn/wz xI6XG8W6NKuNXaX9/MO42oVBYeQ50Xur0UpoEW2dyFwYaF5lXSbzjMEIY Bgxx9O/7IZoEmxbsnymG/2OnvD/8eSjWR+OrYlmbCd+oxHJbEyVMNaz4w cwpQVCikW5yxhCcQLcLEva0+eGzk4q6WTrAdo5xc20AH/Dx2SyHPxlFdg dAGgWckqVlfepXBsSzYztacnkH39FLDHxKzJ8DbxSp9+1oJRA9t0+MP5X g==; X-CSE-ConnectionGUID: G7xWs66XQuemimg9F3xMag== X-CSE-MsgGUID: nYNpoygJQvimgIZVY5I7QA== X-IronPort-AV: E=McAfee;i="6600,9927,11026"; a="17221538" X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="17221538" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="53821309" Received: from ssherman-mobl.amr.corp.intel.com (HELO pbossart-mobl6.intel.com) ([10.212.117.1]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:33 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Brent Lu , Bard Liao , Pierre-Louis Bossart Subject: [PATCH 11/18] ASoC: Intel: sof_rt5682: mach cleanup for tgl boards Date: Wed, 27 Mar 2024 11:24:01 -0500 Message-Id: <20240327162408.63953-12-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> References: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Brent Lu Add a common entry in enumeration table for all rt5682 boards with/without speaker amplifier. All other tgl_rt5682_def entries become redundant so get removed. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart --- .../intel/common/soc-acpi-intel-tgl-match.c | 50 +++++-------------- 1 file changed, 13 insertions(+), 37 deletions(-) diff --git a/sound/soc/intel/common/soc-acpi-intel-tgl-match.c b/sound/soc/intel/common/soc-acpi-intel-tgl-match.c index 77226d1eb1cf..161ba532d270 100644 --- a/sound/soc/intel/common/soc-acpi-intel-tgl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-tgl-match.c @@ -8,6 +8,7 @@ #include #include +#include #include "soc-acpi-intel-sdw-mockup-match.h" static const struct snd_soc_acpi_codecs essx_83x6 = { @@ -15,11 +16,6 @@ static const struct snd_soc_acpi_codecs essx_83x6 = { .codecs = { "ESSX8316", "ESSX8326", "ESSX8336"}, }; -static const struct snd_soc_acpi_codecs tgl_codecs = { - .num_codecs = 1, - .codecs = {"MX98357A"} -}; - static const struct snd_soc_acpi_endpoint single_endpoint = { .num = 0, .aggregated = 0, @@ -499,19 +495,9 @@ static const struct snd_soc_acpi_link_adr tgl_cs42l43_cs35l56[] = { {} }; -static const struct snd_soc_acpi_codecs tgl_max98373_amp = { - .num_codecs = 1, - .codecs = {"MX98373"} -}; - -static const struct snd_soc_acpi_codecs tgl_rt1011_amp = { - .num_codecs = 1, - .codecs = {"10EC1011"} -}; - static const struct snd_soc_acpi_codecs tgl_rt5682_rt5682s_hp = { .num_codecs = 2, - .codecs = {"10EC5682", "RTL5682"}, + .codecs = {RT5682_ACPI_HID, RT5682S_ACPI_HID}, }; static const struct snd_soc_acpi_codecs tgl_lt6911_hdmi = { @@ -520,27 +506,6 @@ static const struct snd_soc_acpi_codecs tgl_lt6911_hdmi = { }; struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_machines[] = { - { - .comp_ids = &tgl_rt5682_rt5682s_hp, - .drv_name = "tgl_rt5682_def", - .machine_quirk = snd_soc_acpi_codec_list, - .quirk_data = &tgl_codecs, - .sof_tplg_filename = "sof-tgl-max98357a-rt5682.tplg", - }, - { - .comp_ids = &tgl_rt5682_rt5682s_hp, - .drv_name = "tgl_rt5682_def", - .machine_quirk = snd_soc_acpi_codec_list, - .quirk_data = &tgl_max98373_amp, - .sof_tplg_filename = "sof-tgl-max98373-rt5682.tplg", - }, - { - .comp_ids = &tgl_rt5682_rt5682s_hp, - .drv_name = "tgl_rt5682_def", - .machine_quirk = snd_soc_acpi_codec_list, - .quirk_data = &tgl_rt1011_amp, - .sof_tplg_filename = "sof-tgl-rt1011-rt5682.tplg", - }, { .comp_ids = &essx_83x6, .drv_name = "sof-essx8336", @@ -549,6 +514,17 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_machines[] = { SND_SOC_ACPI_TPLG_INTEL_SSP_MSB | SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER, }, + /* place boards for each headphone codec: sof driver will complete the + * tplg name and machine driver will detect the amp type + */ + { + .comp_ids = &tgl_rt5682_rt5682s_hp, + .drv_name = "tgl_rt5682_def", + .sof_tplg_filename = "sof-tgl", /* the tplg suffix is added at run time */ + .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_AMP_NAME | + SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME, + }, + /* place amp-only boards in the end of table */ { .id = "10EC1308", .drv_name = "tgl_rt1308_hdmi_ssp", From patchwork Wed Mar 27 16:24:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 13607050 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (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 C7A201311A2 for ; Wed, 27 Mar 2024 16:24:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556677; cv=none; b=H8QU2A0eAXwYLLmHDZsXkW4ei3XLZxuQDXQMdJwa/mi5g9CZrz9z4HaUUyt92VLA2amov713y7tm4iQ7eliVl/JpO3ghkxuVvgjvIrNWA6SsBMPkHknl9NFE01Pn4dtoKQb5RL6vQDUsP3ICguwGdv6HBB+tCvkgUGtgvVZCwPI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556677; c=relaxed/simple; bh=L/rMKeb7bryjkvewzg2n9FkK/ylWO2IYooTwSLchRGY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Psio9Yh1nxPhJ3SivalcfEoGHkhZHxCFEM2tQnu0KNJOFjSDJOdkB6Uai/cKPHIHJNhwScS/UlhnTEz+swVsG5bykhM4MxQWTAbt6FSUu2QUj+9bzitw8b5XxWLi6igEMalhKDlW7W8ypo/MigQsmw0/yOmNZdO/S+gHko6mu3k= 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=RUYK1mf4; arc=none smtp.client-ip=198.175.65.11 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="RUYK1mf4" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711556676; x=1743092676; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=L/rMKeb7bryjkvewzg2n9FkK/ylWO2IYooTwSLchRGY=; b=RUYK1mf4Wr8Pg7hZEXIwZkaF+5sGjtVJaTHaEIjmBgUgjdV8qpuaiNos Ll8UbzOoMtNo6haILCL2+9BKy60IVXxNu3k7xn5/Upcom3V7m/w+H58FE JDduItwcUyppqLkUZu0EQqcp7ehOAPzRLIo71vRhhRg2ipYcel+T5m9Af p/475e2Fwl+dgrSlWW+AtwuQKUFE+pBSrfAsP8XkGHHmV7IgFTWzDlOwa 4vMc/+Hcbn4cdQw/0Hs0zlRJG4AI1BVTw00QEXDpxsdEogZr0G6wj5y1Q ubFYYwdj6KQYgivKsIwG6U+iG0LfazPFkuzqvBHh/SbF0nftZqZct3eEr w==; X-CSE-ConnectionGUID: tfVwICpHQSaj56lWkbwC2g== X-CSE-MsgGUID: LPaWZIxBR7qxm756J+SG1w== X-IronPort-AV: E=McAfee;i="6600,9927,11026"; a="17221545" X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="17221545" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="53821313" Received: from ssherman-mobl.amr.corp.intel.com (HELO pbossart-mobl6.intel.com) ([10.212.117.1]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:34 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Brent Lu , Bard Liao , Pierre-Louis Bossart Subject: [PATCH 12/18] ASoC: Intel: sof_rt5682: mach cleanup for adl boards Date: Wed, 27 Mar 2024 11:24:02 -0500 Message-Id: <20240327162408.63953-13-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> References: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Brent Lu Add two common entries in enumeration table for all rt5682/rt5650 boards with/without speaker amplifier. All other adl_rt5682_def entries become redundant so get removed. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart --- .../intel/common/soc-acpi-intel-adl-match.c | 71 ++++--------------- 1 file changed, 15 insertions(+), 56 deletions(-) diff --git a/sound/soc/intel/common/soc-acpi-intel-adl-match.c b/sound/soc/intel/common/soc-acpi-intel-adl-match.c index f8b8864b5ec6..9ac9310dd2be 100644 --- a/sound/soc/intel/common/soc-acpi-intel-adl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-adl-match.c @@ -448,11 +448,6 @@ static const struct snd_soc_acpi_link_adr adl_chromebook_base[] = { {} }; -static const struct snd_soc_acpi_codecs adl_max98373_amp = { - .num_codecs = 1, - .codecs = {"MX98373"} -}; - static const struct snd_soc_acpi_codecs adl_max98357a_amp = { .num_codecs = 1, .codecs = {"MX98357A"} @@ -465,7 +460,7 @@ static const struct snd_soc_acpi_codecs adl_max98360a_amp = { static const struct snd_soc_acpi_codecs adl_rt5682_rt5682s_hp = { .num_codecs = 2, - .codecs = {"10EC5682", "RTL5682"}, + .codecs = {RT5682_ACPI_HID, RT5682S_ACPI_HID}, }; static const struct snd_soc_acpi_codecs adl_rt1019p_amp = { @@ -473,29 +468,12 @@ static const struct snd_soc_acpi_codecs adl_rt1019p_amp = { .codecs = {"RTL1019"} }; -static const struct snd_soc_acpi_codecs adl_max98390_amp = { - .num_codecs = 1, - .codecs = {"MX98390"} -}; - static const struct snd_soc_acpi_codecs adl_lt6911_hdmi = { .num_codecs = 1, .codecs = {"INTC10B0"} }; -static struct snd_soc_acpi_codecs adl_rt5650_amp = { - .num_codecs = 1, - .codecs = {"10EC5650"} -}; - struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = { - { - .comp_ids = &adl_rt5682_rt5682s_hp, - .drv_name = "adl_rt5682_def", - .machine_quirk = snd_soc_acpi_codec_list, - .quirk_data = &adl_max98373_amp, - .sof_tplg_filename = "sof-adl-max98373-rt5682.tplg", - }, { .comp_ids = &adl_rt5682_rt5682s_hp, .drv_name = "adl_mx98357_rt5682", @@ -503,13 +481,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = { .quirk_data = &adl_max98357a_amp, .sof_tplg_filename = "sof-adl-max98357a-rt5682.tplg", }, - { - .comp_ids = &adl_rt5682_rt5682s_hp, - .drv_name = "adl_rt5682_def", - .machine_quirk = snd_soc_acpi_codec_list, - .quirk_data = &adl_max98360a_amp, - .sof_tplg_filename = "sof-adl-max98360a-rt5682.tplg", - }, { .id = "10508825", .drv_name = "adl_rt1019p_8825", @@ -517,20 +488,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = { .quirk_data = &adl_rt1019p_amp, .sof_tplg_filename = "sof-adl-rt1019-nau8825.tplg", }, - { - .comp_ids = &adl_rt5682_rt5682s_hp, - .drv_name = "adl_rt5682_def", - .machine_quirk = snd_soc_acpi_codec_list, - .quirk_data = &adl_rt1019p_amp, - .sof_tplg_filename = "sof-adl-rt1019-rt5682.tplg", - }, - { - .comp_ids = &adl_rt5682_rt5682s_hp, - .drv_name = "adl_rt5682_def", - .machine_quirk = snd_soc_acpi_codec_list, - .quirk_data = &adl_max98390_amp, - .sof_tplg_filename = "sof-adl-max98390-rt5682.tplg", - }, { .comp_ids = &adl_rt5682_rt5682s_hp, .drv_name = "adl_rt5682_c1_h02", @@ -538,11 +495,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = { .quirk_data = &adl_lt6911_hdmi, .sof_tplg_filename = "sof-adl-rt5682-ssp1-hdmi-ssp02.tplg", }, - { - .comp_ids = &adl_rt5682_rt5682s_hp, - .drv_name = "adl_rt5682_def", - .sof_tplg_filename = "sof-adl-rt5682.tplg", - }, { .id = "10134242", .drv_name = "adl_mx98360a_cs4242", @@ -565,13 +517,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = { SND_SOC_ACPI_TPLG_INTEL_SSP_MSB | SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER, }, - { - .id = "10EC5650", - .drv_name = "adl_rt5682_def", - .machine_quirk = snd_soc_acpi_codec_list, - .quirk_data = &adl_rt5650_amp, - .sof_tplg_filename = "sof-adl-rt5650.tplg", - }, { .id = "DLGS7219", .drv_name = "adl_da7219_def", @@ -589,6 +534,20 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = { .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_AMP_NAME | SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME, }, + { + .id = RT5650_ACPI_HID, + .drv_name = "adl_rt5682_def", + .sof_tplg_filename = "sof-adl", /* the tplg suffix is added at run time */ + .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_AMP_NAME | + SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME, + }, + { + .comp_ids = &adl_rt5682_rt5682s_hp, + .drv_name = "adl_rt5682_def", + .sof_tplg_filename = "sof-adl", /* the tplg suffix is added at run time */ + .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_AMP_NAME | + SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME, + }, /* place amp-only boards in the end of table */ { .id = "CSC3541", From patchwork Wed Mar 27 16:24:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 13607051 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (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 08C651304AD for ; Wed, 27 Mar 2024 16:24:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556677; cv=none; b=K+GWKFauOnND1rEmCgpJ0InMGykm6klWfADQFO/tNDJW0qNOwmVRJHRPlMCmeArRYvs2yd/UsTjKEr3SYep8qRIyJF9EMbS8WjQpo1L7qKHgNBXfWYuCJKIcnl1I+YvM9Py/mCJnCKbMHOGYwvivsz+Oy8RuiwQrHA8Sq5tAwLs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556677; c=relaxed/simple; bh=kBjilh3lBSecefNieVDjy8yvJNKSl/RKrX7Hlh67ag8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=iX/IZzueU6nhTt6q3IVS6HsT1xnkwhzK1pfAvlB/0nUXPDX+5Hz0n7EZqL4oMhMyQKBlgPqKWFLD+JxXG4NsaZfzPRaLMal3JgF7CYU6T21S7ncX/KdWyiNlybdH1igj1wumzC2uifgT8xDmGl7pQAzP+MHaQ7Tzlc48JGq7tWQ= 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=To/MZ3Dm; arc=none smtp.client-ip=198.175.65.11 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="To/MZ3Dm" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711556677; x=1743092677; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kBjilh3lBSecefNieVDjy8yvJNKSl/RKrX7Hlh67ag8=; b=To/MZ3DmuOozRKuXOFS6u3Hc7+aedJCV1sbyTH+Oi+K1GAoGA2UiZzO4 FThyqjEaKn5eCGepBgZ7iBtJ0Eh4H9SRNOGzzPEJQl6wRmBWHKlXPkrc0 UHxQ8U0O0/4yusYat8kjE3HPdnX+krjU8FmnZwZRFYH7Q6LdWacH9ZFoH ahvKbhQb1vhhhGkMgLzzHIjzVKmstQg5WegPbrXhDsiY8fuN6LD7g6xrG LjYFPg/4RuiW/+DFNVa0YWdrn3mazxfx2W6JIlzqlTm3SZzAN39g+jl3f mqbcGtBc8/WRZ1/4oZys23oh/6qf6qyFJL3SIAuuCd5pO7uQrBVVId6BH w==; X-CSE-ConnectionGUID: LuqFqkFJSc2+cI3BmzqPHw== X-CSE-MsgGUID: QmAERnvmTUmzDnNmplHR5Q== X-IronPort-AV: E=McAfee;i="6600,9927,11026"; a="17221551" X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="17221551" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="53821319" Received: from ssherman-mobl.amr.corp.intel.com (HELO pbossart-mobl6.intel.com) ([10.212.117.1]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:34 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Brent Lu , Bard Liao , Pierre-Louis Bossart Subject: [PATCH 13/18] ASoC: Intel: sof_rt5682: mach cleanup for rpl boards Date: Wed, 27 Mar 2024 11:24:03 -0500 Message-Id: <20240327162408.63953-14-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> References: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Brent Lu Add two common entries in enumeration table for all rt5682/rt5650 boards with/without speaker amplifier. All other rpl_rt5682_def entries become redundant so get removed. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart --- .../intel/common/soc-acpi-intel-rpl-match.c | 40 +++++++------------ 1 file changed, 15 insertions(+), 25 deletions(-) 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 44be9077b4e0..e28a21667780 100644 --- a/sound/soc/intel/common/soc-acpi-intel-rpl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-rpl-match.c @@ -348,7 +348,7 @@ static const struct snd_soc_acpi_link_adr rplp_crb[] = { static const struct snd_soc_acpi_codecs rpl_rt5682_hp = { .num_codecs = 2, - .codecs = {"10EC5682", "RTL5682"}, + .codecs = {RT5682_ACPI_HID, RT5682S_ACPI_HID}, }; static const struct snd_soc_acpi_codecs rpl_essx_83x6 = { @@ -371,11 +371,6 @@ static const struct snd_soc_acpi_codecs rpl_lt6911_hdmi = { .codecs = {"INTC10B0"} }; -static const struct snd_soc_acpi_codecs rpl_rt1019p_amp = { - .num_codecs = 1, - .codecs = {"RTL1019"} -}; - struct snd_soc_acpi_mach snd_soc_acpi_intel_rpl_machines[] = { { .comp_ids = &rpl_rt5682_hp, @@ -384,20 +379,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_rpl_machines[] = { .quirk_data = &rpl_max98357a_amp, .sof_tplg_filename = "sof-rpl-max98357a-rt5682.tplg", }, - { - .comp_ids = &rpl_rt5682_hp, - .drv_name = "rpl_rt5682_def", - .machine_quirk = snd_soc_acpi_codec_list, - .quirk_data = &rpl_max98360a_amp, - .sof_tplg_filename = "sof-rpl-max98360a-rt5682.tplg", - }, - { - .comp_ids = &rpl_rt5682_hp, - .drv_name = "rpl_rt5682_def", - .machine_quirk = snd_soc_acpi_codec_list, - .quirk_data = &rpl_rt1019p_amp, - .sof_tplg_filename = "sof-rpl-rt1019-rt5682.tplg", - }, { .comp_ids = &rpl_rt5682_hp, .drv_name = "rpl_rt5682_c1_h02", @@ -430,6 +411,20 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_rpl_machines[] = { .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_AMP_NAME | SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME, }, + { + .id = RT5650_ACPI_HID, + .drv_name = "rpl_rt5682_def", + .sof_tplg_filename = "sof-rpl", /* the tplg suffix is added at run time */ + .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_AMP_NAME | + SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME, + }, + { + .comp_ids = &rpl_rt5682_hp, + .drv_name = "rpl_rt5682_def", + .sof_tplg_filename = "sof-rpl", /* the tplg suffix is added at run time */ + .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_AMP_NAME | + SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME, + }, /* place amp-only boards in the end of table */ { .id = "INTC10B0", @@ -443,11 +438,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_rpl_machines[] = { .quirk_data = &rpl_max98360a_amp, .sof_tplg_filename = "sof-rpl-max98360a-da7219.tplg", }, - { - .id = "10EC5650", - .drv_name = "rpl_rt5682_def", - .sof_tplg_filename = "sof-rpl-rt5650.tplg", - }, {}, }; EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_rpl_machines); From patchwork Wed Mar 27 16:24:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 13607053 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (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 C0EB01311BB for ; Wed, 27 Mar 2024 16:24:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556680; cv=none; b=M99uY1y8Y9yyIEgPKjlpunp5VKpv0rKP1ezRaUexItMP40He1NMrdboxAO+fZKD1zdIZC9EkfpyRVCojlC1JadPYXnNuqqyI2RABREUIx4RPZ3b0vjryqe74UNucNDZ0x6eckXkHq46R9OEi5ShAbskdhOzhtnWkGIRD33+e7Ro= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556680; c=relaxed/simple; bh=Ir7vtaKEGyf7DswIMMovVREmiqNtlXRIc3iQIBZQ54k=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Ff1KVkMFO2kbsbj5G8C+0QXOZU0un8UCf+2v5puBcqwg2E5xXLJ1wPk0BFKL/8R7KcgUBeMIk7qHXbixANQvyPrSZXlrjaGv2KZDxB6zBUhu9Eb8lwpbJuS2OTyfOX/3Cc5D1EZ04Ig7BLMutm9VpOnYkgpk8uCxPfvs4dXtByY= 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=PySk6zaE; arc=none smtp.client-ip=198.175.65.11 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="PySk6zaE" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711556677; x=1743092677; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Ir7vtaKEGyf7DswIMMovVREmiqNtlXRIc3iQIBZQ54k=; b=PySk6zaEVI2UQCiOhXjmfLiUgdsb7EZKF5fXfLIJCMDC+qlwKBgw5JMJ irdmjBeiiRVHqguOpIlvR6w9QBQbaA9EPoqzIgnx979O5ig9SfmzHzzHu RWRBNPIj4BV74k2iE7mNgF+rBKsovHGh8CJcf26T56/k99Ue34xaTKH0R 8CgM0BRAKSrRXjeHm7MwFg4pt6ngVX5r2Fhxe+npyiCwc4PZ1HWJzhSfH HkVfWzLuNIA5myF1YFxCly405iZKjvDHwvP8VkRHnVwN0XJXqcpjwjCs3 /6fXVkelKadxc+UhiK54gxiTFDyThFamLF4mpUz9l256emfID2DR/INK+ Q==; X-CSE-ConnectionGUID: UY/J9RXgSpeejhewuVrU+w== X-CSE-MsgGUID: C5E+6Ku/QLivnOtvUOwC6g== X-IronPort-AV: E=McAfee;i="6600,9927,11026"; a="17221558" X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="17221558" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="53821328" Received: from ssherman-mobl.amr.corp.intel.com (HELO pbossart-mobl6.intel.com) ([10.212.117.1]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:35 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Brent Lu , Bard Liao , Pierre-Louis Bossart Subject: [PATCH 14/18] ASoC: Intel: sof_rt5682: mach cleanup for mtl boards Date: Wed, 27 Mar 2024 11:24:04 -0500 Message-Id: <20240327162408.63953-15-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> References: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Brent Lu Add two common entries in enumeration table for all rt5682/rt5650 boards with/without speaker amplifier. All other mtl_rt5682_def entries become redundant so get removed. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart --- .../intel/common/soc-acpi-intel-mtl-match.c | 40 +++++++------------ 1 file changed, 15 insertions(+), 25 deletions(-) diff --git a/sound/soc/intel/common/soc-acpi-intel-mtl-match.c b/sound/soc/intel/common/soc-acpi-intel-mtl-match.c index 0125e81af9e1..7f422848a3ba 100644 --- a/sound/soc/intel/common/soc-acpi-intel-mtl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-mtl-match.c @@ -21,14 +21,9 @@ static const struct snd_soc_acpi_codecs mtl_max98360a_amp = { .codecs = {"MX98360A"} }; -static const struct snd_soc_acpi_codecs mtl_rt1019p_amp = { - .num_codecs = 1, - .codecs = {"RTL1019"} -}; - static const struct snd_soc_acpi_codecs mtl_rt5682_rt5682s_hp = { .num_codecs = 2, - .codecs = {"10EC5682", "RTL5682"}, + .codecs = {RT5682_ACPI_HID, RT5682S_ACPI_HID}, }; static const struct snd_soc_acpi_codecs mtl_essx_83x6 = { @@ -41,11 +36,6 @@ static const struct snd_soc_acpi_codecs mtl_lt6911_hdmi = { .codecs = {"INTC10B0"} }; -static const struct snd_soc_acpi_codecs mtl_rt5650_amp = { - .num_codecs = 1, - .codecs = {"10EC5650"} -}; - struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_machines[] = { { .comp_ids = &mtl_rt5682_rt5682s_hp, @@ -61,13 +51,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_machines[] = { .quirk_data = &mtl_max98360a_amp, .sof_tplg_filename = "sof-mtl-max98360a-rt5682.tplg", }, - { - .comp_ids = &mtl_rt5682_rt5682s_hp, - .drv_name = "mtl_rt5682_def", - .machine_quirk = snd_soc_acpi_codec_list, - .quirk_data = &mtl_rt1019p_amp, - .sof_tplg_filename = "sof-mtl-rt1019-rt5682.tplg", - }, { .comp_ids = &mtl_essx_83x6, .drv_name = "mtl_es83x6_c1_h02", @@ -83,13 +66,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_machines[] = { SND_SOC_ACPI_TPLG_INTEL_SSP_MSB | SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER, }, - { - .id = "10EC5650", - .drv_name = "mtl_rt5682_def", - .machine_quirk = snd_soc_acpi_codec_list, - .quirk_data = &mtl_rt5650_amp, - .sof_tplg_filename = "sof-mtl-rt5650.tplg", - }, /* place boards for each headphone codec: sof driver will complete the * tplg name and machine driver will detect the amp type */ @@ -100,6 +76,20 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_machines[] = { .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_AMP_NAME | SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME, }, + { + .id = RT5650_ACPI_HID, + .drv_name = "mtl_rt5682_def", + .sof_tplg_filename = "sof-mtl", /* the tplg suffix is added at run time */ + .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_AMP_NAME | + SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME, + }, + { + .comp_ids = &mtl_rt5682_rt5682s_hp, + .drv_name = "mtl_rt5682_def", + .sof_tplg_filename = "sof-mtl", /* the tplg suffix is added at run time */ + .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_AMP_NAME | + SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME, + }, /* place amp-only boards in the end of table */ { .id = "INTC10B0", From patchwork Wed Mar 27 16:24:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 13607055 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (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 562F7130E3C for ; Wed, 27 Mar 2024 16:24:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556680; cv=none; b=uPr2gMyd9PAqGWvXYmDPZQYbvKjm9FbZhGwyu33MpKVE/Jg+ART4lQ+x8fTVoN+QnFLWxexesdiuGp38V/Jahudt8NtsH5g/+9m/FuHdBfFzKeBXHApcJtF98UpPOGDuIkynacg61dXwEfum57zaxoMF/ETv7Ssi4vNREfOVyOQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556680; c=relaxed/simple; bh=yo1S20Nb/qbRVE550kkoA7HJaQ0Sj7F5P9mjlosdfF0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qK4vNqxF7R9PoHdiZdCqIOVLURL7cEn19ndWt5N+1ynpIBkIjbzSW5UX5/79EMmS5W10hKqiY5fDUjUENCv+jMTek7ZDI/OS2CJq3jCQPmsQ5IW9dStVR2kufTnAhoYIvn4IBt/fHQEwz5rxDgvYzi2dSaUsgpKinRUxr4CiNcA= 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=Trk6tGXP; arc=none smtp.client-ip=198.175.65.11 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="Trk6tGXP" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711556678; x=1743092678; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=yo1S20Nb/qbRVE550kkoA7HJaQ0Sj7F5P9mjlosdfF0=; b=Trk6tGXPZlYihfMrOY/BlEU8tPcwQignk+VDAsl3aJNCPSgxwAy/iEy3 QHRYD5Nzib3MXbYs77Ryaai0Al0rZMASnuLmxV/uBGnqSFIqbESRdHlhl /plEF/7FxwsFwH+IRo5eyD2NShe67QEawx8il99PMKsRtSTUQR3P1rfE5 ZI+k4wQ7p1gcXmhG5Ljtt0OnKXx+yPwL1MOQUoIf3sR26Wm9JT5/bm+xL DQIC5cA0xNaeOR3CSeJSAdlQxlleFluSl7Ewu2Fw2Mr67GPaAs2d8nKwA lHKeadvcSsyKfkrLYVSwTtP9JHe5emCB0up0AkcQGxkOKIlOTLW/tt/4F w==; X-CSE-ConnectionGUID: 5WKCbbs/QbG0hYg7Cq9r0g== X-CSE-MsgGUID: oxVt3vvmSreu8J5TcbmBug== X-IronPort-AV: E=McAfee;i="6600,9927,11026"; a="17221566" X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="17221566" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="53821337" Received: from ssherman-mobl.amr.corp.intel.com (HELO pbossart-mobl6.intel.com) ([10.212.117.1]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:36 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Brent Lu , Bard Liao , Pierre-Louis Bossart Subject: [PATCH 15/18] ASoC: Intel: sof_cs42l42: board id cleanup for adl boards Date: Wed, 27 Mar 2024 11:24:05 -0500 Message-Id: <20240327162408.63953-16-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> References: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Brent Lu Introduce "adl_cs42l42_def" for adl boards which implement headphone codec on SSP0 and speaker amplifiers on SSP1. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart --- sound/soc/intel/boards/sof_cs42l42.c | 2 +- sound/soc/intel/common/soc-acpi-intel-adl-match.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/intel/boards/sof_cs42l42.c b/sound/soc/intel/boards/sof_cs42l42.c index 40ecfeaa1d26..8a2833a0e3c5 100644 --- a/sound/soc/intel/boards/sof_cs42l42.c +++ b/sound/soc/intel/boards/sof_cs42l42.c @@ -263,7 +263,7 @@ static const struct platform_device_id board_ids[] = { SOF_SSP_PORT_AMP(1)), }, { - .name = "adl_mx98360a_cs4242", + .name = "adl_cs42l42_def", .driver_data = (kernel_ulong_t)(SOF_SSP_PORT_CODEC(0) | SOF_SSP_PORT_AMP(1) | SOF_NUM_IDISP_HDMI(4) | diff --git a/sound/soc/intel/common/soc-acpi-intel-adl-match.c b/sound/soc/intel/common/soc-acpi-intel-adl-match.c index 9ac9310dd2be..7977a6fb9a5c 100644 --- a/sound/soc/intel/common/soc-acpi-intel-adl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-adl-match.c @@ -497,7 +497,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = { }, { .id = "10134242", - .drv_name = "adl_mx98360a_cs4242", + .drv_name = "adl_cs42l42_def", .machine_quirk = snd_soc_acpi_codec_list, .quirk_data = &adl_max98360a_amp, .sof_tplg_filename = "sof-adl-max98360a-cs42l42.tplg", From patchwork Wed Mar 27 16:24:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 13607052 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (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 83761131734 for ; Wed, 27 Mar 2024 16:24:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556678; cv=none; b=KwCsV6V4oBDpk05Kl3xZAvBYGwe77RrbszABazG/Q9QVrvuowBoE/TbjuBIYQAMrgxsq7Lep9BYYkIebbIVsDjQvMIrYXVNAhO3iQLDcVLXFbrCYbMNwh9EG45GrrH540qgsGsPBoiKzucooMV6bSXURHdiYLAZ525NqKKEzMaM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556678; c=relaxed/simple; bh=k4DX4gn64X3zpa0wG4xldGenu8XVSNu55Cuza/XVQds=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BXmcBhxG96CFEeMaNqQrekvNdLNGSA676It/W8AhZsZulSz1sWeZelsosrFQwPCtAy1u+nqthGzQKayAp/otahHUunvLMlebNyo23X6BFYsxsfvwQl7+HAwKOqcLcBbOdE27wXNqPYDtkZ/tkEZQxrlaT3XYHuVUVpjORydnN1Y= 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=ihKSpGnl; arc=none smtp.client-ip=198.175.65.11 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="ihKSpGnl" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711556678; x=1743092678; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=k4DX4gn64X3zpa0wG4xldGenu8XVSNu55Cuza/XVQds=; b=ihKSpGnlo9fBef0L1AlWLyFz9YMHx2sMrwjHKwazeeprnF9nqdsC8YXb 4TRG+ql5JHfRcLxxZ+Iz5aQOwnfuMl1+aoS4zpHsIN4EhSs4Az7PwuE9a TKvw4Ifss6X58Bve68LoN1z4Mlb8vzoH6B+l4odn/A3bvwZePA5VSa2u0 Zr2NeHjtc/PF1ORV6tjOTmdbx21/gzHibGkrsuJ9Y8/8RRbLYrCeFERwG 6fewaLNAT0VCNB6QkneU7MBgiSw8T9875Rw5PUTA7zoodDFs4aSYgeB4W bZ4gKCPWhuf5Zwfz+F11P9YGHOZpYRJKXHoqV9VaHQo+WS2IiP+oGU+yj w==; X-CSE-ConnectionGUID: PaXeokuuS2y3isqkk4LF3Q== X-CSE-MsgGUID: rDQYUfB3RDWdNCv0OlohIw== X-IronPort-AV: E=McAfee;i="6600,9927,11026"; a="17221571" X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="17221571" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="53821345" Received: from ssherman-mobl.amr.corp.intel.com (HELO pbossart-mobl6.intel.com) ([10.212.117.1]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:37 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Brent Lu , Bard Liao , Pierre-Louis Bossart Subject: [PATCH 16/18] ASoC: Intel: sof_cs42l42: mach cleanup for adl boards Date: Wed, 27 Mar 2024 11:24:06 -0500 Message-Id: <20240327162408.63953-17-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> References: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Brent Lu Add a common entry in enumeration table for all cs42l42 boards with/without speaker amplifier. All other adl_cs42l42_def entries become redundant so get removed. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart --- sound/soc/intel/common/soc-acpi-intel-adl-match.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sound/soc/intel/common/soc-acpi-intel-adl-match.c b/sound/soc/intel/common/soc-acpi-intel-adl-match.c index 7977a6fb9a5c..1ea2d9c582ee 100644 --- a/sound/soc/intel/common/soc-acpi-intel-adl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-adl-match.c @@ -495,13 +495,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = { .quirk_data = &adl_lt6911_hdmi, .sof_tplg_filename = "sof-adl-rt5682-ssp1-hdmi-ssp02.tplg", }, - { - .id = "10134242", - .drv_name = "adl_cs42l42_def", - .machine_quirk = snd_soc_acpi_codec_list, - .quirk_data = &adl_max98360a_amp, - .sof_tplg_filename = "sof-adl-max98360a-cs42l42.tplg", - }, { .comp_ids = &essx_83x6, .drv_name = "adl_es83x6_c1_h02", @@ -527,6 +520,13 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = { /* place boards for each headphone codec: sof driver will complete the * tplg name and machine driver will detect the amp type */ + { + .id = CS42L42_ACPI_HID, + .drv_name = "adl_cs42l42_def", + .sof_tplg_filename = "sof-adl", /* the tplg suffix is added at run time */ + .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_AMP_NAME | + SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME, + }, { .id = NAU8825_ACPI_HID, .drv_name = "adl_nau8825_def", From patchwork Wed Mar 27 16:24:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 13607054 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (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 1192F131196 for ; Wed, 27 Mar 2024 16:24:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556680; cv=none; b=BL8ctKVXTd2SyuyX/+s7BViggp0r8uKYDI7IijM3KwrZ9yPbLAF3bfcmHmv9vja069evsDWntKvL2SwPEadRqyzlCJwdLW22W2DLIRgzkhinDWJvMXRhVraSMsM2/vs4HclIrG8qlpDxr/HH1epkocP+WWeDbtPkZbUdsNhOuXI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556680; c=relaxed/simple; bh=cOyf6fdZwa3ljk1RfWn3pKTRNtto1U1plCa6n3+94CY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ec77iRZwq1uSyd80U/MWcz7Jtbin+RJF4pvrij/qs7HoCelLp6KUXn2K6YuBMBl4oP5v8m3QoL+8ulxf3TgHdZldSUxpDfBFwLxLFZh3J582dArMITVEbDL67z+jeJwQfV5pwUGA49C3m+fpP63Eb5GF8zSqgSpBYFhS+kXrgSQ= 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=W1vz8teK; arc=none smtp.client-ip=198.175.65.11 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="W1vz8teK" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711556680; x=1743092680; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cOyf6fdZwa3ljk1RfWn3pKTRNtto1U1plCa6n3+94CY=; b=W1vz8teK2buhMBbXNgvVocY3f32+FHbkZh1jtujasn7/YaLSAVpNSXp7 Anr2L4y6h/g7K3gCI4SjqO9I8aVyiKBT9IU5aEOgqWlXK8zEdTFk/MbMH STfEHU+mVcFcdxkO2LxE2oLlp2CHdamiY8QnaRTjGUcWYbOIs9IDdFz/u pQRn0g+Ydh3EKgorSfiOjJ2kWQri9ayGnrNpwxGF4mT/Wj490rS8JbTug bXkx813QCeBy0AAst88fOwMypB2hK4/wupKzg50c1anOhmhwXrQoCPj5L 4oD83RdQMFTDwohWc1LaHVk7VVK6JNY7wNdHYDNBCyEHopLECB77scU9R g==; X-CSE-ConnectionGUID: bd6UtIegQua8I9FXAE/+Aw== X-CSE-MsgGUID: SbJHy9w7RreuhNmQV6XSAA== X-IronPort-AV: E=McAfee;i="6600,9927,11026"; a="17221576" X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="17221576" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="53821350" Received: from ssherman-mobl.amr.corp.intel.com (HELO pbossart-mobl6.intel.com) ([10.212.117.1]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:37 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Brent Lu , Bard Liao , Pierre-Louis Bossart Subject: [PATCH 17/18] ASoC: Intel: sof_cs42l42: add rpl_cs42l42_def for rpl boards Date: Wed, 27 Mar 2024 11:24:07 -0500 Message-Id: <20240327162408.63953-18-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> References: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Brent Lu Add the board config rpl_cs42l42_def to cs42l42 machine driver for all rpl boards using default SSP port allocation (headphone codec on SSP0, speaker amplifiers on SSP1, and BT offload on SSP2). Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart --- sound/soc/intel/boards/sof_cs42l42.c | 8 ++++++++ sound/soc/intel/common/soc-acpi-intel-rpl-match.c | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/sound/soc/intel/boards/sof_cs42l42.c b/sound/soc/intel/boards/sof_cs42l42.c index 8a2833a0e3c5..3fc76184bdb3 100644 --- a/sound/soc/intel/boards/sof_cs42l42.c +++ b/sound/soc/intel/boards/sof_cs42l42.c @@ -270,6 +270,14 @@ static const struct platform_device_id board_ids[] = { SOF_BT_OFFLOAD_PRESENT | SOF_SSP_PORT_BT_OFFLOAD(2)), }, + { + .name = "rpl_cs42l42_def", + .driver_data = (kernel_ulong_t)(SOF_SSP_PORT_CODEC(0) | + SOF_SSP_PORT_AMP(1) | + SOF_NUM_IDISP_HDMI(4) | + SOF_BT_OFFLOAD_PRESENT | + SOF_SSP_PORT_BT_OFFLOAD(2)), + }, { } }; MODULE_DEVICE_TABLE(platform, board_ids); 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 e28a21667780..34588db6138a 100644 --- a/sound/soc/intel/common/soc-acpi-intel-rpl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-rpl-match.c @@ -404,6 +404,13 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_rpl_machines[] = { /* place boards for each headphone codec: sof driver will complete the * tplg name and machine driver will detect the amp type */ + { + .id = CS42L42_ACPI_HID, + .drv_name = "rpl_cs42l42_def", + .sof_tplg_filename = "sof-rpl", /* the tplg suffix is added at run time */ + .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_AMP_NAME | + SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME, + }, { .id = NAU8825_ACPI_HID, .drv_name = "rpl_nau8825_def", From patchwork Wed Mar 27 16:24:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 13607056 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (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 3095F1311B3 for ; Wed, 27 Mar 2024 16:24:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556681; cv=none; b=QrcaALP1viWk6Exk3iSLuV7YmTCKvypaVGW/3FQsoYlUC3vAQOIutaCJ+ey1dDaqJ/fvhlbXBRcCwuo05uA9FsFoHL9iMe27gxUWcElvzH+JrYh7cACf7D5pp2CSQgFVhgd8Iq5sjcUUsps2VZHm2wX6AxwlE1Ue+QpNnmvckr4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556681; c=relaxed/simple; bh=Et/Bpq0RKd9eLmA9c0OeqzY3evz0f/slQrkvVBl7WcY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=DWvRmKNJ+lcxPu4xEiAOTqGrVTB+raP+wSxhz5I0qGs+BN9lJ20v/4u8bZxHFWYAkYSiB4RQEvSvm3MWmu2Xke0icans0At2LDM2YpKchN4PYKIhe9eKF83x2zoeii96hvqVXxIH/ti5Q92N9SXkOXB3ziYZAxpwy8IpLWuPWqY= 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=dAXrgn2t; arc=none smtp.client-ip=198.175.65.11 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="dAXrgn2t" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711556681; x=1743092681; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Et/Bpq0RKd9eLmA9c0OeqzY3evz0f/slQrkvVBl7WcY=; b=dAXrgn2tCOU6Me035Qosx9NBJRS58BsVtlGzlJuDjTopckpKG5nfuomn /J1B5d/u4sGja8XY8wS97lmGeLjWuMyLjkj0H6dDfPZfAvmmAKMK6fCVo yX8Eqyycd7P7oXAO3LKGZ/5GpUuyirlDdC5hgmCvztp4YERlKC3JTLYS6 k0qGUTigelWlE3j2E7FUhUxc0DZ92g9gDl8AebZCYwc2L3XoBnCD24G71 zUUhfe1oAT8WwJdLRsXIfMpWtgSx1YzOeUe5jgtECk+0eHvEp7loUV/Hl y+fRTSwgGXWvoyZFrKr5odX+v8GwtJm2/jkWM8ae4rwBGSd8+typFeuyS w==; X-CSE-ConnectionGUID: aE+edwVOSJyZaUtW59kx+g== X-CSE-MsgGUID: 9VEXV47ZRJqHcepBKE5YxA== X-IronPort-AV: E=McAfee;i="6600,9927,11026"; a="17221581" X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="17221581" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="53821356" Received: from ssherman-mobl.amr.corp.intel.com (HELO pbossart-mobl6.intel.com) ([10.212.117.1]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:38 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Brent Lu , Bard Liao , Pierre-Louis Bossart Subject: [PATCH 18/18] ASoC: Intel: sof_cs42l42: add mtl_cs42l42_def for mtl boards Date: Wed, 27 Mar 2024 11:24:08 -0500 Message-Id: <20240327162408.63953-19-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> References: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Brent Lu Add the board config mtl_cs42l42_def to cs42l42 machine driver for all mtl boards using default SSP port allocation (headphone codec on SSP2, speaker amplifiers on SSP0, and BT offload on SSP1). Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart --- sound/soc/intel/boards/sof_cs42l42.c | 7 +++++++ sound/soc/intel/common/soc-acpi-intel-mtl-match.c | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/sound/soc/intel/boards/sof_cs42l42.c b/sound/soc/intel/boards/sof_cs42l42.c index 3fc76184bdb3..f4fee2ee0d63 100644 --- a/sound/soc/intel/boards/sof_cs42l42.c +++ b/sound/soc/intel/boards/sof_cs42l42.c @@ -278,6 +278,13 @@ static const struct platform_device_id board_ids[] = { SOF_BT_OFFLOAD_PRESENT | SOF_SSP_PORT_BT_OFFLOAD(2)), }, + { + .name = "mtl_cs42l42_def", + .driver_data = (kernel_ulong_t)(SOF_SSP_PORT_CODEC(2) | + SOF_SSP_PORT_AMP(0) | + SOF_BT_OFFLOAD_PRESENT | + SOF_SSP_PORT_BT_OFFLOAD(1)), + }, { } }; MODULE_DEVICE_TABLE(platform, board_ids); diff --git a/sound/soc/intel/common/soc-acpi-intel-mtl-match.c b/sound/soc/intel/common/soc-acpi-intel-mtl-match.c index 7f422848a3ba..75935b454e5d 100644 --- a/sound/soc/intel/common/soc-acpi-intel-mtl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-mtl-match.c @@ -69,6 +69,13 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_machines[] = { /* place boards for each headphone codec: sof driver will complete the * tplg name and machine driver will detect the amp type */ + { + .id = CS42L42_ACPI_HID, + .drv_name = "mtl_cs42l42_def", + .sof_tplg_filename = "sof-mtl", /* the tplg suffix is added at run time */ + .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_AMP_NAME | + SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME, + }, { .id = NAU8825_ACPI_HID, .drv_name = "mtl_nau8825_def",