···261261 list_for_each_entry_safe(dai, _dai, &(component)->dai_list, list)262262263263/**264264- * snd_soc_dapm_to_component() - Casts a DAPM context to the component it is265265- * embedded in266266- * @dapm: The DAPM context to cast to the component267267- *268268- * This function must only be used on DAPM contexts that are known to be part of269269- * a component (e.g. in a component driver). Otherwise the behavior is270270- * undefined.271271- */272272-static inline struct snd_soc_component *snd_soc_dapm_to_component(273273- struct snd_soc_dapm_context *dapm)274274-{275275- return container_of(dapm, struct snd_soc_component, dapm);276276-}277277-278278-/**279279- * snd_soc_component_get_dapm() - Returns the DAPM context associated with a264264+ * snd_soc_component_to_dapm() - Returns the DAPM context associated with a280265 * component281266 * @component: The component for which to get the DAPM context282267 */283283-static inline struct snd_soc_dapm_context *snd_soc_component_get_dapm(268268+static inline struct snd_soc_dapm_context *snd_soc_component_to_dapm(284269 struct snd_soc_component *component)285270{286271 return &component->dapm;287272}273273+274274+// FIXME275275+#define snd_soc_component_get_dapm snd_soc_component_to_dapm288276289277/**290278 * snd_soc_component_cache_sync() - Sync the register cache with the hardware
+8-4
include/sound/soc-dapm.h
···583583struct snd_soc_dapm_context {584584 enum snd_soc_bias_level bias_level;585585586586- /* bit field */587587- unsigned int idle_bias_off:1; /* Use BIAS_OFF instead of STANDBY */588588- unsigned int suspend_bias_off:1; /* Use BIAS_OFF in suspend if the DAPM is idle */586586+ bool idle_bias; /* Use BIAS_OFF instead of STANDBY when false */589587590590- struct device *dev; /* from parent - for debug */588588+ struct device *dev; /* from parent - for debug */ /* REMOVE ME */591589 struct snd_soc_component *component; /* parent component */592590 struct snd_soc_card *card; /* parent card */593591···658660int snd_soc_dapm_update_dai(struct snd_pcm_substream *substream,659661 struct snd_pcm_hw_params *params, struct snd_soc_dai *dai);660662int snd_soc_dapm_widget_name_cmp(struct snd_soc_dapm_widget *widget, const char *s);663663+struct device *snd_soc_dapm_to_dev(struct snd_soc_dapm_context *dapm);664664+struct snd_soc_card *snd_soc_dapm_to_card(struct snd_soc_dapm_context *dapm);665665+struct snd_soc_component *snd_soc_dapm_to_component(struct snd_soc_dapm_context *dapm);666666+667667+bool snd_soc_dapm_get_idle_bias(struct snd_soc_dapm_context *dapm);668668+void snd_soc_dapm_set_idle_bias(struct snd_soc_dapm_context *dapm, bool on);661669662670/* dapm path setup */663671int snd_soc_dapm_new_widgets(struct snd_soc_card *card);
+5
include/sound/soc.h
···11201120 return card && card->instantiated;11211121}1122112211231123+static inline struct snd_soc_dapm_context *snd_soc_card_to_dapm(struct snd_soc_card *card)11241124+{11251125+ return &card->dapm;11261126+}11271127+11231128/* SoC machine DAI configuration, glues a codec and cpu DAI together */11241129struct snd_soc_pcm_runtime {11251130 struct device *dev;
+1-1
sound/soc/codecs/wm8993.c
···15361536 * VMID as an output and can disable it.15371537 */15381538 if (wm8993->pdata.lineout1_diff && wm8993->pdata.lineout2_diff)15391539- dapm->idle_bias_off = 1;15391539+ dapm->idle_bias = false;1540154015411541 return 0;15421542
+3-3
sound/soc/codecs/wm8994.c
···4182418241834183 wm8994->micdet_irq = control->pdata.micdet_irq;4184418441854185- /* By default use idle_bias_off, will override for WM8994 */41864186- dapm->idle_bias_off = 1;41854185+ /* By default use idle_bias false, will override for WM8994 */41864186+ dapm->idle_bias = false;4187418741884188 /* Set revision-specific configuration */41894189 switch (control->type) {···41914191 /* Single ended line outputs should have VMID on. */41924192 if (!control->pdata.lineout1_diff ||41934193 !control->pdata.lineout2_diff)41944194- dapm->idle_bias_off = 0;41944194+ dapm->idle_bias = true;4195419541964196 switch (control->revision) {41974197 case 2:
···7777 byt_cht_cx2072x_acpi_gpios))7878 dev_warn(rtd->dev, "Unable to add GPIO mapping table\n");79798080- card->dapm.idle_bias_off = true;8080+ card->dapm.idle_bias = false;81818282 /* set the default PLL rate, the clock is handled by the codec driver */8383 ret = snd_soc_dai_set_sysclk(snd_soc_rtd_to_codec(rtd, 0), CX2072X_MCLK_EXTERNAL_PLL,
+1-1
sound/soc/intel/boards/bytcht_es8316.c
···179179 int num_routes;180180 int ret;181181182182- card->dapm.idle_bias_off = true;182182+ card->dapm.idle_bias = false;183183184184 switch (BYT_CHT_ES8316_MAP(quirk)) {185185 case BYT_CHT_ES8316_INTMIC_IN1_MAP:
+1-1
sound/soc/intel/boards/bytcr_rt5640.c
···13241324 int num_routes = 0;13251325 int ret;1326132613271327- card->dapm.idle_bias_off = true;13271327+ card->dapm.idle_bias = false;13281328 jack_data->use_platform_clock = true;1329132913301330 /* Start with RC clk for jack-detect (we disable MCLK below) */
+1-1
sound/soc/intel/boards/bytcr_rt5651.c
···586586 int report;587587 int ret;588588589589- card->dapm.idle_bias_off = true;589589+ card->dapm.idle_bias = false;590590591591 /* Start with RC clk for jack-detect (we disable MCLK below) */592592 if (byt_rt5651_quirk & BYT_RT5651_MCLK_EN)
···276276 int num_routes;277277 int ret;278278279279- card->dapm.idle_bias_off = true;279279+ card->dapm.idle_bias = false;280280281281 if (quirk & SOC_ES8336_HEADSET_MIC1) {282282 custom_map = sof_es8316_headset_mic1_map;
+2-2
sound/soc/soc-core.c
···717717 * means it's doing something,718718 * otherwise fall through.719719 */720720- if (dapm->idle_bias_off) {720720+ if (!dapm->idle_bias) {721721 dev_dbg(component->dev,722722 "ASoC: idle_bias_off CODEC on over suspend\n");723723 break;···16521652 if (ret < 0)16531653 goto err_probe;1654165416551655- WARN(dapm->idle_bias_off &&16551655+ WARN(!dapm->idle_bias &&16561656 dapm->bias_level != SND_SOC_BIAS_OFF,16571657 "codec %s can not start from non-off bias with idle_bias_off==1\n",16581658 component->name);
···525525 card->dai_link = links;526526527527 /* set idle_bias_off to prevent the core from resuming the card->dev */528528- card->dapm.idle_bias_off = true;528528+ card->dapm.idle_bias = false;529529530530 snd_soc_card_set_drvdata(card, cdev);531531