diff options
author | Vaibhav Agarwal <vaibhav.agarwal@linaro.org> | 2016-02-16 00:27:28 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-02-17 16:03:40 -0800 |
commit | 29386f058a758f5ef6e8a522101fcbfd0ef07a19 (patch) | |
tree | 9ace3a3dbaf869b729938bd0cd20fd2b255c6c22 /drivers/staging/greybus/audio_codec.h | |
parent | b19df7b9950cd8c1212dcc775dffcdaace391db3 (diff) | |
download | op-kernel-dev-29386f058a758f5ef6e8a522101fcbfd0ef07a19.zip op-kernel-dev-29386f058a758f5ef6e8a522101fcbfd0ef07a19.tar.gz |
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.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/greybus/audio_codec.h b/drivers/staging/greybus/audio_codec.h index 4c19bd8..fc60c36 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 { |