All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: linux-sound@vger.kernel.org
Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org,
	Brent Lu <brent.lu@intel.com>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Subject: [PATCH 03/18] ASoC: Intel: ssp-common: naming convention change
Date: Wed, 27 Mar 2024 11:23:53 -0500	[thread overview]
Message-ID: <20240327162408.63953-4-pierre-louis.bossart@linux.intel.com> (raw)
In-Reply-To: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com>

From: Brent Lu <brent.lu@intel.com>

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 <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 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 <brent.lu@intel.com>");
-- 
2.40.1


  parent reply	other threads:[~2024-03-27 16:24 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-27 16:23 [PATCH 00/18] ASoC: Intel: boards: updates for 6.10 - part3 Pierre-Louis Bossart
2024-03-27 16:23 ` [PATCH 01/18] ASoC: Intel: ssp-common: relocate source file Pierre-Louis Bossart
2024-03-27 16:23 ` [PATCH 02/18] ASoC: Intel: ssp-common: relocate header file Pierre-Louis Bossart
2024-03-27 16:23 ` Pierre-Louis Bossart [this message]
2024-03-27 16:23 ` [PATCH 04/18] ASoC: Intel: ssp-common: module name change Pierre-Louis Bossart
2024-03-27 16:23 ` [PATCH 05/18] ASoC: Intel: ssp-common: delete module Pierre-Louis Bossart
2024-03-27 16:23 ` [PATCH 06/18] ASoC: Intel: ssp-common: get codec tplg suffix function Pierre-Louis Bossart
2024-03-27 16:23 ` [PATCH 07/18] ASoC: SOF: Intel: support tplg suffix detection Pierre-Louis Bossart
2024-03-27 16:23 ` [PATCH 08/18] ASoC: Intel: sof_nau8825: mach cleanup for adl boards Pierre-Louis Bossart
2024-03-27 16:23 ` [PATCH 09/18] ASoC: Intel: sof_nau8825: mach cleanup for rpl boards Pierre-Louis Bossart
2024-03-27 16:24 ` [PATCH 10/18] ASoC: Intel: sof_nau8825: add mtl_nau8825_def for mtl boards Pierre-Louis Bossart
2024-03-27 16:24 ` [PATCH 11/18] ASoC: Intel: sof_rt5682: mach cleanup for tgl boards Pierre-Louis Bossart
2024-03-27 16:24 ` [PATCH 12/18] ASoC: Intel: sof_rt5682: mach cleanup for adl boards Pierre-Louis Bossart
2024-03-27 16:24 ` [PATCH 13/18] ASoC: Intel: sof_rt5682: mach cleanup for rpl boards Pierre-Louis Bossart
2024-03-27 16:24 ` [PATCH 14/18] ASoC: Intel: sof_rt5682: mach cleanup for mtl boards Pierre-Louis Bossart
2024-03-27 16:24 ` [PATCH 15/18] ASoC: Intel: sof_cs42l42: board id cleanup for adl boards Pierre-Louis Bossart
2024-03-27 16:24 ` [PATCH 16/18] ASoC: Intel: sof_cs42l42: mach " Pierre-Louis Bossart
2024-03-27 16:24 ` [PATCH 17/18] ASoC: Intel: sof_cs42l42: add rpl_cs42l42_def for rpl boards Pierre-Louis Bossart
2024-03-27 16:24 ` [PATCH 18/18] ASoC: Intel: sof_cs42l42: add mtl_cs42l42_def for mtl boards Pierre-Louis Bossart
2024-03-29 12:33 ` [PATCH 00/18] ASoC: Intel: boards: updates for 6.10 - part3 Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240327162408.63953-4-pierre-louis.bossart@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=brent.lu@intel.com \
    --cc=broonie@kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.