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

Commit d57aca08 authored by Xiaojun Sang's avatar Xiaojun Sang Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: initialize queue head for compress capture



Waitqueue head is not initialized at open stage. Future
action may wake up uninitialized wait. Initialize them
for compress capture.

Change-Id: I142202783aa9b7b9334c1a9632a89cd1ba7f5005
Signed-off-by: default avatarXiaojun Sang <xsang@codeaurora.org>
parent e039f16f
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1779,6 +1779,11 @@ static int msm_compr_capture_open(struct snd_compr_stream *cstream)
	atomic_set(&prtd->wait_on_close, 0);
	atomic_set(&prtd->error, 0);

	init_waitqueue_head(&prtd->eos_wait);
	init_waitqueue_head(&prtd->drain_wait);
	init_waitqueue_head(&prtd->close_wait);
	init_waitqueue_head(&prtd->wait_for_stream_avail);

	runtime->private_data = prtd;

	return 0;