diff options
author | dvdli <dvdli@google.com> | 2021-01-28 11:53:30 +0800 |
---|---|---|
committer | dvdli <dvdli@google.com> | 2021-01-28 14:25:40 +0800 |
commit | c0f924738de2b8f5478e8b454b4ad5521802f3f6 (patch) | |
tree | cc0248f32f5e6c7afee5b098d416c846cf435c04 /src | |
parent | b618ec79a1fde67594d7361c5fdc07d74a464951 (diff) |
prepare in pcm_generic_transfer
Diffstat (limited to 'src')
-rw-r--r-- | src/pcm.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1637,6 +1637,10 @@ static int pcm_generic_transfer(struct pcm *pcm, void *data, if (frames > INT_MAX) return -EINVAL; + if (pcm_state(pcm) == PCM_STATE_SETUP && pcm_prepare(pcm) != 0) { + return -1; + } + again: if (pcm->flags & PCM_MMAP) |