Commit e661d0dd authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela

[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: default avatarTakashi Iwai <tiwai@suse.de>
parent 8278ca8f
...@@ -2539,6 +2539,14 @@ static int snd_pcm_common_ioctl1(struct snd_pcm_substream *substream, ...@@ -2539,6 +2539,14 @@ static int snd_pcm_common_ioctl1(struct snd_pcm_substream *substream,
return snd_pcm_drain(substream); return snd_pcm_drain(substream);
case SNDRV_PCM_IOCTL_DROP: case SNDRV_PCM_IOCTL_DROP:
return snd_pcm_drop(substream); return snd_pcm_drop(substream);
case SNDRV_PCM_IOCTL_PAUSE:
{
int res;
snd_pcm_stream_lock_irq(substream);
res = snd_pcm_pause(substream, (int)(unsigned long)arg);
snd_pcm_stream_unlock_irq(substream);
return res;
}
} }
snd_printd("unknown ioctl = 0x%x\n", cmd); snd_printd("unknown ioctl = 0x%x\n", cmd);
return -ENOTTY; return -ENOTTY;
...@@ -2619,14 +2627,6 @@ static int snd_pcm_playback_ioctl1(struct snd_pcm_substream *substream, ...@@ -2619,14 +2627,6 @@ static int snd_pcm_playback_ioctl1(struct snd_pcm_substream *substream,
__put_user(result, _frames); __put_user(result, _frames);
return result < 0 ? result : 0; return result < 0 ? result : 0;
} }
case SNDRV_PCM_IOCTL_PAUSE:
{
int res;
snd_pcm_stream_lock_irq(substream);
res = snd_pcm_pause(substream, (int)(unsigned long)arg);
snd_pcm_stream_unlock_irq(substream);
return res;
}
} }
return snd_pcm_common_ioctl1(substream, cmd, arg); return snd_pcm_common_ioctl1(substream, cmd, arg);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment