aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/pcm_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/core/pcm_lib.c')
-rw-r--r--sound/core/pcm_lib.c49
1 files changed, 0 insertions, 49 deletions
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
index eeba2f060955..230a940d00bd 100644
--- a/sound/core/pcm_lib.c
+++ b/sound/core/pcm_lib.c
@@ -2299,19 +2299,7 @@ snd_pcm_sframes_t snd_pcm_lib_write(struct snd_pcm_substream *substream, const v
2299 if (runtime->status->state == SNDRV_PCM_STATE_OPEN) 2299 if (runtime->status->state == SNDRV_PCM_STATE_OPEN)
2300 return -EBADFD; 2300 return -EBADFD;
2301 2301
2302 snd_assert(substream->ffile != NULL, return -ENXIO);
2303 nonblock = !!(substream->ffile->f_flags & O_NONBLOCK); 2302 nonblock = !!(substream->ffile->f_flags & O_NONBLOCK);
2304#if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
2305 if (substream->oss.oss) {
2306 struct snd_pcm_oss_setup *setup = substream->oss.setup;
2307 if (setup != NULL) {
2308 if (setup->nonblock)
2309 nonblock = 1;
2310 else if (setup->block)
2311 nonblock = 0;
2312 }
2313 }
2314#endif
2315 2303
2316 if (runtime->access != SNDRV_PCM_ACCESS_RW_INTERLEAVED && 2304 if (runtime->access != SNDRV_PCM_ACCESS_RW_INTERLEAVED &&
2317 runtime->channels > 1) 2305 runtime->channels > 1)
@@ -2374,19 +2362,7 @@ snd_pcm_sframes_t snd_pcm_lib_writev(struct snd_pcm_substream *substream,
2374 if (runtime->status->state == SNDRV_PCM_STATE_OPEN) 2362 if (runtime->status->state == SNDRV_PCM_STATE_OPEN)
2375 return -EBADFD; 2363 return -EBADFD;
2376 2364
2377 snd_assert(substream->ffile != NULL, return -ENXIO);
2378 nonblock = !!(substream->ffile->f_flags & O_NONBLOCK); 2365 nonblock = !!(substream->ffile->f_flags & O_NONBLOCK);
2379#if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
2380 if (substream->oss.oss) {
2381 struct snd_pcm_oss_setup *setup = substream->oss.setup;
2382 if (setup != NULL) {
2383 if (setup->nonblock)
2384 nonblock = 1;
2385 else if (setup->block)
2386 nonblock = 0;
2387 }
2388 }
2389#endif
2390 2366
2391 if (runtime->access != SNDRV_PCM_ACCESS_RW_NONINTERLEAVED) 2367 if (runtime->access != SNDRV_PCM_ACCESS_RW_NONINTERLEAVED)
2392 return -EINVAL; 2368 return -EINVAL;
@@ -2596,19 +2572,7 @@ snd_pcm_sframes_t snd_pcm_lib_read(struct snd_pcm_substream *substream, void __u
2596 if (runtime->status->state == SNDRV_PCM_STATE_OPEN) 2572 if (runtime->status->state == SNDRV_PCM_STATE_OPEN)
2597 return -EBADFD; 2573 return -EBADFD;
2598 2574
2599 snd_assert(substream->ffile != NULL, return -ENXIO);
2600 nonblock = !!(substream->ffile->f_flags & O_NONBLOCK); 2575 nonblock = !!(substream->ffile->f_flags & O_NONBLOCK);
2601#if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
2602 if (substream->oss.oss) {
2603 struct snd_pcm_oss_setup *setup = substream->oss.setup;
2604 if (setup != NULL) {
2605 if (setup->nonblock)
2606 nonblock = 1;
2607 else if (setup->block)
2608 nonblock = 0;
2609 }
2610 }
2611#endif
2612 if (runtime->access != SNDRV_PCM_ACCESS_RW_INTERLEAVED) 2576 if (runtime->access != SNDRV_PCM_ACCESS_RW_INTERLEAVED)
2613 return -EINVAL; 2577 return -EINVAL;
2614 return snd_pcm_lib_read1(substream, (unsigned long)buf, size, nonblock, snd_pcm_lib_read_transfer); 2578 return snd_pcm_lib_read1(substream, (unsigned long)buf, size, nonblock, snd_pcm_lib_read_transfer);
@@ -2665,20 +2629,7 @@ snd_pcm_sframes_t snd_pcm_lib_readv(struct snd_pcm_substream *substream,
2665 if (runtime->status->state == SNDRV_PCM_STATE_OPEN) 2629 if (runtime->status->state == SNDRV_PCM_STATE_OPEN)
2666 return -EBADFD; 2630 return -EBADFD;
2667 2631
2668 snd_assert(substream->ffile != NULL, return -ENXIO);
2669 nonblock = !!(substream->ffile->f_flags & O_NONBLOCK); 2632 nonblock = !!(substream->ffile->f_flags & O_NONBLOCK);
2670#if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
2671 if (substream->oss.oss) {
2672 struct snd_pcm_oss_setup *setup = substream->oss.setup;
2673 if (setup != NULL) {
2674 if (setup->nonblock)
2675 nonblock = 1;
2676 else if (setup->block)
2677 nonblock = 0;
2678 }
2679 }
2680#endif
2681
2682 if (runtime->access != SNDRV_PCM_ACCESS_RW_NONINTERLEAVED) 2633 if (runtime->access != SNDRV_PCM_ACCESS_RW_NONINTERLEAVED)
2683 return -EINVAL; 2634 return -EINVAL;
2684 return snd_pcm_lib_read1(substream, (unsigned long)bufs, frames, nonblock, snd_pcm_lib_readv_transfer); 2635 return snd_pcm_lib_read1(substream, (unsigned long)bufs, frames, nonblock, snd_pcm_lib_readv_transfer);