diff options
Diffstat (limited to 'sound/soc/samsung')
| -rw-r--r-- | sound/soc/samsung/aries_wm8994.c | 6 | ||||
| -rw-r--r-- | sound/soc/samsung/bells.c | 6 | ||||
| -rw-r--r-- | sound/soc/samsung/littlemill.c | 8 | ||||
| -rw-r--r-- | sound/soc/samsung/lowland.c | 3 | ||||
| -rw-r--r-- | sound/soc/samsung/midas_wm1811.c | 8 | ||||
| -rw-r--r-- | sound/soc/samsung/smdk_wm8994.c | 30 | ||||
| -rw-r--r-- | sound/soc/samsung/speyside.c | 24 | ||||
| -rw-r--r-- | sound/soc/samsung/tm2_wm5110.c | 7 | ||||
| -rw-r--r-- | sound/soc/samsung/tobermory.c | 6 |
9 files changed, 51 insertions, 47 deletions
diff --git a/sound/soc/samsung/aries_wm8994.c b/sound/soc/samsung/aries_wm8994.c index 3723329b266d..48ccc1d1854b 100644 --- a/sound/soc/samsung/aries_wm8994.c +++ b/sound/soc/samsung/aries_wm8994.c @@ -159,7 +159,7 @@ static struct snd_soc_jack_gpio headset_button_gpio[] = { static int aries_spk_cfg(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 snd_soc_pcm_runtime *rtd; struct snd_soc_component *component; int ret = 0; @@ -194,7 +194,7 @@ static int aries_spk_cfg(struct snd_soc_dapm_widget *w, static int aries_main_bias(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 aries_wm8994_data *priv = snd_soc_card_get_drvdata(card); int ret = 0; @@ -213,7 +213,7 @@ static int aries_main_bias(struct snd_soc_dapm_widget *w, static int aries_headset_bias(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 aries_wm8994_data *priv = snd_soc_card_get_drvdata(card); int ret = 0; diff --git a/sound/soc/samsung/bells.c b/sound/soc/samsung/bells.c index 61ed5e69391a..fc4963d3b99b 100644 --- a/sound/soc/samsung/bells.c +++ b/sound/soc/samsung/bells.c @@ -62,12 +62,12 @@ static int bells_set_bias_level(struct snd_soc_card *card, codec_dai = snd_soc_rtd_to_codec(rtd, 0); component = codec_dai->component; - if (dapm->dev != codec_dai->dev) + if (snd_soc_dapm_to_dev(dapm) != codec_dai->dev) return 0; switch (level) { case SND_SOC_BIAS_PREPARE: - if (dapm->bias_level != SND_SOC_BIAS_STANDBY) + if (snd_soc_dapm_get_bias_level(dapm) != SND_SOC_BIAS_STANDBY) break; ret = snd_soc_component_set_pll(component, WM5102_FLL1, @@ -108,7 +108,7 @@ static int bells_set_bias_level_post(struct snd_soc_card *card, codec_dai = snd_soc_rtd_to_codec(rtd, 0); component = codec_dai->component; - if (dapm->dev != codec_dai->dev) + if (snd_soc_dapm_to_dev(dapm) != codec_dai->dev) return 0; switch (level) { diff --git a/sound/soc/samsung/littlemill.c b/sound/soc/samsung/littlemill.c index c8b06894ac88..d0d1b1ee326e 100644 --- a/sound/soc/samsung/littlemill.c +++ b/sound/soc/samsung/littlemill.c @@ -24,7 +24,7 @@ static int littlemill_set_bias_level(struct snd_soc_card *card, rtd = snd_soc_get_pcm_runtime(card, &card->dai_link[0]); aif1_dai = snd_soc_rtd_to_codec(rtd, 0); - if (dapm->dev != aif1_dai->dev) + if (snd_soc_dapm_to_dev(dapm) != aif1_dai->dev) return 0; switch (level) { @@ -33,7 +33,7 @@ static int littlemill_set_bias_level(struct snd_soc_card *card, * If we've not already clocked things via hw_params() * then do so now, otherwise these are noops. */ - if (dapm->bias_level == SND_SOC_BIAS_STANDBY) { + if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_STANDBY) { ret = snd_soc_dai_set_pll(aif1_dai, WM8994_FLL1, WM8994_FLL_SRC_MCLK2, 32768, sample_rate * 512); @@ -71,7 +71,7 @@ static int littlemill_set_bias_level_post(struct snd_soc_card *card, rtd = snd_soc_get_pcm_runtime(card, &card->dai_link[0]); aif1_dai = snd_soc_rtd_to_codec(rtd, 0); - if (dapm->dev != aif1_dai->dev) + if (snd_soc_dapm_to_dev(dapm) != aif1_dai->dev) return 0; switch (level) { @@ -173,7 +173,7 @@ static struct snd_soc_dai_link littlemill_dai[] = { static int bbclk_ev(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 snd_soc_pcm_runtime *rtd; struct snd_soc_dai *aif2_dai; int ret; diff --git a/sound/soc/samsung/lowland.c b/sound/soc/samsung/lowland.c index 1e95a2a435d4..ca9b78007dfe 100644 --- a/sound/soc/samsung/lowland.c +++ b/sound/soc/samsung/lowland.c @@ -70,8 +70,9 @@ static int lowland_wm5100_init(struct snd_soc_pcm_runtime *rtd) static int lowland_wm9081_init(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; + struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(rtd->card); - snd_soc_dapm_nc_pin(&rtd->card->dapm, "LINEOUT"); + snd_soc_dapm_disable_pin(dapm, "LINEOUT"); /* At any time the WM9081 is active it will have this clock */ return snd_soc_component_set_sysclk(component, WM9081_SYSCLK_MCLK, 0, diff --git a/sound/soc/samsung/midas_wm1811.c b/sound/soc/samsung/midas_wm1811.c index 239e958b88d3..bc34dbbb50c9 100644 --- a/sound/soc/samsung/midas_wm1811.c +++ b/sound/soc/samsung/midas_wm1811.c @@ -73,7 +73,7 @@ static struct snd_soc_jack_zone headset_key_zones[] = { static int headset_jack_check(void *data) { struct snd_soc_component *codec = data; - struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(codec); + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(codec); struct midas_priv *priv = snd_soc_card_get_drvdata(codec->card); int adc, ret; int jack_type = 0; @@ -285,7 +285,7 @@ static int midas_ext_spkmode(struct snd_soc_dapm_widget *w, static int midas_fm_set(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 midas_priv *priv = snd_soc_card_get_drvdata(card); if (!priv->gpio_fm_sel) @@ -306,7 +306,7 @@ static int midas_fm_set(struct snd_soc_dapm_widget *w, static int midas_line_set(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 midas_priv *priv = snd_soc_card_get_drvdata(card); if (!priv->gpio_lineout_sel) @@ -376,7 +376,7 @@ static int midas_set_bias_level(struct snd_soc_card *card, &card->dai_link[0]); struct snd_soc_dai *aif1_dai = snd_soc_rtd_to_codec(rtd, 0); - if (dapm->dev != aif1_dai->dev) + if (snd_soc_dapm_to_dev(dapm) != aif1_dai->dev) return 0; switch (level) { diff --git a/sound/soc/samsung/smdk_wm8994.c b/sound/soc/samsung/smdk_wm8994.c index acb29cd785a9..911f56b12f0a 100644 --- a/sound/soc/samsung/smdk_wm8994.c +++ b/sound/soc/samsung/smdk_wm8994.c @@ -69,23 +69,23 @@ static const struct snd_soc_ops smdk_ops = { static int smdk_wm8994_init_paiftx(struct snd_soc_pcm_runtime *rtd) { - struct snd_soc_dapm_context *dapm = &rtd->card->dapm; + struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(rtd->card); /* Other pins NC */ - snd_soc_dapm_nc_pin(dapm, "HPOUT2P"); - snd_soc_dapm_nc_pin(dapm, "HPOUT2N"); - snd_soc_dapm_nc_pin(dapm, "SPKOUTLN"); - snd_soc_dapm_nc_pin(dapm, "SPKOUTLP"); - snd_soc_dapm_nc_pin(dapm, "SPKOUTRP"); - snd_soc_dapm_nc_pin(dapm, "SPKOUTRN"); - snd_soc_dapm_nc_pin(dapm, "LINEOUT1N"); - snd_soc_dapm_nc_pin(dapm, "LINEOUT1P"); - snd_soc_dapm_nc_pin(dapm, "LINEOUT2N"); - snd_soc_dapm_nc_pin(dapm, "LINEOUT2P"); - snd_soc_dapm_nc_pin(dapm, "IN1LP"); - snd_soc_dapm_nc_pin(dapm, "IN2LP:VXRN"); - snd_soc_dapm_nc_pin(dapm, "IN1RP"); - snd_soc_dapm_nc_pin(dapm, "IN2RP:VXRP"); + snd_soc_dapm_disable_pin(dapm, "HPOUT2P"); + snd_soc_dapm_disable_pin(dapm, "HPOUT2N"); + snd_soc_dapm_disable_pin(dapm, "SPKOUTLN"); + snd_soc_dapm_disable_pin(dapm, "SPKOUTLP"); + snd_soc_dapm_disable_pin(dapm, "SPKOUTRP"); + snd_soc_dapm_disable_pin(dapm, "SPKOUTRN"); + snd_soc_dapm_disable_pin(dapm, "LINEOUT1N"); + snd_soc_dapm_disable_pin(dapm, "LINEOUT1P"); + snd_soc_dapm_disable_pin(dapm, "LINEOUT2N"); + snd_soc_dapm_disable_pin(dapm, "LINEOUT2P"); + snd_soc_dapm_disable_pin(dapm, "IN1LP"); + snd_soc_dapm_disable_pin(dapm, "IN2LP:VXRN"); + snd_soc_dapm_disable_pin(dapm, "IN1RP"); + snd_soc_dapm_disable_pin(dapm, "IN2RP:VXRP"); return 0; } diff --git a/sound/soc/samsung/speyside.c b/sound/soc/samsung/speyside.c index f4cc5684ef0a..26701a55fe0a 100644 --- a/sound/soc/samsung/speyside.c +++ b/sound/soc/samsung/speyside.c @@ -27,7 +27,7 @@ static int speyside_set_bias_level(struct snd_soc_card *card, rtd = snd_soc_get_pcm_runtime(card, &card->dai_link[1]); codec_dai = snd_soc_rtd_to_codec(rtd, 0); - if (dapm->dev != codec_dai->dev) + if (snd_soc_dapm_to_dev(dapm) != codec_dai->dev) return 0; switch (level) { @@ -63,12 +63,12 @@ static int speyside_set_bias_level_post(struct snd_soc_card *card, rtd = snd_soc_get_pcm_runtime(card, &card->dai_link[1]); codec_dai = snd_soc_rtd_to_codec(rtd, 0); - if (dapm->dev != codec_dai->dev) + if (snd_soc_dapm_to_dev(dapm) != codec_dai->dev) return 0; switch (level) { case SND_SOC_BIAS_PREPARE: - if (card->dapm.bias_level == SND_SOC_BIAS_STANDBY) { + if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_STANDBY) { ret = snd_soc_dai_set_pll(codec_dai, 0, WM8996_FLL_MCLK2, 32768, MCLK_AUDIO_RATE); @@ -125,7 +125,7 @@ static void speyside_set_polarity(struct snd_soc_component *component, gpiod_direction_output(speyside_hpsel_gpio, speyside_jack_polarity); /* Re-run DAPM to make sure we're using the correct mic bias */ - snd_soc_dapm_sync(snd_soc_component_get_dapm(component)); + snd_soc_dapm_sync(snd_soc_component_to_dapm(component)); } static int speyside_wm0010_init(struct snd_soc_pcm_runtime *rtd) @@ -177,13 +177,15 @@ static int speyside_wm8996_init(struct snd_soc_pcm_runtime *rtd) static int speyside_late_probe(struct snd_soc_card *card) { - snd_soc_dapm_ignore_suspend(&card->dapm, "Headphone"); - snd_soc_dapm_ignore_suspend(&card->dapm, "Headset Mic"); - snd_soc_dapm_ignore_suspend(&card->dapm, "Main AMIC"); - snd_soc_dapm_ignore_suspend(&card->dapm, "Main DMIC"); - snd_soc_dapm_ignore_suspend(&card->dapm, "Main Speaker"); - snd_soc_dapm_ignore_suspend(&card->dapm, "WM1250 Output"); - snd_soc_dapm_ignore_suspend(&card->dapm, "WM1250 Input"); + struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(card); + + snd_soc_dapm_ignore_suspend(dapm, "Headphone"); + snd_soc_dapm_ignore_suspend(dapm, "Headset Mic"); + snd_soc_dapm_ignore_suspend(dapm, "Main AMIC"); + snd_soc_dapm_ignore_suspend(dapm, "Main DMIC"); + snd_soc_dapm_ignore_suspend(dapm, "Main Speaker"); + snd_soc_dapm_ignore_suspend(dapm, "WM1250 Output"); + snd_soc_dapm_ignore_suspend(dapm, "WM1250 Input"); return 0; } diff --git a/sound/soc/samsung/tm2_wm5110.c b/sound/soc/samsung/tm2_wm5110.c index b68ce7bd44ef..f1f59e059f5d 100644 --- a/sound/soc/samsung/tm2_wm5110.c +++ b/sound/soc/samsung/tm2_wm5110.c @@ -260,7 +260,7 @@ static const struct snd_soc_ops tm2_hdmi_ops = { static int tm2_mic_bias(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 tm2_machine_priv *priv = snd_soc_card_get_drvdata(card); switch (event) { @@ -279,16 +279,17 @@ static int tm2_set_bias_level(struct snd_soc_card *card, struct snd_soc_dapm_context *dapm, enum snd_soc_bias_level level) { + struct snd_soc_dapm_context *card_dapm = snd_soc_card_to_dapm(card); struct snd_soc_pcm_runtime *rtd; rtd = snd_soc_get_pcm_runtime(card, &card->dai_link[0]); - if (dapm->dev != snd_soc_rtd_to_codec(rtd, 0)->dev) + if (snd_soc_dapm_to_dev(dapm) != snd_soc_rtd_to_codec(rtd, 0)->dev) return 0; switch (level) { case SND_SOC_BIAS_STANDBY: - if (card->dapm.bias_level == SND_SOC_BIAS_OFF) + if (snd_soc_dapm_get_bias_level(card_dapm) == SND_SOC_BIAS_OFF) tm2_start_sysclk(card); break; case SND_SOC_BIAS_OFF: diff --git a/sound/soc/samsung/tobermory.c b/sound/soc/samsung/tobermory.c index 1d0a782402f0..5448c16199bd 100644 --- a/sound/soc/samsung/tobermory.c +++ b/sound/soc/samsung/tobermory.c @@ -24,12 +24,12 @@ static int tobermory_set_bias_level(struct snd_soc_card *card, rtd = snd_soc_get_pcm_runtime(card, &card->dai_link[0]); codec_dai = snd_soc_rtd_to_codec(rtd, 0); - if (dapm->dev != codec_dai->dev) + if (snd_soc_dapm_to_dev(dapm) != codec_dai->dev) return 0; switch (level) { case SND_SOC_BIAS_PREPARE: - if (dapm->bias_level == SND_SOC_BIAS_STANDBY) { + if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_STANDBY) { ret = snd_soc_dai_set_pll(codec_dai, WM8962_FLL, WM8962_FLL_MCLK, 32768, sample_rate * 512); @@ -67,7 +67,7 @@ static int tobermory_set_bias_level_post(struct snd_soc_card *card, rtd = snd_soc_get_pcm_runtime(card, &card->dai_link[0]); codec_dai = snd_soc_rtd_to_codec(rtd, 0); - if (dapm->dev != codec_dai->dev) + if (snd_soc_dapm_to_dev(dapm) != codec_dai->dev) return 0; switch (level) { |
