diff options
author | Mark Brown <broonie@kernel.org> | 2015-08-30 15:52:12 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-08-30 15:52:12 +0100 |
commit | cb42e0f709a73caf4d631be32189bb1ca513ad25 (patch) | |
tree | 16a45cd33a8edf58967cd56cc74f51dbc3d91e5c /sound/soc/soc-dapm.c | |
parent | ca945cf9fb887ff64e63f324a9098a1bd848c58f (diff) | |
parent | f2988afedf2c19880a3c65d79dfc7939e1b53d8a (diff) | |
download | op-kernel-dev-cb42e0f709a73caf4d631be32189bb1ca513ad25.zip op-kernel-dev-cb42e0f709a73caf4d631be32189bb1ca513ad25.tar.gz |
Merge remote-tracking branch 'asoc/topic/rt5645' into asoc-next
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r-- | sound/soc/soc-dapm.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index c0117dd5..89e6316 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -2163,14 +2163,16 @@ int snd_soc_dapm_mixer_update_power(struct snd_soc_dapm_context *dapm, } EXPORT_SYMBOL_GPL(snd_soc_dapm_mixer_update_power); -static ssize_t dapm_widget_show_codec(struct snd_soc_codec *codec, char *buf) +static ssize_t dapm_widget_show_component(struct snd_soc_component *cmpnt, + char *buf) { + struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(cmpnt); struct snd_soc_dapm_widget *w; int count = 0; char *state = "not set"; - list_for_each_entry(w, &codec->component.card->widgets, list) { - if (w->dapm != &codec->dapm) + list_for_each_entry(w, &cmpnt->card->widgets, list) { + if (w->dapm != dapm) continue; /* only display widgets that burnm power */ @@ -2198,7 +2200,7 @@ static ssize_t dapm_widget_show_codec(struct snd_soc_codec *codec, char *buf) } } - switch (codec->dapm.bias_level) { + switch (snd_soc_dapm_get_bias_level(dapm)) { case SND_SOC_BIAS_ON: state = "On"; break; @@ -2227,8 +2229,9 @@ static ssize_t dapm_widget_show(struct device *dev, mutex_lock(&rtd->card->dapm_mutex); for (i = 0; i < rtd->num_codecs; i++) { - struct snd_soc_codec *codec = rtd->codec_dais[i]->codec; - count += dapm_widget_show_codec(codec, buf + count); + struct snd_soc_component *cmpnt = rtd->codec_dais[i]->component; + + count += dapm_widget_show_component(cmpnt, buf + count); } mutex_unlock(&rtd->card->dapm_mutex); |