mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 09:04:39 +02:00
ASoC: Intel: avs: Streamline register-component function names
Word 'component' is commonly used in ASoC when referring to any component, regardless if it is a platform-type or codec-type component. Reword all avs_xxx_platform_register() to match the scheme present in ASoC's core. In case of avs_soc_component_register(), the name is simplified. Summary: - avs_xxx_platform_register() -> avs_register_xxx_component() - avs_soc_component_register() -> avs_register_component() Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20250818104126.526442-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
4dee5c1cc4
commit
2a55135201
|
|
@ -348,13 +348,13 @@ struct avs_soc_component {
|
|||
|
||||
extern const struct snd_soc_dai_ops avs_dai_fe_ops;
|
||||
|
||||
int avs_soc_component_register(struct device *dev, const char *name,
|
||||
struct snd_soc_component_driver *drv,
|
||||
struct snd_soc_dai_driver *cpu_dais, int num_cpu_dais);
|
||||
int avs_dmic_platform_register(struct avs_dev *adev, const char *name);
|
||||
int avs_i2s_platform_register(struct avs_dev *adev, const char *name, unsigned long port_mask,
|
||||
unsigned long *tdms);
|
||||
int avs_hda_platform_register(struct avs_dev *adev, const char *name);
|
||||
int avs_register_dmic_component(struct avs_dev *adev, const char *name);
|
||||
int avs_register_i2s_component(struct avs_dev *adev, const char *name, unsigned long port_mask,
|
||||
unsigned long *tdms);
|
||||
int avs_register_hda_component(struct avs_dev *adev, const char *name);
|
||||
int avs_register_component(struct device *dev, const char *name,
|
||||
struct snd_soc_component_driver *drv,
|
||||
struct snd_soc_dai_driver *cpu_dais, int num_cpu_dais);
|
||||
|
||||
int avs_register_all_boards(struct avs_dev *adev);
|
||||
void avs_unregister_all_boards(struct avs_dev *adev);
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
#include <sound/soc-component.h>
|
||||
#include "avs.h"
|
||||
#include "debug.h"
|
||||
#include "pcm.h"
|
||||
#include "utils.h"
|
||||
|
||||
static char *i2s_test;
|
||||
|
|
@ -410,7 +411,7 @@ static int __maybe_unused avs_register_probe_board(struct avs_dev *adev)
|
|||
struct snd_soc_acpi_mach mach = {{0}};
|
||||
int ret;
|
||||
|
||||
ret = avs_probe_platform_register(adev, "probe-platform");
|
||||
ret = avs_register_probe_component(adev, "probe-platform");
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
|
@ -455,7 +456,7 @@ static int avs_register_dmic_board(struct avs_dev *adev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
ret = avs_dmic_platform_register(adev, "dmic-platform");
|
||||
ret = avs_register_dmic_component(adev, "dmic-platform");
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
|
@ -516,7 +517,7 @@ static int avs_register_i2s_board(struct avs_dev *adev, struct snd_soc_acpi_mach
|
|||
if (!name)
|
||||
return -ENOMEM;
|
||||
|
||||
ret = avs_i2s_platform_register(adev, name, mach->mach_params.i2s_link_mask, pdata->tdms);
|
||||
ret = avs_register_i2s_component(adev, name, mach->mach_params.i2s_link_mask, pdata->tdms);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
|
@ -655,7 +656,7 @@ static int avs_register_hda_board(struct avs_dev *adev, struct hda_codec *codec)
|
|||
pdata->obsolete_card_names = obsolete_card_names;
|
||||
pdata->codec = codec;
|
||||
|
||||
ret = avs_hda_platform_register(adev, pname);
|
||||
ret = avs_register_hda_component(adev, pname);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ static_assert(sizeof(struct avs_apl_log_buffer_layout) == 8);
|
|||
(addr + sizeof(struct avs_apl_log_buffer_layout))
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
int avs_probe_platform_register(struct avs_dev *adev, const char *name);
|
||||
int avs_register_probe_component(struct avs_dev *adev, const char *name);
|
||||
|
||||
#define AVS_SET_ENABLE_LOGS_OP(name) \
|
||||
.enable_logs = avs_##name##_enable_logs
|
||||
|
|
@ -63,7 +63,7 @@ void avs_debugfs_init(struct avs_dev *adev);
|
|||
void avs_debugfs_exit(struct avs_dev *adev);
|
||||
|
||||
#else
|
||||
static inline int avs_probe_platform_register(struct avs_dev *adev, const char *name)
|
||||
static inline int avs_register_probe_component(struct avs_dev *adev, const char *name)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1379,9 +1379,9 @@ static struct snd_soc_component_driver avs_component_driver = {
|
|||
.topology_name_prefix = "intel/avs",
|
||||
};
|
||||
|
||||
int avs_soc_component_register(struct device *dev, const char *name,
|
||||
struct snd_soc_component_driver *drv,
|
||||
struct snd_soc_dai_driver *cpu_dais, int num_cpu_dais)
|
||||
int avs_register_component(struct device *dev, const char *name,
|
||||
struct snd_soc_component_driver *drv,
|
||||
struct snd_soc_dai_driver *cpu_dais, int num_cpu_dais)
|
||||
{
|
||||
struct avs_soc_component *acomp;
|
||||
int ret;
|
||||
|
|
@ -1428,7 +1428,7 @@ static struct snd_soc_dai_driver dmic_cpu_dais[] = {
|
|||
},
|
||||
};
|
||||
|
||||
int avs_dmic_platform_register(struct avs_dev *adev, const char *name)
|
||||
int avs_register_dmic_component(struct avs_dev *adev, const char *name)
|
||||
{
|
||||
const struct snd_soc_dai_ops *ops;
|
||||
|
||||
|
|
@ -1439,8 +1439,8 @@ int avs_dmic_platform_register(struct avs_dev *adev, const char *name)
|
|||
|
||||
dmic_cpu_dais[0].ops = ops;
|
||||
dmic_cpu_dais[1].ops = ops;
|
||||
return avs_soc_component_register(adev->dev, name, &avs_component_driver, dmic_cpu_dais,
|
||||
ARRAY_SIZE(dmic_cpu_dais));
|
||||
return avs_register_component(adev->dev, name, &avs_component_driver, dmic_cpu_dais,
|
||||
ARRAY_SIZE(dmic_cpu_dais));
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_driver i2s_dai_template = {
|
||||
|
|
@ -1472,8 +1472,8 @@ static const struct snd_soc_dai_driver i2s_dai_template = {
|
|||
},
|
||||
};
|
||||
|
||||
int avs_i2s_platform_register(struct avs_dev *adev, const char *name, unsigned long port_mask,
|
||||
unsigned long *tdms)
|
||||
int avs_register_i2s_component(struct avs_dev *adev, const char *name, unsigned long port_mask,
|
||||
unsigned long *tdms)
|
||||
{
|
||||
struct snd_soc_dai_driver *cpus, *dai;
|
||||
const struct snd_soc_dai_ops *ops;
|
||||
|
|
@ -1539,7 +1539,7 @@ int avs_i2s_platform_register(struct avs_dev *adev, const char *name, unsigned l
|
|||
}
|
||||
|
||||
plat_register:
|
||||
return avs_soc_component_register(adev->dev, name, &avs_component_driver, cpus, cpu_count);
|
||||
return avs_register_component(adev->dev, name, &avs_component_driver, cpus, cpu_count);
|
||||
}
|
||||
|
||||
/* HD-Audio CPU DAI template */
|
||||
|
|
@ -1764,8 +1764,7 @@ static struct snd_soc_component_driver avs_hda_component_driver = {
|
|||
.topology_name_prefix = "intel/avs",
|
||||
};
|
||||
|
||||
int avs_hda_platform_register(struct avs_dev *adev, const char *name)
|
||||
int avs_register_hda_component(struct avs_dev *adev, const char *name)
|
||||
{
|
||||
return avs_soc_component_register(adev->dev, name,
|
||||
&avs_hda_component_driver, NULL, 0);
|
||||
return avs_register_component(adev->dev, name, &avs_hda_component_driver, NULL, 0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -291,7 +291,7 @@ static const struct snd_soc_component_driver avs_probe_component_driver = {
|
|||
.module_get_upon_open = 1, /* increment refcount when a stream is opened */
|
||||
};
|
||||
|
||||
int avs_probe_platform_register(struct avs_dev *adev, const char *name)
|
||||
int avs_register_probe_component(struct avs_dev *adev, const char *name)
|
||||
{
|
||||
struct snd_soc_component *component;
|
||||
int ret;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user