Loading sound/core/pcm_native.c +26 −1 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ #include <linux/dma-mapping.h> #include <sound/core.h> #include <sound/control.h> #include <sound/compress_offload.h> #include <sound/info.h> #include <sound/pcm.h> #include <sound/pcm_params.h> Loading Loading @@ -1259,6 +1260,20 @@ static int snd_pcm_start_lock_irq(struct snd_pcm_substream *substream) SNDRV_PCM_STATE_RUNNING); } static int snd_compressed_ioctl(struct snd_pcm_substream *substream, unsigned int cmd, void __user *arg) { struct snd_pcm_runtime *runtime; int err = 0; if (PCM_RUNTIME_CHECK(substream)) return -ENXIO; runtime = substream->runtime; pr_debug("%s called with cmd = %d\n", __func__, cmd); err = substream->ops->ioctl(substream, cmd, arg); return err; } /* * stop callbacks */ Loading Loading @@ -2949,6 +2964,13 @@ static int snd_pcm_common_ioctl(struct file *file, return snd_pcm_rewind_ioctl(substream, arg); case SNDRV_PCM_IOCTL_FORWARD: return snd_pcm_forward_ioctl(substream, arg); case SNDRV_COMPRESS_GET_CAPS: case SNDRV_COMPRESS_GET_CODEC_CAPS: case SNDRV_COMPRESS_SET_PARAMS: case SNDRV_COMPRESS_GET_PARAMS: case SNDRV_COMPRESS_TSTAMP: case SNDRV_COMPRESS_DRAIN: return snd_compressed_ioctl(substream, cmd, arg); } pcm_dbg(substream->pcm, "unknown ioctl = 0x%x\n", cmd); return -ENOTTY; Loading @@ -2961,7 +2983,10 @@ static long snd_pcm_ioctl(struct file *file, unsigned int cmd, pcm_file = file->private_data; if (((cmd >> 8) & 0xff) != 'A') if ((((cmd >> 8) & 0xff) != 'A') && ((pcm_file->substream->stream == SNDRV_PCM_STREAM_CAPTURE) || (pcm_file->substream->stream == SNDRV_PCM_STREAM_PLAYBACK && (((cmd >> 8) & 0xff) != 'C')))) return -ENOTTY; return snd_pcm_common_ioctl(file, pcm_file->substream, cmd, Loading Loading
sound/core/pcm_native.c +26 −1 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ #include <linux/dma-mapping.h> #include <sound/core.h> #include <sound/control.h> #include <sound/compress_offload.h> #include <sound/info.h> #include <sound/pcm.h> #include <sound/pcm_params.h> Loading Loading @@ -1259,6 +1260,20 @@ static int snd_pcm_start_lock_irq(struct snd_pcm_substream *substream) SNDRV_PCM_STATE_RUNNING); } static int snd_compressed_ioctl(struct snd_pcm_substream *substream, unsigned int cmd, void __user *arg) { struct snd_pcm_runtime *runtime; int err = 0; if (PCM_RUNTIME_CHECK(substream)) return -ENXIO; runtime = substream->runtime; pr_debug("%s called with cmd = %d\n", __func__, cmd); err = substream->ops->ioctl(substream, cmd, arg); return err; } /* * stop callbacks */ Loading Loading @@ -2949,6 +2964,13 @@ static int snd_pcm_common_ioctl(struct file *file, return snd_pcm_rewind_ioctl(substream, arg); case SNDRV_PCM_IOCTL_FORWARD: return snd_pcm_forward_ioctl(substream, arg); case SNDRV_COMPRESS_GET_CAPS: case SNDRV_COMPRESS_GET_CODEC_CAPS: case SNDRV_COMPRESS_SET_PARAMS: case SNDRV_COMPRESS_GET_PARAMS: case SNDRV_COMPRESS_TSTAMP: case SNDRV_COMPRESS_DRAIN: return snd_compressed_ioctl(substream, cmd, arg); } pcm_dbg(substream->pcm, "unknown ioctl = 0x%x\n", cmd); return -ENOTTY; Loading @@ -2961,7 +2983,10 @@ static long snd_pcm_ioctl(struct file *file, unsigned int cmd, pcm_file = file->private_data; if (((cmd >> 8) & 0xff) != 'A') if ((((cmd >> 8) & 0xff) != 'A') && ((pcm_file->substream->stream == SNDRV_PCM_STREAM_CAPTURE) || (pcm_file->substream->stream == SNDRV_PCM_STREAM_PLAYBACK && (((cmd >> 8) & 0xff) != 'C')))) return -ENOTTY; return snd_pcm_common_ioctl(file, pcm_file->substream, cmd, Loading