From: Kuninori Morimoto Date: Tue, 11 Nov 2025 00:37:20 +0000 (+0000) Subject: ASoC: ti: rx51: convert to snd_soc_dapm_xxx() X-Git-Tag: v6.19-rc1~156^2~3^2~43^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fefd4e0b26392ab7676b13b597166b6478eec4c6;p=thirdparty%2Fkernel%2Flinux.git ASoC: ti: rx51: 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 Reviewed-by: Charles Keepax Link: https://patch.msgid.link/87o6p9s8u8.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/ti/rx51.c b/sound/soc/ti/rx51.c index e969031657e9a..7eeb12e5066c4 100644 --- a/sound/soc/ti/rx51.c +++ b/sound/soc/ti/rx51.c @@ -42,7 +42,7 @@ static int rx51_jack_func; static void rx51_ext_control(struct snd_soc_dapm_context *dapm) { - struct snd_soc_card *card = dapm->card; + struct snd_soc_card *card = snd_soc_dapm_to_card(dapm); struct rx51_audio_pdata *pdata = snd_soc_card_get_drvdata(card); int hp = 0, hs = 0, tvout = 0; @@ -89,10 +89,10 @@ static int rx51_startup(struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); - struct snd_soc_card *card = rtd->card; + struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(rtd->card); snd_pcm_hw_constraint_single(runtime, SNDRV_PCM_HW_PARAM_CHANNELS, 2); - rx51_ext_control(&card->dapm); + rx51_ext_control(dapm); return 0; } @@ -125,12 +125,13 @@ static int rx51_set_spk(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); + struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(card); if (rx51_spk_func == ucontrol->value.enumerated.item[0]) return 0; rx51_spk_func = ucontrol->value.enumerated.item[0]; - rx51_ext_control(&card->dapm); + rx51_ext_control(dapm); return 1; } @@ -139,7 +140,7 @@ static int rx51_spk_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *k, int event) { struct snd_soc_dapm_context *dapm = w->dapm; - struct snd_soc_card *card = dapm->card; + struct snd_soc_card *card = snd_soc_dapm_to_card(dapm); struct rx51_audio_pdata *pdata = snd_soc_card_get_drvdata(card); gpiod_set_raw_value_cansleep(pdata->speaker_amp_gpio, @@ -160,12 +161,13 @@ static int rx51_set_input(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); + struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(card); if (rx51_dmic_func == ucontrol->value.enumerated.item[0]) return 0; rx51_dmic_func = ucontrol->value.enumerated.item[0]; - rx51_ext_control(&card->dapm); + rx51_ext_control(dapm); return 1; } @@ -182,12 +184,13 @@ static int rx51_set_jack(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); + struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(card); if (rx51_jack_func == ucontrol->value.enumerated.item[0]) return 0; rx51_jack_func = ucontrol->value.enumerated.item[0]; - rx51_ext_control(&card->dapm); + rx51_ext_control(dapm); return 1; }