Lines Matching refs:substream
32 #define snd_pcm_substream_chip(substream) ((substream)->private_data)
62 int (*open)(struct snd_pcm_substream *substream);
63 int (*close)(struct snd_pcm_substream *substream);
64 int (*ioctl)(struct snd_pcm_substream * substream,
66 int (*hw_params)(struct snd_pcm_substream *substream,
68 int (*hw_free)(struct snd_pcm_substream *substream);
69 int (*prepare)(struct snd_pcm_substream *substream);
70 int (*trigger)(struct snd_pcm_substream *substream, int cmd);
71 snd_pcm_uframes_t (*pointer)(struct snd_pcm_substream *substream);
72 int (*copy)(struct snd_pcm_substream *substream, int channel,
75 int (*silence)(struct snd_pcm_substream *substream, int channel,
77 struct page *(*page)(struct snd_pcm_substream *substream,
79 int (*mmap)(struct snd_pcm_substream *substream, struct vm_area_struct *vma);
80 int (*ack)(struct snd_pcm_substream *substream);
195 struct snd_pcm_substream *substream;
321 void (*transfer_ack_begin)(struct snd_pcm_substream *substream);
322 void (*transfer_ack_end)(struct snd_pcm_substream *substream);
351 char name[32]; /* substream name */
366 /* -- next substream -- */
370 struct snd_pcm_group self_group; /* fake group for non linked substream (with substream lock inside) */
395 #define SUBSTREAM_BUSY(substream) ((substream)->ref_count > 0)
404 struct snd_pcm_substream *substream;
465 int snd_pcm_info(struct snd_pcm_substream *substream, struct snd_pcm_info *info);
466 int snd_pcm_info_user(struct snd_pcm_substream *substream,
468 int snd_pcm_status(struct snd_pcm_substream *substream,
470 int snd_pcm_start(struct snd_pcm_substream *substream);
471 int snd_pcm_stop(struct snd_pcm_substream *substream, int status);
472 int snd_pcm_drain_done(struct snd_pcm_substream *substream);
474 int snd_pcm_suspend(struct snd_pcm_substream *substream);
477 int snd_pcm_kernel_ioctl(struct snd_pcm_substream *substream, unsigned int cmd, void *arg);
480 void snd_pcm_release_substream(struct snd_pcm_substream *substream);
483 void snd_pcm_detach_substream(struct snd_pcm_substream *substream);
485 int snd_pcm_mmap_data(struct snd_pcm_substream *substream, struct file *file, struct vm_area_struct *area);
565 static inline int snd_pcm_stream_linked(struct snd_pcm_substream *substream)
567 return substream->group != &substream->self_group;
570 static inline void snd_pcm_stream_lock(struct snd_pcm_substream *substream)
573 spin_lock(&substream->self_group.lock);
576 static inline void snd_pcm_stream_unlock(struct snd_pcm_substream *substream)
578 spin_unlock(&substream->self_group.lock);
582 static inline void snd_pcm_stream_lock_irq(struct snd_pcm_substream *substream)
585 spin_lock(&substream->self_group.lock);
588 static inline void snd_pcm_stream_unlock_irq(struct snd_pcm_substream *substream)
590 spin_unlock(&substream->self_group.lock);
594 #define snd_pcm_stream_lock_irqsave(substream, flags) \
597 spin_lock(&substream->self_group.lock); \
600 #define snd_pcm_stream_unlock_irqrestore(substream, flags) \
602 spin_unlock(&substream->self_group.lock); \
606 #define snd_pcm_group_for_each_entry(s, substream) \
607 list_for_each_entry(s, &substream->group->substreams, link_list)
609 static inline int snd_pcm_running(struct snd_pcm_substream *substream)
611 return (substream->runtime->status->state == SNDRV_PCM_STATE_RUNNING ||
612 (substream->runtime->status->state == SNDRV_PCM_STATE_DRAINING &&
613 substream->stream == SNDRV_PCM_STREAM_PLAYBACK));
641 static inline size_t snd_pcm_lib_buffer_bytes(struct snd_pcm_substream *substream)
643 struct snd_pcm_runtime *runtime = substream->runtime;
647 static inline size_t snd_pcm_lib_period_bytes(struct snd_pcm_substream *substream)
649 struct snd_pcm_runtime *runtime = substream->runtime;
689 * @substream: the pcm substream instance
695 static inline int snd_pcm_playback_ready(struct snd_pcm_substream *substream)
697 struct snd_pcm_runtime *runtime = substream->runtime;
703 * @substream: the pcm substream instance
709 static inline int snd_pcm_capture_ready(struct snd_pcm_substream *substream)
711 struct snd_pcm_runtime *runtime = substream->runtime;
717 * @substream: the pcm substream instance
724 static inline int snd_pcm_playback_data(struct snd_pcm_substream *substream)
726 struct snd_pcm_runtime *runtime = substream->runtime;
735 * @substream: the pcm substream instance
741 static inline int snd_pcm_playback_empty(struct snd_pcm_substream *substream)
743 struct snd_pcm_runtime *runtime = substream->runtime;
749 * @substream: the pcm substream instance
755 static inline int snd_pcm_capture_empty(struct snd_pcm_substream *substream)
757 struct snd_pcm_runtime *runtime = substream->runtime;
761 static inline void snd_pcm_trigger_done(struct snd_pcm_substream *substream,
764 substream->runtime->trigger_master = master;
830 int snd_pcm_hw_params_choose(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params);
832 int snd_pcm_hw_refine(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params);
834 int snd_pcm_hw_constraints_init(struct snd_pcm_substream *substream);
835 int snd_pcm_hw_constraints_complete(struct snd_pcm_substream *substream);
901 void snd_pcm_set_sync(struct snd_pcm_substream *substream);
902 int snd_pcm_lib_interleave_len(struct snd_pcm_substream *substream);
903 int snd_pcm_lib_ioctl(struct snd_pcm_substream *substream,
905 int snd_pcm_update_hw_ptr(struct snd_pcm_substream *substream);
906 int snd_pcm_playback_xrun_check(struct snd_pcm_substream *substream);
907 int snd_pcm_capture_xrun_check(struct snd_pcm_substream *substream);
908 int snd_pcm_playback_xrun_asap(struct snd_pcm_substream *substream);
909 int snd_pcm_capture_xrun_asap(struct snd_pcm_substream *substream);
910 void snd_pcm_playback_silence(struct snd_pcm_substream *substream, snd_pcm_uframes_t new_hw_ptr);
911 void snd_pcm_tick_prepare(struct snd_pcm_substream *substream);
912 void snd_pcm_tick_set(struct snd_pcm_substream *substream, unsigned long ticks);
913 void snd_pcm_tick_elapsed(struct snd_pcm_substream *substream);
914 void snd_pcm_period_elapsed(struct snd_pcm_substream *substream);
915 snd_pcm_sframes_t snd_pcm_lib_write(struct snd_pcm_substream *substream,
918 snd_pcm_sframes_t snd_pcm_lib_read(struct snd_pcm_substream *substream,
920 substream,
922 snd_pcm_sframes_t snd_pcm_lib_readv(struct snd_pcm_substream *substream,
930 static inline void snd_pcm_set_runtime_buffer(struct snd_pcm_substream *substream,
933 struct snd_pcm_runtime *runtime = substream->runtime;
951 void snd_pcm_timer_resolution_change(struct snd_pcm_substream *substream);
952 void snd_pcm_timer_init(struct snd_pcm_substream *substream);
953 void snd_pcm_timer_done(struct snd_pcm_substream *substream);
959 int snd_pcm_lib_preallocate_free(struct snd_pcm_substream *substream);
961 int snd_pcm_lib_preallocate_pages(struct snd_pcm_substream *substream,
967 int snd_pcm_lib_malloc_pages(struct snd_pcm_substream *substream, size_t size);
968 int snd_pcm_lib_free_pages(struct snd_pcm_substream *substream);
970 #define snd_pcm_substream_sgbuf(substream) ((substream)->runtime->dma_buffer_p->private_data)
973 struct page *snd_pcm_sgbuf_ops_page(struct snd_pcm_substream *substream, unsigned long offset);
978 struct snd_pcm_substream *substream = (struct snd_pcm_substream *)area->vm_private_data;
979 atomic_inc(&substream->mmap_count);
984 struct snd_pcm_substream *substream = (struct snd_pcm_substream *)area->vm_private_data;
985 atomic_dec(&substream->mmap_count);
991 int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream, struct vm_area_struct *area);