aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/pcm_lib.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-01-29 11:07:24 +0100
committerTakashi Iwai <tiwai@suse.de>2019-01-29 11:07:48 +0100
commit286406c2e198b199c348447b3a7c54c6324db147 (patch)
treea193b6e6590e268ba46fe876146c3545d03599c0 /sound/core/pcm_lib.c
parentALSA: dice: add support for Solid State Logic Duende Classic/Mini (diff)
parentALSA: pcm: Fix tight loop of OSS capture stream (diff)
downloadlinux-dev-286406c2e198b199c348447b3a7c54c6324db147.tar.xz
linux-dev-286406c2e198b199c348447b3a7c54c6324db147.zip
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.c9
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;