Home
last modified time | relevance | path

Searched refs:substream (Results 1 – 200 of 523) sorted by relevance

123

/linux-4.1.27/sound/core/
Dpcm_memory.c51 static int preallocate_pcm_pages(struct snd_pcm_substream *substream, size_t size) in preallocate_pcm_pages() argument
53 struct snd_dma_buffer *dmab = &substream->dma_buffer; in preallocate_pcm_pages()
68 substream->pcm->card->number, substream->pcm->device, in preallocate_pcm_pages()
69 substream->stream ? 'c' : 'p', substream->number, in preallocate_pcm_pages()
70 substream->pcm->name, orig_size); in preallocate_pcm_pages()
77 static void snd_pcm_lib_preallocate_dma_free(struct snd_pcm_substream *substream) in snd_pcm_lib_preallocate_dma_free() argument
79 if (substream->dma_buffer.area == NULL) in snd_pcm_lib_preallocate_dma_free()
81 snd_dma_free_pages(&substream->dma_buffer); in snd_pcm_lib_preallocate_dma_free()
82 substream->dma_buffer.area = NULL; in snd_pcm_lib_preallocate_dma_free()
93 int snd_pcm_lib_preallocate_free(struct snd_pcm_substream *substream) in snd_pcm_lib_preallocate_free() argument
[all …]
Dpcm_native.c63 static int snd_pcm_hw_refine_old_user(struct snd_pcm_substream *substream,
65 static int snd_pcm_hw_params_old_user(struct snd_pcm_substream *substream,
97 void snd_pcm_stream_lock(struct snd_pcm_substream *substream) in snd_pcm_stream_lock() argument
99 if (substream->pcm->nonatomic) { in snd_pcm_stream_lock()
101 mutex_lock(&substream->self_group.mutex); in snd_pcm_stream_lock()
104 spin_lock(&substream->self_group.lock); in snd_pcm_stream_lock()
115 void snd_pcm_stream_unlock(struct snd_pcm_substream *substream) in snd_pcm_stream_unlock() argument
117 if (substream->pcm->nonatomic) { in snd_pcm_stream_unlock()
118 mutex_unlock(&substream->self_group.mutex); in snd_pcm_stream_unlock()
121 spin_unlock(&substream->self_group.lock); in snd_pcm_stream_unlock()
[all …]
Dpcm_dmaengine.c39 const struct snd_pcm_substream *substream) in substream_to_prtd() argument
41 return substream->runtime->private_data; in substream_to_prtd()
44 struct dma_chan *snd_dmaengine_pcm_get_chan(struct snd_pcm_substream *substream) in snd_dmaengine_pcm_get_chan() argument
46 struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream); in snd_dmaengine_pcm_get_chan()
61 int snd_hwparams_to_dma_slave_config(const struct snd_pcm_substream *substream, in snd_hwparams_to_dma_slave_config() argument
82 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in snd_hwparams_to_dma_slave_config()
113 const struct snd_pcm_substream *substream, in snd_dmaengine_pcm_set_config_from_dai_data() argument
117 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in snd_dmaengine_pcm_set_config_from_dai_data()
135 struct snd_pcm_substream *substream = arg; in dmaengine_pcm_dma_complete() local
136 struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream); in dmaengine_pcm_dma_complete()
[all …]
Dpcm_timer.c32 void snd_pcm_timer_resolution_change(struct snd_pcm_substream *substream) in snd_pcm_timer_resolution_change() argument
35 struct snd_pcm_runtime *runtime = substream->runtime; in snd_pcm_timer_resolution_change()
56 pcm_err(substream->pcm, in snd_pcm_timer_resolution_change()
67 struct snd_pcm_substream *substream; in snd_pcm_timer_resolution() local
69 substream = timer->private_data; in snd_pcm_timer_resolution()
70 return substream->runtime ? substream->runtime->timer_resolution : 0; in snd_pcm_timer_resolution()
75 struct snd_pcm_substream *substream; in snd_pcm_timer_start() local
77 substream = snd_timer_chip(timer); in snd_pcm_timer_start()
78 substream->timer_running = 1; in snd_pcm_timer_start()
84 struct snd_pcm_substream *substream; in snd_pcm_timer_stop() local
[all …]
Dpcm.c117 struct snd_pcm_substream *substream; in snd_pcm_control_ioctl() local
144 for (substream = pstr->substream; substream; in snd_pcm_control_ioctl()
145 substream = substream->next) in snd_pcm_control_ioctl()
146 if (substream->number == (int)subdevice) in snd_pcm_control_ioctl()
148 if (substream == NULL) { in snd_pcm_control_ioctl()
152 err = snd_pcm_info_user(substream, info); in snd_pcm_control_ioctl()
336 static void snd_pcm_proc_info_read(struct snd_pcm_substream *substream, in snd_pcm_proc_info_read() argument
342 if (! substream) in snd_pcm_proc_info_read()
349 err = snd_pcm_info(substream, info); in snd_pcm_proc_info_read()
372 snd_pcm_proc_info_read(((struct snd_pcm_str *)entry->private_data)->substream, in snd_pcm_stream_proc_info_read()
[all …]
Dpcm_trace.h11 TP_PROTO(struct snd_pcm_substream *substream, snd_pcm_uframes_t pos, bool irq),
12 TP_ARGS(substream, pos, irq),
27 __entry->card = (substream)->pcm->card->number;
28 __entry->device = (substream)->pcm->device;
29 __entry->number = (substream)->number;
30 __entry->stream = (substream)->stream;
32 __entry->period_size = (substream)->runtime->period_size;
33 __entry->buffer_size = (substream)->runtime->buffer_size;
34 __entry->old_hw_ptr = (substream)->runtime->status->hw_ptr;
35 __entry->hw_ptr_base = (substream)->runtime->hw_ptr_base;
[all …]
Drawmidi.c88 static inline int snd_rawmidi_ready(struct snd_rawmidi_substream *substream) in snd_rawmidi_ready() argument
90 struct snd_rawmidi_runtime *runtime = substream->runtime; in snd_rawmidi_ready()
94 static inline int snd_rawmidi_ready_append(struct snd_rawmidi_substream *substream, in snd_rawmidi_ready_append() argument
97 struct snd_rawmidi_runtime *runtime = substream->runtime; in snd_rawmidi_ready_append()
99 (!substream->append || runtime->avail >= count); in snd_rawmidi_ready_append()
107 runtime->event(runtime->substream); in snd_rawmidi_input_event_work()
110 static int snd_rawmidi_runtime_create(struct snd_rawmidi_substream *substream) in snd_rawmidi_runtime_create() argument
116 runtime->substream = substream; in snd_rawmidi_runtime_create()
123 if (substream->stream == SNDRV_RAWMIDI_STREAM_INPUT) in snd_rawmidi_runtime_create()
132 substream->runtime = runtime; in snd_rawmidi_runtime_create()
[all …]
Dpcm_compat.c26 static int snd_pcm_ioctl_delay_compat(struct snd_pcm_substream *substream, in snd_pcm_ioctl_delay_compat() argument
34 err = snd_pcm_delay(substream, &delay); in snd_pcm_ioctl_delay_compat()
43 static int snd_pcm_ioctl_rewind_compat(struct snd_pcm_substream *substream, in snd_pcm_ioctl_rewind_compat() argument
51 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in snd_pcm_ioctl_rewind_compat()
52 err = snd_pcm_playback_rewind(substream, frames); in snd_pcm_ioctl_rewind_compat()
54 err = snd_pcm_capture_rewind(substream, frames); in snd_pcm_ioctl_rewind_compat()
60 static int snd_pcm_ioctl_forward_compat(struct snd_pcm_substream *substream, in snd_pcm_ioctl_forward_compat() argument
68 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in snd_pcm_ioctl_forward_compat()
69 err = snd_pcm_playback_forward(substream, frames); in snd_pcm_ioctl_forward_compat()
71 err = snd_pcm_capture_forward(substream, frames); in snd_pcm_ioctl_forward_compat()
[all …]
Dpcm_lib.c39 #define trace_hwptr(substream, pos, in_interrupt) argument
40 #define trace_xrun(substream) argument
41 #define trace_hw_ptr_error(substream, reason) argument
53 void snd_pcm_playback_silence(struct snd_pcm_substream *substream, snd_pcm_uframes_t new_hw_ptr) in snd_pcm_playback_silence() argument
55 struct snd_pcm_runtime *runtime = substream->runtime; in snd_pcm_playback_silence()
111 if (substream->ops->silence) { in snd_pcm_playback_silence()
113 err = substream->ops->silence(substream, -1, ofs, transfer); in snd_pcm_playback_silence()
122 if (substream->ops->silence) { in snd_pcm_playback_silence()
125 err = substream->ops->silence(substream, c, ofs, transfer); in snd_pcm_playback_silence()
143 void snd_pcm_debug_name(struct snd_pcm_substream *substream, in snd_pcm_debug_name() argument
[all …]
/linux-4.1.27/sound/soc/fsl/
Dimx-pcm-fiq.c44 struct snd_pcm_substream *substream; member
53 struct snd_pcm_substream *substream = iprtd->substream; in snd_hrtimer_callback() local
61 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in snd_hrtimer_callback()
66 snd_pcm_period_elapsed(substream); in snd_hrtimer_callback()
77 static int snd_imx_pcm_hw_params(struct snd_pcm_substream *substream, in snd_imx_pcm_hw_params() argument
80 struct snd_pcm_runtime *runtime = substream->runtime; in snd_imx_pcm_hw_params()
88 snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer); in snd_imx_pcm_hw_params()
93 static int snd_imx_pcm_prepare(struct snd_pcm_substream *substream) in snd_imx_pcm_prepare() argument
95 struct snd_pcm_runtime *runtime = substream->runtime; in snd_imx_pcm_prepare()
100 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in snd_imx_pcm_prepare()
[all …]
Dfsl_asrc_dma.c50 struct snd_pcm_substream *substream = arg; in fsl_asrc_dma_complete() local
51 struct snd_pcm_runtime *runtime = substream->runtime; in fsl_asrc_dma_complete()
54 pair->pos += snd_pcm_lib_period_bytes(substream); in fsl_asrc_dma_complete()
55 if (pair->pos >= snd_pcm_lib_buffer_bytes(substream)) in fsl_asrc_dma_complete()
58 snd_pcm_period_elapsed(substream); in fsl_asrc_dma_complete()
61 static int fsl_asrc_dma_prepare_and_submit(struct snd_pcm_substream *substream) in fsl_asrc_dma_prepare_and_submit() argument
63 u8 dir = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? OUT : IN; in fsl_asrc_dma_prepare_and_submit()
64 struct snd_soc_pcm_runtime *rtd = substream->private_data; in fsl_asrc_dma_prepare_and_submit()
65 struct snd_pcm_runtime *runtime = substream->runtime; in fsl_asrc_dma_prepare_and_submit()
71 if (!substream->runtime->no_period_wakeup) in fsl_asrc_dma_prepare_and_submit()
[all …]
Dmpc5200_dma.c99 static int psc_dma_hw_free(struct snd_pcm_substream *substream) in psc_dma_hw_free() argument
101 snd_pcm_set_runtime_buffer(substream, NULL); in psc_dma_hw_free()
111 static int psc_dma_trigger(struct snd_pcm_substream *substream, int cmd) in psc_dma_trigger() argument
113 struct snd_soc_pcm_runtime *rtd = substream->private_data; in psc_dma_trigger()
115 struct snd_pcm_runtime *runtime = substream->runtime; in psc_dma_trigger()
116 struct psc_dma_stream *s = to_psc_dma_stream(substream, psc_dma); in psc_dma_trigger()
125 substream->pstr->stream, runtime->frame_bits, in psc_dma_trigger()
140 if (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE) in psc_dma_trigger()
158 substream->pstr->stream, s->period_count); in psc_dma_trigger()
163 if (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE) in psc_dma_trigger()
[all …]
Dfsl_dma.c100 struct snd_pcm_substream *substream; member
152 static void fsl_dma_abort_stream(struct snd_pcm_substream *substream) in fsl_dma_abort_stream() argument
154 snd_pcm_stop_xrun(substream); in fsl_dma_abort_stream()
172 if (dma_private->substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in fsl_dma_update_pointers()
205 struct snd_pcm_substream *substream = dma_private->substream; in fsl_dma_isr() local
206 struct snd_soc_pcm_runtime *rtd = substream->private_data; in fsl_dma_isr()
219 fsl_dma_abort_stream(substream); in fsl_dma_isr()
229 fsl_dma_abort_stream(substream); in fsl_dma_isr()
244 snd_pcm_period_elapsed(substream); in fsl_dma_isr()
299 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { in fsl_dma_new()
[all …]
Dmpc5200_psc_ac97.c141 static int psc_ac97_hw_analog_params(struct snd_pcm_substream *substream, in psc_ac97_hw_analog_params() argument
146 struct psc_dma_stream *s = to_psc_dma_stream(substream, psc_dma); in psc_ac97_hw_analog_params()
151 __func__, substream, params_period_size(params), in psc_ac97_hw_analog_params()
159 if (substream->pstr->stream != SNDRV_PCM_STREAM_CAPTURE) in psc_ac97_hw_analog_params()
164 static int psc_ac97_hw_digital_params(struct snd_pcm_substream *substream, in psc_ac97_hw_digital_params() argument
170 dev_dbg(psc_dma->dev, "%s(substream=%p)\n", __func__, substream); in psc_ac97_hw_digital_params()
180 static int psc_ac97_trigger(struct snd_pcm_substream *substream, int cmd, in psc_ac97_trigger() argument
184 struct psc_dma_stream *s = to_psc_dma_stream(substream, psc_dma); in psc_ac97_trigger()
189 substream->pstr->stream); in psc_ac97_trigger()
198 substream->pstr->stream); in psc_ac97_trigger()
Dfsl_ssi.c526 static int fsl_ssi_startup(struct snd_pcm_substream *substream, in fsl_ssi_startup() argument
529 struct snd_soc_pcm_runtime *rtd = substream->private_data; in fsl_ssi_startup()
544 snd_pcm_hw_constraint_step(substream->runtime, 0, in fsl_ssi_startup()
554 static void fsl_ssi_shutdown(struct snd_pcm_substream *substream, in fsl_ssi_shutdown() argument
557 struct snd_soc_pcm_runtime *rtd = substream->private_data; in fsl_ssi_shutdown()
574 static int fsl_ssi_set_bclk(struct snd_pcm_substream *substream, in fsl_ssi_set_bclk() argument
597 baudclk_is_used = ssi_private->baudclk_streams & ~(BIT(substream->stream)); in fsl_ssi_set_bclk()
658 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK || synchronous) in fsl_ssi_set_bclk()
697 static int fsl_ssi_hw_params(struct snd_pcm_substream *substream, in fsl_ssi_hw_params() argument
721 ret = fsl_ssi_set_bclk(substream, cpu_dai, hw_params); in fsl_ssi_hw_params()
[all …]
/linux-4.1.27/sound/soc/omap/
Domap-pcm.c75 static int omap_pcm_hw_params(struct snd_pcm_substream *substream, in omap_pcm_hw_params() argument
78 struct snd_pcm_runtime *runtime = substream->runtime; in omap_pcm_hw_params()
79 struct snd_soc_pcm_runtime *rtd = substream->private_data; in omap_pcm_hw_params()
85 dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); in omap_pcm_hw_params()
92 snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer); in omap_pcm_hw_params()
95 chan = snd_dmaengine_pcm_get_chan(substream); in omap_pcm_hw_params()
100 err = snd_hwparams_to_dma_slave_config(substream, params, &config); in omap_pcm_hw_params()
104 snd_dmaengine_pcm_set_config_from_dai_data(substream, in omap_pcm_hw_params()
105 snd_soc_dai_get_dma_data(rtd->cpu_dai, substream), in omap_pcm_hw_params()
111 static int omap_pcm_hw_free(struct snd_pcm_substream *substream) in omap_pcm_hw_free() argument
[all …]
Domap-hdmi-audio.c72 static int hdmi_dai_startup(struct snd_pcm_substream *substream, in hdmi_dai_startup() argument
75 struct hdmi_audio_data *ad = card_drvdata_substream(substream); in hdmi_dai_startup()
81 ret = snd_pcm_hw_constraint_step(substream->runtime, 0, in hdmi_dai_startup()
88 snd_soc_dai_set_dma_data(dai, substream, &ad->dma_data); in hdmi_dai_startup()
91 ad->current_stream = substream; in hdmi_dai_startup()
105 static int hdmi_dai_hw_params(struct snd_pcm_substream *substream, in hdmi_dai_hw_params() argument
109 struct hdmi_audio_data *ad = card_drvdata_substream(substream); in hdmi_dai_hw_params()
113 WARN_ON(ad->current_stream != substream); in hdmi_dai_hw_params()
229 static int hdmi_dai_trigger(struct snd_pcm_substream *substream, int cmd, in hdmi_dai_trigger() argument
232 struct hdmi_audio_data *ad = card_drvdata_substream(substream); in hdmi_dai_trigger()
[all …]
Domap-mcbsp.c66 static void omap_mcbsp_set_threshold(struct snd_pcm_substream *substream, in omap_mcbsp_set_threshold() argument
69 struct snd_soc_pcm_runtime *rtd = substream->private_data; in omap_mcbsp_set_threshold()
86 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in omap_mcbsp_set_threshold()
111 static int omap_mcbsp_dai_startup(struct snd_pcm_substream *substream, in omap_mcbsp_dai_startup() argument
141 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in omap_mcbsp_dai_startup()
142 snd_pcm_hw_rule_add(substream->runtime, 0, in omap_mcbsp_dai_startup()
149 snd_pcm_hw_constraint_step(substream->runtime, 0, in omap_mcbsp_dai_startup()
156 static void omap_mcbsp_dai_shutdown(struct snd_pcm_substream *substream, in omap_mcbsp_dai_shutdown() argument
167 static int omap_mcbsp_dai_trigger(struct snd_pcm_substream *substream, int cmd, in omap_mcbsp_dai_trigger() argument
171 int err = 0, play = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK); in omap_mcbsp_dai_trigger()
[all …]
Dosk5912.c42 static int osk_startup(struct snd_pcm_substream *substream) in osk_startup() argument
47 static void osk_shutdown(struct snd_pcm_substream *substream) in osk_shutdown() argument
52 static int osk_hw_params(struct snd_pcm_substream *substream, in osk_hw_params() argument
55 struct snd_soc_pcm_runtime *rtd = substream->private_data; in osk_hw_params()
Dn810.c97 static int n810_startup(struct snd_pcm_substream *substream) in n810_startup() argument
99 struct snd_pcm_runtime *runtime = substream->runtime; in n810_startup()
100 struct snd_soc_pcm_runtime *rtd = substream->private_data; in n810_startup()
109 static void n810_shutdown(struct snd_pcm_substream *substream) in n810_shutdown() argument
114 static int n810_hw_params(struct snd_pcm_substream *substream, in n810_hw_params() argument
117 struct snd_soc_pcm_runtime *rtd = substream->private_data; in n810_hw_params()
/linux-4.1.27/include/sound/
Dpcm.h34 #define snd_pcm_substream_chip(substream) ((substream)->private_data) argument
67 int (*open)(struct snd_pcm_substream *substream);
68 int (*close)(struct snd_pcm_substream *substream);
69 int (*ioctl)(struct snd_pcm_substream * substream,
71 int (*hw_params)(struct snd_pcm_substream *substream,
73 int (*hw_free)(struct snd_pcm_substream *substream);
74 int (*prepare)(struct snd_pcm_substream *substream);
75 int (*trigger)(struct snd_pcm_substream *substream, int cmd);
76 snd_pcm_uframes_t (*pointer)(struct snd_pcm_substream *substream);
77 int (*get_time_info)(struct snd_pcm_substream *substream,
[all …]
Drawmidi.h54 int (*open) (struct snd_rawmidi_substream * substream);
55 int (*close) (struct snd_rawmidi_substream * substream);
56 void (*trigger) (struct snd_rawmidi_substream * substream, int up);
57 void (*drain) (struct snd_rawmidi_substream * substream);
68 struct snd_rawmidi_substream *substream; member
83 void (*event)(struct snd_rawmidi_substream *substream);
88 void (*private_free)(struct snd_rawmidi_substream *substream);
162 int snd_rawmidi_receive(struct snd_rawmidi_substream *substream,
164 int snd_rawmidi_transmit_empty(struct snd_rawmidi_substream *substream);
165 int snd_rawmidi_transmit_peek(struct snd_rawmidi_substream *substream,
[all …]
Ddmaengine_pcm.h28 snd_pcm_substream_to_dma_direction(const struct snd_pcm_substream *substream) in snd_pcm_substream_to_dma_direction() argument
30 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in snd_pcm_substream_to_dma_direction()
36 int snd_hwparams_to_dma_slave_config(const struct snd_pcm_substream *substream,
38 int snd_dmaengine_pcm_trigger(struct snd_pcm_substream *substream, int cmd);
39 snd_pcm_uframes_t snd_dmaengine_pcm_pointer(struct snd_pcm_substream *substream);
40 snd_pcm_uframes_t snd_dmaengine_pcm_pointer_no_residue(struct snd_pcm_substream *substream);
42 int snd_dmaengine_pcm_open(struct snd_pcm_substream *substream,
44 int snd_dmaengine_pcm_close(struct snd_pcm_substream *substream);
46 int snd_dmaengine_pcm_open_request_chan(struct snd_pcm_substream *substream,
48 int snd_dmaengine_pcm_close_release_chan(struct snd_pcm_substream *substream);
[all …]
Dpcm-indirect.h40 typedef void (*snd_pcm_indirect_copy_t)(struct snd_pcm_substream *substream,
47 snd_pcm_indirect_playback_transfer(struct snd_pcm_substream *substream, in snd_pcm_indirect_playback_transfer() argument
51 struct snd_pcm_runtime *runtime = substream->runtime; in snd_pcm_indirect_playback_transfer()
75 copy(substream, rec, bytes); in snd_pcm_indirect_playback_transfer()
92 snd_pcm_indirect_playback_pointer(struct snd_pcm_substream *substream, in snd_pcm_indirect_playback_pointer() argument
103 if (substream->ops->ack) in snd_pcm_indirect_playback_pointer()
104 substream->ops->ack(substream); in snd_pcm_indirect_playback_pointer()
105 return bytes_to_frames(substream->runtime, rec->sw_io); in snd_pcm_indirect_playback_pointer()
113 snd_pcm_indirect_capture_transfer(struct snd_pcm_substream *substream, in snd_pcm_indirect_capture_transfer() argument
117 struct snd_pcm_runtime *runtime = substream->runtime; in snd_pcm_indirect_capture_transfer()
[all …]
Dpxa2xx-lib.h9 extern int __pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream,
11 extern int __pxa2xx_pcm_hw_free(struct snd_pcm_substream *substream);
12 extern int pxa2xx_pcm_trigger(struct snd_pcm_substream *substream, int cmd);
13 extern snd_pcm_uframes_t pxa2xx_pcm_pointer(struct snd_pcm_substream *substream);
14 extern int __pxa2xx_pcm_prepare(struct snd_pcm_substream *substream);
16 extern int __pxa2xx_pcm_open(struct snd_pcm_substream *substream);
17 extern int __pxa2xx_pcm_close(struct snd_pcm_substream *substream);
18 extern int pxa2xx_pcm_mmap(struct snd_pcm_substream *substream,
/linux-4.1.27/sound/firewire/dice/
Ddice-pcm.c15 struct snd_pcm_substream *substream = rule->private; in dice_rate_constraint() local
16 struct snd_dice *dice = substream->private_data; in dice_rate_constraint()
27 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) in dice_rate_constraint()
50 struct snd_pcm_substream *substream = rule->private; in dice_channels_constraint() local
51 struct snd_dice *dice = substream->private_data; in dice_channels_constraint()
62 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) in dice_channels_constraint()
120 struct snd_pcm_substream *substream) in init_hw_info() argument
122 struct snd_pcm_runtime *runtime = substream->runtime; in init_hw_info()
135 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { in init_hw_info()
149 dice_rate_constraint, substream, in init_hw_info()
[all …]
/linux-4.1.27/sound/soc/blackfin/
Dbf5xx-i2s-pcm.c63 static int bf5xx_pcm_hw_params(struct snd_pcm_substream *substream, in bf5xx_pcm_hw_params() argument
66 struct snd_soc_pcm_runtime *rtd = substream->private_data; in bf5xx_pcm_hw_params()
70 dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); in bf5xx_pcm_hw_params()
75 return snd_pcm_lib_malloc_pages(substream, buffer_size); in bf5xx_pcm_hw_params()
78 static int bf5xx_pcm_hw_free(struct snd_pcm_substream *substream) in bf5xx_pcm_hw_free() argument
80 snd_pcm_lib_free_pages(substream); in bf5xx_pcm_hw_free()
85 static int bf5xx_pcm_prepare(struct snd_pcm_substream *substream) in bf5xx_pcm_prepare() argument
87 struct snd_soc_pcm_runtime *rtd = substream->private_data; in bf5xx_pcm_prepare()
88 struct snd_pcm_runtime *runtime = substream->runtime; in bf5xx_pcm_prepare()
93 dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); in bf5xx_pcm_prepare()
[all …]
Dbf5xx-ac97-pcm.c55 static void bf5xx_mmap_copy(struct snd_pcm_substream *substream, in bf5xx_mmap_copy() argument
58 struct snd_pcm_runtime *runtime = substream->runtime; in bf5xx_mmap_copy()
61 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in bf5xx_mmap_copy()
118 static int bf5xx_pcm_hw_params(struct snd_pcm_substream *substream, in bf5xx_pcm_hw_params() argument
124 snd_pcm_lib_malloc_pages(substream, size); in bf5xx_pcm_hw_params()
129 static int bf5xx_pcm_hw_free(struct snd_pcm_substream *substream) in bf5xx_pcm_hw_free() argument
132 struct snd_pcm_runtime *runtime = substream->runtime; in bf5xx_pcm_hw_free()
135 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in bf5xx_pcm_hw_free()
145 snd_pcm_lib_free_pages(substream); in bf5xx_pcm_hw_free()
149 static int bf5xx_pcm_prepare(struct snd_pcm_substream *substream) in bf5xx_pcm_prepare() argument
[all …]
/linux-4.1.27/sound/soc/nuc900/
Dnuc900-pcm.c42 static int nuc900_dma_hw_params(struct snd_pcm_substream *substream, in nuc900_dma_hw_params() argument
45 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params)); in nuc900_dma_hw_params()
48 static void nuc900_update_dma_register(struct snd_pcm_substream *substream) in nuc900_update_dma_register() argument
50 struct snd_pcm_runtime *runtime = substream->runtime; in nuc900_update_dma_register()
54 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in nuc900_update_dma_register()
66 static void nuc900_dma_start(struct snd_pcm_substream *substream) in nuc900_dma_start() argument
68 struct snd_pcm_runtime *runtime = substream->runtime; in nuc900_dma_start()
77 static void nuc900_dma_stop(struct snd_pcm_substream *substream) in nuc900_dma_stop() argument
79 struct snd_pcm_runtime *runtime = substream->runtime; in nuc900_dma_stop()
90 struct snd_pcm_substream *substream = dev_id; in nuc900_dma_interrupt() local
[all …]
/linux-4.1.27/sound/drivers/pcsp/
Dpcsp_lib.c31 struct snd_pcm_substream *substream; in pcsp_call_pcm_elapsed() local
32 substream = pcsp_chip.playback_substream; in pcsp_call_pcm_elapsed()
33 if (substream) in pcsp_call_pcm_elapsed()
34 snd_pcm_period_elapsed(substream); in pcsp_call_pcm_elapsed()
47 struct snd_pcm_substream *substream; in pcsp_timer_update() local
57 substream = chip->playback_substream; in pcsp_timer_update()
58 if (!substream) in pcsp_timer_update()
61 runtime = substream->runtime; in pcsp_timer_update()
89 struct snd_pcm_substream *substream; in pcsp_pointer_update() local
95 substream = chip->playback_substream; in pcsp_pointer_update()
[all …]
/linux-4.1.27/sound/soc/kirkwood/
Dkirkwood-dma.c105 static int kirkwood_dma_open(struct snd_pcm_substream *substream) in kirkwood_dma_open() argument
108 struct snd_pcm_runtime *runtime = substream->runtime; in kirkwood_dma_open()
109 struct kirkwood_dma_data *priv = kirkwood_priv(substream); in kirkwood_dma_open()
113 snd_soc_set_runtime_hwparams(substream, &kirkwood_dma_snd_hw); in kirkwood_dma_open()
129 err = snd_pcm_hw_constraint_step(substream->runtime, 0, in kirkwood_dma_open()
149 addr = substream->dma_buffer.addr; in kirkwood_dma_open()
150 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in kirkwood_dma_open()
151 priv->substream_play = substream; in kirkwood_dma_open()
155 priv->substream_rec = substream; in kirkwood_dma_open()
163 static int kirkwood_dma_close(struct snd_pcm_substream *substream) in kirkwood_dma_close() argument
[all …]
Dkirkwood-i2s.c130 static int kirkwood_i2s_startup(struct snd_pcm_substream *substream, in kirkwood_i2s_startup() argument
135 snd_soc_dai_set_dma_data(dai, substream, priv); in kirkwood_i2s_startup()
139 static int kirkwood_i2s_hw_params(struct snd_pcm_substream *substream, in kirkwood_i2s_hw_params() argument
148 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in kirkwood_i2s_hw_params()
204 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in kirkwood_i2s_hw_params()
234 static int kirkwood_i2s_play_trigger(struct snd_pcm_substream *substream, in kirkwood_i2s_play_trigger() argument
237 struct snd_pcm_runtime *runtime = substream->runtime; in kirkwood_i2s_play_trigger()
322 static int kirkwood_i2s_rec_trigger(struct snd_pcm_substream *substream, in kirkwood_i2s_rec_trigger() argument
388 static int kirkwood_i2s_trigger(struct snd_pcm_substream *substream, int cmd, in kirkwood_i2s_trigger() argument
391 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in kirkwood_i2s_trigger()
[all …]
/linux-4.1.27/sound/isa/wavefront/
Dwavefront_midi.c93 get_wavefront_midi (struct snd_rawmidi_substream *substream) in get_wavefront_midi() argument
99 if (substream == NULL || substream->rmidi == NULL) in get_wavefront_midi()
102 card = substream->rmidi->card; in get_wavefront_midi()
232 static int snd_wavefront_midi_input_open(struct snd_rawmidi_substream *substream) in snd_wavefront_midi_input_open() argument
238 if (snd_BUG_ON(!substream || !substream->rmidi)) in snd_wavefront_midi_input_open()
240 if (snd_BUG_ON(!substream->rmidi->private_data)) in snd_wavefront_midi_input_open()
243 mpu = *((snd_wavefront_mpu_id *) substream->rmidi->private_data); in snd_wavefront_midi_input_open()
245 if ((midi = get_wavefront_midi (substream)) == NULL) in snd_wavefront_midi_input_open()
250 midi->substream_input[mpu] = substream; in snd_wavefront_midi_input_open()
256 static int snd_wavefront_midi_output_open(struct snd_rawmidi_substream *substream) in snd_wavefront_midi_output_open() argument
[all …]
/linux-4.1.27/sound/pci/au88x0/
Dau88x0_pcm.c138 static int snd_vortex_pcm_open(struct snd_pcm_substream *substream) in snd_vortex_pcm_open() argument
140 vortex_t *vortex = snd_pcm_substream_chip(substream); in snd_vortex_pcm_open()
141 struct snd_pcm_runtime *runtime = substream->runtime; in snd_vortex_pcm_open()
158 if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) { in snd_vortex_pcm_open()
160 if (VORTEX_PCM_TYPE(substream->pcm) == VORTEX_PCM_A3D) { in snd_vortex_pcm_open()
164 if (VORTEX_PCM_TYPE(substream->pcm) == VORTEX_PCM_SPDIF) { in snd_vortex_pcm_open()
178 if (VORTEX_PCM_TYPE(substream->pcm) == VORTEX_PCM_ADB in snd_vortex_pcm_open()
179 || VORTEX_PCM_TYPE(substream->pcm) == VORTEX_PCM_I2S) in snd_vortex_pcm_open()
182 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK && in snd_vortex_pcm_open()
184 VORTEX_PCM_TYPE(substream->pcm) == VORTEX_PCM_ADB) { in snd_vortex_pcm_open()
[all …]
/linux-4.1.27/sound/pci/ctxfi/
Dctpcm.c101 if (!apcm->substream) in ct_atc_pcm_interrupt()
104 snd_pcm_period_elapsed(apcm->substream); in ct_atc_pcm_interrupt()
110 struct ct_atc *atc = snd_pcm_substream_chip(apcm->substream); in ct_atc_pcm_free_substream()
119 static int ct_pcm_playback_open(struct snd_pcm_substream *substream) in ct_pcm_playback_open() argument
121 struct ct_atc *atc = snd_pcm_substream_chip(substream); in ct_pcm_playback_open()
122 struct snd_pcm_runtime *runtime = substream->runtime; in ct_pcm_playback_open()
130 apcm->substream = substream; in ct_pcm_playback_open()
132 if (IEC958 == substream->pcm->device) { in ct_pcm_playback_open()
137 if (FRONT == substream->pcm->device) in ct_pcm_playback_open()
166 static int ct_pcm_playback_close(struct snd_pcm_substream *substream) in ct_pcm_playback_close() argument
[all …]
Dcttimer.c37 struct snd_pcm_substream *substream; member
69 struct snd_pcm_substream *substream = ti->substream; in ct_systimer_callback() local
70 struct snd_pcm_runtime *runtime = substream->runtime; in ct_systimer_callback()
77 position = substream->ops->pointer(substream); in ct_systimer_callback()
102 struct snd_pcm_runtime *runtime = ti->substream->runtime; in ct_systimer_start()
206 period_size = ti->substream->runtime->period_size; in ct_xfitimer_reprogram()
207 rate = ti->substream->runtime->rate; in ct_xfitimer_reprogram()
208 pos = ti->substream->ops->pointer(ti->substream); in ct_xfitimer_reprogram()
269 ti->frag_count = ti->substream->runtime->period_size; in ct_xfitimer_prepare()
350 ti->substream = apcm->substream; in ct_timer_instance_new()
/linux-4.1.27/sound/soc/
Dsoc-generic-dmaengine-pcm.c40 struct snd_pcm_substream *substream) in dmaengine_dma_dev() argument
42 if (!pcm->chan[substream->stream]) in dmaengine_dma_dev()
45 return pcm->chan[substream->stream]->device->dev; in dmaengine_dma_dev()
61 int snd_dmaengine_pcm_prepare_slave_config(struct snd_pcm_substream *substream, in snd_dmaengine_pcm_prepare_slave_config() argument
64 struct snd_soc_pcm_runtime *rtd = substream->private_data; in snd_dmaengine_pcm_prepare_slave_config()
68 dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); in snd_dmaengine_pcm_prepare_slave_config()
70 ret = snd_hwparams_to_dma_slave_config(substream, params, slave_config); in snd_dmaengine_pcm_prepare_slave_config()
74 snd_dmaengine_pcm_set_config_from_dai_data(substream, dma_data, in snd_dmaengine_pcm_prepare_slave_config()
81 static int dmaengine_pcm_hw_params(struct snd_pcm_substream *substream, in dmaengine_pcm_hw_params() argument
84 struct snd_soc_pcm_runtime *rtd = substream->private_data; in dmaengine_pcm_hw_params()
[all …]
Dsoc-pcm.c137 int snd_soc_set_runtime_hwparams(struct snd_pcm_substream *substream, in snd_soc_set_runtime_hwparams() argument
140 struct snd_pcm_runtime *runtime = substream->runtime; in snd_soc_set_runtime_hwparams()
174 static int soc_pcm_apply_symmetry(struct snd_pcm_substream *substream, in soc_pcm_apply_symmetry() argument
177 struct snd_soc_pcm_runtime *rtd = substream->private_data; in soc_pcm_apply_symmetry()
185 ret = snd_pcm_hw_constraint_minmax(substream->runtime, in soc_pcm_apply_symmetry()
201 ret = snd_pcm_hw_constraint_minmax(substream->runtime, in soc_pcm_apply_symmetry()
218 ret = snd_pcm_hw_constraint_minmax(substream->runtime, in soc_pcm_apply_symmetry()
233 static int soc_pcm_params_symmetry(struct snd_pcm_substream *substream, in soc_pcm_params_symmetry() argument
236 struct snd_soc_pcm_runtime *rtd = substream->private_data; in soc_pcm_params_symmetry()
284 static bool soc_pcm_has_symmetry(struct snd_pcm_substream *substream) in soc_pcm_has_symmetry() argument
[all …]
/linux-4.1.27/sound/core/oss/
Dpcm_oss.c565 static int snd_pcm_oss_plugin_clear(struct snd_pcm_substream *substream) in snd_pcm_oss_plugin_clear() argument
567 struct snd_pcm_runtime *runtime = substream->runtime; in snd_pcm_oss_plugin_clear()
611 static long snd_pcm_oss_bytes(struct snd_pcm_substream *substream, long frames) in snd_pcm_oss_bytes() argument
613 struct snd_pcm_runtime *runtime = substream->runtime; in snd_pcm_oss_bytes()
614 long buffer_size = snd_pcm_lib_buffer_bytes(substream); in snd_pcm_oss_bytes()
628 static long snd_pcm_alsa_frames(struct snd_pcm_substream *substream, long bytes) in snd_pcm_alsa_frames() argument
630 struct snd_pcm_runtime *runtime = substream->runtime; in snd_pcm_alsa_frames()
631 long buffer_size = snd_pcm_lib_buffer_bytes(substream); in snd_pcm_alsa_frames()
707 static int snd_pcm_oss_period_size(struct snd_pcm_substream *substream, in snd_pcm_oss_period_size() argument
714 struct snd_pcm_runtime *runtime = substream->runtime; in snd_pcm_oss_period_size()
[all …]
Dpcm_plugin.h124 int snd_pcm_plug_format_plugins(struct snd_pcm_substream *substream,
159 snd_pcm_sframes_t snd_pcm_oss_write3(struct snd_pcm_substream *substream,
162 snd_pcm_sframes_t snd_pcm_oss_read3(struct snd_pcm_substream *substream,
164 snd_pcm_sframes_t snd_pcm_oss_writev3(struct snd_pcm_substream *substream,
167 snd_pcm_sframes_t snd_pcm_oss_readv3(struct snd_pcm_substream *substream,
/linux-4.1.27/sound/arm/
Dpxa2xx-pcm-lib.c39 int __pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream, in __pxa2xx_pcm_hw_params() argument
42 struct snd_pcm_runtime *runtime = substream->runtime; in __pxa2xx_pcm_hw_params()
78 snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer); in __pxa2xx_pcm_hw_params()
87 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in __pxa2xx_pcm_hw_params()
106 int __pxa2xx_pcm_hw_free(struct snd_pcm_substream *substream) in __pxa2xx_pcm_hw_free() argument
108 struct pxa2xx_runtime_data *rtd = substream->runtime->private_data; in __pxa2xx_pcm_hw_free()
115 snd_pcm_set_runtime_buffer(substream, NULL); in __pxa2xx_pcm_hw_free()
120 int pxa2xx_pcm_trigger(struct snd_pcm_substream *substream, int cmd) in pxa2xx_pcm_trigger() argument
122 struct pxa2xx_runtime_data *prtd = substream->runtime->private_data; in pxa2xx_pcm_trigger()
154 pxa2xx_pcm_pointer(struct snd_pcm_substream *substream) in pxa2xx_pcm_pointer() argument
[all …]
Dpxa2xx-pcm.c25 static int pxa2xx_pcm_prepare(struct snd_pcm_substream *substream) in pxa2xx_pcm_prepare() argument
27 struct pxa2xx_pcm_client *client = substream->private_data; in pxa2xx_pcm_prepare()
29 __pxa2xx_pcm_prepare(substream); in pxa2xx_pcm_prepare()
31 return client->prepare(substream); in pxa2xx_pcm_prepare()
34 static int pxa2xx_pcm_open(struct snd_pcm_substream *substream) in pxa2xx_pcm_open() argument
36 struct pxa2xx_pcm_client *client = substream->private_data; in pxa2xx_pcm_open()
37 struct snd_pcm_runtime *runtime = substream->runtime; in pxa2xx_pcm_open()
41 ret = __pxa2xx_pcm_open(substream); in pxa2xx_pcm_open()
47 rtd->params = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ? in pxa2xx_pcm_open()
50 pxa2xx_pcm_dma_irq, substream); in pxa2xx_pcm_open()
[all …]
Daaci.c216 if (!aacirun->substream || !aacirun->start) { in aaci_fifo_irq()
263 snd_pcm_period_elapsed(aacirun->substream); in aaci_fifo_irq()
276 if (!aacirun->substream || !aacirun->start) { in aaci_fifo_irq()
323 snd_pcm_period_elapsed(aacirun->substream); in aaci_fifo_irq()
402 static int aaci_pcm_open(struct snd_pcm_substream *substream) in aaci_pcm_open() argument
404 struct snd_pcm_runtime *runtime = substream->runtime; in aaci_pcm_open()
405 struct aaci *aaci = substream->private_data; in aaci_pcm_open()
409 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in aaci_pcm_open()
415 aacirun->substream = substream; in aaci_pcm_open()
421 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in aaci_pcm_open()
[all …]
Dpxa2xx-ac97.c65 static int pxa2xx_ac97_pcm_startup(struct snd_pcm_substream *substream) in pxa2xx_ac97_pcm_startup() argument
67 struct snd_pcm_runtime *runtime = substream->runtime; in pxa2xx_ac97_pcm_startup()
74 r = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ? in pxa2xx_ac97_pcm_startup()
79 platform_ops = substream->pcm->card->dev->platform_data; in pxa2xx_ac97_pcm_startup()
81 return platform_ops->startup(substream, platform_ops->priv); in pxa2xx_ac97_pcm_startup()
86 static void pxa2xx_ac97_pcm_shutdown(struct snd_pcm_substream *substream) in pxa2xx_ac97_pcm_shutdown() argument
90 platform_ops = substream->pcm->card->dev->platform_data; in pxa2xx_ac97_pcm_shutdown()
92 platform_ops->shutdown(substream, platform_ops->priv); in pxa2xx_ac97_pcm_shutdown()
95 static int pxa2xx_ac97_pcm_prepare(struct snd_pcm_substream *substream) in pxa2xx_ac97_pcm_prepare() argument
97 struct snd_pcm_runtime *runtime = substream->runtime; in pxa2xx_ac97_pcm_prepare()
[all …]
/linux-4.1.27/sound/pci/emu10k1/
Demupcm.c44 if (epcm->substream == NULL) in snd_emu10k1_pcm_interrupt()
49 epcm->substream->runtime->hw->pointer(emu, epcm->substream), in snd_emu10k1_pcm_interrupt()
50 snd_pcm_lib_period_bytes(epcm->substream), in snd_emu10k1_pcm_interrupt()
51 snd_pcm_lib_buffer_bytes(epcm->substream)); in snd_emu10k1_pcm_interrupt()
53 snd_pcm_period_elapsed(epcm->substream); in snd_emu10k1_pcm_interrupt()
92 static snd_pcm_uframes_t snd_emu10k1_efx_playback_pointer(struct snd_pcm_substream *substream) in snd_emu10k1_efx_playback_pointer() argument
94 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_efx_playback_pointer()
95 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_efx_playback_pointer()
289 struct snd_pcm_substream *substream = evoice->epcm->substream; in snd_emu10k1_pcm_init_voice() local
290 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_pcm_init_voice()
[all …]
Dp16v.c174 static int snd_p16v_pcm_open_playback_channel(struct snd_pcm_substream *substream, int channel_id) in snd_p16v_pcm_open_playback_channel() argument
176 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_p16v_pcm_open_playback_channel()
179 struct snd_pcm_runtime *runtime = substream->runtime; in snd_p16v_pcm_open_playback_channel()
188 epcm->substream = substream; in snd_p16v_pcm_open_playback_channel()
214 runtime->sync.id32[0] = substream->pcm->card->number; in snd_p16v_pcm_open_playback_channel()
222 static int snd_p16v_pcm_open_capture_channel(struct snd_pcm_substream *substream, int channel_id) in snd_p16v_pcm_open_capture_channel() argument
224 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_p16v_pcm_open_capture_channel()
227 struct snd_pcm_runtime *runtime = substream->runtime; in snd_p16v_pcm_open_capture_channel()
236 epcm->substream = substream; in snd_p16v_pcm_open_capture_channel()
267 static int snd_p16v_pcm_close_playback(struct snd_pcm_substream *substream) in snd_p16v_pcm_close_playback() argument
[all …]
Demu10k1x.c208 struct snd_pcm_substream *substream; member
369 if (epcm->substream == NULL) in snd_emu10k1x_pcm_interrupt()
374 epcm->substream->ops->pointer(epcm->substream), in snd_emu10k1x_pcm_interrupt()
375 snd_pcm_lib_period_bytes(epcm->substream), in snd_emu10k1x_pcm_interrupt()
376 snd_pcm_lib_buffer_bytes(epcm->substream)); in snd_emu10k1x_pcm_interrupt()
378 snd_pcm_period_elapsed(epcm->substream); in snd_emu10k1x_pcm_interrupt()
382 static int snd_emu10k1x_playback_open(struct snd_pcm_substream *substream) in snd_emu10k1x_playback_open() argument
384 struct emu10k1x *chip = snd_pcm_substream_chip(substream); in snd_emu10k1x_playback_open()
386 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1x_playback_open()
399 epcm->substream = substream; in snd_emu10k1x_playback_open()
[all …]
Demumpu401.c156 static int snd_emu10k1_midi_input_open(struct snd_rawmidi_substream *substream) in snd_emu10k1_midi_input_open() argument
159 struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data; in snd_emu10k1_midi_input_open()
167 midi->substream_input = substream; in snd_emu10k1_midi_input_open()
183 static int snd_emu10k1_midi_output_open(struct snd_rawmidi_substream *substream) in snd_emu10k1_midi_output_open() argument
186 struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data; in snd_emu10k1_midi_output_open()
194 midi->substream_output = substream; in snd_emu10k1_midi_output_open()
210 static int snd_emu10k1_midi_input_close(struct snd_rawmidi_substream *substream) in snd_emu10k1_midi_input_close() argument
213 struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data; in snd_emu10k1_midi_input_close()
233 static int snd_emu10k1_midi_output_close(struct snd_rawmidi_substream *substream) in snd_emu10k1_midi_output_close() argument
236 struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data; in snd_emu10k1_midi_output_close()
[all …]
/linux-4.1.27/drivers/media/usb/go7007/
Dsnd-go7007.c47 struct snd_pcm_substream *substream; member
76 struct snd_pcm_runtime *runtime = gosnd->substream->runtime; in parse_audio_stream_data()
103 snd_pcm_period_elapsed(gosnd->substream); in parse_audio_stream_data()
106 static int go7007_snd_hw_params(struct snd_pcm_substream *substream, in go7007_snd_hw_params() argument
109 struct go7007 *go = snd_pcm_substream_chip(substream); in go7007_snd_hw_params()
113 if (substream->runtime->dma_bytes > 0) in go7007_snd_hw_params()
114 vfree(substream->runtime->dma_area); in go7007_snd_hw_params()
115 substream->runtime->dma_bytes = 0; in go7007_snd_hw_params()
116 substream->runtime->dma_area = vmalloc(bytes); in go7007_snd_hw_params()
117 if (substream->runtime->dma_area == NULL) in go7007_snd_hw_params()
[all …]
/linux-4.1.27/sound/firewire/fireworks/
Dfireworks_pcm.c147 struct snd_pcm_substream *substream) in pcm_init_hw_params() argument
149 struct snd_pcm_runtime *runtime = substream->runtime; in pcm_init_hw_params()
161 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { in pcm_init_hw_params()
195 static int pcm_open(struct snd_pcm_substream *substream) in pcm_open() argument
197 struct snd_efw *efw = substream->private_data; in pcm_open()
206 err = pcm_init_hw_params(efw, substream); in pcm_open()
224 substream->runtime->hw.rate_min = sampling_rate; in pcm_open()
225 substream->runtime->hw.rate_max = sampling_rate; in pcm_open()
228 snd_pcm_set_sync(substream); in pcm_open()
236 static int pcm_close(struct snd_pcm_substream *substream) in pcm_close() argument
[all …]
Dfireworks_midi.c11 static int midi_capture_open(struct snd_rawmidi_substream *substream) in midi_capture_open() argument
13 struct snd_efw *efw = substream->rmidi->private_data; in midi_capture_open()
29 static int midi_playback_open(struct snd_rawmidi_substream *substream) in midi_playback_open() argument
31 struct snd_efw *efw = substream->rmidi->private_data; in midi_playback_open()
46 static int midi_capture_close(struct snd_rawmidi_substream *substream) in midi_capture_close() argument
48 struct snd_efw *efw = substream->rmidi->private_data; in midi_capture_close()
57 static int midi_playback_close(struct snd_rawmidi_substream *substream) in midi_playback_close() argument
59 struct snd_efw *efw = substream->rmidi->private_data; in midi_playback_close()
/linux-4.1.27/sound/firewire/bebob/
Dbebob_pcm.c110 struct snd_pcm_substream *substream) in pcm_init_hw_params() argument
112 struct snd_pcm_runtime *runtime = substream->runtime; in pcm_init_hw_params()
124 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { in pcm_init_hw_params()
155 pcm_open(struct snd_pcm_substream *substream) in pcm_open() argument
157 struct snd_bebob *bebob = substream->private_data; in pcm_open()
167 err = pcm_init_hw_params(bebob, substream); in pcm_open()
189 substream->runtime->hw.rate_min = sampling_rate; in pcm_open()
190 substream->runtime->hw.rate_max = sampling_rate; in pcm_open()
193 snd_pcm_set_sync(substream); in pcm_open()
202 pcm_close(struct snd_pcm_substream *substream) in pcm_close() argument
[all …]
Dbebob_midi.c11 static int midi_capture_open(struct snd_rawmidi_substream *substream) in midi_capture_open() argument
13 struct snd_bebob *bebob = substream->rmidi->private_data; in midi_capture_open()
28 static int midi_playback_open(struct snd_rawmidi_substream *substream) in midi_playback_open() argument
30 struct snd_bebob *bebob = substream->rmidi->private_data; in midi_playback_open()
45 static int midi_capture_close(struct snd_rawmidi_substream *substream) in midi_capture_close() argument
47 struct snd_bebob *bebob = substream->rmidi->private_data; in midi_capture_close()
56 static int midi_playback_close(struct snd_rawmidi_substream *substream) in midi_playback_close() argument
58 struct snd_bebob *bebob = substream->rmidi->private_data; in midi_playback_close()
/linux-4.1.27/sound/pci/cs5535audio/
Dcs5535audio_pcm.c92 static int snd_cs5535audio_playback_open(struct snd_pcm_substream *substream) in snd_cs5535audio_playback_open() argument
95 struct cs5535audio *cs5535au = snd_pcm_substream_chip(substream); in snd_cs5535audio_playback_open()
96 struct snd_pcm_runtime *runtime = substream->runtime; in snd_cs5535audio_playback_open()
101 cs5535au->playback_substream = substream; in snd_cs5535audio_playback_open()
110 static int snd_cs5535audio_playback_close(struct snd_pcm_substream *substream) in snd_cs5535audio_playback_close() argument
120 struct snd_pcm_substream *substream, in cs5535audio_build_dma_packets() argument
145 addr = (u32) substream->runtime->dma_addr; in cs5535audio_build_dma_packets()
164 dma->substream = substream; in cs5535audio_build_dma_packets()
238 struct snd_pcm_substream *substream) in cs5535audio_clear_dma_packets() argument
242 dma->substream = NULL; in cs5535audio_clear_dma_packets()
[all …]
Dcs5535audio_pm.c69 if (dma && dma->substream) in snd_cs5535audio_suspend()
102 if (dma && dma->substream) { in snd_cs5535audio_resume()
103 dma->substream->ops->prepare(dma->substream); in snd_cs5535audio_resume()
/linux-4.1.27/sound/firewire/oxfw/
Doxfw-pcm.c122 struct snd_pcm_substream *substream) in init_hw_params() argument
124 struct snd_pcm_runtime *runtime = substream->runtime; in init_hw_params()
136 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { in init_hw_params()
166 static int limit_to_current_params(struct snd_pcm_substream *substream) in limit_to_current_params() argument
168 struct snd_oxfw *oxfw = substream->private_data; in limit_to_current_params()
173 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) in limit_to_current_params()
182 substream->runtime->hw.channels_min = formation.pcm; in limit_to_current_params()
183 substream->runtime->hw.channels_max = formation.pcm; in limit_to_current_params()
184 substream->runtime->hw.rate_min = formation.rate; in limit_to_current_params()
185 substream->runtime->hw.rate_max = formation.rate; in limit_to_current_params()
[all …]
Doxfw-midi.c11 static int midi_capture_open(struct snd_rawmidi_substream *substream) in midi_capture_open() argument
13 struct snd_oxfw *oxfw = substream->rmidi->private_data; in midi_capture_open()
33 static int midi_playback_open(struct snd_rawmidi_substream *substream) in midi_playback_open() argument
35 struct snd_oxfw *oxfw = substream->rmidi->private_data; in midi_playback_open()
55 static int midi_capture_close(struct snd_rawmidi_substream *substream) in midi_capture_close() argument
57 struct snd_oxfw *oxfw = substream->rmidi->private_data; in midi_capture_close()
70 static int midi_playback_close(struct snd_rawmidi_substream *substream) in midi_playback_close() argument
72 struct snd_oxfw *oxfw = substream->rmidi->private_data; in midi_playback_close()
/linux-4.1.27/drivers/media/usb/tm6000/
Dtm6000-alsa.c105 static void dsp_buffer_free(struct snd_pcm_substream *substream) in dsp_buffer_free() argument
107 struct snd_tm6000_card *chip = snd_pcm_substream_chip(substream); in dsp_buffer_free()
111 vfree(substream->runtime->dma_area); in dsp_buffer_free()
112 substream->runtime->dma_area = NULL; in dsp_buffer_free()
113 substream->runtime->dma_bytes = 0; in dsp_buffer_free()
116 static int dsp_buffer_alloc(struct snd_pcm_substream *substream, int size) in dsp_buffer_alloc() argument
118 struct snd_tm6000_card *chip = snd_pcm_substream_chip(substream); in dsp_buffer_alloc()
122 if (substream->runtime->dma_area) { in dsp_buffer_alloc()
123 if (substream->runtime->dma_bytes > size) in dsp_buffer_alloc()
126 dsp_buffer_free(substream); in dsp_buffer_alloc()
[all …]
/linux-4.1.27/sound/soc/samsung/
Didma.c71 static int idma_enqueue(struct snd_pcm_substream *substream) in idma_enqueue() argument
73 struct snd_pcm_runtime *runtime = substream->runtime; in idma_enqueue()
74 struct idma_ctrl *prtd = substream->runtime->private_data; in idma_enqueue()
78 prtd->token = (void *) substream; in idma_enqueue()
106 static void idma_setcallbk(struct snd_pcm_substream *substream, in idma_setcallbk() argument
109 struct idma_ctrl *prtd = substream->runtime->private_data; in idma_setcallbk()
140 struct snd_pcm_substream *substream = id; in idma_done() local
141 struct idma_ctrl *prtd = substream->runtime->private_data; in idma_done()
144 snd_pcm_period_elapsed(substream); in idma_done()
147 static int idma_hw_params(struct snd_pcm_substream *substream, in idma_hw_params() argument
[all …]
Dneo1973_wm8753.c30 static int neo1973_hifi_hw_params(struct snd_pcm_substream *substream, in neo1973_hifi_hw_params() argument
33 struct snd_soc_pcm_runtime *rtd = substream->private_data; in neo1973_hifi_hw_params()
105 static int neo1973_hifi_hw_free(struct snd_pcm_substream *substream) in neo1973_hifi_hw_free() argument
107 struct snd_soc_pcm_runtime *rtd = substream->private_data; in neo1973_hifi_hw_free()
122 static int neo1973_voice_hw_params(struct snd_pcm_substream *substream, in neo1973_voice_hw_params() argument
125 struct snd_soc_pcm_runtime *rtd = substream->private_data; in neo1973_voice_hw_params()
160 static int neo1973_voice_hw_free(struct snd_pcm_substream *substream) in neo1973_voice_hw_free() argument
162 struct snd_soc_pcm_runtime *rtd = substream->private_data; in neo1973_voice_hw_free()
Drx1950_uda1380.c35 static int rx1950_startup(struct snd_pcm_substream *substream);
36 static int rx1950_hw_params(struct snd_pcm_substream *substream,
134 static int rx1950_startup(struct snd_pcm_substream *substream) in rx1950_startup() argument
136 struct snd_pcm_runtime *runtime = substream->runtime; in rx1950_startup()
154 static int rx1950_hw_params(struct snd_pcm_substream *substream, in rx1950_hw_params() argument
157 struct snd_soc_pcm_runtime *rtd = substream->private_data; in rx1950_hw_params()
/linux-4.1.27/sound/pci/lola/
Dlola_pcm.c34 static struct lola_pcm *lola_get_pcm(struct snd_pcm_substream *substream) in lola_get_pcm() argument
36 struct lola *chip = snd_pcm_substream_chip(substream); in lola_get_pcm()
37 return &chip->pcm[substream->stream]; in lola_get_pcm()
40 static struct lola_stream *lola_get_stream(struct snd_pcm_substream *substream) in lola_get_stream() argument
42 struct lola_pcm *pcm = lola_get_pcm(substream); in lola_get_stream()
43 unsigned int idx = substream->number; in lola_get_stream()
129 struct snd_pcm_substream *substream, in lola_sync_wait_for_fifo() argument
139 snd_pcm_group_for_each_entry(s, substream) { in lola_sync_wait_for_fifo()
141 if (s->pcm->card != substream->pcm->card) in lola_sync_wait_for_fifo()
165 struct snd_pcm_substream *substream) in lola_sync_pause() argument
[all …]
/linux-4.1.27/sound/soc/intel/baytrail/
Dsst-baytrail-pcm.c46 struct snd_pcm_substream *substream; member
68 static int sst_byt_pcm_hw_params(struct snd_pcm_substream *substream, in sst_byt_pcm_hw_params() argument
71 struct snd_soc_pcm_runtime *rtd = substream->private_data; in sst_byt_pcm_hw_params()
74 struct sst_byt_pcm_data *pcm_data = &pdata->pcm[substream->stream]; in sst_byt_pcm_hw_params()
78 int ret, playback = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK); in sst_byt_pcm_hw_params()
112 snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params)); in sst_byt_pcm_hw_params()
115 substream->dma_buffer.addr, in sst_byt_pcm_hw_params()
131 static int sst_byt_pcm_hw_free(struct snd_pcm_substream *substream) in sst_byt_pcm_hw_free() argument
133 struct snd_soc_pcm_runtime *rtd = substream->private_data; in sst_byt_pcm_hw_free()
136 snd_pcm_lib_free_pages(substream); in sst_byt_pcm_hw_free()
[all …]
/linux-4.1.27/sound/soc/pxa/
Dmmp-pcm.c61 static int mmp_pcm_hw_params(struct snd_pcm_substream *substream, in mmp_pcm_hw_params() argument
64 struct dma_chan *chan = snd_dmaengine_pcm_get_chan(substream); in mmp_pcm_hw_params()
69 snd_dmaengine_pcm_prepare_slave_config(substream, params, in mmp_pcm_hw_params()
78 snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer); in mmp_pcm_hw_params()
100 static int mmp_pcm_open(struct snd_pcm_substream *substream) in mmp_pcm_open() argument
102 struct snd_soc_pcm_runtime *rtd = substream->private_data; in mmp_pcm_open()
108 r = platform_get_resource(pdev, IORESOURCE_DMA, substream->stream); in mmp_pcm_open()
112 snd_soc_set_runtime_hwparams(substream, in mmp_pcm_open()
113 &mmp_pcm_hardware[substream->stream]); in mmp_pcm_open()
118 return snd_dmaengine_pcm_open_request_chan(substream, filter, in mmp_pcm_open()
[all …]
Dpxa2xx-pcm.c27 static int pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream, in pxa2xx_pcm_hw_params() argument
30 struct snd_pcm_runtime *runtime = substream->runtime; in pxa2xx_pcm_hw_params()
32 struct snd_soc_pcm_runtime *rtd = substream->private_data; in pxa2xx_pcm_hw_params()
36 dma = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); in pxa2xx_pcm_hw_params()
48 pxa2xx_pcm_dma_irq, substream); in pxa2xx_pcm_hw_params()
56 pxa2xx_pcm_dma_irq, substream); in pxa2xx_pcm_hw_params()
62 return __pxa2xx_pcm_hw_params(substream, params); in pxa2xx_pcm_hw_params()
65 static int pxa2xx_pcm_hw_free(struct snd_pcm_substream *substream) in pxa2xx_pcm_hw_free() argument
67 struct pxa2xx_runtime_data *prtd = substream->runtime->private_data; in pxa2xx_pcm_hw_free()
69 __pxa2xx_pcm_hw_free(substream); in pxa2xx_pcm_hw_free()
[all …]
Dpxa2xx-ac97.c92 static int pxa2xx_ac97_hw_params(struct snd_pcm_substream *substream, in pxa2xx_ac97_hw_params() argument
98 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in pxa2xx_ac97_hw_params()
103 snd_soc_dai_set_dma_data(cpu_dai, substream, dma_data); in pxa2xx_ac97_hw_params()
108 static int pxa2xx_ac97_hw_aux_params(struct snd_pcm_substream *substream, in pxa2xx_ac97_hw_aux_params() argument
114 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in pxa2xx_ac97_hw_aux_params()
119 snd_soc_dai_set_dma_data(cpu_dai, substream, dma_data); in pxa2xx_ac97_hw_aux_params()
124 static int pxa2xx_ac97_hw_mic_params(struct snd_pcm_substream *substream, in pxa2xx_ac97_hw_mic_params() argument
128 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in pxa2xx_ac97_hw_mic_params()
131 snd_soc_dai_set_dma_data(cpu_dai, substream, in pxa2xx_ac97_hw_mic_params()
Draumfeld.c67 static int raumfeld_cs4270_startup(struct snd_pcm_substream *substream) in raumfeld_cs4270_startup() argument
69 struct snd_soc_pcm_runtime *rtd = substream->private_data; in raumfeld_cs4270_startup()
76 static void raumfeld_cs4270_shutdown(struct snd_pcm_substream *substream) in raumfeld_cs4270_shutdown() argument
78 struct snd_soc_pcm_runtime *rtd = substream->private_data; in raumfeld_cs4270_shutdown()
85 static int raumfeld_cs4270_hw_params(struct snd_pcm_substream *substream, in raumfeld_cs4270_hw_params() argument
88 struct snd_soc_pcm_runtime *rtd = substream->private_data; in raumfeld_cs4270_hw_params()
155 static int raumfeld_ak4104_hw_params(struct snd_pcm_substream *substream, in raumfeld_ak4104_hw_params() argument
158 struct snd_soc_pcm_runtime *rtd = substream->private_data; in raumfeld_ak4104_hw_params()
Dpxa2xx-i2s.c101 static int pxa2xx_i2s_startup(struct snd_pcm_substream *substream, in pxa2xx_i2s_startup() argument
104 struct snd_soc_pcm_runtime *rtd = substream->private_data; in pxa2xx_i2s_startup()
162 static int pxa2xx_i2s_hw_params(struct snd_pcm_substream *substream, in pxa2xx_i2s_hw_params() argument
174 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in pxa2xx_i2s_hw_params()
179 snd_soc_dai_set_dma_data(dai, substream, dma_data); in pxa2xx_i2s_hw_params()
190 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in pxa2xx_i2s_hw_params()
222 static int pxa2xx_i2s_trigger(struct snd_pcm_substream *substream, int cmd, in pxa2xx_i2s_trigger() argument
229 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in pxa2xx_i2s_trigger()
248 static void pxa2xx_i2s_shutdown(struct snd_pcm_substream *substream, in pxa2xx_i2s_shutdown() argument
251 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in pxa2xx_i2s_shutdown()
Dmmp-sspa.c103 static int mmp_sspa_startup(struct snd_pcm_substream *substream, in mmp_sspa_startup() argument
114 static void mmp_sspa_shutdown(struct snd_pcm_substream *substream, in mmp_sspa_shutdown() argument
264 static int mmp_sspa_hw_params(struct snd_pcm_substream *substream, in mmp_sspa_hw_params() argument
268 struct snd_soc_pcm_runtime *rtd = substream->private_data; in mmp_sspa_hw_params()
275 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in mmp_sspa_hw_params()
306 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in mmp_sspa_hw_params()
314 dma_params = &sspa_priv->dma_params[substream->stream]; in mmp_sspa_hw_params()
315 dma_params->addr = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? in mmp_sspa_hw_params()
318 snd_soc_dai_set_dma_data(cpu_dai, substream, dma_params); in mmp_sspa_hw_params()
322 static int mmp_sspa_trigger(struct snd_pcm_substream *substream, int cmd, in mmp_sspa_trigger() argument
[all …]
Dpxa-ssp.c91 static int pxa_ssp_startup(struct snd_pcm_substream *substream, in pxa_ssp_startup() argument
108 dma->filter_data = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? in pxa_ssp_startup()
111 snd_soc_dai_set_dma_data(cpu_dai, substream, dma); in pxa_ssp_startup()
116 static void pxa_ssp_shutdown(struct snd_pcm_substream *substream, in pxa_ssp_shutdown() argument
127 kfree(snd_soc_dai_get_dma_data(cpu_dai, substream)); in pxa_ssp_shutdown()
128 snd_soc_dai_set_dma_data(cpu_dai, substream, NULL); in pxa_ssp_shutdown()
541 static int pxa_ssp_hw_params(struct snd_pcm_substream *substream, in pxa_ssp_hw_params() argument
554 dma_data = snd_soc_dai_get_dma_data(cpu_dai, substream); in pxa_ssp_hw_params()
562 substream->stream == SNDRV_PCM_STREAM_PLAYBACK, dma_data); in pxa_ssp_hw_params()
639 static void pxa_ssp_set_running_bit(struct snd_pcm_substream *substream, in pxa_ssp_set_running_bit() argument
[all …]
Dpoodle.c74 static int poodle_startup(struct snd_pcm_substream *substream) in poodle_startup() argument
76 struct snd_soc_pcm_runtime *rtd = substream->private_data; in poodle_startup()
85 static void poodle_shutdown(struct snd_pcm_substream *substream) in poodle_shutdown() argument
94 static int poodle_hw_params(struct snd_pcm_substream *substream, in poodle_hw_params() argument
97 struct snd_soc_pcm_runtime *rtd = substream->private_data; in poodle_hw_params()
/linux-4.1.27/sound/soc/qcom/
Dlpass-platform.c60 static int lpass_platform_pcmops_open(struct snd_pcm_substream *substream) in lpass_platform_pcmops_open() argument
62 struct snd_pcm_runtime *runtime = substream->runtime; in lpass_platform_pcmops_open()
63 struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; in lpass_platform_pcmops_open()
66 snd_soc_set_runtime_hwparams(substream, &lpass_platform_pcm_hardware); in lpass_platform_pcmops_open()
78 snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer); in lpass_platform_pcmops_open()
83 static int lpass_platform_pcmops_hw_params(struct snd_pcm_substream *substream, in lpass_platform_pcmops_hw_params() argument
86 struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; in lpass_platform_pcmops_hw_params()
169 static int lpass_platform_pcmops_hw_free(struct snd_pcm_substream *substream) in lpass_platform_pcmops_hw_free() argument
171 struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; in lpass_platform_pcmops_hw_free()
185 static int lpass_platform_pcmops_prepare(struct snd_pcm_substream *substream) in lpass_platform_pcmops_prepare() argument
[all …]
/linux-4.1.27/drivers/media/pci/cx18/
Dcx18-alsa-pcm.c76 struct snd_pcm_substream *substream; in cx18_alsa_announce_pcm_data() local
86 substream = cxsc->capture_pcm_substream; in cx18_alsa_announce_pcm_data()
87 if (substream == NULL) { in cx18_alsa_announce_pcm_data()
92 runtime = substream->runtime; in cx18_alsa_announce_pcm_data()
127 snd_pcm_stream_lock(substream); in cx18_alsa_announce_pcm_data()
143 snd_pcm_stream_unlock(substream); in cx18_alsa_announce_pcm_data()
146 snd_pcm_period_elapsed(substream); in cx18_alsa_announce_pcm_data()
149 static int snd_cx18_pcm_capture_open(struct snd_pcm_substream *substream) in snd_cx18_pcm_capture_open() argument
151 struct snd_cx18_card *cxsc = snd_pcm_substream_chip(substream); in snd_cx18_pcm_capture_open()
152 struct snd_pcm_runtime *runtime = substream->runtime; in snd_cx18_pcm_capture_open()
[all …]
/linux-4.1.27/sound/soc/intel/atom/
Dsst-mfld-platform-pcm.c131 static void sst_fill_alloc_params(struct snd_pcm_substream *substream, in sst_fill_alloc_params() argument
137 ssize_t buffer_bytes = snd_pcm_lib_buffer_bytes(substream); in sst_fill_alloc_params()
138 u32 buffer_addr = virt_to_phys(substream->dma_buffer.area); in sst_fill_alloc_params()
140 channels = substream->runtime->channels; in sst_fill_alloc_params()
141 period_size = substream->runtime->period_size; in sst_fill_alloc_params()
142 periodbytes = samples_to_bytes(substream->runtime, period_size); in sst_fill_alloc_params()
150 static void sst_fill_pcm_params(struct snd_pcm_substream *substream, in sst_fill_pcm_params() argument
153 param->uc.pcm_params.num_chan = (u8) substream->runtime->channels; in sst_fill_pcm_params()
154 param->uc.pcm_params.pcm_wd_sz = substream->runtime->sample_bits; in sst_fill_pcm_params()
155 param->uc.pcm_params.sfreq = substream->runtime->rate; in sst_fill_pcm_params()
[all …]
/linux-4.1.27/sound/pci/oxygen/
Doxygen_pcm.c127 oxygen_substream_channel(struct snd_pcm_substream *substream) in oxygen_substream_channel() argument
129 return (unsigned int)(uintptr_t)substream->runtime->private_data; in oxygen_substream_channel()
132 static int oxygen_open(struct snd_pcm_substream *substream, in oxygen_open() argument
135 struct oxygen *chip = snd_pcm_substream_chip(substream); in oxygen_open()
136 struct snd_pcm_runtime *runtime = substream->runtime; in oxygen_open()
183 snd_pcm_set_sync(substream); in oxygen_open()
184 chip->streams[channel] = substream; in oxygen_open()
201 static int oxygen_rec_a_open(struct snd_pcm_substream *substream) in oxygen_rec_a_open() argument
203 return oxygen_open(substream, PCM_A); in oxygen_rec_a_open()
206 static int oxygen_rec_b_open(struct snd_pcm_substream *substream) in oxygen_rec_b_open() argument
[all …]
/linux-4.1.27/sound/soc/au1x/
Ddbdma2.c48 struct snd_pcm_substream *substream; member
117 snd_pcm_period_elapsed(cd->substream); in au1x_pcm_dmatx_cb()
130 snd_pcm_period_elapsed(cd->substream); in au1x_pcm_dmarx_cb()
195 static int au1xpsc_pcm_hw_params(struct snd_pcm_substream *substream, in au1xpsc_pcm_hw_params() argument
198 struct snd_pcm_runtime *runtime = substream->runtime; in au1xpsc_pcm_hw_params()
202 ret = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params)); in au1xpsc_pcm_hw_params()
206 stype = substream->stream; in au1xpsc_pcm_hw_params()
207 pcd = to_dmadata(substream); in au1xpsc_pcm_hw_params()
224 pcd->substream = substream; in au1xpsc_pcm_hw_params()
237 static int au1xpsc_pcm_hw_free(struct snd_pcm_substream *substream) in au1xpsc_pcm_hw_free() argument
[all …]
Ddma.c31 struct snd_pcm_substream *substream; member
64 struct snd_pcm_substream *substream = stream->substream; in au1000_setup_dma_link() local
65 struct snd_pcm_runtime *runtime = substream->runtime; in au1000_setup_dma_link()
134 struct snd_pcm_substream *substream = stream->substream; in au1000_dma_interrupt() local
159 snd_pcm_period_elapsed(substream); in au1000_dma_interrupt()
186 static int alchemy_pcm_open(struct snd_pcm_substream *substream) in alchemy_pcm_open() argument
188 struct alchemy_pcm_ctx *ctx = ss_to_ctx(substream); in alchemy_pcm_open()
189 struct snd_soc_pcm_runtime *rtd = substream->private_data; in alchemy_pcm_open()
190 int *dmaids, s = substream->stream; in alchemy_pcm_open()
193 dmaids = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); in alchemy_pcm_open()
[all …]
/linux-4.1.27/drivers/media/pci/ivtv/
Divtv-alsa-pcm.c77 struct snd_pcm_substream *substream; in ivtv_alsa_announce_pcm_data() local
87 substream = itvsc->capture_pcm_substream; in ivtv_alsa_announce_pcm_data()
88 if (substream == NULL) { in ivtv_alsa_announce_pcm_data()
93 runtime = substream->runtime; in ivtv_alsa_announce_pcm_data()
128 snd_pcm_stream_lock(substream); in ivtv_alsa_announce_pcm_data()
144 snd_pcm_stream_unlock(substream); in ivtv_alsa_announce_pcm_data()
147 snd_pcm_period_elapsed(substream); in ivtv_alsa_announce_pcm_data()
150 static int snd_ivtv_pcm_capture_open(struct snd_pcm_substream *substream) in snd_ivtv_pcm_capture_open() argument
152 struct snd_ivtv_card *itvsc = snd_pcm_substream_chip(substream); in snd_ivtv_pcm_capture_open()
153 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ivtv_pcm_capture_open()
[all …]
/linux-4.1.27/sound/drivers/
Dmtpav.c289 struct snd_rawmidi_substream *substream) in snd_mtpav_output_port_write() argument
295 if (snd_rawmidi_transmit(substream, &outbyte, 1) != 1) in snd_mtpav_output_port_write()
320 } while (snd_rawmidi_transmit(substream, &outbyte, 1) == 1); in snd_mtpav_output_port_write()
323 static void snd_mtpav_output_write(struct snd_rawmidi_substream *substream) in snd_mtpav_output_write() argument
325 struct mtpav *mtp_card = substream->rmidi->private_data; in snd_mtpav_output_write()
326 struct mtpav_port *portp = &mtp_card->ports[substream->number]; in snd_mtpav_output_write()
330 snd_mtpav_output_port_write(mtp_card, portp, substream); in snd_mtpav_output_write()
353 static int snd_mtpav_input_open(struct snd_rawmidi_substream *substream) in snd_mtpav_input_open() argument
355 struct mtpav *mtp_card = substream->rmidi->private_data; in snd_mtpav_input_open()
356 struct mtpav_port *portp = &mtp_card->ports[substream->number]; in snd_mtpav_input_open()
[all …]
Ddummy.c112 #define get_dummy_ops(substream) \ argument
113 (*(const struct dummy_timer_ops **)(substream)->runtime->private_data)
247 struct snd_pcm_substream *substream; member
275 static int dummy_systimer_start(struct snd_pcm_substream *substream) in dummy_systimer_start() argument
277 struct dummy_systimer_pcm *dpcm = substream->runtime->private_data; in dummy_systimer_start()
285 static int dummy_systimer_stop(struct snd_pcm_substream *substream) in dummy_systimer_stop() argument
287 struct dummy_systimer_pcm *dpcm = substream->runtime->private_data; in dummy_systimer_stop()
294 static int dummy_systimer_prepare(struct snd_pcm_substream *substream) in dummy_systimer_prepare() argument
296 struct snd_pcm_runtime *runtime = substream->runtime; in dummy_systimer_prepare()
322 snd_pcm_period_elapsed(dpcm->substream); in dummy_systimer_callback()
[all …]
Dserial-u16550.c210 int substream; in snd_uart16550_io_loop() local
213 substream = uart->prev_in; in snd_uart16550_io_loop()
228 substream = c - 1; in snd_uart16550_io_loop()
234 && uart->midi_input[substream]) in snd_uart16550_io_loop()
235 snd_rawmidi_receive(uart->midi_input[substream], in snd_uart16550_io_loop()
238 uart->midi_input[substream]) in snd_uart16550_io_loop()
239 snd_rawmidi_receive(uart->midi_input[substream], &c, 1); in snd_uart16550_io_loop()
248 uart->prev_in = substream; in snd_uart16550_io_loop()
515 static int snd_uart16550_input_open(struct snd_rawmidi_substream *substream) in snd_uart16550_input_open() argument
518 struct snd_uart16550 *uart = substream->rmidi->private_data; in snd_uart16550_input_open()
[all …]
Dpcm-indirect2.c40 void snd_pcm_indirect2_stat(struct snd_pcm_substream *substream, in snd_pcm_indirect2_stat() argument
43 struct snd_pcm_runtime *runtime = substream->runtime; in snd_pcm_indirect2_stat()
136 snd_pcm_indirect2_increase_min_periods(struct snd_pcm_substream *substream, in snd_pcm_indirect2_increase_min_periods() argument
154 snd_pcm_lib_period_bytes(substream)) { in snd_pcm_indirect2_increase_min_periods()
159 (substream))) * in snd_pcm_indirect2_increase_min_periods()
161 (substream); in snd_pcm_indirect2_increase_min_periods()
232 snd_pcm_indirect2_pointer(struct snd_pcm_substream *substream, in snd_pcm_indirect2_pointer() argument
238 return bytes_to_frames(substream->runtime, rec->sw_io); in snd_pcm_indirect2_pointer()
245 snd_pcm_indirect2_playback_transfer(struct snd_pcm_substream *substream, in snd_pcm_indirect2_playback_transfer() argument
250 struct snd_pcm_runtime *runtime = substream->runtime; in snd_pcm_indirect2_playback_transfer()
[all …]
Daloop.c105 struct snd_pcm_substream *substream; member
151 int device = dpcm->substream->pstr->pcm->device; in get_setup()
153 if (dpcm->substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in get_setup()
155 return &dpcm->loopback->setup[dpcm->substream->number][device]; in get_setup()
211 substream->runtime; in loopback_check_format()
213 substream->runtime; in loopback_check_format()
223 substream, SNDRV_PCM_STATE_DRAINING); in loopback_check_format()
226 substream->runtime; in loopback_check_format()
255 static int loopback_trigger(struct snd_pcm_substream *substream, int cmd) in loopback_trigger() argument
257 struct snd_pcm_runtime *runtime = substream->runtime; in loopback_trigger()
[all …]
Dml403-ac97cr.c415 snd_ml403_ac97cr_playback_ind2_zero(struct snd_pcm_substream *substream, in snd_ml403_ac97cr_playback_ind2_zero() argument
422 ml403_ac97cr = snd_pcm_substream_chip(substream); in snd_ml403_ac97cr_playback_ind2_zero()
437 snd_ml403_ac97cr_playback_ind2_copy(struct snd_pcm_substream *substream, in snd_ml403_ac97cr_playback_ind2_copy() argument
446 ml403_ac97cr = snd_pcm_substream_chip(substream); in snd_ml403_ac97cr_playback_ind2_copy()
447 src = (u16 *)(substream->runtime->dma_area + rec->sw_data); in snd_ml403_ac97cr_playback_ind2_copy()
467 snd_ml403_ac97cr_capture_ind2_null(struct snd_pcm_substream *substream, in snd_ml403_ac97cr_capture_ind2_null() argument
474 ml403_ac97cr = snd_pcm_substream_chip(substream); in snd_ml403_ac97cr_capture_ind2_null()
495 snd_ml403_ac97cr_capture_ind2_copy(struct snd_pcm_substream *substream, in snd_ml403_ac97cr_capture_ind2_copy() argument
503 ml403_ac97cr = snd_pcm_substream_chip(substream); in snd_ml403_ac97cr_capture_ind2_copy()
504 dst = (u16 *)(substream->runtime->dma_area + rec->sw_data); in snd_ml403_ac97cr_capture_ind2_copy()
[all …]
Dpcm-indirect2.h115 typedef size_t (*snd_pcm_indirect2_copy_t) (struct snd_pcm_substream *substream,
118 typedef size_t (*snd_pcm_indirect2_zero_t) (struct snd_pcm_substream *substream,
122 void snd_pcm_indirect2_stat(struct snd_pcm_substream *substream,
127 snd_pcm_indirect2_pointer(struct snd_pcm_substream *substream,
130 snd_pcm_indirect2_playback_interrupt(struct snd_pcm_substream *substream,
135 snd_pcm_indirect2_capture_interrupt(struct snd_pcm_substream *substream,
Dmts64.c686 static int snd_mts64_rawmidi_open(struct snd_rawmidi_substream *substream) in snd_mts64_rawmidi_open() argument
688 struct mts64 *mts = substream->rmidi->private_data; in snd_mts64_rawmidi_open()
703 static int snd_mts64_rawmidi_close(struct snd_rawmidi_substream *substream) in snd_mts64_rawmidi_close() argument
705 struct mts64 *mts = substream->rmidi->private_data; in snd_mts64_rawmidi_close()
724 static void snd_mts64_rawmidi_output_trigger(struct snd_rawmidi_substream *substream, in snd_mts64_rawmidi_output_trigger() argument
727 struct mts64 *mts = substream->rmidi->private_data; in snd_mts64_rawmidi_output_trigger()
732 while (snd_rawmidi_transmit_peek(substream, &data, 1) == 1) { in snd_mts64_rawmidi_output_trigger()
733 mts64_write_midi(mts, data, substream->number+1); in snd_mts64_rawmidi_output_trigger()
734 snd_rawmidi_transmit_ack(substream, 1); in snd_mts64_rawmidi_output_trigger()
739 static void snd_mts64_rawmidi_input_trigger(struct snd_rawmidi_substream *substream, in snd_mts64_rawmidi_input_trigger() argument
[all …]
Dportman2x4.c512 static int snd_portman_midi_open(struct snd_rawmidi_substream *substream) in snd_portman_midi_open() argument
517 static int snd_portman_midi_close(struct snd_rawmidi_substream *substream) in snd_portman_midi_close() argument
522 static void snd_portman_midi_input_trigger(struct snd_rawmidi_substream *substream, in snd_portman_midi_input_trigger() argument
525 struct portman *pm = substream->rmidi->private_data; in snd_portman_midi_input_trigger()
530 pm->mode[substream->number] |= PORTMAN2X4_MODE_INPUT_TRIGGERED; in snd_portman_midi_input_trigger()
532 pm->mode[substream->number] &= ~PORTMAN2X4_MODE_INPUT_TRIGGERED; in snd_portman_midi_input_trigger()
536 static void snd_portman_midi_output_trigger(struct snd_rawmidi_substream *substream, in snd_portman_midi_output_trigger() argument
539 struct portman *pm = substream->rmidi->private_data; in snd_portman_midi_output_trigger()
545 while ((snd_rawmidi_transmit(substream, &byte, 1) == 1)) in snd_portman_midi_output_trigger()
546 portman_write_midi(pm, substream->number, byte); in snd_portman_midi_output_trigger()
[all …]
/linux-4.1.27/sound/soc/sh/
Ddma-sh7760.c120 static int camelot_pcm_open(struct snd_pcm_substream *substream) in camelot_pcm_open() argument
122 struct snd_soc_pcm_runtime *rtd = substream->private_data; in camelot_pcm_open()
124 int recv = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? 0:1; in camelot_pcm_open()
127 snd_soc_set_runtime_hwparams(substream, &camelot_pcm_hardware); in camelot_pcm_open()
132 cam->rx_ss = substream; in camelot_pcm_open()
141 cam->tx_ss = substream; in camelot_pcm_open()
153 static int camelot_pcm_close(struct snd_pcm_substream *substream) in camelot_pcm_close() argument
155 struct snd_soc_pcm_runtime *rtd = substream->private_data; in camelot_pcm_close()
157 int recv = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? 0:1; in camelot_pcm_close()
173 static int camelot_hw_params(struct snd_pcm_substream *substream, in camelot_hw_params() argument
[all …]
Dfsi.c210 struct snd_pcm_substream *substream; member
401 static int fsi_is_play(struct snd_pcm_substream *substream) in fsi_is_play() argument
403 return substream->stream == SNDRV_PCM_STREAM_PLAYBACK; in fsi_is_play()
406 static struct snd_soc_dai *fsi_get_dai(struct snd_pcm_substream *substream) in fsi_get_dai() argument
408 struct snd_soc_pcm_runtime *rtd = substream->private_data; in fsi_get_dai()
423 static struct fsi_priv *fsi_get_priv(struct snd_pcm_substream *substream) in fsi_get_priv() argument
425 return fsi_get_priv_frm_dai(fsi_get_dai(substream)); in fsi_get_priv()
499 struct snd_pcm_substream *substream) in fsi_stream_get() argument
501 return fsi_is_play(substream) ? &fsi->playback : &fsi->capture; in fsi_stream_get()
512 ret = !!(io->substream && io->substream->runtime); in fsi_stream_is_working()
[all …]
Dsiu_pcm.c111 snd_pcm_period_elapsed(siu_stream->substream); in siu_dma_tx_complete()
120 struct snd_pcm_substream *substream = siu_stream->substream; in siu_pcm_wr_set() local
121 struct device *dev = substream->pcm->card->dev; in siu_pcm_wr_set()
168 struct snd_pcm_substream *substream = siu_stream->substream; in siu_pcm_rd_set() local
169 struct device *dev = substream->pcm->card->dev; in siu_pcm_rd_set()
216 struct snd_pcm_substream *substream = siu_stream->substream; in siu_io_tasklet() local
217 struct device *dev = substream->pcm->card->dev; in siu_io_tasklet()
218 struct snd_pcm_runtime *rt = substream->runtime; in siu_io_tasklet()
219 struct siu_port *port_info = siu_port_info(substream); in siu_io_tasklet()
228 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { in siu_io_tasklet()
[all …]
Dmigor.c49 static int migor_hw_params(struct snd_pcm_substream *substream, in migor_hw_params() argument
52 struct snd_soc_pcm_runtime *rtd = substream->private_data; in migor_hw_params()
83 static int migor_hw_free(struct snd_pcm_substream *substream) in migor_hw_free() argument
85 struct snd_soc_pcm_runtime *rtd = substream->private_data; in migor_hw_free()
/linux-4.1.27/sound/pci/aw2/
Daw2-alsa.c121 static int snd_aw2_pcm_playback_open(struct snd_pcm_substream *substream);
122 static int snd_aw2_pcm_playback_close(struct snd_pcm_substream *substream);
123 static int snd_aw2_pcm_capture_open(struct snd_pcm_substream *substream);
124 static int snd_aw2_pcm_capture_close(struct snd_pcm_substream *substream);
125 static int snd_aw2_pcm_hw_params(struct snd_pcm_substream *substream,
127 static int snd_aw2_pcm_hw_free(struct snd_pcm_substream *substream);
128 static int snd_aw2_pcm_prepare_playback(struct snd_pcm_substream *substream);
129 static int snd_aw2_pcm_prepare_capture(struct snd_pcm_substream *substream);
130 static int snd_aw2_pcm_trigger_playback(struct snd_pcm_substream *substream,
132 static int snd_aw2_pcm_trigger_capture(struct snd_pcm_substream *substream,
[all …]
/linux-4.1.27/sound/soc/atmel/
Datmel-pcm-pdc.c53 struct snd_pcm_substream *substream = pcm->streams[stream].substream; in atmel_pcm_preallocate_dma_buffer() local
54 struct snd_dma_buffer *buf = &substream->dma_buffer; in atmel_pcm_preallocate_dma_buffer()
72 static int atmel_pcm_mmap(struct snd_pcm_substream *substream, in atmel_pcm_mmap() argument
76 substream->dma_buffer.addr >> PAGE_SHIFT, in atmel_pcm_mmap()
90 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { in atmel_pcm_new()
98 if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { in atmel_pcm_new()
111 struct snd_pcm_substream *substream; in atmel_pcm_free() local
116 substream = pcm->streams[stream].substream; in atmel_pcm_free()
117 if (!substream) in atmel_pcm_free()
120 buf = &substream->dma_buffer; in atmel_pcm_free()
[all …]
Datmel-pcm-dma.c67 struct snd_pcm_substream *substream) in atmel_pcm_dma_irq() argument
69 struct snd_soc_pcm_runtime *rtd = substream->private_data; in atmel_pcm_dma_irq()
72 prtd = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); in atmel_pcm_dma_irq()
75 if (snd_pcm_running(substream)) in atmel_pcm_dma_irq()
77 substream->stream == SNDRV_PCM_STREAM_PLAYBACK in atmel_pcm_dma_irq()
83 snd_pcm_stop_xrun(substream); in atmel_pcm_dma_irq()
91 static int atmel_pcm_configure_dma(struct snd_pcm_substream *substream, in atmel_pcm_configure_dma() argument
94 struct snd_soc_pcm_runtime *rtd = substream->private_data; in atmel_pcm_configure_dma()
99 prtd = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); in atmel_pcm_configure_dma()
102 ret = snd_hwparams_to_dma_slave_config(substream, params, slave_config); in atmel_pcm_configure_dma()
Datmel_ssc_dai.c182 substream); in atmel_ssc_interrupt()
285 static int atmel_ssc_startup(struct snd_pcm_substream *substream, in atmel_ssc_startup() argument
304 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in atmel_ssc_startup()
312 ret = snd_pcm_hw_rule_add(substream->runtime, 0, in atmel_ssc_startup()
325 dma_params->substream = substream; in atmel_ssc_startup()
329 snd_soc_dai_set_dma_data(dai, substream, dma_params); in atmel_ssc_startup()
346 static void atmel_ssc_shutdown(struct snd_pcm_substream *substream, in atmel_ssc_shutdown() argument
353 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in atmel_ssc_shutdown()
362 dma_params->substream = NULL; in atmel_ssc_shutdown()
444 static int atmel_ssc_hw_params(struct snd_pcm_substream *substream, in atmel_ssc_hw_params() argument
[all …]
/linux-4.1.27/sound/sh/
Dsh_dac_audio.c56 struct snd_pcm_substream *substream; member
114 static int snd_sh_dac_pcm_open(struct snd_pcm_substream *substream) in snd_sh_dac_pcm_open() argument
116 struct snd_sh_dac *chip = snd_pcm_substream_chip(substream); in snd_sh_dac_pcm_open()
117 struct snd_pcm_runtime *runtime = substream->runtime; in snd_sh_dac_pcm_open()
121 chip->substream = substream; in snd_sh_dac_pcm_open()
131 static int snd_sh_dac_pcm_close(struct snd_pcm_substream *substream) in snd_sh_dac_pcm_close() argument
133 struct snd_sh_dac *chip = snd_pcm_substream_chip(substream); in snd_sh_dac_pcm_close()
135 chip->substream = NULL; in snd_sh_dac_pcm_close()
143 static int snd_sh_dac_pcm_hw_params(struct snd_pcm_substream *substream, in snd_sh_dac_pcm_hw_params() argument
146 return snd_pcm_lib_malloc_pages(substream, in snd_sh_dac_pcm_hw_params()
[all …]
Daica.c235 struct snd_pcm_substream *substream) in aica_dma_transfer() argument
242 dreamcastcard = substream->pcm->private_data; in aica_dma_transfer()
245 runtime = substream->runtime; in aica_dma_transfer()
281 runtime = dreamcastcard->substream->runtime; in run_spu_dma()
288 dreamcastcard->substream); in run_spu_dma()
296 dreamcastcard->substream); in run_spu_dma()
297 snd_pcm_period_elapsed(dreamcastcard->substream); in run_spu_dma()
310 struct snd_pcm_substream *substream; in aica_period_elapsed() local
312 substream = (struct snd_pcm_substream *) timer_var; in aica_period_elapsed()
313 runtime = substream->runtime; in aica_period_elapsed()
[all …]
/linux-4.1.27/sound/isa/sb/
Dsb8_main.c104 static int snd_sb8_playback_prepare(struct snd_pcm_substream *substream) in snd_sb8_playback_prepare() argument
107 struct snd_sb *chip = snd_pcm_substream_chip(substream); in snd_sb8_playback_prepare()
108 struct snd_pcm_runtime *runtime = substream->runtime; in snd_sb8_playback_prepare()
157 size = chip->p_dma_size = snd_pcm_lib_buffer_bytes(substream); in snd_sb8_playback_prepare()
158 count = chip->p_period_size = snd_pcm_lib_period_bytes(substream); in snd_sb8_playback_prepare()
206 static int snd_sb8_playback_trigger(struct snd_pcm_substream *substream, in snd_sb8_playback_trigger() argument
210 struct snd_sb *chip = snd_pcm_substream_chip(substream); in snd_sb8_playback_trigger()
225 struct snd_pcm_runtime *runtime = substream->runtime; in snd_sb8_playback_trigger()
242 static int snd_sb8_hw_params(struct snd_pcm_substream *substream, in snd_sb8_hw_params() argument
245 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); in snd_sb8_hw_params()
[all …]
Dsb8_midi.c63 static int snd_sb8dsp_midi_input_open(struct snd_rawmidi_substream *substream) in snd_sb8dsp_midi_input_open() argument
69 chip = substream->rmidi->private_data; in snd_sb8dsp_midi_input_open()
78 chip->midi_substream_input = substream; in snd_sb8dsp_midi_input_open()
90 static int snd_sb8dsp_midi_output_open(struct snd_rawmidi_substream *substream) in snd_sb8dsp_midi_output_open() argument
96 chip = substream->rmidi->private_data; in snd_sb8dsp_midi_output_open()
105 chip->midi_substream_output = substream; in snd_sb8dsp_midi_output_open()
117 static int snd_sb8dsp_midi_input_close(struct snd_rawmidi_substream *substream) in snd_sb8dsp_midi_input_close() argument
122 chip = substream->rmidi->private_data; in snd_sb8dsp_midi_input_close()
135 static int snd_sb8dsp_midi_output_close(struct snd_rawmidi_substream *substream) in snd_sb8dsp_midi_output_close() argument
140 chip = substream->rmidi->private_data; in snd_sb8dsp_midi_output_close()
[all …]
Dsb16_main.c247 static int snd_sb16_hw_params(struct snd_pcm_substream *substream, in snd_sb16_hw_params() argument
250 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); in snd_sb16_hw_params()
253 static int snd_sb16_hw_free(struct snd_pcm_substream *substream) in snd_sb16_hw_free() argument
255 snd_pcm_lib_free_pages(substream); in snd_sb16_hw_free()
259 static int snd_sb16_playback_prepare(struct snd_pcm_substream *substream) in snd_sb16_playback_prepare() argument
262 struct snd_sb *chip = snd_pcm_substream_chip(substream); in snd_sb16_playback_prepare()
263 struct snd_pcm_runtime *runtime = substream->runtime; in snd_sb16_playback_prepare()
275 size = chip->p_dma_size = snd_pcm_lib_buffer_bytes(substream); in snd_sb16_playback_prepare()
279 count = snd_pcm_lib_period_bytes(substream); in snd_sb16_playback_prepare()
301 static int snd_sb16_playback_trigger(struct snd_pcm_substream *substream, in snd_sb16_playback_trigger() argument
[all …]
/linux-4.1.27/sound/usb/caiaq/
Dmidi.c29 static int snd_usb_caiaq_midi_input_open(struct snd_rawmidi_substream *substream) in snd_usb_caiaq_midi_input_open() argument
34 static int snd_usb_caiaq_midi_input_close(struct snd_rawmidi_substream *substream) in snd_usb_caiaq_midi_input_close() argument
39 static void snd_usb_caiaq_midi_input_trigger(struct snd_rawmidi_substream *substream, int up) in snd_usb_caiaq_midi_input_trigger() argument
41 struct snd_usb_caiaqdev *cdev = substream->rmidi->private_data; in snd_usb_caiaq_midi_input_trigger()
46 cdev->midi_receive_substream = up ? substream : NULL; in snd_usb_caiaq_midi_input_trigger()
50 static int snd_usb_caiaq_midi_output_open(struct snd_rawmidi_substream *substream) in snd_usb_caiaq_midi_output_open() argument
55 static int snd_usb_caiaq_midi_output_close(struct snd_rawmidi_substream *substream) in snd_usb_caiaq_midi_output_close() argument
57 struct snd_usb_caiaqdev *cdev = substream->rmidi->private_data; in snd_usb_caiaq_midi_output_close()
66 struct snd_rawmidi_substream *substream) in snd_usb_caiaq_midi_send() argument
73 len = snd_rawmidi_transmit(substream, cdev->midi_out_buf + 3, in snd_usb_caiaq_midi_send()
[all …]
/linux-4.1.27/sound/aoa/soundbus/i2sbus/
Dpcm.c91 hw = &pi->substream->runtime->hw; in i2sbus_pcm_open()
196 err = snd_pcm_hw_constraint_integer(pi->substream->runtime, in i2sbus_pcm_open()
204 err = cii->codec->open(cii, pi->substream); in i2sbus_pcm_open()
213 pi->substream); in i2sbus_pcm_open()
242 tmp = cii->codec->close(cii, pi->substream); in i2sbus_pcm_close()
248 pi->substream = NULL; in i2sbus_pcm_close()
298 static int i2sbus_hw_params(struct snd_pcm_substream *substream, in i2sbus_hw_params() argument
301 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params)); in i2sbus_hw_params()
304 static inline int i2sbus_hw_free(struct snd_pcm_substream *substream, int in) in i2sbus_hw_free() argument
306 struct i2sbus_dev *i2sdev = snd_pcm_substream_chip(substream); in i2sbus_hw_free()
[all …]
/linux-4.1.27/sound/isa/gus/
Dgus_pcm.c46 struct snd_pcm_substream *substream; member
74 static int snd_gf1_pcm_block_change(struct snd_pcm_substream *substream, in snd_gf1_pcm_block_change() argument
80 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_block_change()
106 static void snd_gf1_pcm_trigger_up(struct snd_pcm_substream *substream) in snd_gf1_pcm_trigger_up() argument
108 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_trigger_up()
207 runtime = pcmp->substream->runtime; in snd_gf1_pcm_interrupt_wave()
256 snd_pcm_period_elapsed(pcmp->substream); in snd_gf1_pcm_interrupt_wave()
262 snd_gf1_pcm_block_change(pcmp->substream, end, pcmp->memory + (end / 2), pcmp->block_size / 2); in snd_gf1_pcm_interrupt_wave()
263 …snd_gf1_pcm_block_change(pcmp->substream, end + (pcmp->block_size / 2), pcmp->memory + (pcmp->dma_… in snd_gf1_pcm_interrupt_wave()
265 snd_gf1_pcm_block_change(pcmp->substream, end, pcmp->memory + end, pcmp->block_size); in snd_gf1_pcm_interrupt_wave()
[all …]
Dgus_uart.c92 static int snd_gf1_uart_output_open(struct snd_rawmidi_substream *substream) in snd_gf1_uart_output_open() argument
97 gus = substream->rmidi->private_data; in snd_gf1_uart_output_open()
103 gus->midi_substream_output = substream; in snd_gf1_uart_output_open()
111 static int snd_gf1_uart_input_open(struct snd_rawmidi_substream *substream) in snd_gf1_uart_input_open() argument
117 gus = substream->rmidi->private_data; in snd_gf1_uart_input_open()
123 gus->midi_substream_input = substream; in snd_gf1_uart_input_open()
144 static int snd_gf1_uart_output_close(struct snd_rawmidi_substream *substream) in snd_gf1_uart_output_close() argument
149 gus = substream->rmidi->private_data; in snd_gf1_uart_output_close()
159 static int snd_gf1_uart_input_close(struct snd_rawmidi_substream *substream) in snd_gf1_uart_input_close() argument
164 gus = substream->rmidi->private_data; in snd_gf1_uart_input_close()
[all …]
/linux-4.1.27/sound/soc/txx9/
Dtxx9aclc.c51 static int txx9aclc_pcm_hw_params(struct snd_pcm_substream *substream, in txx9aclc_pcm_hw_params() argument
54 struct snd_soc_pcm_runtime *rtd = snd_pcm_substream_chip(substream); in txx9aclc_pcm_hw_params()
55 struct snd_pcm_runtime *runtime = substream->runtime; in txx9aclc_pcm_hw_params()
59 ret = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params)); in txx9aclc_pcm_hw_params()
72 substream->stream); in txx9aclc_pcm_hw_params()
74 dmadata->substream = substream; in txx9aclc_pcm_hw_params()
79 static int txx9aclc_pcm_hw_free(struct snd_pcm_substream *substream) in txx9aclc_pcm_hw_free() argument
81 return snd_pcm_lib_free_pages(substream); in txx9aclc_pcm_hw_free()
84 static int txx9aclc_pcm_prepare(struct snd_pcm_substream *substream) in txx9aclc_pcm_prepare() argument
86 struct snd_pcm_runtime *runtime = substream->runtime; in txx9aclc_pcm_prepare()
[all …]
/linux-4.1.27/sound/usb/line6/
Dmidi.c21 #define line6_rawmidi_substream_midi(substream) \ argument
22 ((struct snd_line6_midi *)((substream)->rmidi->private_data))
41 static void line6_midi_transmit(struct snd_rawmidi_substream *substream) in line6_midi_transmit() argument
44 line6_rawmidi_substream_midi(substream)->line6; in line6_midi_transmit()
52 done = snd_rawmidi_transmit_peek(substream, chunk, req); in line6_midi_transmit()
58 snd_rawmidi_transmit_ack(substream, done); in line6_midi_transmit()
145 static int line6_midi_output_open(struct snd_rawmidi_substream *substream) in line6_midi_output_open() argument
150 static int line6_midi_output_close(struct snd_rawmidi_substream *substream) in line6_midi_output_close() argument
155 static void line6_midi_output_trigger(struct snd_rawmidi_substream *substream, in line6_midi_output_trigger() argument
160 line6_rawmidi_substream_midi(substream)->line6; in line6_midi_output_trigger()
[all …]
Dpcm.h43 (line6pcm->pcm->streams[stream].substream)
187 extern int snd_line6_trigger(struct snd_pcm_substream *substream, int cmd);
188 extern int snd_line6_prepare(struct snd_pcm_substream *substream);
189 extern int snd_line6_hw_params(struct snd_pcm_substream *substream,
191 extern int snd_line6_hw_free(struct snd_pcm_substream *substream);
192 extern snd_pcm_uframes_t snd_line6_pointer(struct snd_pcm_substream *substream);
Dpcm.c224 int snd_line6_trigger(struct snd_pcm_substream *substream, int cmd) in snd_line6_trigger() argument
226 struct snd_line6_pcm *line6pcm = snd_pcm_substream_chip(substream); in snd_line6_trigger()
232 snd_pcm_group_for_each_entry(s, substream) { in snd_line6_trigger()
233 if (s->pcm->card != substream->pcm->card) in snd_line6_trigger()
272 snd_pcm_uframes_t snd_line6_pointer(struct snd_pcm_substream *substream) in snd_line6_pointer() argument
274 struct snd_line6_pcm *line6pcm = snd_pcm_substream_chip(substream); in snd_line6_pointer()
275 struct line6_pcm_stream *pstr = get_stream(line6pcm, substream->stream); in snd_line6_pointer()
328 int snd_line6_hw_params(struct snd_pcm_substream *substream, in snd_line6_hw_params() argument
332 struct snd_line6_pcm *line6pcm = snd_pcm_substream_chip(substream); in snd_line6_hw_params()
333 struct line6_pcm_stream *pstr = get_stream(line6pcm, substream->stream); in snd_line6_hw_params()
[all …]
Dcapture.c90 struct snd_pcm_substream *substream = in line6_capture_copy() local
92 struct snd_pcm_runtime *runtime = substream->runtime; in line6_capture_copy()
132 struct snd_pcm_substream *substream = in line6_capture_check_period() local
139 snd_pcm_period_elapsed(substream); in line6_capture_check_period()
211 static int snd_line6_capture_open(struct snd_pcm_substream *substream) in snd_line6_capture_open() argument
214 struct snd_pcm_runtime *runtime = substream->runtime; in snd_line6_capture_open()
215 struct snd_line6_pcm *line6pcm = snd_pcm_substream_chip(substream); in snd_line6_capture_open()
228 static int snd_line6_capture_close(struct snd_pcm_substream *substream) in snd_line6_capture_close() argument
/linux-4.1.27/sound/mips/
Dsgio2audio.c87 struct snd_pcm_substream *substream; member
369 struct snd_pcm_runtime *runtime = chip->channel[ch].substream->runtime; in snd_sgio2audio_dma_pull_frag()
417 struct snd_pcm_runtime *runtime = chip->channel[ch].substream->runtime; in snd_sgio2audio_dma_push_frag()
454 static int snd_sgio2audio_dma_start(struct snd_pcm_substream *substream) in snd_sgio2audio_dma_start() argument
456 struct snd_sgio2audio *chip = snd_pcm_substream_chip(substream); in snd_sgio2audio_dma_start()
457 struct snd_sgio2audio_chan *chan = substream->runtime->private_data; in snd_sgio2audio_dma_start()
465 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in snd_sgio2audio_dma_start()
475 static int snd_sgio2audio_dma_stop(struct snd_pcm_substream *substream) in snd_sgio2audio_dma_stop() argument
477 struct snd_sgio2audio_chan *chan = substream->runtime->private_data; in snd_sgio2audio_dma_stop()
486 struct snd_pcm_substream *substream; in snd_sgio2audio_dma_in_isr() local
[all …]
Dau1x00.c84 struct snd_pcm_substream *substream; member
156 struct snd_pcm_substream *substream = stream->substream; in au1000_setup_dma_link() local
157 struct snd_pcm_runtime *runtime = substream->runtime; in au1000_setup_dma_link()
229 struct snd_pcm_substream *substream = stream->substream; in au1000_dma_interrupt() local
256 snd_pcm_period_elapsed(substream); in au1000_dma_interrupt()
289 snd_au1000_playback_open(struct snd_pcm_substream *substream) in snd_au1000_playback_open() argument
291 struct snd_au1000 *au1000 = substream->pcm->private_data; in snd_au1000_playback_open()
293 au1000->stream[PLAYBACK]->substream = substream; in snd_au1000_playback_open()
295 substream->private_data = au1000->stream[PLAYBACK]; in snd_au1000_playback_open()
296 substream->runtime->hw = snd_au1000_hw; in snd_au1000_playback_open()
[all …]
Dhal2.c70 struct snd_pcm_substream *substream; member
313 snd_pcm_period_elapsed(hal2->dac.substream); in hal2_interrupt()
317 snd_pcm_period_elapsed(hal2->adc.substream); in hal2_interrupt()
513 static int hal2_pcm_hw_params(struct snd_pcm_substream *substream, in hal2_pcm_hw_params() argument
518 err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params)); in hal2_pcm_hw_params()
525 static int hal2_pcm_hw_free(struct snd_pcm_substream *substream) in hal2_pcm_hw_free() argument
527 return snd_pcm_lib_free_pages(substream); in hal2_pcm_hw_free()
530 static int hal2_playback_open(struct snd_pcm_substream *substream) in hal2_playback_open() argument
532 struct snd_pcm_runtime *runtime = substream->runtime; in hal2_playback_open()
533 struct snd_hal2 *hal2 = snd_pcm_substream_chip(substream); in hal2_playback_open()
[all …]
/linux-4.1.27/sound/pci/hda/
Dhda_controller.c170 azx_assign_device(struct azx *chip, struct snd_pcm_substream *substream) in azx_assign_device() argument
175 int key = (substream->pcm->device << 16) | (substream->number << 2) | in azx_assign_device()
176 (substream->stream + 1); in azx_assign_device()
178 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in azx_assign_device()
219 struct snd_pcm_substream *substream = azx_dev->substream; in azx_cc_read() local
220 struct azx_pcm *apcm = snd_pcm_substream_chip(substream); in azx_cc_read()
226 static void azx_timecounter_init(struct snd_pcm_substream *substream, in azx_timecounter_init() argument
229 struct azx_dev *azx_dev = get_azx_dev(substream); in azx_timecounter_init()
261 to_hda_pcm_stream(struct snd_pcm_substream *substream) in to_hda_pcm_stream() argument
263 struct azx_pcm *apcm = snd_pcm_substream_chip(substream); in to_hda_pcm_stream()
[all …]
Dpatch_si3054.c153 struct snd_pcm_substream *substream) in si3054_pcm_prepare() argument
157 SET_REG(codec, SI3054_LINE_RATE, substream->runtime->rate); in si3054_pcm_prepare()
159 val &= 0xff << (8 * (substream->stream != SNDRV_PCM_STREAM_PLAYBACK)); in si3054_pcm_prepare()
160 val |= ((stream_tag & 0xf) << 4) << (8 * (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)); in si3054_pcm_prepare()
170 struct snd_pcm_substream *substream) in si3054_pcm_open() argument
178 substream->runtime->hw.period_bytes_min = 80; in si3054_pcm_open()
179 return snd_pcm_hw_constraint_list(substream->runtime, 0, in si3054_pcm_open()
/linux-4.1.27/drivers/media/usb/usbtv/
Dusbtv-audio.c51 static int snd_usbtv_pcm_open(struct snd_pcm_substream *substream) in snd_usbtv_pcm_open() argument
53 struct usbtv *chip = snd_pcm_substream_chip(substream); in snd_usbtv_pcm_open()
54 struct snd_pcm_runtime *runtime = substream->runtime; in snd_usbtv_pcm_open()
56 chip->snd_substream = substream; in snd_usbtv_pcm_open()
62 static int snd_usbtv_pcm_close(struct snd_pcm_substream *substream) in snd_usbtv_pcm_close() argument
64 struct usbtv *chip = snd_pcm_substream_chip(substream); in snd_usbtv_pcm_close()
74 static int snd_usbtv_hw_params(struct snd_pcm_substream *substream, in snd_usbtv_hw_params() argument
78 struct usbtv *chip = snd_pcm_substream_chip(substream); in snd_usbtv_hw_params()
80 rv = snd_pcm_lib_malloc_pages(substream, in snd_usbtv_hw_params()
92 static int snd_usbtv_hw_free(struct snd_pcm_substream *substream) in snd_usbtv_hw_free() argument
[all …]
/linux-4.1.27/sound/core/seq/
Dseq_virmidi.c93 snd_seq_dump_var_event(ev, (snd_seq_dump_func_t)snd_rawmidi_receive, vmidi->substream); in snd_virmidi_dev_receive_event()
97 snd_rawmidi_receive(vmidi->substream, msg, len); in snd_virmidi_dev_receive_event()
139 static void snd_virmidi_input_trigger(struct snd_rawmidi_substream *substream, int up) in snd_virmidi_input_trigger() argument
141 struct snd_virmidi *vmidi = substream->runtime->private_data; in snd_virmidi_input_trigger()
153 static void snd_virmidi_output_trigger(struct snd_rawmidi_substream *substream, int up) in snd_virmidi_output_trigger() argument
155 struct snd_virmidi *vmidi = substream->runtime->private_data; in snd_virmidi_output_trigger()
164 while (snd_rawmidi_transmit(substream, buf, in snd_virmidi_output_trigger()
175 spin_lock_irqsave(&substream->runtime->lock, flags); in snd_virmidi_output_trigger()
177 count = __snd_rawmidi_transmit_peek(substream, buf, sizeof(buf)); in snd_virmidi_output_trigger()
187 __snd_rawmidi_transmit_ack(substream, res); in snd_virmidi_output_trigger()
[all …]
Dseq_midi.c75 static void snd_midi_input_event(struct snd_rawmidi_substream *substream) in snd_midi_input_event() argument
83 if (substream == NULL) in snd_midi_input_event()
85 runtime = substream->runtime; in snd_midi_input_event()
91 res = snd_rawmidi_kernel_read(substream, buf, sizeof(buf)); in snd_midi_input_event()
114 static int dump_midi(struct snd_rawmidi_substream *substream, const char *buf, int count) in dump_midi() argument
119 if (snd_BUG_ON(!substream || !buf)) in dump_midi()
121 runtime = substream->runtime; in dump_midi()
127 if (snd_rawmidi_kernel_write(substream, buf, count) < count) in dump_midi()
137 struct snd_rawmidi_substream *substream; in event_process_midi() local
142 substream = msynth->output_rfile.output; in event_process_midi()
[all …]
/linux-4.1.27/sound/pci/
Datiixp.c247 struct snd_pcm_substream *substream; /* assigned PCM substream */ member
357 struct snd_pcm_substream *substream, in atiixp_build_dma_packets() argument
388 addr = (u32)substream->runtime->dma_addr; in atiixp_build_dma_packets()
417 struct snd_pcm_substream *substream) in atiixp_clear_dma_packets() argument
661 static snd_pcm_uframes_t snd_atiixp_pcm_pointer(struct snd_pcm_substream *substream) in snd_atiixp_pcm_pointer() argument
663 struct atiixp *chip = snd_pcm_substream_chip(substream); in snd_atiixp_pcm_pointer()
664 struct snd_pcm_runtime *runtime = substream->runtime; in snd_atiixp_pcm_pointer()
688 if (! dma->substream || ! dma->running) in snd_atiixp_xrun_dma()
691 snd_pcm_stop_xrun(dma->substream); in snd_atiixp_xrun_dma()
699 if (! dma->substream || ! dma->running) in snd_atiixp_update_dma()
[all …]
Dals300.c369 static int snd_als300_playback_open(struct snd_pcm_substream *substream) in snd_als300_playback_open() argument
371 struct snd_als300 *chip = snd_pcm_substream_chip(substream); in snd_als300_playback_open()
372 struct snd_pcm_runtime *runtime = substream->runtime; in snd_als300_playback_open()
378 chip->playback_substream = substream; in snd_als300_playback_open()
386 static int snd_als300_playback_close(struct snd_pcm_substream *substream) in snd_als300_playback_close() argument
388 struct snd_als300 *chip = snd_pcm_substream_chip(substream); in snd_als300_playback_close()
391 data = substream->runtime->private_data; in snd_als300_playback_close()
394 snd_pcm_lib_free_pages(substream); in snd_als300_playback_close()
398 static int snd_als300_capture_open(struct snd_pcm_substream *substream) in snd_als300_capture_open() argument
400 struct snd_als300 *chip = snd_pcm_substream_chip(substream); in snd_als300_capture_open()
[all …]
Datiixp_modem.c223 struct snd_pcm_substream *substream; /* assigned PCM substream */ member
326 struct snd_pcm_substream *substream, in atiixp_build_dma_packets() argument
355 addr = (u32)substream->runtime->dma_addr; in atiixp_build_dma_packets()
385 struct snd_pcm_substream *substream) in atiixp_clear_dma_packets() argument
610 static snd_pcm_uframes_t snd_atiixp_pcm_pointer(struct snd_pcm_substream *substream) in snd_atiixp_pcm_pointer() argument
612 struct atiixp_modem *chip = snd_pcm_substream_chip(substream); in snd_atiixp_pcm_pointer()
613 struct snd_pcm_runtime *runtime = substream->runtime; in snd_atiixp_pcm_pointer()
638 if (! dma->substream || ! dma->running) in snd_atiixp_xrun_dma()
641 snd_pcm_stop_xrun(dma->substream); in snd_atiixp_xrun_dma()
650 if (! dma->substream || ! dma->running) in snd_atiixp_update_dma()
[all …]
Drme32.c240 static int snd_rme32_playback_prepare(struct snd_pcm_substream *substream);
242 static int snd_rme32_capture_prepare(struct snd_pcm_substream *substream);
244 static int snd_rme32_pcm_trigger(struct snd_pcm_substream *substream, int cmd);
257 static int snd_rme32_playback_silence(struct snd_pcm_substream *substream, int channel, /* not used… in snd_rme32_playback_silence() argument
261 struct rme32 *rme32 = snd_pcm_substream_chip(substream); in snd_rme32_playback_silence()
269 static int snd_rme32_playback_copy(struct snd_pcm_substream *substream, int channel, /* not used (i… in snd_rme32_playback_copy() argument
273 struct rme32 *rme32 = snd_pcm_substream_chip(substream); in snd_rme32_playback_copy()
283 static int snd_rme32_capture_copy(struct snd_pcm_substream *substream, int channel, /* not used (in… in snd_rme32_capture_copy() argument
287 struct rme32 *rme32 = snd_pcm_substream_chip(substream); in snd_rme32_capture_copy()
651 snd_rme32_playback_hw_params(struct snd_pcm_substream *substream, in snd_rme32_playback_hw_params() argument
[all …]
Dals4000.c371 static int snd_als4000_hw_params(struct snd_pcm_substream *substream, in snd_als4000_hw_params() argument
374 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); in snd_als4000_hw_params()
377 static int snd_als4000_hw_free(struct snd_pcm_substream *substream) in snd_als4000_hw_free() argument
379 snd_pcm_lib_free_pages(substream); in snd_als4000_hw_free()
383 static int snd_als4000_capture_prepare(struct snd_pcm_substream *substream) in snd_als4000_capture_prepare() argument
385 struct snd_sb *chip = snd_pcm_substream_chip(substream); in snd_als4000_capture_prepare()
386 struct snd_pcm_runtime *runtime = substream->runtime; in snd_als4000_capture_prepare()
392 size = snd_pcm_lib_buffer_bytes(substream); in snd_als4000_capture_prepare()
393 count = snd_pcm_lib_period_bytes(substream); in snd_als4000_capture_prepare()
410 static int snd_als4000_playback_prepare(struct snd_pcm_substream *substream) in snd_als4000_playback_prepare() argument
[all …]
Dvia82xx_modem.c223 struct snd_pcm_substream *substream; member
278 static int build_via_table(struct viadev *dev, struct snd_pcm_substream *substream, in build_via_table() argument
283 struct via82xx_modem *chip = snd_pcm_substream_chip(substream); in build_via_table()
318 addr = snd_pcm_sgbuf_get_addr(substream, ofs); in build_via_table()
350 static int clean_via_table(struct viadev *dev, struct snd_pcm_substream *substream, in clean_via_table() argument
503 if (viadev->substream && viadev->running) { in snd_via82xx_interrupt()
505 snd_pcm_period_elapsed(viadev->substream); in snd_via82xx_interrupt()
521 static int snd_via82xx_pcm_trigger(struct snd_pcm_substream *substream, int cmd) in snd_via82xx_pcm_trigger() argument
523 struct via82xx_modem *chip = snd_pcm_substream_chip(substream); in snd_via82xx_pcm_trigger()
524 struct viadev *viadev = substream->runtime->private_data; in snd_via82xx_pcm_trigger()
[all …]
Des1938.c461 struct snd_pcm_substream *substream, in snd_es1938_rate_set() argument
465 struct snd_pcm_runtime *runtime = substream->runtime; in snd_es1938_rate_set()
531 static int snd_es1938_capture_trigger(struct snd_pcm_substream *substream, in snd_es1938_capture_trigger() argument
534 struct es1938 *chip = snd_pcm_substream_chip(substream); in snd_es1938_capture_trigger()
554 static int snd_es1938_playback1_trigger(struct snd_pcm_substream *substream, in snd_es1938_playback1_trigger() argument
557 struct es1938 *chip = snd_pcm_substream_chip(substream); in snd_es1938_playback1_trigger()
584 static int snd_es1938_playback2_trigger(struct snd_pcm_substream *substream, in snd_es1938_playback2_trigger() argument
587 struct es1938 *chip = snd_pcm_substream_chip(substream); in snd_es1938_playback2_trigger()
607 static int snd_es1938_playback_trigger(struct snd_pcm_substream *substream, in snd_es1938_playback_trigger() argument
610 switch (substream->number) { in snd_es1938_playback_trigger()
[all …]
Dsis7019.c94 struct snd_pcm_substream *substream; member
293 snd_pcm_period_elapsed(voice->substream); in sis_update_voice()
345 snd_pcm_period_elapsed(voice->substream); in sis_interrupt()
447 static int sis_alloc_timing_voice(struct snd_pcm_substream *substream, in sis_alloc_timing_voice() argument
450 struct sis7019 *sis = snd_pcm_substream_chip(substream); in sis_alloc_timing_voice()
451 struct snd_pcm_runtime *runtime = substream->runtime; in sis_alloc_timing_voice()
474 voice->timing->substream = substream; in sis_alloc_timing_voice()
483 static int sis_playback_open(struct snd_pcm_substream *substream) in sis_playback_open() argument
485 struct sis7019 *sis = snd_pcm_substream_chip(substream); in sis_playback_open()
486 struct snd_pcm_runtime *runtime = substream->runtime; in sis_playback_open()
[all …]
Dvia82xx.c328 struct snd_pcm_substream *substream; member
425 static int build_via_table(struct viadev *dev, struct snd_pcm_substream *substream, in build_via_table() argument
430 struct via82xx *chip = snd_pcm_substream_chip(substream); in build_via_table()
465 addr = snd_pcm_sgbuf_get_addr(substream, ofs); in build_via_table()
467 r = snd_pcm_sgbuf_get_chunk_size(substream, ofs, rest); in build_via_table()
496 static int clean_via_table(struct viadev *dev, struct snd_pcm_substream *substream, in clean_via_table() argument
649 if (viadev->substream && viadev->running) { in snd_via686_interrupt()
661 snd_pcm_period_elapsed(viadev->substream); in snd_via686_interrupt()
687 struct snd_pcm_substream *substream; in snd_via8233_interrupt() local
697 substream = viadev->substream; in snd_via8233_interrupt()
[all …]
Dintel8x0.c353 #define get_ichdev(substream) (substream->runtime->private_data) argument
360 struct snd_pcm_substream *substream; member
803 if (ack && ichdev->substream) { in snd_intel8x0_update()
804 snd_pcm_period_elapsed(ichdev->substream); in snd_intel8x0_update()
847 static int snd_intel8x0_pcm_trigger(struct snd_pcm_substream *substream, int cmd) in snd_intel8x0_pcm_trigger() argument
849 struct intel8x0 *chip = snd_pcm_substream_chip(substream); in snd_intel8x0_pcm_trigger()
850 struct ichdev *ichdev = get_ichdev(substream); in snd_intel8x0_pcm_trigger()
885 static int snd_intel8x0_ali_trigger(struct snd_pcm_substream *substream, int cmd) in snd_intel8x0_ali_trigger() argument
887 struct intel8x0 *chip = snd_pcm_substream_chip(substream); in snd_intel8x0_ali_trigger()
888 struct ichdev *ichdev = get_ichdev(substream); in snd_intel8x0_ali_trigger()
[all …]
Dens1370.c810 static int snd_ensoniq_trigger(struct snd_pcm_substream *substream, int cmd) in snd_ensoniq_trigger() argument
812 struct ensoniq *ensoniq = snd_pcm_substream_chip(substream); in snd_ensoniq_trigger()
819 snd_pcm_group_for_each_entry(s, substream) { in snd_ensoniq_trigger()
822 snd_pcm_trigger_done(s, substream); in snd_ensoniq_trigger()
825 snd_pcm_trigger_done(s, substream); in snd_ensoniq_trigger()
843 snd_pcm_group_for_each_entry(s, substream) { in snd_ensoniq_trigger()
846 snd_pcm_trigger_done(s, substream); in snd_ensoniq_trigger()
849 snd_pcm_trigger_done(s, substream); in snd_ensoniq_trigger()
852 snd_pcm_trigger_done(s, substream); in snd_ensoniq_trigger()
874 static int snd_ensoniq_hw_params(struct snd_pcm_substream *substream, in snd_ensoniq_hw_params() argument
[all …]
Dintel8x0m.c166 #define get_ichdev(substream) (substream->runtime->private_data) argument
173 struct snd_pcm_substream *substream; member
491 if (ack && ichdev->substream) { in snd_intel8x0m_update()
493 snd_pcm_period_elapsed(ichdev->substream); in snd_intel8x0m_update()
536 static int snd_intel8x0m_pcm_trigger(struct snd_pcm_substream *substream, int cmd) in snd_intel8x0m_pcm_trigger() argument
538 struct intel8x0m *chip = snd_pcm_substream_chip(substream); in snd_intel8x0m_pcm_trigger()
539 struct ichdev *ichdev = get_ichdev(substream); in snd_intel8x0m_pcm_trigger()
571 static int snd_intel8x0m_hw_params(struct snd_pcm_substream *substream, in snd_intel8x0m_hw_params() argument
574 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); in snd_intel8x0m_hw_params()
577 static int snd_intel8x0m_hw_free(struct snd_pcm_substream *substream) in snd_intel8x0m_hw_free() argument
[all …]
Drme96.c286 snd_rme96_playback_prepare(struct snd_pcm_substream *substream);
289 snd_rme96_capture_prepare(struct snd_pcm_substream *substream);
292 snd_rme96_playback_trigger(struct snd_pcm_substream *substream,
296 snd_rme96_capture_trigger(struct snd_pcm_substream *substream,
300 snd_rme96_playback_pointer(struct snd_pcm_substream *substream);
303 snd_rme96_capture_pointer(struct snd_pcm_substream *substream);
329 snd_rme96_playback_silence(struct snd_pcm_substream *substream, in snd_rme96_playback_silence() argument
334 struct rme96 *rme96 = snd_pcm_substream_chip(substream); in snd_rme96_playback_silence()
343 snd_rme96_playback_copy(struct snd_pcm_substream *substream, in snd_rme96_playback_copy() argument
349 struct rme96 *rme96 = snd_pcm_substream_chip(substream); in snd_rme96_playback_copy()
[all …]
Dcs4281.c431 struct snd_pcm_substream *substream; member
668 static int snd_cs4281_trigger(struct snd_pcm_substream *substream, int cmd) in snd_cs4281_trigger() argument
670 struct cs4281_dma *dma = substream->runtime->private_data; in snd_cs4281_trigger()
671 struct cs4281 *chip = snd_pcm_substream_chip(substream); in snd_cs4281_trigger()
799 static int snd_cs4281_hw_params(struct snd_pcm_substream *substream, in snd_cs4281_hw_params() argument
802 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); in snd_cs4281_hw_params()
805 static int snd_cs4281_hw_free(struct snd_pcm_substream *substream) in snd_cs4281_hw_free() argument
807 return snd_pcm_lib_free_pages(substream); in snd_cs4281_hw_free()
810 static int snd_cs4281_playback_prepare(struct snd_pcm_substream *substream) in snd_cs4281_playback_prepare() argument
812 struct snd_pcm_runtime *runtime = substream->runtime; in snd_cs4281_playback_prepare()
[all …]
Dbt87x.c201 struct snd_pcm_substream *substream; member
227 static int snd_bt87x_create_risc(struct snd_bt87x *chip, struct snd_pcm_substream *substream, in snd_bt87x_create_risc() argument
263 addr = snd_pcm_sgbuf_get_addr(substream, offset); in snd_bt87x_create_risc()
351 snd_pcm_period_elapsed(chip->substream); in snd_bt87x_interrupt()
421 static int snd_bt87x_pcm_open(struct snd_pcm_substream *substream) in snd_bt87x_pcm_open() argument
423 struct snd_bt87x *chip = snd_pcm_substream_chip(substream); in snd_bt87x_pcm_open()
424 struct snd_pcm_runtime *runtime = substream->runtime; in snd_bt87x_pcm_open()
430 if (substream->pcm->device == DEVICE_DIGITAL) in snd_bt87x_pcm_open()
441 chip->substream = substream; in snd_bt87x_pcm_open()
450 static int snd_bt87x_close(struct snd_pcm_substream *substream) in snd_bt87x_close() argument
[all …]
Dcmipci.c433 struct snd_pcm_substream *substream; member
682 static int snd_cmipci_hw_params(struct snd_pcm_substream *substream, in snd_cmipci_hw_params() argument
685 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); in snd_cmipci_hw_params()
688 static int snd_cmipci_playback2_hw_params(struct snd_pcm_substream *substream, in snd_cmipci_playback2_hw_params() argument
691 struct cmipci *cm = snd_pcm_substream_chip(substream); in snd_cmipci_playback2_hw_params()
702 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); in snd_cmipci_playback2_hw_params()
713 static int snd_cmipci_hw_free(struct snd_pcm_substream *substream) in snd_cmipci_hw_free() argument
715 return snd_pcm_lib_free_pages(substream); in snd_cmipci_hw_free()
783 struct snd_pcm_substream *substream) in snd_cmipci_pcm_prepare() argument
787 struct snd_pcm_runtime *runtime = substream->runtime; in snd_cmipci_pcm_prepare()
[all …]
Dfm801.c364 static int snd_fm801_playback_trigger(struct snd_pcm_substream *substream, in snd_fm801_playback_trigger() argument
367 struct fm801 *chip = snd_pcm_substream_chip(substream); in snd_fm801_playback_trigger()
399 static int snd_fm801_capture_trigger(struct snd_pcm_substream *substream, in snd_fm801_capture_trigger() argument
402 struct fm801 *chip = snd_pcm_substream_chip(substream); in snd_fm801_capture_trigger()
434 static int snd_fm801_hw_params(struct snd_pcm_substream *substream, in snd_fm801_hw_params() argument
437 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); in snd_fm801_hw_params()
440 static int snd_fm801_hw_free(struct snd_pcm_substream *substream) in snd_fm801_hw_free() argument
442 return snd_pcm_lib_free_pages(substream); in snd_fm801_hw_free()
445 static int snd_fm801_playback_prepare(struct snd_pcm_substream *substream) in snd_fm801_playback_prepare() argument
447 struct fm801 *chip = snd_pcm_substream_chip(substream); in snd_fm801_playback_prepare()
[all …]
Dsonicvibes.c684 static int snd_sonicvibes_playback_trigger(struct snd_pcm_substream *substream, in snd_sonicvibes_playback_trigger() argument
687 struct sonicvibes *sonic = snd_pcm_substream_chip(substream); in snd_sonicvibes_playback_trigger()
691 static int snd_sonicvibes_capture_trigger(struct snd_pcm_substream *substream, in snd_sonicvibes_capture_trigger() argument
694 struct sonicvibes *sonic = snd_pcm_substream_chip(substream); in snd_sonicvibes_capture_trigger()
698 static int snd_sonicvibes_hw_params(struct snd_pcm_substream *substream, in snd_sonicvibes_hw_params() argument
701 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); in snd_sonicvibes_hw_params()
704 static int snd_sonicvibes_hw_free(struct snd_pcm_substream *substream) in snd_sonicvibes_hw_free() argument
706 return snd_pcm_lib_free_pages(substream); in snd_sonicvibes_hw_free()
709 static int snd_sonicvibes_playback_prepare(struct snd_pcm_substream *substream) in snd_sonicvibes_playback_prepare() argument
711 struct sonicvibes *sonic = snd_pcm_substream_chip(substream); in snd_sonicvibes_playback_prepare()
[all …]
Dazt3328.c268 struct snd_pcm_substream *substream; member
1223 snd_azf3328_hw_params(struct snd_pcm_substream *substream, in snd_azf3328_hw_params() argument
1226 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); in snd_azf3328_hw_params()
1230 snd_azf3328_hw_free(struct snd_pcm_substream *substream) in snd_azf3328_hw_free() argument
1232 snd_pcm_lib_free_pages(substream); in snd_azf3328_hw_free()
1456 snd_azf3328_pcm_prepare(struct snd_pcm_substream *substream) in snd_azf3328_pcm_prepare() argument
1458 struct snd_pcm_runtime *runtime = substream->runtime; in snd_azf3328_pcm_prepare()
1461 unsigned int size = snd_pcm_lib_buffer_bytes(substream); in snd_azf3328_pcm_prepare()
1462 unsigned int count = snd_pcm_lib_period_bytes(substream); in snd_azf3328_pcm_prepare()
1479 snd_azf3328_pcm_trigger(struct snd_pcm_substream *substream, int cmd) in snd_azf3328_pcm_trigger() argument
[all …]
/linux-4.1.27/sound/pci/lx6464es/
Dlx6464es.c106 struct snd_pcm_substream *substream) in lx_hardware_open() argument
109 struct snd_pcm_runtime *runtime = substream->runtime; in lx_hardware_open()
111 int is_capture = (substream->stream == SNDRV_PCM_STREAM_CAPTURE); in lx_hardware_open()
133 struct snd_pcm_substream *substream) in lx_hardware_start() argument
136 struct snd_pcm_runtime *runtime = substream->runtime; in lx_hardware_start()
137 int is_capture = (substream->stream == SNDRV_PCM_STREAM_CAPTURE); in lx_hardware_start()
165 struct snd_pcm_substream *substream) in lx_hardware_stop() argument
168 int is_capture = (substream->stream == SNDRV_PCM_STREAM_CAPTURE); in lx_hardware_stop()
196 struct snd_pcm_substream *substream) in lx_hardware_close() argument
199 int is_capture = (substream->stream == SNDRV_PCM_STREAM_CAPTURE); in lx_hardware_close()
[all …]
/linux-4.1.27/sound/isa/msnd/
Dmsnd.c478 static int snd_msnd_playback_open(struct snd_pcm_substream *substream) in snd_msnd_playback_open() argument
480 struct snd_pcm_runtime *runtime = substream->runtime; in snd_msnd_playback_open()
481 struct snd_msnd *chip = snd_pcm_substream_chip(substream); in snd_msnd_playback_open()
490 chip->playback_substream = substream; in snd_msnd_playback_open()
495 static int snd_msnd_playback_close(struct snd_pcm_substream *substream) in snd_msnd_playback_close() argument
497 struct snd_msnd *chip = snd_pcm_substream_chip(substream); in snd_msnd_playback_close()
505 static int snd_msnd_playback_hw_params(struct snd_pcm_substream *substream, in snd_msnd_playback_hw_params() argument
509 struct snd_msnd *chip = snd_pcm_substream_chip(substream); in snd_msnd_playback_hw_params()
528 static int snd_msnd_playback_prepare(struct snd_pcm_substream *substream) in snd_msnd_playback_prepare() argument
530 struct snd_msnd *chip = snd_pcm_substream_chip(substream); in snd_msnd_playback_prepare()
[all …]
Dmsnd_midi.c56 static int snd_msndmidi_input_open(struct snd_rawmidi_substream *substream) in snd_msndmidi_input_open() argument
62 mpu = substream->rmidi->private_data; in snd_msndmidi_input_open()
64 mpu->substream_input = substream; in snd_msndmidi_input_open()
73 static int snd_msndmidi_input_close(struct snd_rawmidi_substream *substream) in snd_msndmidi_input_close() argument
77 mpu = substream->rmidi->private_data; in snd_msndmidi_input_close()
96 static void snd_msndmidi_input_trigger(struct snd_rawmidi_substream *substream, in snd_msndmidi_input_trigger() argument
104 mpu = substream->rmidi->private_data; in snd_msndmidi_input_trigger()
/linux-4.1.27/sound/pci/ca0106/
Dca0106_main.c560 static int snd_ca0106_pcm_open_playback_channel(struct snd_pcm_substream *substream, in snd_ca0106_pcm_open_playback_channel() argument
563 struct snd_ca0106 *chip = snd_pcm_substream_chip(substream); in snd_ca0106_pcm_open_playback_channel()
566 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ca0106_pcm_open_playback_channel()
574 epcm->substream = substream; in snd_ca0106_pcm_open_playback_channel()
596 snd_pcm_set_sync(substream); in snd_ca0106_pcm_open_playback_channel()
611 static int snd_ca0106_pcm_close_playback(struct snd_pcm_substream *substream) in snd_ca0106_pcm_close_playback() argument
613 struct snd_ca0106 *chip = snd_pcm_substream_chip(substream); in snd_ca0106_pcm_close_playback()
614 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ca0106_pcm_close_playback()
632 static int snd_ca0106_pcm_open_playback_front(struct snd_pcm_substream *substream) in snd_ca0106_pcm_open_playback_front() argument
634 return snd_ca0106_pcm_open_playback_channel(substream, PCM_FRONT_CHANNEL); in snd_ca0106_pcm_open_playback_front()
[all …]
Dca_midi.c123 static int ca_midi_input_open(struct snd_rawmidi_substream *substream) in ca_midi_input_open() argument
125 struct snd_ca_midi *midi = substream->rmidi->private_data; in ca_midi_input_open()
132 midi->substream_input = substream; in ca_midi_input_open()
143 static int ca_midi_output_open(struct snd_rawmidi_substream *substream) in ca_midi_output_open() argument
145 struct snd_ca_midi *midi = substream->rmidi->private_data; in ca_midi_output_open()
152 midi->substream_output = substream; in ca_midi_output_open()
163 static int ca_midi_input_close(struct snd_rawmidi_substream *substream) in ca_midi_input_close() argument
165 struct snd_ca_midi *midi = substream->rmidi->private_data; in ca_midi_input_close()
183 static int ca_midi_output_close(struct snd_rawmidi_substream *substream) in ca_midi_output_close() argument
185 struct snd_ca_midi *midi = substream->rmidi->private_data; in ca_midi_output_close()
[all …]
/linux-4.1.27/drivers/media/pci/cx23885/
Dcx23885-alsa.c264 snd_pcm_period_elapsed(chip->substream); in cx23885_audio_irq()
323 static int snd_cx23885_pcm_open(struct snd_pcm_substream *substream) in snd_cx23885_pcm_open() argument
325 struct cx23885_audio_dev *chip = snd_pcm_substream_chip(substream); in snd_cx23885_pcm_open()
326 struct snd_pcm_runtime *runtime = substream->runtime; in snd_cx23885_pcm_open()
340 chip->substream = substream; in snd_cx23885_pcm_open()
362 static int snd_cx23885_close(struct snd_pcm_substream *substream) in snd_cx23885_close() argument
371 static int snd_cx23885_hw_params(struct snd_pcm_substream *substream, in snd_cx23885_hw_params() argument
374 struct cx23885_audio_dev *chip = snd_pcm_substream_chip(substream); in snd_cx23885_hw_params()
378 if (substream->runtime->dma_area) { in snd_cx23885_hw_params()
380 substream->runtime->dma_area = NULL; in snd_cx23885_hw_params()
[all …]
/linux-4.1.27/sound/atmel/
Dabdac.c97 struct snd_pcm_substream *substream; member
114 snd_pcm_period_elapsed(dac->substream); in atmel_abdac_dma_period_done()
118 struct snd_pcm_substream *substream, in atmel_abdac_prepare_dma() argument
123 struct snd_pcm_runtime *runtime = substream->runtime; in atmel_abdac_prepare_dma()
175 static int atmel_abdac_open(struct snd_pcm_substream *substream) in atmel_abdac_open() argument
177 struct atmel_abdac *dac = snd_pcm_substream_chip(substream); in atmel_abdac_open()
179 dac->substream = substream; in atmel_abdac_open()
182 substream->runtime->hw = atmel_abdac_hw; in atmel_abdac_open()
184 return snd_pcm_hw_constraint_list(substream->runtime, 0, in atmel_abdac_open()
188 static int atmel_abdac_close(struct snd_pcm_substream *substream) in atmel_abdac_close() argument
[all …]
Dac97c.c108 struct snd_pcm_substream *substream, in atmel_ac97c_prepare_dma() argument
113 struct snd_pcm_runtime *runtime = substream->runtime; in atmel_ac97c_prepare_dma()
175 static int atmel_ac97c_playback_open(struct snd_pcm_substream *substream) in atmel_ac97c_playback_open() argument
177 struct atmel_ac97c *chip = snd_pcm_substream_chip(substream); in atmel_ac97c_playback_open()
178 struct snd_pcm_runtime *runtime = substream->runtime; in atmel_ac97c_playback_open()
190 chip->playback_substream = substream; in atmel_ac97c_playback_open()
194 static int atmel_ac97c_capture_open(struct snd_pcm_substream *substream) in atmel_ac97c_capture_open() argument
196 struct atmel_ac97c *chip = snd_pcm_substream_chip(substream); in atmel_ac97c_capture_open()
197 struct snd_pcm_runtime *runtime = substream->runtime; in atmel_ac97c_capture_open()
209 chip->capture_substream = substream; in atmel_ac97c_capture_open()
[all …]
/linux-4.1.27/sound/pci/ice1712/
Dice1724.c319 static void vt1724_enable_midi_irq(struct snd_rawmidi_substream *substream, in vt1724_enable_midi_irq() argument
322 struct snd_ice1712 *ice = substream->rmidi->private_data; in vt1724_enable_midi_irq()
555 static int snd_vt1724_pcm_trigger(struct snd_pcm_substream *substream, int cmd) in snd_vt1724_pcm_trigger() argument
557 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream); in snd_vt1724_pcm_trigger()
563 snd_pcm_group_for_each_entry(s, substream) { in snd_vt1724_pcm_trigger()
568 snd_pcm_trigger_done(s, substream); in snd_vt1724_pcm_trigger()
719 static int snd_vt1724_pcm_hw_params(struct snd_pcm_substream *substream, in snd_vt1724_pcm_hw_params() argument
722 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream); in snd_vt1724_pcm_hw_params()
728 if (substream == ice->playback_pro_substream) { in snd_vt1724_pcm_hw_params()
733 ice->pcm_reserved[i] != substream) { in snd_vt1724_pcm_hw_params()
[all …]
Dice1712.c372 static void open_cs8427(struct snd_ice1712 *ice, struct snd_pcm_substream *substream) in open_cs8427() argument
377 static void close_cs8427(struct snd_ice1712 *ice, struct snd_pcm_substream *substream) in close_cs8427() argument
468 struct snd_pcm_substream *substream; in snd_ice1712_interrupt() local
474 substream = ice->playback_con_substream_ds[idx]; in snd_ice1712_interrupt()
475 if (substream != NULL) in snd_ice1712_interrupt()
476 snd_pcm_period_elapsed(substream); in snd_ice1712_interrupt()
500 static int snd_ice1712_hw_params(struct snd_pcm_substream *substream, in snd_ice1712_hw_params() argument
503 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); in snd_ice1712_hw_params()
506 static int snd_ice1712_hw_free(struct snd_pcm_substream *substream) in snd_ice1712_hw_free() argument
508 return snd_pcm_lib_free_pages(substream); in snd_ice1712_hw_free()
[all …]
/linux-4.1.27/sound/pci/echoaudio/
Dmidi.c155 static int snd_echo_midi_input_open(struct snd_rawmidi_substream *substream) in snd_echo_midi_input_open() argument
157 struct echoaudio *chip = substream->rmidi->private_data; in snd_echo_midi_input_open()
159 chip->midi_in = substream; in snd_echo_midi_input_open()
165 static void snd_echo_midi_input_trigger(struct snd_rawmidi_substream *substream, in snd_echo_midi_input_trigger() argument
168 struct echoaudio *chip = substream->rmidi->private_data; in snd_echo_midi_input_trigger()
180 static int snd_echo_midi_input_close(struct snd_rawmidi_substream *substream) in snd_echo_midi_input_close() argument
182 struct echoaudio *chip = substream->rmidi->private_data; in snd_echo_midi_input_close()
190 static int snd_echo_midi_output_open(struct snd_rawmidi_substream *substream) in snd_echo_midi_output_open() argument
192 struct echoaudio *chip = substream->rmidi->private_data; in snd_echo_midi_output_open()
196 chip->midi_out = substream; in snd_echo_midi_output_open()
[all …]
Dechoaudio.c270 static int pcm_open(struct snd_pcm_substream *substream, in pcm_open() argument
281 chip = snd_pcm_substream_chip(substream); in pcm_open()
282 runtime = substream->runtime; in pcm_open()
306 snd_pcm_set_sync(substream); in pcm_open()
331 if ((err = snd_pcm_hw_rule_add(substream->runtime, 0, in pcm_open()
350 static int pcm_analog_in_open(struct snd_pcm_substream *substream) in pcm_analog_in_open() argument
352 struct echoaudio *chip = snd_pcm_substream_chip(substream); in pcm_analog_in_open()
355 if ((err = pcm_open(substream, num_analog_busses_in(chip) - in pcm_analog_in_open()
356 substream->number)) < 0) in pcm_analog_in_open()
358 if ((err = snd_pcm_hw_rule_add(substream->runtime, 0, in pcm_analog_in_open()
[all …]
/linux-4.1.27/drivers/media/usb/em28xx/
Dem28xx-audio.c90 struct snd_pcm_substream *substream; in em28xx_audio_isocirq() local
116 substream = dev->adev.capture_pcm_substream; in em28xx_audio_isocirq()
117 runtime = substream->runtime; in em28xx_audio_isocirq()
142 snd_pcm_stream_lock(substream); in em28xx_audio_isocirq()
158 snd_pcm_stream_unlock(substream); in em28xx_audio_isocirq()
161 snd_pcm_period_elapsed(substream); in em28xx_audio_isocirq()
250 static int snd_em28xx_capture_open(struct snd_pcm_substream *substream) in snd_em28xx_capture_open() argument
252 struct em28xx *dev = snd_pcm_substream_chip(substream); in snd_em28xx_capture_open()
253 struct snd_pcm_runtime *runtime = substream->runtime; in snd_em28xx_capture_open()
267 nonblock = !!(substream->f_flags & O_NONBLOCK); in snd_em28xx_capture_open()
[all …]
/linux-4.1.27/sound/soc/davinci/
Ddavinci-vcif.c55 static void davinci_vcif_start(struct snd_pcm_substream *substream) in davinci_vcif_start() argument
57 struct snd_soc_pcm_runtime *rtd = substream->private_data; in davinci_vcif_start()
66 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in davinci_vcif_start()
74 static void davinci_vcif_stop(struct snd_pcm_substream *substream) in davinci_vcif_stop() argument
76 struct snd_soc_pcm_runtime *rtd = substream->private_data; in davinci_vcif_stop()
84 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in davinci_vcif_stop()
92 static int davinci_vcif_hw_params(struct snd_pcm_substream *substream, in davinci_vcif_hw_params() argument
101 davinci_vcif_stop(substream); in davinci_vcif_hw_params()
102 davinci_vcif_start(substream); in davinci_vcif_hw_params()
144 static int davinci_vcif_trigger(struct snd_pcm_substream *substream, int cmd, in davinci_vcif_trigger() argument
[all …]
Ddavinci-i2s.c184 struct snd_pcm_substream *substream) in davinci_mcbsp_start() argument
186 struct snd_soc_pcm_runtime *rtd = substream->private_data; in davinci_mcbsp_start()
188 int playback = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK); in davinci_mcbsp_start()
209 int ret = platform->driver->ops->trigger(substream, in davinci_mcbsp_start()
231 int ret = platform->driver->ops->trigger(substream, in davinci_mcbsp_start()
419 static int davinci_i2s_hw_params(struct snd_pcm_substream *substream, in davinci_i2s_hw_params() argument
433 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { in davinci_i2s_hw_params()
557 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in davinci_i2s_hw_params()
568 static int davinci_i2s_prepare(struct snd_pcm_substream *substream, in davinci_i2s_prepare() argument
572 int playback = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK); in davinci_i2s_prepare()
[all …]
Ddavinci-mcasp.c309 struct snd_pcm_substream *substream; in davinci_mcasp_tx_irq_handler() local
319 substream = mcasp->substreams[SNDRV_PCM_STREAM_PLAYBACK]; in davinci_mcasp_tx_irq_handler()
320 if (substream) { in davinci_mcasp_tx_irq_handler()
321 snd_pcm_stream_lock_irq(substream); in davinci_mcasp_tx_irq_handler()
322 if (snd_pcm_running(substream)) in davinci_mcasp_tx_irq_handler()
323 snd_pcm_stop(substream, SNDRV_PCM_STATE_XRUN); in davinci_mcasp_tx_irq_handler()
324 snd_pcm_stream_unlock_irq(substream); in davinci_mcasp_tx_irq_handler()
344 struct snd_pcm_substream *substream; in davinci_mcasp_rx_irq_handler() local
354 substream = mcasp->substreams[SNDRV_PCM_STREAM_CAPTURE]; in davinci_mcasp_rx_irq_handler()
355 if (substream) { in davinci_mcasp_rx_irq_handler()
[all …]
/linux-4.1.27/drivers/usb/gadget/function/
Du_uac1.c97 struct snd_pcm_substream *substream = snd->substream; in playback_default_hw_params() local
126 snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_DROP, NULL); in playback_default_hw_params()
127 snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_HW_PARAMS, params); in playback_default_hw_params()
129 result = snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_PREPARE, NULL); in playback_default_hw_params()
158 struct snd_pcm_substream *substream = snd->substream; in u_audio_playback() local
159 struct snd_pcm_runtime *runtime = substream->runtime; in u_audio_playback()
167 result = snd_pcm_kernel_ioctl(substream, in u_audio_playback()
179 result = snd_pcm_lib_write(snd->substream, (void __user *)buf, frames); in u_audio_playback()
239 snd->substream = pcm_file->substream; in gaudio_open_snd_dev()
248 snd->substream = NULL; in gaudio_open_snd_dev()
[all …]
Df_midi.c221 struct snd_rawmidi_substream *substream = midi->out_substream[cable]; in f_midi_read_data() local
223 if (!substream) in f_midi_read_data()
230 snd_rawmidi_receive(substream, data, length); in f_midi_read_data()
531 struct snd_rawmidi_substream *substream = midi->in_substream[i]; in f_midi_transmit() local
533 if (!port || !port->active || !substream) in f_midi_transmit()
538 if (snd_rawmidi_transmit(substream, &b, 1) != 1) { in f_midi_transmit()
558 static int f_midi_in_open(struct snd_rawmidi_substream *substream) in f_midi_in_open() argument
560 struct f_midi *midi = substream->rmidi->private_data; in f_midi_in_open()
562 if (!midi->in_port[substream->number]) in f_midi_in_open()
566 midi->in_substream[substream->number] = substream; in f_midi_in_open()
[all …]
Df_uac2.c179 struct snd_pcm_substream *substream; in agdev_iso_complete() local
195 substream = prm->ss; in agdev_iso_complete()
198 if (!substream) in agdev_iso_complete()
203 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in agdev_iso_complete()
240 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in agdev_iso_complete()
263 snd_pcm_period_elapsed(substream); in agdev_iso_complete()
269 uac2_pcm_trigger(struct snd_pcm_substream *substream, int cmd) in uac2_pcm_trigger() argument
271 struct snd_uac2_chip *uac2 = snd_pcm_substream_chip(substream); in uac2_pcm_trigger()
276 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in uac2_pcm_trigger()
289 prm->ss = substream; in uac2_pcm_trigger()
[all …]
/linux-4.1.27/sound/usb/misc/
Dua101.c114 struct snd_pcm_substream *substream; member
202 ua->playback.substream->runtime->delay -= in playback_urb_complete()
228 runtime = stream->substream->runtime; in copy_playback_data()
317 ua->playback.substream->runtime->delay += frames; in playback_tasklet()
321 snd_pcm_period_elapsed(ua->playback.substream); in playback_tasklet()
332 runtime = stream->substream->runtime; in copy_capture_data()
420 snd_pcm_period_elapsed(stream->substream); in capture_urb_complete()
617 snd_pcm_stop_xrun(ua->capture.substream); in abort_alsa_capture()
623 snd_pcm_stop_xrun(ua->playback.substream); in abort_alsa_playback()
626 static int set_stream_hw(struct ua101 *ua, struct snd_pcm_substream *substream, in set_stream_hw() argument
[all …]
/linux-4.1.27/sound/ppc/
Dsnd_ps3.c352 snd_pcm_period_elapsed(card->substream); in snd_ps3_interrupt()
452 static int snd_ps3_set_avsetting(struct snd_pcm_substream *substream) in snd_ps3_set_avsetting() argument
454 struct snd_ps3_card_info *card = snd_pcm_substream_chip(substream); in snd_ps3_set_avsetting()
461 substream->runtime->rate, in snd_ps3_set_avsetting()
462 snd_pcm_format_width(substream->runtime->format)); in snd_ps3_set_avsetting()
468 switch (substream->runtime->rate) { in snd_ps3_set_avsetting()
483 substream->runtime->rate); in snd_ps3_set_avsetting()
488 switch (snd_pcm_format_width(substream->runtime->format)) { in snd_ps3_set_avsetting()
497 snd_pcm_format_width(substream->runtime->format)); in snd_ps3_set_avsetting()
525 static int snd_ps3_pcm_open(struct snd_pcm_substream *substream) in snd_ps3_pcm_open() argument
[all …]
/linux-4.1.27/sound/soc/ux500/
Dux500_pcm.c50 struct snd_pcm_substream *substream) in ux500_pcm_request_chan() argument
57 dma_params = snd_soc_dai_get_dma_data(dai, substream); in ux500_pcm_request_chan()
76 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in ux500_pcm_request_chan()
87 static int ux500_pcm_prepare_slave_config(struct snd_pcm_substream *substream, in ux500_pcm_prepare_slave_config() argument
91 struct snd_soc_pcm_runtime *rtd = substream->private_data; in ux500_pcm_prepare_slave_config()
100 snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); in ux500_pcm_prepare_slave_config()
104 snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); in ux500_pcm_prepare_slave_config()
108 ret = snd_hwparams_to_dma_slave_config(substream, params, slave_config); in ux500_pcm_prepare_slave_config()
118 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in ux500_pcm_prepare_slave_config()
Dmop500_ab8500.c194 static int mop500_ab8500_startup(struct snd_pcm_substream *substream) in mop500_ab8500_startup() argument
196 struct snd_soc_pcm_runtime *rtd = substream->private_data; in mop500_ab8500_startup()
203 static void mop500_ab8500_shutdown(struct snd_pcm_substream *substream) in mop500_ab8500_shutdown() argument
205 struct snd_soc_pcm_runtime *rtd = substream->private_data; in mop500_ab8500_shutdown()
211 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in mop500_ab8500_shutdown()
217 static int mop500_ab8500_hw_params(struct snd_pcm_substream *substream, in mop500_ab8500_hw_params() argument
220 struct snd_soc_pcm_runtime *rtd = substream->private_data; in mop500_ab8500_hw_params()
236 substream->pcm->name, in mop500_ab8500_hw_params()
237 substream->pcm->id, in mop500_ab8500_hw_params()
238 substream->name, in mop500_ab8500_hw_params()
[all …]
Dux500_msp_dai.c303 static int setup_msp_config(struct snd_pcm_substream *substream, in setup_msp_config() argument
309 struct snd_pcm_runtime *runtime = substream->runtime; in setup_msp_config()
320 msp_config->direction = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? in setup_msp_config()
385 static int ux500_msp_dai_startup(struct snd_pcm_substream *substream, in ux500_msp_dai_startup() argument
392 snd_pcm_stream_str(substream)); in ux500_msp_dai_startup()
426 static void ux500_msp_dai_shutdown(struct snd_pcm_substream *substream, in ux500_msp_dai_shutdown() argument
431 bool is_playback = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK); in ux500_msp_dai_shutdown()
434 snd_pcm_stream_str(substream)); in ux500_msp_dai_shutdown()
446 __func__, dai->id, snd_pcm_stream_str(substream)); in ux500_msp_dai_shutdown()
461 static int ux500_msp_dai_prepare(struct snd_pcm_substream *substream, in ux500_msp_dai_prepare() argument
[all …]
/linux-4.1.27/sound/pci/nm256/
Dnm256.c190 struct snd_pcm_substream *substream; member
430 struct snd_pcm_substream *substream) in snd_nm256_set_format() argument
432 struct snd_pcm_runtime *runtime = substream->runtime; in snd_nm256_set_format()
448 switch (substream->stream) { in snd_nm256_set_format()
513 struct snd_pcm_substream *substream) in snd_nm256_playback_start() argument
530 struct snd_pcm_substream *substream) in snd_nm256_capture_start() argument
562 snd_nm256_playback_trigger(struct snd_pcm_substream *substream, int cmd) in snd_nm256_playback_trigger() argument
564 struct nm256 *chip = snd_pcm_substream_chip(substream); in snd_nm256_playback_trigger()
565 struct nm256_stream *s = substream->runtime->private_data; in snd_nm256_playback_trigger()
578 snd_nm256_playback_start(chip, s, substream); in snd_nm256_playback_trigger()
[all …]
/linux-4.1.27/sound/pci/trident/
Dtrident_main.c50 struct snd_pcm_substream *substream);
53 struct snd_pcm_substream *substream);
762 static unsigned int snd_trident_control_mode(struct snd_pcm_substream *substream) in snd_trident_control_mode() argument
765 struct snd_pcm_runtime *runtime = substream->runtime; in snd_trident_control_mode()
797 static int snd_trident_ioctl(struct snd_pcm_substream *substream, in snd_trident_ioctl() argument
804 return snd_pcm_lib_ioctl(substream, cmd, arg); in snd_trident_ioctl()
819 static int snd_trident_allocate_pcm_mem(struct snd_pcm_substream *substream, in snd_trident_allocate_pcm_mem() argument
822 struct snd_trident *trident = snd_pcm_substream_chip(substream); in snd_trident_allocate_pcm_mem()
823 struct snd_pcm_runtime *runtime = substream->runtime; in snd_trident_allocate_pcm_mem()
827 if ((err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params))) < 0) in snd_trident_allocate_pcm_mem()
[all …]
Dtrident_memory.c190 struct snd_pcm_substream *substream) in snd_trident_alloc_sg_pages() argument
194 struct snd_pcm_runtime *runtime = substream->runtime; in snd_trident_alloc_sg_pages()
218 dma_addr_t addr = snd_pcm_sgbuf_get_addr(substream, ofs); in snd_trident_alloc_sg_pages()
220 snd_pcm_sgbuf_get_ptr(substream, ofs); in snd_trident_alloc_sg_pages()
237 struct snd_pcm_substream *substream) in snd_trident_alloc_cont_pages() argument
242 struct snd_pcm_runtime *runtime = substream->runtime; in snd_trident_alloc_cont_pages()
282 struct snd_pcm_substream *substream) in snd_trident_alloc_pages() argument
284 if (snd_BUG_ON(!trident || !substream)) in snd_trident_alloc_pages()
286 if (substream->dma_buffer.dev.type == SNDRV_DMA_TYPE_DEV_SG) in snd_trident_alloc_pages()
287 return snd_trident_alloc_sg_pages(trident, substream); in snd_trident_alloc_pages()
[all …]
/linux-4.1.27/sound/pci/cs46xx/
Dcs46xx_lib.c878 static void snd_cs46xx_pb_trans_copy(struct snd_pcm_substream *substream, in snd_cs46xx_pb_trans_copy() argument
881 struct snd_pcm_runtime *runtime = substream->runtime; in snd_cs46xx_pb_trans_copy()
886 static int snd_cs46xx_playback_transfer(struct snd_pcm_substream *substream) in snd_cs46xx_playback_transfer() argument
888 struct snd_pcm_runtime *runtime = substream->runtime; in snd_cs46xx_playback_transfer()
890 snd_pcm_indirect_playback_transfer(substream, &cpcm->pcm_rec, snd_cs46xx_pb_trans_copy); in snd_cs46xx_playback_transfer()
894 static void snd_cs46xx_cp_trans_copy(struct snd_pcm_substream *substream, in snd_cs46xx_cp_trans_copy() argument
897 struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); in snd_cs46xx_cp_trans_copy()
898 struct snd_pcm_runtime *runtime = substream->runtime; in snd_cs46xx_cp_trans_copy()
903 static int snd_cs46xx_capture_transfer(struct snd_pcm_substream *substream) in snd_cs46xx_capture_transfer() argument
905 struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); in snd_cs46xx_capture_transfer()
[all …]
/linux-4.1.27/drivers/media/pci/cx25821/
Dcx25821-alsa.c95 struct snd_pcm_substream *substream; member
356 snd_pcm_period_elapsed(chip->substream); in cx25821_aud_irq()
458 static int snd_cx25821_pcm_open(struct snd_pcm_substream *substream) in snd_cx25821_pcm_open() argument
460 struct cx25821_audio_dev *chip = snd_pcm_substream_chip(substream); in snd_cx25821_pcm_open()
461 struct snd_pcm_runtime *runtime = substream->runtime; in snd_cx25821_pcm_open()
475 chip->substream = substream; in snd_cx25821_pcm_open()
501 static int snd_cx25821_close(struct snd_pcm_substream *substream) in snd_cx25821_close() argument
509 static int snd_cx25821_hw_params(struct snd_pcm_substream *substream, in snd_cx25821_hw_params() argument
512 struct cx25821_audio_dev *chip = snd_pcm_substream_chip(substream); in snd_cx25821_hw_params()
516 if (substream->runtime->dma_area) { in snd_cx25821_hw_params()
[all …]
/linux-4.1.27/drivers/media/usb/cx231xx/
Dcx231xx-audio.c104 struct snd_pcm_substream *substream; in cx231xx_audio_isocirq() local
128 substream = dev->adev.capture_pcm_substream; in cx231xx_audio_isocirq()
129 runtime = substream->runtime; in cx231xx_audio_isocirq()
155 snd_pcm_stream_lock(substream); in cx231xx_audio_isocirq()
170 snd_pcm_stream_unlock(substream); in cx231xx_audio_isocirq()
173 snd_pcm_period_elapsed(substream); in cx231xx_audio_isocirq()
194 struct snd_pcm_substream *substream; in cx231xx_audio_bulkirq() local
218 substream = dev->adev.capture_pcm_substream; in cx231xx_audio_bulkirq()
219 runtime = substream->runtime; in cx231xx_audio_bulkirq()
241 snd_pcm_stream_lock(substream); in cx231xx_audio_bulkirq()
[all …]
/linux-4.1.27/sound/sparc/
Damd7930.c567 static int snd_amd7930_playback_trigger(struct snd_pcm_substream *substream, in snd_amd7930_playback_trigger() argument
570 struct snd_amd7930 *amd = snd_pcm_substream_chip(substream); in snd_amd7930_playback_trigger()
574 static int snd_amd7930_capture_trigger(struct snd_pcm_substream *substream, in snd_amd7930_capture_trigger() argument
577 struct snd_amd7930 *amd = snd_pcm_substream_chip(substream); in snd_amd7930_capture_trigger()
581 static int snd_amd7930_playback_prepare(struct snd_pcm_substream *substream) in snd_amd7930_playback_prepare() argument
583 struct snd_amd7930 *amd = snd_pcm_substream_chip(substream); in snd_amd7930_playback_prepare()
584 struct snd_pcm_runtime *runtime = substream->runtime; in snd_amd7930_playback_prepare()
585 unsigned int size = snd_pcm_lib_buffer_bytes(substream); in snd_amd7930_playback_prepare()
613 static int snd_amd7930_capture_prepare(struct snd_pcm_substream *substream) in snd_amd7930_capture_prepare() argument
615 struct snd_amd7930 *amd = snd_pcm_substream_chip(substream); in snd_amd7930_capture_prepare()
[all …]
Dcs4231.c423 struct snd_pcm_substream *substream, in snd_cs4231_advance_dma() argument
426 struct snd_pcm_runtime *runtime = substream->runtime; in snd_cs4231_advance_dma()
429 unsigned int period_size = snd_pcm_lib_period_bytes(substream); in snd_cs4231_advance_dma()
442 static void cs4231_dma_trigger(struct snd_pcm_substream *substream, in cs4231_dma_trigger() argument
445 struct snd_cs4231 *chip = snd_pcm_substream_chip(substream); in cs4231_dma_trigger()
474 static int snd_cs4231_trigger(struct snd_pcm_substream *substream, int cmd) in snd_cs4231_trigger() argument
476 struct snd_cs4231 *chip = snd_pcm_substream_chip(substream); in snd_cs4231_trigger()
487 snd_pcm_group_for_each_entry(s, substream) { in snd_cs4231_trigger()
490 snd_pcm_trigger_done(s, substream); in snd_cs4231_trigger()
493 snd_pcm_trigger_done(s, substream); in snd_cs4231_trigger()
[all …]
Ddbri.c291 struct snd_pcm_substream *substream; member
565 #define DBRI_STREAMNO(substream) \ argument
566 (substream->stream == \
570 #define DBRI_STREAM(dbri, substream) \ argument
571 &dbri->stream_info[DBRI_STREAMNO(substream)]
1796 snd_pcm_period_elapsed(info->substream); in transmission_complete_intr()
1825 snd_pcm_period_elapsed(info->substream); in reception_complete_intr()
2032 static int snd_dbri_open(struct snd_pcm_substream *substream) in snd_dbri_open() argument
2034 struct snd_dbri *dbri = snd_pcm_substream_chip(substream); in snd_dbri_open()
2035 struct snd_pcm_runtime *runtime = substream->runtime; in snd_dbri_open()
[all …]
/linux-4.1.27/sound/isa/es1688/
Des1688_lib.c313 static void snd_es1688_set_rate(struct snd_es1688 *chip, struct snd_pcm_substream *substream) in snd_es1688_set_rate() argument
315 struct snd_pcm_runtime *runtime = substream->runtime; in snd_es1688_set_rate()
329 static int snd_es1688_ioctl(struct snd_pcm_substream *substream, in snd_es1688_ioctl() argument
332 return snd_pcm_lib_ioctl(substream, cmd, arg); in snd_es1688_ioctl()
361 static int snd_es1688_hw_params(struct snd_pcm_substream *substream, in snd_es1688_hw_params() argument
364 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); in snd_es1688_hw_params()
367 static int snd_es1688_hw_free(struct snd_pcm_substream *substream) in snd_es1688_hw_free() argument
369 return snd_pcm_lib_free_pages(substream); in snd_es1688_hw_free()
372 static int snd_es1688_playback_prepare(struct snd_pcm_substream *substream) in snd_es1688_playback_prepare() argument
375 struct snd_es1688 *chip = snd_pcm_substream_chip(substream); in snd_es1688_playback_prepare()
[all …]
/linux-4.1.27/sound/pci/ymfpci/
Dymfpci_main.c311 if (ypcm->substream == NULL) in snd_ymfpci_pcm_interrupt()
331 snd_pcm_period_elapsed(ypcm->substream); in snd_ymfpci_pcm_interrupt()
336 unsigned int subs = ypcm->substream->number; in snd_ymfpci_pcm_interrupt()
358 static void snd_ymfpci_pcm_capture_interrupt(struct snd_pcm_substream *substream) in snd_ymfpci_pcm_capture_interrupt() argument
360 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ymfpci_pcm_capture_interrupt()
383 snd_pcm_period_elapsed(substream); in snd_ymfpci_pcm_capture_interrupt()
390 static int snd_ymfpci_playback_trigger(struct snd_pcm_substream *substream, in snd_ymfpci_playback_trigger() argument
393 struct snd_ymfpci *chip = snd_pcm_substream_chip(substream); in snd_ymfpci_playback_trigger()
394 struct snd_ymfpci_pcm *ypcm = substream->runtime->private_data; in snd_ymfpci_playback_trigger()
413 if (substream->pcm == chip->pcm && !ypcm->use_441_slot) { in snd_ymfpci_playback_trigger()
[all …]
/linux-4.1.27/sound/isa/ad1816a/
Dad1816a_lib.c206 static int snd_ad1816a_playback_trigger(struct snd_pcm_substream *substream, int cmd) in snd_ad1816a_playback_trigger() argument
208 struct snd_ad1816a *chip = snd_pcm_substream_chip(substream); in snd_ad1816a_playback_trigger()
213 static int snd_ad1816a_capture_trigger(struct snd_pcm_substream *substream, int cmd) in snd_ad1816a_capture_trigger() argument
215 struct snd_ad1816a *chip = snd_pcm_substream_chip(substream); in snd_ad1816a_capture_trigger()
220 static int snd_ad1816a_hw_params(struct snd_pcm_substream *substream, in snd_ad1816a_hw_params() argument
223 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); in snd_ad1816a_hw_params()
226 static int snd_ad1816a_hw_free(struct snd_pcm_substream *substream) in snd_ad1816a_hw_free() argument
228 return snd_pcm_lib_free_pages(substream); in snd_ad1816a_hw_free()
231 static int snd_ad1816a_playback_prepare(struct snd_pcm_substream *substream) in snd_ad1816a_playback_prepare() argument
233 struct snd_ad1816a *chip = snd_pcm_substream_chip(substream); in snd_ad1816a_playback_prepare()
[all …]
/linux-4.1.27/sound/soc/intel/haswell/
Dsst-haswell-pcm.c119 struct snd_pcm_substream *substream; member
439 static int create_adsp_page_table(struct snd_pcm_substream *substream, in create_adsp_page_table() argument
443 struct snd_dma_buffer *dmab = snd_pcm_get_dma_buf(substream); in create_adsp_page_table()
444 int i, pages, stream = substream->stream; in create_adsp_page_table()
470 static int hsw_pcm_hw_params(struct snd_pcm_substream *substream, in hsw_pcm_hw_params() argument
473 struct snd_soc_pcm_runtime *rtd = substream->private_data; in hsw_pcm_hw_params()
474 struct snd_pcm_runtime *runtime = substream->runtime; in hsw_pcm_hw_params()
489 pcm_data = &pdata->pcm[dai][substream->stream]; in hsw_pcm_hw_params()
515 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in hsw_pcm_hw_params()
523 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in hsw_pcm_hw_params()
[all …]
/linux-4.1.27/drivers/media/pci/saa7134/
Dsaa7134-alsa.c96 struct snd_pcm_substream *substream; member
176 snd_pcm_stop_xrun(dev->dmasound.substream); in saa7134_irq_alsa_done()
194 if (dev->dmasound.read_count >= snd_pcm_lib_period_bytes(dev->dmasound.substream)) { in saa7134_irq_alsa_done()
196 snd_pcm_period_elapsed(dev->dmasound.substream); in saa7134_irq_alsa_done()
253 static int snd_card_saa7134_capture_trigger(struct snd_pcm_substream * substream, in snd_card_saa7134_capture_trigger() argument
256 struct snd_pcm_runtime *runtime = substream->runtime; in snd_card_saa7134_capture_trigger()
518 static int snd_card_saa7134_capture_prepare(struct snd_pcm_substream * substream) in snd_card_saa7134_capture_prepare() argument
520 struct snd_pcm_runtime *runtime = substream->runtime; in snd_card_saa7134_capture_prepare()
523 snd_card_saa7134_t *saa7134 = snd_pcm_substream_chip(substream); in snd_card_saa7134_capture_prepare()
527 pcm->dev->dmasound.substream = substream; in snd_card_saa7134_capture_prepare()
[all …]
/linux-4.1.27/sound/isa/
Des18xx.c414 struct snd_pcm_substream *substream, in snd_es18xx_rate_set() argument
418 struct snd_pcm_runtime *runtime = substream->runtime; in snd_es18xx_rate_set()
448 static int snd_es18xx_playback_hw_params(struct snd_pcm_substream *substream, in snd_es18xx_playback_hw_params() argument
451 struct snd_es18xx *chip = snd_pcm_substream_chip(substream); in snd_es18xx_playback_hw_params()
460 if (substream->number == 0 && (chip->caps & ES18XX_PCM2)) { in snd_es18xx_playback_hw_params()
471 if ((err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params))) < 0) in snd_es18xx_playback_hw_params()
476 static int snd_es18xx_pcm_hw_free(struct snd_pcm_substream *substream) in snd_es18xx_pcm_hw_free() argument
478 return snd_pcm_lib_free_pages(substream); in snd_es18xx_pcm_hw_free()
482 struct snd_pcm_substream *substream) in snd_es18xx_playback1_prepare() argument
484 struct snd_pcm_runtime *runtime = substream->runtime; in snd_es18xx_playback1_prepare()
[all …]
/linux-4.1.27/sound/pci/asihpi/
Dasihpi.c134 void (*pcm_start)(struct snd_pcm_substream *substream);
135 void (*pcm_stop)(struct snd_pcm_substream *substream);
162 struct snd_pcm_substream *substream; member
296 static void print_hwparams(struct snd_pcm_substream *substream, in print_hwparams() argument
300 snd_pcm_debug_name(substream, name, sizeof(name)); in print_hwparams()
451 static int snd_card_asihpi_pcm_hw_params(struct snd_pcm_substream *substream, in snd_card_asihpi_pcm_hw_params() argument
454 struct snd_pcm_runtime *runtime = substream->runtime; in snd_card_asihpi_pcm_hw_params()
456 struct snd_card_asihpi *card = snd_pcm_substream_chip(substream); in snd_card_asihpi_pcm_hw_params()
462 print_hwparams(substream, params); in snd_card_asihpi_pcm_hw_params()
463 err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params)); in snd_card_asihpi_pcm_hw_params()
[all …]
/linux-4.1.27/sound/pci/ali5451/
Dali5451.c196 struct snd_pcm_substream *substream; member
867 if (pvoice->pcm && pvoice->substream) { in snd_ali_update_ptr()
875 snd_pcm_period_elapsed(pvoice->substream); in snd_ali_update_ptr()
971 pvoice->substream = NULL; in snd_ali_free_voice()
1059 static unsigned int snd_ali_control_mode(struct snd_pcm_substream *substream) in snd_ali_control_mode() argument
1062 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ali_control_mode()
1081 static int snd_ali_trigger(struct snd_pcm_substream *substream, in snd_ali_trigger() argument
1085 struct snd_ali *codec = snd_pcm_substream_chip(substream); in snd_ali_trigger()
1106 snd_pcm_group_for_each_entry(s, substream) { in snd_ali_trigger()
1126 snd_pcm_trigger_done(s, substream); in snd_ali_trigger()
[all …]
/linux-4.1.27/sound/soc/dwc/
Ddesignware_i2s.c142 struct snd_pcm_substream *substream) in i2s_start() argument
147 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in i2s_start()
156 struct snd_pcm_substream *substream) in i2s_stop() argument
160 i2s_clear_irqs(dev, substream->stream); in i2s_stop()
161 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in i2s_stop()
183 static int dw_i2s_startup(struct snd_pcm_substream *substream, in dw_i2s_startup() argument
190 (substream->stream == SNDRV_PCM_STREAM_CAPTURE)) in dw_i2s_startup()
194 (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)) in dw_i2s_startup()
197 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in dw_i2s_startup()
199 else if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) in dw_i2s_startup()
[all …]
/linux-4.1.27/drivers/media/pci/cx88/
Dcx88-alsa.c92 struct snd_pcm_substream *substream; member
252 snd_pcm_period_elapsed(chip->substream); in cx8801_aud_irq()
421 static int snd_cx88_pcm_open(struct snd_pcm_substream *substream) in snd_cx88_pcm_open() argument
423 snd_cx88_card_t *chip = snd_pcm_substream_chip(substream); in snd_cx88_pcm_open()
424 struct snd_pcm_runtime *runtime = substream->runtime; in snd_cx88_pcm_open()
437 chip->substream = substream; in snd_cx88_pcm_open()
457 static int snd_cx88_close(struct snd_pcm_substream *substream) in snd_cx88_close() argument
465 static int snd_cx88_hw_params(struct snd_pcm_substream * substream, in snd_cx88_hw_params() argument
468 snd_cx88_card_t *chip = snd_pcm_substream_chip(substream); in snd_cx88_hw_params()
473 if (substream->runtime->dma_area) { in snd_cx88_hw_params()
[all …]
/linux-4.1.27/sound/soc/xtensa/
Dxtfpga-i2s.c273 static int xtfpga_i2s_startup(struct snd_pcm_substream *substream, in xtfpga_i2s_startup() argument
278 snd_soc_dai_set_dma_data(dai, substream, i2s); in xtfpga_i2s_startup()
282 static int xtfpga_i2s_hw_params(struct snd_pcm_substream *substream, in xtfpga_i2s_hw_params() argument
371 static int xtfpga_pcm_open(struct snd_pcm_substream *substream) in xtfpga_pcm_open() argument
373 struct snd_pcm_runtime *runtime = substream->runtime; in xtfpga_pcm_open()
374 struct snd_soc_pcm_runtime *rtd = substream->private_data; in xtfpga_pcm_open()
377 snd_soc_set_runtime_hwparams(substream, &xtfpga_pcm_hardware); in xtfpga_pcm_open()
378 p = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); in xtfpga_pcm_open()
384 static int xtfpga_pcm_close(struct snd_pcm_substream *substream) in xtfpga_pcm_close() argument
390 static int xtfpga_pcm_hw_params(struct snd_pcm_substream *substream, in xtfpga_pcm_hw_params() argument
[all …]
/linux-4.1.27/sound/soc/sh/rcar/
Dcore.c287 struct snd_pcm_substream *substream = io->substream; in rsnd_dai_pointer_offset() local
288 struct snd_pcm_runtime *runtime = substream->runtime; in rsnd_dai_pointer_offset()
301 struct snd_pcm_substream *substream = io->substream; in rsnd_dai_pointer_update() local
302 struct snd_pcm_runtime *runtime = substream->runtime; in rsnd_dai_pointer_update()
313 snd_pcm_period_elapsed(substream); in rsnd_dai_pointer_update()
318 struct snd_pcm_substream *substream) in rsnd_dai_stream_init() argument
320 struct snd_pcm_runtime *runtime = substream->runtime; in rsnd_dai_stream_init()
322 io->substream = substream; in rsnd_dai_stream_init()
334 struct snd_soc_dai *rsnd_substream_to_dai(struct snd_pcm_substream *substream) in rsnd_substream_to_dai() argument
336 struct snd_soc_pcm_runtime *rtd = substream->private_data; in rsnd_substream_to_dai()
[all …]
/linux-4.1.27/sound/usb/
Dmidi.c151 struct snd_rawmidi_substream *substream; member
173 struct snd_rawmidi_substream *substream; member
231 if (!port->substream) { in snd_usbmidi_input_data()
235 if (!test_bit(port->substream->number, &ep->umidi->input_triggered)) in snd_usbmidi_input_data()
237 snd_rawmidi_receive(port->substream, data, length); in snd_usbmidi_input_data()
665 if (snd_rawmidi_transmit(port->substream, &b, 1) != 1) { in snd_usbmidi_standard_output()
742 struct snd_rawmidi_substream *substream = ep->ports[0].substream; in snd_usbmidi_akai_output() local
752 count = snd_rawmidi_transmit_peek(substream, in snd_usbmidi_akai_output()
763 snd_rawmidi_transmit_ack(substream, pos); in snd_usbmidi_akai_output()
774 snd_rawmidi_transmit_ack(substream, end); in snd_usbmidi_akai_output()
[all …]
Dproc.c156 if (stream->substream[SNDRV_PCM_STREAM_PLAYBACK].num_formats) { in proc_pcm_format_read()
158 proc_dump_substream_status(&stream->substream[SNDRV_PCM_STREAM_PLAYBACK], buffer); in proc_pcm_format_read()
159 proc_dump_substream_formats(&stream->substream[SNDRV_PCM_STREAM_PLAYBACK], buffer); in proc_pcm_format_read()
161 if (stream->substream[SNDRV_PCM_STREAM_CAPTURE].num_formats) { in proc_pcm_format_read()
163 proc_dump_substream_status(&stream->substream[SNDRV_PCM_STREAM_CAPTURE], buffer); in proc_pcm_format_read()
164 proc_dump_substream_formats(&stream->substream[SNDRV_PCM_STREAM_CAPTURE], buffer); in proc_pcm_format_read()
Dpcm.c77 static snd_pcm_uframes_t snd_usb_pcm_pointer(struct snd_pcm_substream *substream) in snd_usb_pcm_pointer() argument
82 subs = (struct snd_usb_substream *)substream->runtime->private_data; in snd_usb_pcm_pointer()
87 substream->runtime->delay = snd_usb_pcm_delay(subs, in snd_usb_pcm_pointer()
88 substream->runtime->rate); in snd_usb_pcm_pointer()
90 return hwptr_done / (substream->runtime->frame_bits >> 3); in snd_usb_pcm_pointer()
590 &subs->stream->substream[subs->direction ^ 1]; in configure_sync_endpoint()
685 static int snd_usb_hw_params(struct snd_pcm_substream *substream, in snd_usb_hw_params() argument
688 struct snd_usb_substream *subs = substream->runtime->private_data; in snd_usb_hw_params()
692 ret = snd_pcm_lib_alloc_vmalloc_buffer(substream, in snd_usb_hw_params()
732 static int snd_usb_hw_free(struct snd_pcm_substream *substream) in snd_usb_hw_free() argument
[all …]
/linux-4.1.27/sound/pci/rme9652/
Drme9652.c1848 snd_pcm_period_elapsed(rme9652->pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream); in snd_rme9652_interrupt()
1852 snd_pcm_period_elapsed(rme9652->pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream); in snd_rme9652_interrupt()
1857 static snd_pcm_uframes_t snd_rme9652_hw_pointer(struct snd_pcm_substream *substream) in snd_rme9652_hw_pointer() argument
1859 struct snd_rme9652 *rme9652 = snd_pcm_substream_chip(substream); in snd_rme9652_hw_pointer()
1886 static int snd_rme9652_playback_copy(struct snd_pcm_substream *substream, int channel, in snd_rme9652_playback_copy() argument
1889 struct snd_rme9652 *rme9652 = snd_pcm_substream_chip(substream); in snd_rme9652_playback_copy()
1896 substream->pstr->stream, in snd_rme9652_playback_copy()
1905 static int snd_rme9652_capture_copy(struct snd_pcm_substream *substream, int channel, in snd_rme9652_capture_copy() argument
1908 struct snd_rme9652 *rme9652 = snd_pcm_substream_chip(substream); in snd_rme9652_capture_copy()
1915 substream->pstr->stream, in snd_rme9652_capture_copy()
[all …]
/linux-4.1.27/sound/usb/usx2y/
Dusbusx2yaudio.c523 static snd_pcm_uframes_t snd_usX2Y_pcm_pointer(struct snd_pcm_substream *substream) in snd_usX2Y_pcm_pointer() argument
525 struct snd_usX2Y_substream *subs = substream->runtime->private_data; in snd_usX2Y_pcm_pointer()
531 static int snd_usX2Y_pcm_trigger(struct snd_pcm_substream *substream, int cmd) in snd_usX2Y_pcm_trigger() argument
533 struct snd_usX2Y_substream *subs = substream->runtime->private_data; in snd_usX2Y_pcm_trigger()
743 static int snd_usX2Y_pcm_hw_params(struct snd_pcm_substream *substream, in snd_usX2Y_pcm_hw_params() argument
749 struct snd_card *card = substream->pstr->pcm->card; in snd_usX2Y_pcm_hw_params()
754 snd_printdd("snd_usX2Y_hw_params(%p, %p)\n", substream, hw_params); in snd_usX2Y_pcm_hw_params()
765 if (!test_substream || test_substream == substream || in snd_usX2Y_pcm_hw_params()
777 err = snd_pcm_lib_malloc_pages(substream, in snd_usX2Y_pcm_hw_params()
781 substream, params_buffer_bytes(hw_params), err); in snd_usX2Y_pcm_hw_params()
[all …]
Dusx2yhwdeppcm.c356 static int snd_usX2Y_usbpcm_hw_free(struct snd_pcm_substream *substream) in snd_usX2Y_usbpcm_hw_free() argument
358 struct snd_pcm_runtime *runtime = substream->runtime; in snd_usX2Y_usbpcm_hw_free()
362 snd_printdd("snd_usX2Y_usbpcm_hw_free(%p)\n", substream); in snd_usX2Y_usbpcm_hw_free()
364 if (SNDRV_PCM_STREAM_PLAYBACK == substream->stream) { in snd_usX2Y_usbpcm_hw_free()
391 return snd_pcm_lib_free_pages(substream); in snd_usX2Y_usbpcm_hw_free()
481 static int snd_usX2Y_usbpcm_prepare(struct snd_pcm_substream *substream) in snd_usX2Y_usbpcm_prepare() argument
483 struct snd_pcm_runtime *runtime = substream->runtime; in snd_usX2Y_usbpcm_prepare()
488 snd_printdd("snd_usX2Y_pcm_prepare(%p)\n", substream); in snd_usX2Y_usbpcm_prepare()
562 static int snd_usX2Y_usbpcm_open(struct snd_pcm_substream *substream) in snd_usX2Y_usbpcm_open() argument
565 snd_pcm_substream_chip(substream))[substream->stream]; in snd_usX2Y_usbpcm_open()
[all …]
/linux-4.1.27/sound/drivers/mpu401/
Dmpu401_uart.c284 static int snd_mpu401_uart_input_open(struct snd_rawmidi_substream *substream) in snd_mpu401_uart_input_open() argument
289 mpu = substream->rmidi->private_data; in snd_mpu401_uart_input_open()
296 mpu->substream_input = substream; in snd_mpu401_uart_input_open()
306 static int snd_mpu401_uart_output_open(struct snd_rawmidi_substream *substream) in snd_mpu401_uart_output_open() argument
311 mpu = substream->rmidi->private_data; in snd_mpu401_uart_output_open()
318 mpu->substream_output = substream; in snd_mpu401_uart_output_open()
328 static int snd_mpu401_uart_input_close(struct snd_rawmidi_substream *substream) in snd_mpu401_uart_input_close() argument
333 mpu = substream->rmidi->private_data; in snd_mpu401_uart_input_close()
345 static int snd_mpu401_uart_output_close(struct snd_rawmidi_substream *substream) in snd_mpu401_uart_output_close() argument
350 mpu = substream->rmidi->private_data; in snd_mpu401_uart_output_close()
[all …]
/linux-4.1.27/sound/usb/bcd2000/
Dbcd2000.c87 static int bcd2000_midi_input_open(struct snd_rawmidi_substream *substream) in bcd2000_midi_input_open() argument
92 static int bcd2000_midi_input_close(struct snd_rawmidi_substream *substream) in bcd2000_midi_input_close() argument
98 static void bcd2000_midi_input_trigger(struct snd_rawmidi_substream *substream, in bcd2000_midi_input_trigger() argument
101 struct bcd2000 *bcd2k = substream->rmidi->private_data; in bcd2000_midi_input_trigger()
102 bcd2k->midi_receive_substream = up ? substream : NULL; in bcd2000_midi_input_trigger()
181 static int bcd2000_midi_output_open(struct snd_rawmidi_substream *substream) in bcd2000_midi_output_open() argument
186 static int bcd2000_midi_output_close(struct snd_rawmidi_substream *substream) in bcd2000_midi_output_close() argument
188 struct bcd2000 *bcd2k = substream->rmidi->private_data; in bcd2000_midi_output_close()
199 static void bcd2000_midi_output_trigger(struct snd_rawmidi_substream *substream, in bcd2000_midi_output_trigger() argument
202 struct bcd2000 *bcd2k = substream->rmidi->private_data; in bcd2000_midi_output_trigger()
[all …]
/linux-4.1.27/sound/aoa/soundbus/
Dsoundbus.h107 struct snd_pcm_substream *substream);
112 struct snd_pcm_substream *substream);
122 struct snd_pcm_substream *substream);
127 struct snd_pcm_substream *substream);
132 struct snd_pcm_substream *substream);
/linux-4.1.27/sound/soc/codecs/
Dtlv320dac33.c65 static void dac33_calculate_times(struct snd_pcm_substream *substream,
67 static int dac33_prepare_chip(struct snd_pcm_substream *substream,
97 struct snd_pcm_substream *substream; member
431 if (likely(dac33->substream)) { in dac33_playback_event()
432 dac33_calculate_times(dac33->substream, codec); in dac33_playback_event()
433 dac33_prepare_chip(dac33->substream, codec); in dac33_playback_event()
795 static int dac33_startup(struct snd_pcm_substream *substream, in dac33_startup() argument
802 dac33->substream = substream; in dac33_startup()
807 static void dac33_shutdown(struct snd_pcm_substream *substream, in dac33_shutdown() argument
813 dac33->substream = NULL; in dac33_shutdown()
[all …]
Duda134x.c159 static int uda134x_startup(struct snd_pcm_substream *substream, in uda134x_startup() argument
173 snd_pcm_hw_constraint_minmax(substream->runtime, in uda134x_startup()
178 snd_pcm_hw_constraint_minmax(substream->runtime, in uda134x_startup()
183 uda134x->slave_substream = substream; in uda134x_startup()
185 uda134x->master_substream = substream; in uda134x_startup()
190 static void uda134x_shutdown(struct snd_pcm_substream *substream, in uda134x_shutdown() argument
196 if (uda134x->master_substream == substream) in uda134x_shutdown()
202 static int uda134x_hw_params(struct snd_pcm_substream *substream, in uda134x_hw_params() argument
210 if (substream == uda134x->slave_substream) { in uda134x_hw_params()
/linux-4.1.27/sound/firewire/
Disight.c246 static int isight_open(struct snd_pcm_substream *substream) in isight_open() argument
266 struct isight *isight = substream->private_data; in isight_open()
268 substream->runtime->hw = hardware; in isight_open()
276 static int isight_close(struct snd_pcm_substream *substream) in isight_close() argument
278 struct isight *isight = substream->private_data; in isight_close()
285 static int isight_hw_params(struct snd_pcm_substream *substream, in isight_hw_params() argument
288 struct isight *isight = substream->private_data; in isight_hw_params()
291 err = snd_pcm_lib_alloc_vmalloc_buffer(substream, in isight_hw_params()
330 static int isight_hw_free(struct snd_pcm_substream *substream) in isight_hw_free() argument
332 struct isight *isight = substream->private_data; in isight_hw_free()
[all …]
/linux-4.1.27/sound/spi/
Dat73c213.c67 struct snd_pcm_substream *substream; member
208 static int snd_at73c213_pcm_open(struct snd_pcm_substream *substream) in snd_at73c213_pcm_open() argument
210 struct snd_at73c213 *chip = snd_pcm_substream_chip(substream); in snd_at73c213_pcm_open()
211 struct snd_pcm_runtime *runtime = substream->runtime; in snd_at73c213_pcm_open()
222 chip->substream = substream; in snd_at73c213_pcm_open()
227 static int snd_at73c213_pcm_close(struct snd_pcm_substream *substream) in snd_at73c213_pcm_close() argument
229 struct snd_at73c213 *chip = snd_pcm_substream_chip(substream); in snd_at73c213_pcm_close()
230 chip->substream = NULL; in snd_at73c213_pcm_close()
234 static int snd_at73c213_pcm_hw_params(struct snd_pcm_substream *substream, in snd_at73c213_pcm_hw_params() argument
237 struct snd_at73c213 *chip = snd_pcm_substream_chip(substream); in snd_at73c213_pcm_hw_params()
[all …]
/linux-4.1.27/sound/soc/adi/
Daxi-i2s.c55 static int axi_i2s_trigger(struct snd_pcm_substream *substream, int cmd, in axi_i2s_trigger() argument
61 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) in axi_i2s_trigger()
86 static int axi_i2s_hw_params(struct snd_pcm_substream *substream, in axi_i2s_hw_params() argument
104 static int axi_i2s_startup(struct snd_pcm_substream *substream, in axi_i2s_startup() argument
111 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) in axi_i2s_startup()
118 ret = snd_pcm_hw_constraint_ratnums(substream->runtime, 0, in axi_i2s_startup()
127 static void axi_i2s_shutdown(struct snd_pcm_substream *substream, in axi_i2s_shutdown() argument
/linux-4.1.27/sound/isa/wss/
Dwss_lib.c480 static int snd_wss_trigger(struct snd_pcm_substream *substream, in snd_wss_trigger() argument
483 struct snd_wss *chip = snd_pcm_substream_chip(substream); in snd_wss_trigger()
501 snd_pcm_group_for_each_entry(s, substream) { in snd_wss_trigger()
504 snd_pcm_trigger_done(s, substream); in snd_wss_trigger()
507 snd_pcm_trigger_done(s, substream); in snd_wss_trigger()
994 static int snd_wss_playback_hw_params(struct snd_pcm_substream *substream, in snd_wss_playback_hw_params() argument
997 struct snd_wss *chip = snd_pcm_substream_chip(substream); in snd_wss_playback_hw_params()
1001 if ((err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params))) < 0) in snd_wss_playback_hw_params()
1010 static int snd_wss_playback_hw_free(struct snd_pcm_substream *substream) in snd_wss_playback_hw_free() argument
1012 return snd_pcm_lib_free_pages(substream); in snd_wss_playback_hw_free()
[all …]
/linux-4.1.27/sound/soc/spear/
Dspdif_out.c60 static int spdif_out_startup(struct snd_pcm_substream *substream, in spdif_out_startup() argument
66 if (substream->stream != SNDRV_PCM_STREAM_PLAYBACK) in spdif_out_startup()
79 static void spdif_out_shutdown(struct snd_pcm_substream *substream, in spdif_out_shutdown() argument
84 if (substream->stream != SNDRV_PCM_STREAM_PLAYBACK) in spdif_out_shutdown()
105 static int spdif_out_hw_params(struct snd_pcm_substream *substream, in spdif_out_hw_params() argument
112 if (substream->stream != SNDRV_PCM_STREAM_PLAYBACK) in spdif_out_hw_params()
151 static int spdif_out_trigger(struct snd_pcm_substream *substream, int cmd, in spdif_out_trigger() argument
158 if (substream->stream != SNDRV_PCM_STREAM_PLAYBACK) in spdif_out_trigger()
Dspdif_in.c66 static void spdif_in_shutdown(struct snd_pcm_substream *substream, in spdif_in_shutdown() argument
71 if (substream->stream != SNDRV_PCM_STREAM_CAPTURE) in spdif_in_shutdown()
94 static int spdif_in_hw_params(struct snd_pcm_substream *substream, in spdif_in_hw_params() argument
101 if (substream->stream != SNDRV_PCM_STREAM_CAPTURE) in spdif_in_hw_params()
110 static int spdif_in_trigger(struct snd_pcm_substream *substream, int cmd, in spdif_in_trigger() argument
117 if (substream->stream != SNDRV_PCM_STREAM_CAPTURE) in spdif_in_trigger()
/linux-4.1.27/sound/pci/riptide/
Driptide.c426 #define get_pcmhwdev(substream) (struct pcmhw *)(substream->runtime->private_data) argument
1091 struct snd_pcm_substream *substream[PLAYBACK_SUBSTREAMS + 1]; in riptide_handleirq() local
1103 substream[i] = chip->playback_substream[i]; in riptide_handleirq()
1104 substream[i] = chip->capture_substream; in riptide_handleirq()
1106 if (substream[i] && in riptide_handleirq()
1107 (runtime = substream[i]->runtime) && in riptide_handleirq()
1147 snd_pcm_period_elapsed(substream[i]); in riptide_handleirq()
1358 *substream) in snd_riptide_pointer()
1360 struct snd_riptide *chip = snd_pcm_substream_chip(substream); in snd_riptide_pointer()
1361 struct snd_pcm_runtime *runtime = substream->runtime; in snd_riptide_pointer()
[all …]
/linux-4.1.27/sound/soc/bcm/
Dbcm2835-i2s.c307 static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, in bcm2835_i2s_hw_params() argument
563 static int bcm2835_i2s_prepare(struct snd_pcm_substream *substream, in bcm2835_i2s_prepare() argument
579 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK in bcm2835_i2s_prepare()
582 else if (substream->stream == SNDRV_PCM_STREAM_CAPTURE in bcm2835_i2s_prepare()
590 struct snd_pcm_substream *substream, in bcm2835_i2s_stop() argument
595 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) in bcm2835_i2s_stop()
608 static int bcm2835_i2s_trigger(struct snd_pcm_substream *substream, int cmd, in bcm2835_i2s_trigger() argument
620 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) in bcm2835_i2s_trigger()
632 bcm2835_i2s_stop(dev, substream, dai); in bcm2835_i2s_trigger()
641 static int bcm2835_i2s_startup(struct snd_pcm_substream *substream, in bcm2835_i2s_startup() argument
[all …]

123