aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-02-21 08:14:50 -0500
committerJaroslav Kysela <perex@suse.cz>2006-03-22 04:30:48 -0500
commite661d0ddc58740eca41313fbb01f1612ff9c7878 (patch)
tree379123cc50943ec923bd19952880b694ff3daac0 /sound
parent8278ca8feb2748cf02d756ac6c5b9ab2e047c84a (diff)
[ALSA] pcm - Move PAUSE ioctl to common ioctl handler
Modules: PCM Midlevel Moved PAUSE ioctl to the common ioctl handler. A capture stream may issue PAUSE, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/core/pcm_native.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index ce1956a5528d..01f150f0990e 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -2539,6 +2539,14 @@ static int snd_pcm_common_ioctl1(struct snd_pcm_substream *substream,
2539 return snd_pcm_drain(substream); 2539 return snd_pcm_drain(substream);
2540 case SNDRV_PCM_IOCTL_DROP: 2540 case SNDRV_PCM_IOCTL_DROP:
2541 return snd_pcm_drop(substream); 2541 return snd_pcm_drop(substream);
2542 case SNDRV_PCM_IOCTL_PAUSE:
2543 {
2544 int res;
2545 snd_pcm_stream_lock_irq(substream);
2546 res = snd_pcm_pause(substream, (int)(unsigned long)arg);
2547 snd_pcm_stream_unlock_irq(substream);
2548 return res;
2549 }
2542 } 2550 }
2543 snd_printd("unknown ioctl = 0x%x\n", cmd); 2551 snd_printd("unknown ioctl = 0x%x\n", cmd);
2544 return -ENOTTY; 2552 return -ENOTTY;
@@ -2619,14 +2627,6 @@ static int snd_pcm_playback_ioctl1(struct snd_pcm_substream *substream,
2619 __put_user(result, _frames); 2627 __put_user(result, _frames);
2620 return result < 0 ? result : 0; 2628 return result < 0 ? result : 0;
2621 } 2629 }
2622 case SNDRV_PCM_IOCTL_PAUSE:
2623 {
2624 int res;
2625 snd_pcm_stream_lock_irq(substream);
2626 res = snd_pcm_pause(substream, (int)(unsigned long)arg);
2627 snd_pcm_stream_unlock_irq(substream);
2628 return res;
2629 }
2630 } 2630 }
2631 return snd_pcm_common_ioctl1(substream, cmd, arg); 2631 return snd_pcm_common_ioctl1(substream, cmd, arg);
2632} 2632}