Skip to contentSkip to conversation

ASoC: dapm: Fix deadlock on auto-disable mux controls

PATCH Applied Charles Keepax 2 participants 2 messages Jun 26, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: dapm: Fix deadlock on auto-disable mux controls

The commit 02aa78abec6e ("ASoC: DAPM: Add APIs to create individual DAPM controls.") added locking to the snd_soc_dapm_new_control function but did not update the call to snd_soc_dapm_new_control in the auto-disable mux code, this appears to be because the patches were sent at fairly similar times.

This patch change the call in the auto-disable mux code to use the new snd_soc_dapm_new_control_unlocked function instead.

---
 sound/soc/soc-dapm.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
sound/soc/soc-dapm.c +2 -2
index aa327c9..a47a8ce 100644
@@ -389,8 +389,8 @@ static int dapm_kcontrol_data_alloc(struct snd_soc_dapm_widget *widget,
 
 			data->value = template.on_val;
 
-			data->widget = snd_soc_dapm_new_control(widget->dapm,
-					&template);
+			data->widget = snd_soc_dapm_new_control_unlocked(
+						widget->dapm, &template);
 			if (!data->widget) {
 				ret = -ENOMEM;
 				goto err_name;
Signature · 1 line
1.7.2.5
maintainer Applied
#1 lore raw
Quoted 5 lines · Charles Keepax

The commit 02aa78abec6e ("ASoC: DAPM: Add APIs to create individual DAPM controls.") added locking to the snd_soc_dapm_new_control function but did not update the call to snd_soc_dapm_new_control in the auto-disable mux code, this appears to be because the patches were sent at fairly similar times.

Applied, thanks.