diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2015-07-06 09:38:10 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-07-07 09:54:31 -0400 |
commit | b3c25fb7caa30afa5d5cc6b414a5b4d66bed77a7 (patch) | |
tree | f8cddd1ce71bccf8c67c4206175e0b4fbf6d6811 /sound/soc/soc-dapm.c | |
parent | c68c2be5f6ae4a27d548921bf8b32413c5eab8ed (diff) |
ASoC: dapm_widget_show_codec: Use component instead of CODEC
There is nothing snd_soc_codec specific in this function, just use
snd_soc_component instead.
With this also the last reference of snd_soc_codec form soc-dapm.c.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
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 aa327c92480c..a6c0ed15fc14 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -2220,14 +2220,16 @@ int snd_soc_dapm_mixer_update_power(struct snd_soc_dapm_context *dapm, | |||
2220 | } | 2220 | } |
2221 | EXPORT_SYMBOL_GPL(snd_soc_dapm_mixer_update_power); | 2221 | EXPORT_SYMBOL_GPL(snd_soc_dapm_mixer_update_power); |
2222 | 2222 | ||
2223 | static ssize_t dapm_widget_show_codec(struct snd_soc_codec *codec, char *buf) | 2223 | static ssize_t dapm_widget_show_component(struct snd_soc_component *cmpnt, |
2224 | char *buf) | ||
2224 | { | 2225 | { |
2226 | struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(cmpnt); | ||
2225 | struct snd_soc_dapm_widget *w; | 2227 | struct snd_soc_dapm_widget *w; |
2226 | int count = 0; | 2228 | int count = 0; |
2227 | char *state = "not set"; | 2229 | char *state = "not set"; |
2228 | 2230 | ||
2229 | list_for_each_entry(w, &codec->component.card->widgets, list) { | 2231 | list_for_each_entry(w, &cmpnt->card->widgets, list) { |
2230 | if (w->dapm != &codec->dapm) | 2232 | if (w->dapm != dapm) |
2231 | continue; | 2233 | continue; |
2232 | 2234 | ||
2233 | /* only display widgets that burnm power */ | 2235 | /* only display widgets that burnm power */ |
@@ -2255,7 +2257,7 @@ static ssize_t dapm_widget_show_codec(struct snd_soc_codec *codec, char *buf) | |||
2255 | } | 2257 | } |
2256 | } | 2258 | } |
2257 | 2259 | ||
2258 | switch (codec->dapm.bias_level) { | 2260 | switch (snd_soc_dapm_get_bias_level(dapm)) { |
2259 | case SND_SOC_BIAS_ON: | 2261 | case SND_SOC_BIAS_ON: |
2260 | state = "On"; | 2262 | state = "On"; |
2261 | break; | 2263 | break; |
@@ -2282,8 +2284,9 @@ static ssize_t dapm_widget_show(struct device *dev, | |||
2282 | int i, count = 0; | 2284 | int i, count = 0; |
2283 | 2285 | ||
2284 | for (i = 0; i < rtd->num_codecs; i++) { | 2286 | for (i = 0; i < rtd->num_codecs; i++) { |
2285 | struct snd_soc_codec *codec = rtd->codec_dais[i]->codec; | 2287 | struct snd_soc_component *cmpnt = rtd->codec_dais[i]->component; |
2286 | count += dapm_widget_show_codec(codec, buf + count); | 2288 | |
2289 | count += dapm_widget_show_component(cmpnt, buf + count); | ||
2287 | } | 2290 | } |
2288 | 2291 | ||
2289 | return count; | 2292 | return count; |