diff options
| author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2025-11-11 00:32:31 +0000 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2025-11-17 00:17:34 +0000 |
| commit | 2990b658ed446abd3b509854e2b266eaef666ac5 (patch) | |
| tree | 990b941a599ffea35506ab019495aec117bcc014 /sound | |
| parent | 575eb51c72251f73d21408829ed39b8b03e67894 (diff) | |
ASoC: intel: boards: bytcr_wm5102: 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/87tsz1wgrk.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
| -rw-r--r-- | sound/soc/intel/boards/bytcr_wm5102.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/soc/intel/boards/bytcr_wm5102.c b/sound/soc/intel/boards/bytcr_wm5102.c index 02b84c877e5f..4879f79aef29 100644 --- a/sound/soc/intel/boards/bytcr_wm5102.c +++ b/sound/soc/intel/boards/bytcr_wm5102.c @@ -99,7 +99,7 @@ static void log_quirks(struct device *dev) static int byt_wm5102_spkvdd_power_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { - struct snd_soc_card *card = w->dapm->card; + struct snd_soc_card *card = snd_soc_dapm_to_card(w->dapm); struct byt_wm5102_private *priv = snd_soc_card_get_drvdata(card); gpiod_set_value_cansleep(priv->spkvdd_en_gpio, @@ -150,8 +150,7 @@ static int byt_wm5102_prepare_and_enable_pll1(struct snd_soc_dai *codec_dai, int 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 byt_wm5102_private *priv = snd_soc_card_get_drvdata(card); int ret; @@ -283,12 +282,13 @@ static struct snd_soc_jack_pin byt_wm5102_pins[] = { static int byt_wm5102_init(struct snd_soc_pcm_runtime *runtime) { struct snd_soc_card *card = runtime->card; + struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(card); struct byt_wm5102_private *priv = snd_soc_card_get_drvdata(card); struct snd_soc_component *component = snd_soc_rtd_to_codec(runtime, 0)->component; const struct snd_soc_dapm_route *custom_map = NULL; int ret, jack_type, num_routes = 0; - card->dapm.idle_bias = false; + snd_soc_dapm_set_idle_bias(dapm, false); ret = snd_soc_add_card_controls(card, byt_wm5102_controls, ARRAY_SIZE(byt_wm5102_controls)); @@ -307,7 +307,7 @@ static int byt_wm5102_init(struct snd_soc_pcm_runtime *runtime) num_routes = ARRAY_SIZE(byt_wm5102_intmic_in1l_hsmic_in2l_map); break; } - ret = snd_soc_dapm_add_routes(&card->dapm, custom_map, num_routes); + ret = snd_soc_dapm_add_routes(dapm, custom_map, num_routes); if (ret) return ret; @@ -321,7 +321,7 @@ static int byt_wm5102_init(struct snd_soc_pcm_runtime *runtime) num_routes = ARRAY_SIZE(byt_wm5102_spk_hpout2_map); break; } - ret = snd_soc_dapm_add_routes(&card->dapm, custom_map, num_routes); + ret = snd_soc_dapm_add_routes(dapm, custom_map, num_routes); if (ret) return ret; @@ -332,7 +332,7 @@ static int byt_wm5102_init(struct snd_soc_pcm_runtime *runtime) custom_map = bytcr_wm5102_ssp0_map; num_routes = ARRAY_SIZE(bytcr_wm5102_ssp0_map); } - ret = snd_soc_dapm_add_routes(&card->dapm, custom_map, num_routes); + ret = snd_soc_dapm_add_routes(dapm, custom_map, num_routes); if (ret) return ret; |
