diff options
author | Joel Stanley <joel@jms.id.au> | 2020-07-22 12:42:41 +0300 |
---|---|---|
committer | Joel Stanley <joel@jms.id.au> | 2020-07-22 12:42:46 +0300 |
commit | 8a9b346382056b52cd7ff141ae9f15a0fcfeb13d (patch) | |
tree | 7b855ed138c412bc27713ea8d3feef8939c954a0 /include/sound | |
parent | 2b4829edfc1c225c717652153097470529d171db (diff) | |
parent | d811d29517d1ea05bc159579231652d3ca1c2a01 (diff) | |
download | linux-8a9b346382056b52cd7ff141ae9f15a0fcfeb13d.tar.xz |
Merge tag 'v5.4.53' into dev-5.4
This is the 5.4.53 stable release
Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/compress_driver.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/sound/compress_driver.h b/include/sound/compress_driver.h index bc88d6f964da..006f01922439 100644 --- a/include/sound/compress_driver.h +++ b/include/sound/compress_driver.h @@ -59,6 +59,7 @@ struct snd_compr_runtime { * @direction: stream direction, playback/recording * @metadata_set: metadata set flag, true when set * @next_track: has userspace signal next track transition, true when set + * @partial_drain: undergoing partial_drain for stream, true when set * @private_data: pointer to DSP private data */ struct snd_compr_stream { @@ -70,6 +71,7 @@ struct snd_compr_stream { enum snd_compr_direction direction; bool metadata_set; bool next_track; + bool partial_drain; void *private_data; }; @@ -173,7 +175,13 @@ static inline void snd_compr_drain_notify(struct snd_compr_stream *stream) if (snd_BUG_ON(!stream)) return; - stream->runtime->state = SNDRV_PCM_STATE_SETUP; + /* for partial_drain case we are back to running state on success */ + if (stream->partial_drain) { + stream->runtime->state = SNDRV_PCM_STATE_RUNNING; + stream->partial_drain = false; /* clear this flag as well */ + } else { + stream->runtime->state = SNDRV_PCM_STATE_SETUP; + } wake_up(&stream->runtime->sleep); } |