Commit a17fea38 authored by Brent Lu's avatar Brent Lu Committed by Mark Brown

ASoC: Intel: ssp-common: naming convention change

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: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: default avatarBrent Lu <brent.lu@intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://msgid.link/r/20240327162408.63953-4-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent bd1222ad
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* Copyright(c) 2023 Intel Corporation. * Copyright(c) 2023 Intel Corporation.
*/ */
#ifndef __SOF_SSP_COMMON_H #ifndef __LINUX_SND_SOC_ACPI_INTEL_SSP_COMMON_H
#define __SOF_SSP_COMMON_H #define __LINUX_SND_SOC_ACPI_INTEL_SSP_COMMON_H
/* Cirrus Logic */ /* Cirrus Logic */
#define CS35L41_ACPI_HID "CSC3541" #define CS35L41_ACPI_HID "CSC3541"
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#define RT5682_ACPI_HID "10EC5682" #define RT5682_ACPI_HID "10EC5682"
#define RT5682S_ACPI_HID "RTL5682" #define RT5682S_ACPI_HID "RTL5682"
enum sof_ssp_codec { enum snd_soc_acpi_intel_codec {
CODEC_NONE, CODEC_NONE,
/* headphone codec */ /* headphone codec */
...@@ -65,9 +65,12 @@ enum sof_ssp_codec { ...@@ -65,9 +65,12 @@ enum sof_ssp_codec {
CODEC_RT1308, CODEC_RT1308,
}; };
enum sof_ssp_codec sof_ssp_detect_codec_type(struct device *dev); enum snd_soc_acpi_intel_codec
enum sof_ssp_codec sof_ssp_detect_amp_type(struct device *dev); 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 */
...@@ -103,13 +103,13 @@ static struct snd_soc_dai_link_component platform_component[] = { ...@@ -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, 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) int ssp_codec)
{ {
struct snd_soc_dai_link_component *cpus; struct snd_soc_dai_link_component *cpus;
dev_dbg(dev, "link %d: ssp codec %s, ssp %d\n", be_id, 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 */
link->name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d-Codec", ssp_codec); 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 ...@@ -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, 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; struct snd_soc_dai_link_component *cpus;
dev_dbg(dev, "link %d: ssp amp %s, ssp %d\n", be_id, 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 */
link->name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d-Codec", ssp_amp); 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) ...@@ -598,8 +599,8 @@ sof_intel_board_get_ctx(struct device *dev, unsigned long board_quirk)
if (!ctx) if (!ctx)
return NULL; return NULL;
ctx->codec_type = sof_ssp_detect_codec_type(dev); ctx->codec_type = snd_soc_acpi_intel_detect_codec_type(dev);
ctx->amp_type = sof_ssp_detect_amp_type(dev); ctx->amp_type = snd_soc_acpi_intel_detect_amp_type(dev);
ctx->dmic_be_num = 2; ctx->dmic_be_num = 2;
ctx->hdmi_num = (board_quirk & SOF_NUM_IDISP_HDMI_MASK) >> ctx->hdmi_num = (board_quirk & SOF_NUM_IDISP_HDMI_MASK) >>
......
...@@ -132,8 +132,8 @@ struct sof_card_private { ...@@ -132,8 +132,8 @@ struct sof_card_private {
struct snd_soc_jack headset_jack; struct snd_soc_jack headset_jack;
struct sof_hdmi_private hdmi; struct sof_hdmi_private hdmi;
enum sof_ssp_codec codec_type; enum snd_soc_acpi_intel_codec codec_type;
enum sof_ssp_codec amp_type; enum snd_soc_acpi_intel_codec amp_type;
int dmic_be_num; int dmic_be_num;
int hdmi_num; int hdmi_num;
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
struct codec_map { struct codec_map {
const char *name; const char *name;
const char *acpi_hid; const char *acpi_hid;
enum sof_ssp_codec codec_type; enum snd_soc_acpi_intel_codec codec_type;
}; };
static const struct codec_map codecs[] = { static const struct codec_map codecs[] = {
...@@ -64,7 +64,8 @@ static const struct codec_map amps[] = { ...@@ -64,7 +64,8 @@ static const struct codec_map amps[] = {
CODEC_MAP_ENTRY("RT1308", RT1308_ACPI_HID, CODEC_RT1308), 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; int i;
...@@ -78,9 +79,10 @@ enum sof_ssp_codec sof_ssp_detect_codec_type(struct device *dev) ...@@ -78,9 +79,10 @@ enum sof_ssp_codec sof_ssp_detect_codec_type(struct device *dev)
return CODEC_NONE; 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; int i;
...@@ -94,9 +96,10 @@ enum sof_ssp_codec sof_ssp_detect_amp_type(struct device *dev) ...@@ -94,9 +96,10 @@ enum sof_ssp_codec sof_ssp_detect_amp_type(struct device *dev)
return CODEC_NONE; 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; int i;
...@@ -115,7 +118,7 @@ const char *sof_ssp_get_codec_name(enum sof_ssp_codec codec_type) ...@@ -115,7 +118,7 @@ const char *sof_ssp_get_codec_name(enum sof_ssp_codec codec_type)
return NULL; 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_DESCRIPTION("ASoC Intel SOF Common Machine Driver Helpers");
MODULE_AUTHOR("Brent Lu <brent.lu@intel.com>"); MODULE_AUTHOR("Brent Lu <brent.lu@intel.com>");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment