Skip to content

Commit

Permalink
[ALSA] pcm - Move PAUSE ioctl to common ioctl handler
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed Mar 22, 2006
1 parent 8278ca8 commit e661d0d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions sound/core/pcm_native.c
Original file line number Diff line number Diff line change
Expand Up @@ -2539,6 +2539,14 @@ static int snd_pcm_common_ioctl1(struct snd_pcm_substream *substream,
return snd_pcm_drain(substream);
case SNDRV_PCM_IOCTL_DROP:
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);
return -ENOTTY;
Expand Down Expand Up @@ -2619,14 +2627,6 @@ static int snd_pcm_playback_ioctl1(struct snd_pcm_substream *substream,
__put_user(result, _frames);
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);
}
Expand Down

0 comments on commit e661d0d

Please sign in to comment.