From 29386f058a758f5ef6e8a522101fcbfd0ef07a19 Mon Sep 17 00:00:00 2001 From: Vaibhav Agarwal Date: Tue, 16 Feb 2016 00:27:28 +0530 Subject: greybus: audio: schedule workqueue to perform codec cleanup on module removal In response to codec module removal, user space is reported about the event. In response to this, ALSA layer will update DAPM route and cleanup DAPM states. As a fallback mechanism, kernel can cleanup the DAPM state for codec module. But, this would cause immediate playback (first trial) to fail, since DSP is still in inconsistent state. To avoid such situation, a workqueue is scheduled for codec cleanup with timeout=50ms. Thus, normally it is expected from above layers to update routes and perform cleanup. However, fallback mechanism still holds good after 50ms. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/audio_codec.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/staging/greybus/audio_codec.h') diff --git a/drivers/staging/greybus/audio_codec.h b/drivers/staging/greybus/audio_codec.h index 4c19bd884488..fc60c36aa040 100644 --- a/drivers/staging/greybus/audio_codec.h +++ b/drivers/staging/greybus/audio_codec.h @@ -88,6 +88,7 @@ struct gbaudio_dai { atomic_t users; struct gb_connection *connection; struct list_head list; + wait_queue_head_t wait_queue; }; struct gbaudio_codec_info { -- cgit v1.2.3