Home
last modified time | relevance | path

Searched refs:frames (Results 1 – 25 of 33) sorted by relevance

12

/sound/core/oss/
Dpcm_plugin.c49 static int snd_pcm_plugin_alloc(struct snd_pcm_plugin *plugin, snd_pcm_uframes_t frames) in snd_pcm_plugin_alloc() argument
64 size = frames * format->channels * width; in snd_pcm_plugin_alloc()
68 if (plugin->buf_frames < frames) { in snd_pcm_plugin_alloc()
71 plugin->buf_frames = frames; in snd_pcm_plugin_alloc()
80 c->frames = frames; in snd_pcm_plugin_alloc()
92 c->frames = frames; in snd_pcm_plugin_alloc()
104 int snd_pcm_plug_alloc(struct snd_pcm_substream *plug, snd_pcm_uframes_t frames) in snd_pcm_plug_alloc() argument
113 frames = plugin->dst_frames(plugin, frames); in snd_pcm_plug_alloc()
114 if (snd_BUG_ON((snd_pcm_sframes_t)frames <= 0)) in snd_pcm_plug_alloc()
117 err = snd_pcm_plugin_alloc(plugin, frames); in snd_pcm_plug_alloc()
[all …]
Droute.c28 snd_pcm_uframes_t frames, snd_pcm_format_t format) in zero_areas() argument
33 snd_pcm_area_silence(&dvp->area, 0, frames, format); in zero_areas()
41 snd_pcm_uframes_t frames, snd_pcm_format_t format) in copy_area() argument
44 snd_pcm_area_copy(&src_channel->area, 0, &dst_channel->area, 0, frames, format); in copy_area()
50 snd_pcm_uframes_t frames) in route_transfer() argument
58 if (frames == 0) in route_transfer()
60 if (frames > dst_channels[0].frames) in route_transfer()
61 frames = dst_channels[0].frames; in route_transfer()
71 copy_area(src_channels, dvp, frames, format); in route_transfer()
74 return frames; in route_transfer()
[all …]
Drate.c183 static snd_pcm_sframes_t rate_src_frames(struct snd_pcm_plugin *plugin, snd_pcm_uframes_t frames) in rate_src_frames() argument
190 if (frames == 0) in rate_src_frames()
194 res = (((frames * data->pitch) + (BITS/2)) >> SHIFT); in rate_src_frames()
196 res = (((frames << SHIFT) + (data->pitch / 2)) / data->pitch); in rate_src_frames()
199 snd_pcm_sframes_t frames1 = frames, res1 = data->old_dst_frames; in rate_src_frames()
211 data->old_src_frames = frames; in rate_src_frames()
216 static snd_pcm_sframes_t rate_dst_frames(struct snd_pcm_plugin *plugin, snd_pcm_uframes_t frames) in rate_dst_frames() argument
223 if (frames == 0) in rate_dst_frames()
227 res = (((frames << SHIFT) + (data->pitch / 2)) / data->pitch); in rate_dst_frames()
229 res = (((frames * data->pitch) + (BITS/2)) >> SHIFT); in rate_dst_frames()
[all …]
Dmulaw.c144 snd_pcm_uframes_t frames);
171 snd_pcm_uframes_t frames) in mulaw_decode() argument
183 snd_pcm_area_silence(&dst_channels[channel].area, 0, frames, plugin->dst_format.format); in mulaw_decode()
192 frames1 = frames; in mulaw_decode()
217 snd_pcm_uframes_t frames) in mulaw_encode() argument
229 snd_pcm_area_silence(&dst_channels[channel].area, 0, frames, plugin->dst_format.format); in mulaw_encode()
238 frames1 = frames; in mulaw_encode()
251 snd_pcm_uframes_t frames) in mulaw_transfer() argument
257 if (frames == 0) in mulaw_transfer()
272 if (frames > dst_channels[0].frames) in mulaw_transfer()
[all …]
Dlinear.c58 snd_pcm_uframes_t frames) in convert() argument
70 snd_pcm_area_silence(&dst_channels[channel].area, 0, frames, plugin->dst_format.format); in convert()
79 frames1 = frames; in convert()
91 snd_pcm_uframes_t frames) in linear_transfer() argument
95 if (frames == 0) in linear_transfer()
110 if (frames > dst_channels[0].frames) in linear_transfer()
111 frames = dst_channels[0].frames; in linear_transfer()
112 convert(plugin, src_channels, dst_channels, frames); in linear_transfer()
113 return frames; in linear_transfer()
Dio.c40 snd_pcm_uframes_t frames) in io_playback_transfer() argument
47 return pcm_write(plugin->plug, src_channels->area.addr, frames); in io_playback_transfer()
59 return pcm_writev(plugin->plug, bufs, frames); in io_playback_transfer()
66 snd_pcm_uframes_t frames) in io_capture_transfer() argument
73 return pcm_read(plugin->plug, dst_channels->area.addr, frames); in io_capture_transfer()
85 return pcm_readv(plugin->plug, bufs, frames); in io_capture_transfer()
91 snd_pcm_uframes_t frames, in io_src_channels() argument
97 err = snd_pcm_plugin_client_channels(plugin, frames, &v); in io_src_channels()
105 return frames; in io_src_channels()
Dcopy.c30 snd_pcm_uframes_t frames) in copy_transfer() argument
37 if (frames == 0) in copy_transfer()
49 snd_pcm_area_silence(&dst_channels->area, 0, frames, plugin->dst_format.format); in copy_transfer()
54 …snd_pcm_area_copy(&src_channels->area, 0, &dst_channels->area, 0, frames, plugin->src_format.forma… in copy_transfer()
58 return frames; in copy_transfer()
Dpcm_plugin.h28 snd_pcm_uframes_t frames; /* allocated frames */ member
50 snd_pcm_uframes_t frames,
55 snd_pcm_uframes_t frames);
78 int snd_pcm_plug_alloc(struct snd_pcm_substream *plug, snd_pcm_uframes_t frames);
130 snd_pcm_uframes_t frames,
150 void **bufs, snd_pcm_uframes_t frames);
152 void **bufs, snd_pcm_uframes_t frames);
Dpcm_oss.c585 static long snd_pcm_oss_bytes(struct snd_pcm_substream *substream, long frames) in snd_pcm_oss_bytes() argument
589 long bytes = frames_to_bytes(runtime, frames); in snd_pcm_oss_bytes()
1003 snd_pcm_uframes_t frames; in snd_pcm_oss_change_params_locked() local
1004 frames = runtime->period_size + 16; in snd_pcm_oss_change_params_locked()
1005 if (frames > runtime->buffer_size) in snd_pcm_oss_change_params_locked()
1006 frames = runtime->buffer_size; in snd_pcm_oss_change_params_locked()
1007 sw_params->silence_threshold = frames; in snd_pcm_oss_change_params_locked()
1008 sw_params->silence_size = frames; in snd_pcm_oss_change_params_locked()
1184 snd_pcm_uframes_t frames; in snd_pcm_oss_capture_position_fixup() local
1196 frames = (*delay - runtime->buffer_size) + runtime->period_size - 1; in snd_pcm_oss_capture_position_fixup()
[all …]
/sound/firewire/
Damdtp-am824.c150 __be32 *buffer, unsigned int frames, in write_pcm_s32() argument
168 for (i = 0; i < frames; ++i) { in write_pcm_s32()
181 __be32 *buffer, unsigned int frames, in read_pcm_s32() argument
199 for (i = 0; i < frames; ++i) { in read_pcm_s32()
211 __be32 *buffer, unsigned int frames) in write_pcm_silence() argument
216 for (i = 0; i < frames; ++i) { in write_pcm_silence()
297 unsigned int frames, unsigned int data_block_counter) in write_midi_messages() argument
303 for (f = 0; f < frames; f++) { in write_midi_messages()
325 unsigned int frames, unsigned int data_block_counter) in read_midi_messages() argument
332 for (f = 0; f < frames; f++) { in read_midi_messages()
/sound/core/
Dpcm_compat.c29 snd_pcm_uframes_t frames; in snd_pcm_ioctl_rewind_compat() local
32 if (get_user(frames, src)) in snd_pcm_ioctl_rewind_compat()
34 err = snd_pcm_rewind(substream, frames); in snd_pcm_ioctl_rewind_compat()
43 snd_pcm_uframes_t frames; in snd_pcm_ioctl_forward_compat() local
46 if (get_user(frames, src)) in snd_pcm_ioctl_forward_compat()
48 err = snd_pcm_forward(substream, frames); in snd_pcm_ioctl_forward_compat()
346 u32 frames; member
353 u32 frames; in snd_pcm_ioctl_xferi_compat() local
364 get_user(frames, &data32->frames)) in snd_pcm_ioctl_xferi_compat()
368 err = snd_pcm_lib_write(substream, compat_ptr(buf), frames); in snd_pcm_ioctl_xferi_compat()
[all …]
Dpcm_lib.c34 snd_pcm_uframes_t off, snd_pcm_uframes_t frames);
48 snd_pcm_uframes_t frames, ofs, transfer; in snd_pcm_playback_silence() local
69 frames = runtime->silence_threshold - noise_dist; in snd_pcm_playback_silence()
70 if (frames > runtime->silence_size) in snd_pcm_playback_silence()
71 frames = runtime->silence_size; in snd_pcm_playback_silence()
83 frames = new_hw_ptr - ofs; in snd_pcm_playback_silence()
84 if ((snd_pcm_sframes_t)frames < 0) in snd_pcm_playback_silence()
85 frames += runtime->boundary; in snd_pcm_playback_silence()
86 runtime->silence_filled -= frames; in snd_pcm_playback_silence()
94 frames = runtime->buffer_size - runtime->silence_filled; in snd_pcm_playback_silence()
[all …]
Dpcm_native.c629 snd_pcm_uframes_t frames; in snd_pcm_hw_params() local
689 frames = 1; in snd_pcm_hw_params()
692 frames *= 2; in snd_pcm_hw_params()
695 runtime->min_align = frames; in snd_pcm_hw_params()
2643 snd_pcm_uframes_t frames, in forward_appl_ptr() argument
2652 if (frames > (snd_pcm_uframes_t)avail) in forward_appl_ptr()
2653 frames = avail; in forward_appl_ptr()
2654 appl_ptr = runtime->control->appl_ptr + frames; in forward_appl_ptr()
2658 return ret < 0 ? ret : frames; in forward_appl_ptr()
2663 snd_pcm_uframes_t frames, in rewind_appl_ptr() argument
[all …]
/sound/firewire/fireface/
Damdtp-ff.c31 __le32 *buffer, unsigned int frames, in write_pcm_s32() argument
49 for (i = 0; i < frames; ++i) { in write_pcm_s32()
61 __le32 *buffer, unsigned int frames, in read_pcm_s32() argument
79 for (i = 0; i < frames; ++i) { in read_pcm_s32()
91 __le32 *buffer, unsigned int frames) in write_pcm_silence() argument
96 for (i = 0; i < frames; ++i) { in write_pcm_silence()
/sound/usb/misc/
Dua101.c212 unsigned int frames) in copy_playback_data() argument
221 if (stream->buffer_pos + frames <= runtime->buffer_size) { in copy_playback_data()
222 memcpy(urb->transfer_buffer, source, frames * frame_bytes); in copy_playback_data()
228 runtime->dma_area, (frames - frames1) * frame_bytes); in copy_playback_data()
231 stream->buffer_pos += frames; in copy_playback_data()
234 stream->period_pos += frames; in copy_playback_data()
254 unsigned int frames; in playback_tasklet() local
277 frames = ua->rate_feedback[ua->rate_feedback_start]; in playback_tasklet()
288 frames * ua->playback.frame_bytes; in playback_tasklet()
292 frames); in playback_tasklet()
[all …]
/sound/firewire/motu/
Damdtp-motu.c284 static void __maybe_unused copy_sph(u32 *frames, __be32 *buffer, in copy_sph() argument
291 *frames = be32_to_cpu(*buffer); in copy_sph()
293 frames++; in copy_sph()
298 static void __maybe_unused copy_message(u64 *frames, __be32 *buffer, in copy_message() argument
306 *frames = (be32_to_cpu(buffer[1]) << 16) | in copy_message()
309 frames++; in copy_message()
Damdtp-motu-trace.h18 static void copy_message(u64 *frames, __be32 *buffer, unsigned int data_blocks,
/sound/firewire/tascam/
Damdtp-tascam.c36 __be32 *buffer, unsigned int frames, in write_pcm_s32() argument
54 for (i = 0; i < frames; ++i) { in write_pcm_s32()
66 __be32 *buffer, unsigned int frames, in read_pcm_s32() argument
87 for (i = 0; i < frames; ++i) { in read_pcm_s32()
/sound/atmel/
Dac97c.c430 snd_pcm_uframes_t frames; in atmel_ac97c_playback_pointer() local
436 frames = bytes_to_frames(runtime, bytes); in atmel_ac97c_playback_pointer()
437 if (frames >= runtime->buffer_size) in atmel_ac97c_playback_pointer()
438 frames -= runtime->buffer_size; in atmel_ac97c_playback_pointer()
439 return frames; in atmel_ac97c_playback_pointer()
447 snd_pcm_uframes_t frames; in atmel_ac97c_capture_pointer() local
453 frames = bytes_to_frames(runtime, bytes); in atmel_ac97c_capture_pointer()
454 if (frames >= runtime->buffer_size) in atmel_ac97c_capture_pointer()
455 frames -= runtime->buffer_size; in atmel_ac97c_capture_pointer()
456 return frames; in atmel_ac97c_capture_pointer()
/sound/usb/line6/
Dcapture.c92 int frames = fsize / bytes_per_frame; in line6_capture_copy() local
97 if (line6pcm->in.pos_done + frames > runtime->buffer_size) { in line6_capture_copy()
111 (frames - len) * bytes_per_frame); in line6_capture_copy()
123 line6pcm->in.pos_done += frames; in line6_capture_copy()
Dplayback.c68 int frames = urb_out->transfer_buffer_length / bytes_per_frame; in create_impulse_test_signal() local
75 for (i = 0; i < frames; ++i) { in create_impulse_test_signal()
86 for (i = 0; i < frames; ++i) { in create_impulse_test_signal()
/sound/firewire/digi00x/
Damdtp-dot.c146 __be32 *buffer, unsigned int frames, in write_pcm_s32() argument
165 for (i = 0; i < frames; ++i) { in write_pcm_s32()
178 __be32 *buffer, unsigned int frames, in read_pcm_s32() argument
197 for (i = 0; i < frames; ++i) { in read_pcm_s32()
/sound/usb/
Dpcm.c1515 unsigned int stride, frames, bytes, oldptr; in retire_capture_urb() local
1534 frames = bytes / stride; in retire_capture_urb()
1536 bytes = frames * stride; in retire_capture_urb()
1539 bytes = frames * stride; in retire_capture_urb()
1550 frames = (bytes + (oldptr % stride)) / stride; in retire_capture_urb()
1551 subs->transfer_done += frames; in retire_capture_urb()
1692 unsigned int counts, frames, bytes; in prepare_playback_urb() local
1698 frames = 0; in prepare_playback_urb()
1709 urb->iso_frame_desc[i].offset = frames * ep->stride; in prepare_playback_urb()
1711 frames += counts; in prepare_playback_urb()
[all …]
/sound/soc/fsl/
Dfsl_dma.c710 snd_pcm_uframes_t frames; in fsl_dma_pointer() local
746 frames = bytes_to_frames(runtime, position - dma_private->dma_buf_phys); in fsl_dma_pointer()
752 if (frames == runtime->buffer_size) in fsl_dma_pointer()
753 frames = 0; in fsl_dma_pointer()
755 return frames; in fsl_dma_pointer()
/sound/soc/ti/
Domap-mcbsp.c774 struct snd_interval frames; in omap_mcbsp_hwrule_min_buffersize() local
777 snd_interval_any(&frames); in omap_mcbsp_hwrule_min_buffersize()
780 frames.min = size / channels->min; in omap_mcbsp_hwrule_min_buffersize()
781 frames.integer = 1; in omap_mcbsp_hwrule_min_buffersize()
782 return snd_interval_refine(buffer_size, &frames); in omap_mcbsp_hwrule_min_buffersize()

12