ASoC: dapm: Do not process cpu_dai widgets in bias changes

Kernel 3.10 has cpu dai widgets in the list of card
widgets in addition to platform and codec widgets.
This is causing a delay in device switch because
cpu dai widgets increase the number of widgets to be
processed for bias changes by a factor of five, however
they are not required to be processed.
Skip processing of cpu dai widgets to keep
the device switch latency at same level as in kernel 3.4.

CRs-fixed: 699168
Change-Id: I2d7d9e34dabf2cd25ec5fdd3e58be0fc657c0f6c
Signed-off-by: Damir Didjusto <damird@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
This commit is contained in:
Banajit Goswami 2015-04-10 18:19:16 -07:00 committed by David Keitel
parent f48c0e7f53
commit ab70671974

View file

@ -1783,6 +1783,8 @@ static int dapm_power_widgets(struct snd_soc_card *card, int event)
LIST_HEAD(down_list);
ASYNC_DOMAIN_EXCLUSIVE(async_domain);
enum snd_soc_bias_level bias;
struct snd_soc_platform *p;
struct snd_soc_codec *c;
lockdep_assert_held(&card->dapm_mutex);
@ -1865,7 +1867,9 @@ static int dapm_power_widgets(struct snd_soc_card *card, int event)
dapm_pre_sequence_async(&card->dapm, 0);
/* Run other bias changes in parallel */
list_for_each_entry(d, &card->dapm_list, list) {
if (d != &card->dapm)
p = snd_soc_dapm_to_platform(d);
c = snd_soc_dapm_to_codec(d);
if ((d != &card->dapm) && (c || p))
async_schedule_domain(dapm_pre_sequence_async, d,
&async_domain);
}
@ -1889,7 +1893,9 @@ static int dapm_power_widgets(struct snd_soc_card *card, int event)
/* Run all the bias changes in parallel */
list_for_each_entry(d, &card->dapm_list, list) {
if (d != &card->dapm)
p = snd_soc_dapm_to_platform(d);
c = snd_soc_dapm_to_codec(d);
if ((d != &card->dapm) && (c || p))
async_schedule_domain(dapm_post_sequence_async, d,
&async_domain);
}