Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53ae662f authored by Banajit Goswami's avatar Banajit Goswami
Browse files

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: default avatarDamir Didjusto <damird@codeaurora.org>
Signed-off-by: default avatarBanajit Goswami <bgoswami@codeaurora.org>
parent 6dec724b
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -1819,6 +1819,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);

@@ -1901,7 +1903,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);
	}
@@ -1925,7 +1929,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);
	}