]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/core/pcm_compat.c
ALSA: Kill snd_assert() in sound/core/*
[linux-2.6-omap-h63xx.git] / sound / core / pcm_compat.c
index e5133033de5e5fdf049ab51d2001677c58555738..36d7a5998234f472bec63b603bc5e7366f07f90d 100644 (file)
@@ -397,7 +397,8 @@ static int snd_pcm_ioctl_sync_ptr_compat(struct snd_pcm_substream *substream,
        snd_pcm_uframes_t boundary;
        int err;
 
-       snd_assert(runtime, return -EINVAL);
+       if (snd_BUG_ON(!runtime))
+               return -EINVAL;
 
        if (get_user(sflags, &src->flags) ||
            get_user(scontrol.appl_ptr, &src->c.control.appl_ptr) ||
@@ -478,12 +479,13 @@ static long snd_pcm_ioctl_compat(struct file *file, unsigned int cmd, unsigned l
         * mmap of PCM status/control records because of the size
         * incompatibility.
         */
-       substream->no_mmap_ctrl = 1;
+       pcm_file->no_compat_mmap = 1;
 
        switch (cmd) {
        case SNDRV_PCM_IOCTL_PVERSION:
        case SNDRV_PCM_IOCTL_INFO:
        case SNDRV_PCM_IOCTL_TSTAMP:
+       case SNDRV_PCM_IOCTL_TTSTAMP:
        case SNDRV_PCM_IOCTL_HWSYNC:
        case SNDRV_PCM_IOCTL_PREPARE:
        case SNDRV_PCM_IOCTL_RESET:
@@ -497,9 +499,9 @@ static long snd_pcm_ioctl_compat(struct file *file, unsigned int cmd, unsigned l
        case SNDRV_PCM_IOCTL_LINK:
        case SNDRV_PCM_IOCTL_UNLINK:
                if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
-                       return snd_pcm_playback_ioctl1(substream, cmd, argp);
+                       return snd_pcm_playback_ioctl1(file, substream, cmd, argp);
                else
-                       return snd_pcm_capture_ioctl1(substream, cmd, argp);
+                       return snd_pcm_capture_ioctl1(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: