diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-02-18 14:12:42 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-02-22 13:39:14 -0500 |
commit | ed5a4c472346e4bc1de37f84bb8d2aca26e59538 (patch) | |
tree | 9c72994855009654be8283933a991550c143b49a /sound/soc/soc-dapm.c | |
parent | 4c090edfbbe3f8e63ec9fb7abaab17e0191646a1 (diff) |
ASoC: Remove card from snd_soc_dapm_set_bias_level()
We can get the card from the DAPM context so don't bother passing it as
an argument.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r-- | sound/soc/soc-dapm.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 3bee4b20a7cb..1a932bbe8251 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -125,17 +125,17 @@ static inline struct snd_soc_dapm_widget *dapm_cnew_widget( | |||
125 | 125 | ||
126 | /** | 126 | /** |
127 | * snd_soc_dapm_set_bias_level - set the bias level for the system | 127 | * snd_soc_dapm_set_bias_level - set the bias level for the system |
128 | * @card: audio device | 128 | * @dapm: DAPM context |
129 | * @level: level to configure | 129 | * @level: level to configure |
130 | * | 130 | * |
131 | * Configure the bias (power) levels for the SoC audio device. | 131 | * Configure the bias (power) levels for the SoC audio device. |
132 | * | 132 | * |
133 | * Returns 0 for success else error. | 133 | * Returns 0 for success else error. |
134 | */ | 134 | */ |
135 | static int snd_soc_dapm_set_bias_level(struct snd_soc_card *card, | 135 | static int snd_soc_dapm_set_bias_level(struct snd_soc_dapm_context *dapm, |
136 | struct snd_soc_dapm_context *dapm, | ||
137 | enum snd_soc_bias_level level) | 136 | enum snd_soc_bias_level level) |
138 | { | 137 | { |
138 | struct snd_soc_card *card = dapm->card; | ||
139 | int ret = 0; | 139 | int ret = 0; |
140 | 140 | ||
141 | switch (level) { | 141 | switch (level) { |
@@ -1112,7 +1112,7 @@ static int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event) | |||
1112 | 1112 | ||
1113 | list_for_each_entry(d, &dapm->card->dapm_list, list) { | 1113 | list_for_each_entry(d, &dapm->card->dapm_list, list) { |
1114 | if (d->dev_power && d->bias_level == SND_SOC_BIAS_OFF) { | 1114 | if (d->dev_power && d->bias_level == SND_SOC_BIAS_OFF) { |
1115 | ret = snd_soc_dapm_set_bias_level(card, d, | 1115 | ret = snd_soc_dapm_set_bias_level(d, |
1116 | SND_SOC_BIAS_STANDBY); | 1116 | SND_SOC_BIAS_STANDBY); |
1117 | if (ret != 0) | 1117 | if (ret != 0) |
1118 | dev_err(d->dev, | 1118 | dev_err(d->dev, |
@@ -1122,7 +1122,7 @@ static int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event) | |||
1122 | /* If we're changing to all on or all off then prepare */ | 1122 | /* If we're changing to all on or all off then prepare */ |
1123 | if ((d->dev_power && d->bias_level == SND_SOC_BIAS_STANDBY) || | 1123 | if ((d->dev_power && d->bias_level == SND_SOC_BIAS_STANDBY) || |
1124 | (!d->dev_power && d->bias_level == SND_SOC_BIAS_ON)) { | 1124 | (!d->dev_power && d->bias_level == SND_SOC_BIAS_ON)) { |
1125 | ret = snd_soc_dapm_set_bias_level(card, d, | 1125 | ret = snd_soc_dapm_set_bias_level(d, |
1126 | SND_SOC_BIAS_PREPARE); | 1126 | SND_SOC_BIAS_PREPARE); |
1127 | if (ret != 0) | 1127 | if (ret != 0) |
1128 | dev_err(d->dev, | 1128 | dev_err(d->dev, |
@@ -1141,7 +1141,7 @@ static int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event) | |||
1141 | list_for_each_entry(d, &dapm->card->dapm_list, list) { | 1141 | list_for_each_entry(d, &dapm->card->dapm_list, list) { |
1142 | /* If we just powered the last thing off drop to standby bias */ | 1142 | /* If we just powered the last thing off drop to standby bias */ |
1143 | if (d->bias_level == SND_SOC_BIAS_PREPARE && !d->dev_power) { | 1143 | if (d->bias_level == SND_SOC_BIAS_PREPARE && !d->dev_power) { |
1144 | ret = snd_soc_dapm_set_bias_level(card, d, | 1144 | ret = snd_soc_dapm_set_bias_level(d, |
1145 | SND_SOC_BIAS_STANDBY); | 1145 | SND_SOC_BIAS_STANDBY); |
1146 | if (ret != 0) | 1146 | if (ret != 0) |
1147 | dev_err(d->dev, | 1147 | dev_err(d->dev, |
@@ -1152,7 +1152,7 @@ static int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event) | |||
1152 | /* If we're in standby and can support bias off then do that */ | 1152 | /* If we're in standby and can support bias off then do that */ |
1153 | if (d->bias_level == SND_SOC_BIAS_STANDBY && | 1153 | if (d->bias_level == SND_SOC_BIAS_STANDBY && |
1154 | d->idle_bias_off) { | 1154 | d->idle_bias_off) { |
1155 | ret = snd_soc_dapm_set_bias_level(card, d, | 1155 | ret = snd_soc_dapm_set_bias_level(d, |
1156 | SND_SOC_BIAS_OFF); | 1156 | SND_SOC_BIAS_OFF); |
1157 | if (ret != 0) | 1157 | if (ret != 0) |
1158 | dev_err(d->dev, | 1158 | dev_err(d->dev, |
@@ -1161,7 +1161,7 @@ static int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event) | |||
1161 | 1161 | ||
1162 | /* If we just powered up then move to active bias */ | 1162 | /* If we just powered up then move to active bias */ |
1163 | if (d->bias_level == SND_SOC_BIAS_PREPARE && d->dev_power) { | 1163 | if (d->bias_level == SND_SOC_BIAS_PREPARE && d->dev_power) { |
1164 | ret = snd_soc_dapm_set_bias_level(card, d, | 1164 | ret = snd_soc_dapm_set_bias_level(d, |
1165 | SND_SOC_BIAS_ON); | 1165 | SND_SOC_BIAS_ON); |
1166 | if (ret != 0) | 1166 | if (ret != 0) |
1167 | dev_err(d->dev, | 1167 | dev_err(d->dev, |
@@ -2439,9 +2439,9 @@ static void soc_dapm_shutdown_codec(struct snd_soc_dapm_context *dapm) | |||
2439 | * standby. | 2439 | * standby. |
2440 | */ | 2440 | */ |
2441 | if (powerdown) { | 2441 | if (powerdown) { |
2442 | snd_soc_dapm_set_bias_level(NULL, dapm, SND_SOC_BIAS_PREPARE); | 2442 | snd_soc_dapm_set_bias_level(dapm, SND_SOC_BIAS_PREPARE); |
2443 | dapm_seq_run(dapm, &down_list, 0, false); | 2443 | dapm_seq_run(dapm, &down_list, 0, false); |
2444 | snd_soc_dapm_set_bias_level(NULL, dapm, SND_SOC_BIAS_STANDBY); | 2444 | snd_soc_dapm_set_bias_level(dapm, SND_SOC_BIAS_STANDBY); |
2445 | } | 2445 | } |
2446 | } | 2446 | } |
2447 | 2447 | ||
@@ -2454,7 +2454,7 @@ void snd_soc_dapm_shutdown(struct snd_soc_card *card) | |||
2454 | 2454 | ||
2455 | list_for_each_entry(codec, &card->codec_dev_list, list) { | 2455 | list_for_each_entry(codec, &card->codec_dev_list, list) { |
2456 | soc_dapm_shutdown_codec(&codec->dapm); | 2456 | soc_dapm_shutdown_codec(&codec->dapm); |
2457 | snd_soc_dapm_set_bias_level(card, &codec->dapm, SND_SOC_BIAS_OFF); | 2457 | snd_soc_dapm_set_bias_level(&codec->dapm, SND_SOC_BIAS_OFF); |
2458 | } | 2458 | } |
2459 | } | 2459 | } |
2460 | 2460 | ||