X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Fcore%2Fpcm_native.c;h=6d5271f3f0a98f4adb3e0bbc05b41dd220741031;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=15ed2b9b3c11940f3b3b840f479210dfb21d30db;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index 15ed2b9b3..6d5271f3f 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c @@ -1100,7 +1100,7 @@ static int snd_pcm_pre_reset(snd_pcm_substream_t * substream, int state) static int snd_pcm_do_reset(snd_pcm_substream_t * substream, int state) { snd_pcm_runtime_t *runtime = substream->runtime; - int err = substream->ops->ioctl(substream, SNDRV_PCM_IOCTL1_RESET, 0); + int err = substream->ops->ioctl(substream, SNDRV_PCM_IOCTL1_RESET, NULL); if (err < 0) return err; // snd_assert(runtime->status->hw_ptr < runtime->buffer_size, ); @@ -1475,18 +1475,18 @@ static struct file *snd_pcm_file_fd(int fd) unsigned short minor; file = fget(fd); if (!file) - return 0; + return NULL; inode = file->f_dentry->d_inode; if (!S_ISCHR(inode->i_mode) || imajor(inode) != snd_major) { fput(file); - return 0; + return NULL; } minor = iminor(inode); if (minor >= 256 || minor % SNDRV_MINOR_DEVICES < SNDRV_MINOR_PCM_PLAYBACK) { fput(file); - return 0; + return NULL; } return file; } @@ -1701,23 +1701,23 @@ int snd_pcm_hw_constraints_init(snd_pcm_substream_t *substream) snd_interval_setinteger(constrs_interval(constrs, SNDRV_PCM_HW_PARAM_FRAME_BITS)); err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_FORMAT, - snd_pcm_hw_rule_format, 0, + snd_pcm_hw_rule_format, NULL, SNDRV_PCM_HW_PARAM_SAMPLE_BITS, -1); if (err < 0) return err; err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_SAMPLE_BITS, - snd_pcm_hw_rule_sample_bits, 0, + snd_pcm_hw_rule_sample_bits, NULL, SNDRV_PCM_HW_PARAM_FORMAT, SNDRV_PCM_HW_PARAM_SAMPLE_BITS, -1); if (err < 0) return err; err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_SAMPLE_BITS, - snd_pcm_hw_rule_div, 0, + snd_pcm_hw_rule_div, NULL, SNDRV_PCM_HW_PARAM_FRAME_BITS, SNDRV_PCM_HW_PARAM_CHANNELS, -1); if (err < 0) return err; err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_FRAME_BITS, - snd_pcm_hw_rule_mul, 0, + snd_pcm_hw_rule_mul, NULL, SNDRV_PCM_HW_PARAM_SAMPLE_BITS, SNDRV_PCM_HW_PARAM_CHANNELS, -1); if (err < 0) return err; @@ -1732,7 +1732,7 @@ int snd_pcm_hw_constraints_init(snd_pcm_substream_t *substream) if (err < 0) return err; err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS, - snd_pcm_hw_rule_div, 0, + snd_pcm_hw_rule_div, NULL, SNDRV_PCM_HW_PARAM_FRAME_BITS, SNDRV_PCM_HW_PARAM_SAMPLE_BITS, -1); if (err < 0) return err; @@ -1747,12 +1747,12 @@ int snd_pcm_hw_constraints_init(snd_pcm_substream_t *substream) if (err < 0) return err; err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_PERIODS, - snd_pcm_hw_rule_div, 0, + snd_pcm_hw_rule_div, NULL, SNDRV_PCM_HW_PARAM_BUFFER_SIZE, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, -1); if (err < 0) return err; err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, - snd_pcm_hw_rule_div, 0, + snd_pcm_hw_rule_div, NULL, SNDRV_PCM_HW_PARAM_BUFFER_SIZE, SNDRV_PCM_HW_PARAM_PERIODS, -1); if (err < 0) return err; @@ -1767,7 +1767,7 @@ int snd_pcm_hw_constraints_init(snd_pcm_substream_t *substream) if (err < 0) return err; err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_SIZE, - snd_pcm_hw_rule_mul, 0, + snd_pcm_hw_rule_mul, NULL, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, SNDRV_PCM_HW_PARAM_PERIODS, -1); if (err < 0) return err;