diff options
author | Takashi Iwai <tiwai@suse.de> | 2019-01-29 11:07:24 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-01-29 11:07:48 +0100 |
commit | 286406c2e198b199c348447b3a7c54c6324db147 (patch) | |
tree | a193b6e6590e268ba46fe876146c3545d03599c0 /sound/core/pcm_lib.c | |
parent | b2e9e1c8810ee05c95f4d55800b8afae70ab01b4 (diff) | |
parent | e190161f96b88ffae870405fd6c3fdd1d2e7f98d (diff) |
Merge branch 'for-linus' into for-next
Pull 5.0 branch for further development of USB-audio quirks
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/pcm_lib.c')
-rw-r--r-- | sound/core/pcm_lib.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index f48efce937ad..5957aeb1099e 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c @@ -2112,6 +2112,13 @@ int pcm_lib_apply_appl_ptr(struct snd_pcm_substream *substream, return 0; } +/* allow waiting for a capture stream that hasn't been started */ +#if IS_ENABLED(CONFIG_SND_PCM_OSS) +#define wait_capture_start(substream) ((substream)->oss.oss) +#else +#define wait_capture_start(substream) false +#endif + /* the common loop for read/write data */ snd_pcm_sframes_t __snd_pcm_lib_xfer(struct snd_pcm_substream *substream, void *data, bool interleaved, @@ -2182,7 +2189,7 @@ snd_pcm_sframes_t __snd_pcm_lib_xfer(struct snd_pcm_substream *substream, err = snd_pcm_start(substream); if (err < 0) goto _end_unlock; - } else { + } else if (!wait_capture_start(substream)) { /* nothing to do */ err = 0; goto _end_unlock; |