summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/audio_codec.h
diff options
context:
space:
mode:
authorVaibhav Agarwal <vaibhav.agarwal@linaro.org>2016-02-16 00:27:28 +0530
committerGreg Kroah-Hartman <gregkh@google.com>2016-02-17 16:03:40 -0800
commit29386f058a758f5ef6e8a522101fcbfd0ef07a19 (patch)
tree9ace3a3dbaf869b729938bd0cd20fd2b255c6c22 /drivers/staging/greybus/audio_codec.h
parentb19df7b9950cd8c1212dcc775dffcdaace391db3 (diff)
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 <vaibhav.agarwal@linaro.org> Reviewed-by: Mark Greer <mgreer@animalcreek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/audio_codec.h')
-rw-r--r--drivers/staging/greybus/audio_codec.h1
1 files changed, 1 insertions, 0 deletions
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 {