summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2025-11-11 00:17:37 +0000
committerMark Brown <broonie@kernel.org>2025-11-17 00:14:21 +0000
commit64f90b329ffadae00b187ac797837ba598289707 (patch)
tree294911b19efa09bd07e9b178049d33cb3d5027f7 /drivers/staging/greybus
parent91f20e5167d38eb943a087e3087927d1ce7a5c78 (diff)
ASoC: audio_codec: convert to snd_soc_dapm_xxx()
This patch converts below functions. dapm->dev -> snd_soc_dapm_to_dev() dapm->card -> snd_soc_dapm_to_card() dapm->component -> snd_soc_dapm_to_component() dapm_kcontrol_get_value() -> snd_soc_dapm_kcontrol_get_value() snd_soc_component_enable_pin() -> snd_soc_dapm_enable_pin() snd_soc_component_enable_pin_unlocked() -> snd_soc_dapm_enable_pin_unlocked() snd_soc_component_disable_pin() -> snd_soc_dapm_disable_pin() snd_soc_component_disable_pin_unlocked() -> snd_soc_dapm_disable_pin_unlocked() snd_soc_component_nc_pin() -> snd_soc_dapm_nc_pin() snd_soc_component_nc_pin_unlocked() -> snd_soc_dapm_nc_pin_unlocked() snd_soc_component_get_pin_status() -> snd_soc_dapm_get_pin_status() snd_soc_component_force_enable_pin() -> snd_soc_dapm_force_enable_pin() snd_soc_component_force_enable_pin_unlocked() -> snd_soc_dapm_force_enable_pin_unlocked() snd_soc_component_force_bias_level() -> snd_soc_dapm_force_bias_level() snd_soc_component_get_bias_level() -> snd_soc_dapm_get_bias_level() snd_soc_component_init_bias_level() -> snd_soc_dapm_init_bias_level() snd_soc_component_get_dapm() -> snd_soc_component_to_dapm() snd_soc_dapm_kcontrol_component() -> snd_soc_dapm_kcontrol_to_component() snd_soc_dapm_kcontrol_widget() -> snd_soc_dapm_kcontrol_to_widget() snd_soc_dapm_kcontrol_dapm() -> snd_soc_dapm_kcontrol_to_dapm() snd_soc_dapm_np_pin() -> snd_soc_dapm_disable_pin() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/878qgda0da.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/staging/greybus')
-rw-r--r--drivers/staging/greybus/audio_codec.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c
index 2f05e761fb9a..444c53b4e08d 100644
--- a/drivers/staging/greybus/audio_codec.c
+++ b/drivers/staging/greybus/audio_codec.c
@@ -807,6 +807,7 @@ int gbaudio_register_module(struct gbaudio_module_info *module)
{
int ret;
struct snd_soc_component *comp;
+ struct snd_soc_dapm_context *dapm;
struct gbaudio_jack *jack = NULL;
if (!gbcodec) {
@@ -815,6 +816,7 @@ int gbaudio_register_module(struct gbaudio_module_info *module)
}
comp = gbcodec->component;
+ dapm = snd_soc_component_to_dapm(comp);
mutex_lock(&gbcodec->register_mutex);
@@ -833,18 +835,18 @@ int gbaudio_register_module(struct gbaudio_module_info *module)
}
if (module->dapm_widgets)
- snd_soc_dapm_new_controls(&comp->dapm, module->dapm_widgets,
+ snd_soc_dapm_new_controls(dapm, module->dapm_widgets,
module->num_dapm_widgets);
if (module->controls)
snd_soc_add_component_controls(comp, module->controls,
module->num_controls);
if (module->dapm_routes)
- snd_soc_dapm_add_routes(&comp->dapm, module->dapm_routes,
+ snd_soc_dapm_add_routes(dapm, module->dapm_routes,
module->num_dapm_routes);
/* card already instantiated, create widgets here only */
if (comp->card->instantiated) {
- gbaudio_dapm_link_component_dai_widgets(comp->card, &comp->dapm);
+ gbaudio_dapm_link_component_dai_widgets(comp->card, dapm);
#ifdef CONFIG_SND_JACK
/*
* register jack devices for this module
@@ -966,9 +968,11 @@ void gbaudio_unregister_module(struct gbaudio_module_info *module)
#endif
if (module->dapm_routes) {
+ struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(comp);
+
dev_dbg(comp->dev, "Removing %d routes\n",
module->num_dapm_routes);
- snd_soc_dapm_del_routes(&comp->dapm, module->dapm_routes,
+ snd_soc_dapm_del_routes(dapm, module->dapm_routes,
module->num_dapm_routes);
}
if (module->controls) {
@@ -979,9 +983,11 @@ void gbaudio_unregister_module(struct gbaudio_module_info *module)
module->num_controls);
}
if (module->dapm_widgets) {
+ struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(comp);
+
dev_dbg(comp->dev, "Removing %d widgets\n",
module->num_dapm_widgets);
- gbaudio_dapm_free_controls(&comp->dapm, module->dapm_widgets,
+ gbaudio_dapm_free_controls(dapm, module->dapm_widgets,
module->num_dapm_widgets);
}