summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-02-13 10:00:47 +0300
committerTakashi Iwai <tiwai@suse.de>2019-02-13 10:00:54 +0300
commit5a23f385686fe0e9cd8e19cb09dff9a3b68082de (patch)
tree62c664e87df3a593463397fd4e09d08326687f47
parentd9c0b2afe820fa3b3f8258a659daee2cc71ca3ef (diff)
parent00a399cad1a063e7665f06b6497a807db20441fd (diff)
downloadlinux-5a23f385686fe0e9cd8e19cb09dff9a3b68082de.tar.xz
Merge branch 'for-linus' into for-next
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/core/pcm_lib.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
index 5957aeb1099e..bcb06bd3d81d 100644
--- a/sound/core/pcm_lib.c
+++ b/sound/core/pcm_lib.c
@@ -2112,13 +2112,6 @@ 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,
@@ -2184,16 +2177,11 @@ snd_pcm_sframes_t __snd_pcm_lib_xfer(struct snd_pcm_substream *substream,
snd_pcm_update_hw_ptr(substream);
if (!is_playback &&
- runtime->status->state == SNDRV_PCM_STATE_PREPARED) {
- if (size >= runtime->start_threshold) {
- err = snd_pcm_start(substream);
- if (err < 0)
- goto _end_unlock;
- } else if (!wait_capture_start(substream)) {
- /* nothing to do */
- err = 0;
+ runtime->status->state == SNDRV_PCM_STATE_PREPARED &&
+ size >= runtime->start_threshold) {
+ err = snd_pcm_start(substream);
+ if (err < 0)
goto _end_unlock;
- }
}
avail = snd_pcm_avail(substream);