diff options
author | Takashi Iwai <tiwai@suse.de> | 2017-08-30 15:39:32 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-08-30 20:44:55 +0200 |
commit | 67616feda99e32cb676b0907284bbb6957e45480 (patch) | |
tree | f790394273fdc40a2a918e9855e51044d5dfdfa6 /sound/core/pcm_compat.c | |
parent | 7d8e8292013ab72ae1f1500cbc91f198ccb1826d (diff) | |
download | linux-67616feda99e32cb676b0907284bbb6957e45480.tar.gz |
ALSA: pcm: Unify ioctl functions for playback and capture streams
Some ioctl functions are implemented individually for both playback
and capture streams although most of the codes are identical with just
a few different stream-specific function calls. This patch unifies
these places, removes the superfluous trivial check and flattens the
call paths as a cleanup. Meanwhile, for better readability, some
codes (e.g. xfer ioctls or forward/rewind ioctls) are factored out as
functions.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/pcm_compat.c')
-rw-r--r-- | sound/core/pcm_compat.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sound/core/pcm_compat.c b/sound/core/pcm_compat.c index 10f537f4d735..3a1cc7b97e46 100644 --- a/sound/core/pcm_compat.c +++ b/sound/core/pcm_compat.c @@ -689,10 +689,7 @@ static long snd_pcm_ioctl_compat(struct file *file, unsigned int cmd, unsigned l case SNDRV_PCM_IOCTL_XRUN: case SNDRV_PCM_IOCTL_LINK: case SNDRV_PCM_IOCTL_UNLINK: - if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) - return snd_pcm_playback_ioctl1(file, substream, cmd, argp); - else - return snd_pcm_capture_ioctl1(file, substream, cmd, argp); + return snd_pcm_common_ioctl(file, substream, cmd, argp); case SNDRV_PCM_IOCTL_HW_REFINE32: return snd_pcm_ioctl_hw_params_compat(substream, 1, argp); case SNDRV_PCM_IOCTL_HW_PARAMS32: |