Lines Matching refs:file
67 static int snd_pcm_open(struct file *file, struct snd_pcm *pcm, int stream);
1720 struct file *file) in snd_pcm_prepare() argument
1724 if (file) in snd_pcm_prepare()
1725 f_flags = file->f_flags; in snd_pcm_prepare()
1821 struct file *file) in snd_pcm_drain() argument
1837 if (file) { in snd_pcm_drain()
1838 if (file->f_flags & O_NONBLOCK) in snd_pcm_drain()
1960 static bool is_pcm_file(struct file *file) in is_pcm_file() argument
1962 struct inode *inode = file_inode(file); in is_pcm_file()
1990 if (!f.file) in snd_pcm_link()
1992 if (!is_pcm_file(f.file)) { in snd_pcm_link()
1996 pcm_file = f.file->private_data; in snd_pcm_link()
2446 struct file *file, in snd_pcm_open_substream() argument
2452 err = snd_pcm_attach_substream(pcm, stream, file, &substream); in snd_pcm_open_substream()
2486 static int snd_pcm_open_file(struct file *file, in snd_pcm_open_file() argument
2494 err = snd_pcm_open_substream(pcm, stream, file, &substream); in snd_pcm_open_file()
2506 file->private_data = pcm_file; in snd_pcm_open_file()
2511 static int snd_pcm_playback_open(struct inode *inode, struct file *file) in snd_pcm_playback_open() argument
2514 int err = nonseekable_open(inode, file); in snd_pcm_playback_open()
2519 err = snd_pcm_open(file, pcm, SNDRV_PCM_STREAM_PLAYBACK); in snd_pcm_playback_open()
2525 static int snd_pcm_capture_open(struct inode *inode, struct file *file) in snd_pcm_capture_open() argument
2528 int err = nonseekable_open(inode, file); in snd_pcm_capture_open()
2533 err = snd_pcm_open(file, pcm, SNDRV_PCM_STREAM_CAPTURE); in snd_pcm_capture_open()
2539 static int snd_pcm_open(struct file *file, struct snd_pcm *pcm, int stream) in snd_pcm_open() argument
2548 err = snd_card_file_add(pcm->card, file); in snd_pcm_open()
2559 err = snd_pcm_open_file(file, pcm, stream); in snd_pcm_open()
2563 if (file->f_flags & O_NONBLOCK) { in snd_pcm_open()
2591 snd_card_file_remove(pcm->card, file); in snd_pcm_open()
2596 static int snd_pcm_release(struct inode *inode, struct file *file) in snd_pcm_release() argument
2602 pcm_file = file->private_data; in snd_pcm_release()
2613 snd_card_file_remove(pcm->card, file); in snd_pcm_release()
2886 static int snd_pcm_common_ioctl(struct file *file, in snd_pcm_common_ioctl() argument
2890 struct snd_pcm_file *pcm_file = file->private_data; in snd_pcm_common_ioctl()
2929 return snd_pcm_prepare(substream, file); in snd_pcm_common_ioctl()
2966 return snd_pcm_drain(substream, file); in snd_pcm_common_ioctl()
2988 static long snd_pcm_ioctl(struct file *file, unsigned int cmd, in snd_pcm_ioctl() argument
2993 pcm_file = file->private_data; in snd_pcm_ioctl()
2998 return snd_pcm_common_ioctl(file, pcm_file->substream, cmd, in snd_pcm_ioctl()
3047 static ssize_t snd_pcm_read(struct file *file, char __user *buf, size_t count, in snd_pcm_read() argument
3055 pcm_file = file->private_data; in snd_pcm_read()
3071 static ssize_t snd_pcm_write(struct file *file, const char __user *buf, in snd_pcm_write() argument
3079 pcm_file = file->private_data; in snd_pcm_write()
3166 static __poll_t snd_pcm_poll(struct file *file, poll_table *wait) in snd_pcm_poll() argument
3174 pcm_file = file->private_data; in snd_pcm_poll()
3185 poll_wait(file, &runtime->sleep, wait); in snd_pcm_poll()
3242 static int snd_pcm_mmap_status(struct snd_pcm_substream *substream, struct file *file, in snd_pcm_mmap_status() argument
3278 static int snd_pcm_mmap_control(struct snd_pcm_substream *substream, struct file *file, in snd_pcm_mmap_control() argument
3327 static int snd_pcm_mmap_status(struct snd_pcm_substream *substream, struct file *file, in snd_pcm_mmap_status() argument
3332 static int snd_pcm_mmap_control(struct snd_pcm_substream *substream, struct file *file, in snd_pcm_mmap_control() argument
3453 int snd_pcm_mmap_data(struct snd_pcm_substream *substream, struct file *file, in snd_pcm_mmap_data() argument
3497 static int snd_pcm_mmap(struct file *file, struct vm_area_struct *area) in snd_pcm_mmap() argument
3503 pcm_file = file->private_data; in snd_pcm_mmap()
3513 return snd_pcm_mmap_status(substream, file, area); in snd_pcm_mmap()
3517 return snd_pcm_mmap_control(substream, file, area); in snd_pcm_mmap()
3519 return snd_pcm_mmap_data(substream, file, area); in snd_pcm_mmap()
3524 static int snd_pcm_fasync(int fd, struct file * file, int on) in snd_pcm_fasync() argument
3530 pcm_file = file->private_data; in snd_pcm_fasync()
3535 return fasync_helper(fd, file, on, &runtime->fasync); in snd_pcm_fasync()
3662 static unsigned long snd_pcm_get_unmapped_area(struct file *file, in snd_pcm_get_unmapped_area() argument
3668 struct snd_pcm_file *pcm_file = file->private_data; in snd_pcm_get_unmapped_area()