component->card->debugfs_card_root);
}
- snd_soc_dapm_debugfs_init(snd_soc_component_get_dapm(component),
+ snd_soc_dapm_debugfs_init(snd_soc_component_to_dapm(component),
component->debugfs_root);
}
debugfs_create_u32("dapm_pop_time", 0644, card->debugfs_card_root,
&card->pop_time);
- snd_soc_dapm_debugfs_init(&card->dapm, card->debugfs_card_root);
+ snd_soc_dapm_debugfs_init(snd_soc_card_to_dapm(card), card->debugfs_card_root);
}
static void soc_cleanup_card_debugfs(struct snd_soc_card *card)
/* Recheck all endpoints too, their state is affected by suspend */
snd_soc_dapm_mark_endpoints_dirty(card);
- snd_soc_dapm_sync(&card->dapm);
+ snd_soc_dapm_sync(snd_soc_card_to_dapm(card));
/* suspend all COMPONENTs */
for_each_card_rtds(card, rtd) {
continue;
for_each_rtd_components(rtd, i, component) {
- struct snd_soc_dapm_context *dapm =
- snd_soc_component_get_dapm(component);
+ struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
/*
* ignore if component was already suspended
* means it's doing something,
* otherwise fall through.
*/
- if (!dapm->idle_bias) {
+ if (!snd_soc_dapm_get_idle_bias(dapm)) {
dev_dbg(component->dev,
"ASoC: idle_bias_off CODEC on over suspend\n");
break;
/* Recheck all endpoints too, their state is affected by suspend */
snd_soc_dapm_mark_endpoints_dirty(card);
- snd_soc_dapm_sync(&card->dapm);
+ snd_soc_dapm_sync(snd_soc_card_to_dapm(card));
/* userspace can access us now we are back as we were before */
snd_power_change_state(card->snd_card, SNDRV_CTL_POWER_D0);
snd_soc_component_remove(component);
list_del_init(&component->card_list);
- snd_soc_dapm_free(snd_soc_component_get_dapm(component));
+ snd_soc_dapm_free(snd_soc_component_to_dapm(component));
soc_cleanup_component_debugfs(component);
component->card = NULL;
snd_soc_component_module_put_when_remove(component);
static int soc_probe_component(struct snd_soc_card *card,
struct snd_soc_component *component)
{
- struct snd_soc_dapm_context *dapm =
- snd_soc_component_get_dapm(component);
+ struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
struct snd_soc_dai *dai;
int probed = 0;
int ret;
if (ret < 0)
goto err_probe;
- WARN(!dapm->idle_bias &&
- dapm->bias_level != SND_SOC_BIAS_OFF,
+ WARN(!snd_soc_dapm_get_idle_bias(dapm) &&
+ snd_soc_dapm_get_bias_level(dapm) != SND_SOC_BIAS_OFF,
"codec %s can not start from non-off bias with idle_bias_off==1\n",
component->name);
probed = 1;
soc_remove_aux_devices(card);
soc_unbind_aux_dev(card);
- snd_soc_dapm_free(&card->dapm);
+ snd_soc_dapm_free(snd_soc_card_to_dapm(card));
soc_cleanup_card_debugfs(card);
/* remove the card */
{
struct snd_soc_pcm_runtime *rtd;
struct snd_soc_component *component;
+ struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(card);
int ret;
snd_soc_card_mutex_lock_root(card);
snd_soc_fill_dummy_dai(card);
- snd_soc_dapm_init(&card->dapm, card, NULL);
+ snd_soc_dapm_init(dapm, card, NULL);
/* check whether any platform is ignore machine FE and using topology */
soc_check_tplg_fes(card);
soc_resume_init(card);
- ret = snd_soc_dapm_new_controls(&card->dapm, card->dapm_widgets,
+ ret = snd_soc_dapm_new_controls(dapm, card->dapm_widgets,
card->num_dapm_widgets);
if (ret < 0)
goto probe_end;
- ret = snd_soc_dapm_new_controls(&card->dapm, card->of_dapm_widgets,
+ ret = snd_soc_dapm_new_controls(dapm, card->of_dapm_widgets,
card->num_of_dapm_widgets);
if (ret < 0)
goto probe_end;
if (ret < 0)
goto probe_end;
- ret = snd_soc_dapm_add_routes(&card->dapm, card->dapm_routes,
+ ret = snd_soc_dapm_add_routes(dapm, card->dapm_routes,
card->num_dapm_routes);
if (ret < 0)
goto probe_end;
- ret = snd_soc_dapm_add_routes(&card->dapm, card->of_dapm_routes,
+ ret = snd_soc_dapm_add_routes(dapm, card->of_dapm_routes,
card->num_of_dapm_routes);
if (ret < 0)
goto probe_end;
card->instantiated = 1;
snd_soc_dapm_mark_endpoints_dirty(card);
- snd_soc_dapm_sync(&card->dapm);
+ snd_soc_dapm_sync(dapm);
/* deactivate pins to sleep state */
for_each_card_components(card, component)