]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: intel: boards: cht_bsw_rt5672: convert to snd_soc_dapm_xxx()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 11 Nov 2025 00:32:41 +0000 (00:32 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 17 Nov 2025 00:17:37 +0000 (00:17 +0000)
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/87pl9pwgra.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/cht_bsw_rt5672.c

index 54c1894ee96ac569cdc9b84bc32ed2a5bd401968..359723f2700e466aee46c379c76fc46de5e7a48a 100644 (file)
@@ -51,8 +51,7 @@ static struct snd_soc_jack_pin cht_bsw_headset_pins[] = {
 static int platform_clock_control(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(w->dapm);
        struct snd_soc_dai *codec_dai;
        struct cht_mc_private *ctx = snd_soc_card_get_drvdata(card);
        int ret;
@@ -193,6 +192,7 @@ static const struct acpi_gpio_mapping cht_rt5672_gpios[] = {
 static int cht_codec_init(struct snd_soc_pcm_runtime *runtime)
 {
        int ret;
+       struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(runtime->card);
        struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(runtime, 0);
        struct snd_soc_component *component = codec_dai->component;
        struct cht_mc_private *ctx = snd_soc_card_get_drvdata(runtime->card);
@@ -215,11 +215,11 @@ static int cht_codec_init(struct snd_soc_pcm_runtime *runtime)
                                RT5670_CLK_SEL_I2S1_ASRC);
 
        if (ctx->use_ssp0) {
-               ret = snd_soc_dapm_add_routes(&runtime->card->dapm,
+               ret = snd_soc_dapm_add_routes(dapm,
                                              cht_audio_ssp0_map,
                                              ARRAY_SIZE(cht_audio_ssp0_map));
        } else {
-               ret = snd_soc_dapm_add_routes(&runtime->card->dapm,
+               ret = snd_soc_dapm_add_routes(dapm,
                                              cht_audio_ssp2_map,
                                              ARRAY_SIZE(cht_audio_ssp2_map));
        }