Skip to content

Commit 81630dc

Browse files
jwrdegoedebroonie
authored andcommitted
ASoC: Intel: atom: Take the drv->lock mutex before calling sst_send_slot_map()
sst_send_slot_map() uses sst_fill_and_send_cmd_unlocked() because in some places it is called with the drv->lock mutex already held. So it must always be called with the mutex locked. This commit adds missing locking in the sst_set_be_modules() code-path. Fixes: 24c8d14 ("ASoC: Intel: mrfld: add DSP core controls") Signed-off-by: Hans de Goede <[email protected]> Acked-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 904f353 commit 81630dc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sound/soc/intel/atom/sst-atom-controls.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -966,7 +966,9 @@ static int sst_set_be_modules(struct snd_soc_dapm_widget *w,
966966
dev_dbg(c->dev, "Enter: widget=%s\n", w->name);
967967

968968
if (SND_SOC_DAPM_EVENT_ON(event)) {
969+
mutex_lock(&drv->lock);
969970
ret = sst_send_slot_map(drv);
971+
mutex_unlock(&drv->lock);
970972
if (ret)
971973
return ret;
972974
ret = sst_send_pipe_module_params(w, k);

0 commit comments

Comments
 (0)