/sound/core/oss/ |
D | pcm_plugin.c | 49 static int snd_pcm_plugin_alloc(struct snd_pcm_plugin *plugin, snd_pcm_uframes_t frames) in snd_pcm_plugin_alloc() argument 65 size = array3_size(frames, format->channels, width); in snd_pcm_plugin_alloc() 72 if (plugin->buf_frames < frames) { in snd_pcm_plugin_alloc() 75 plugin->buf_frames = frames; in snd_pcm_plugin_alloc() 84 c->frames = frames; in snd_pcm_plugin_alloc() 96 c->frames = frames; in snd_pcm_plugin_alloc() 108 int snd_pcm_plug_alloc(struct snd_pcm_substream *plug, snd_pcm_uframes_t frames) in snd_pcm_plug_alloc() argument 117 frames = plugin->dst_frames(plugin, frames); in snd_pcm_plug_alloc() 118 if ((snd_pcm_sframes_t)frames <= 0) in snd_pcm_plug_alloc() 121 err = snd_pcm_plugin_alloc(plugin, frames); in snd_pcm_plug_alloc() [all …]
|
D | route.c | 28 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 …]
|
D | rate.c | 183 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 = DIV_ROUND_CLOSEST(frames << SHIFT, 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 = DIV_ROUND_CLOSEST(frames << SHIFT, data->pitch); in rate_dst_frames() 229 res = (((frames * data->pitch) + (BITS/2)) >> SHIFT); in rate_dst_frames() [all …]
|
D | mulaw.c | 144 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 …]
|
D | linear.c | 58 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()
|
D | io.c | 40 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()
|
D | copy.c | 30 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()
|
D | pcm_plugin.h | 28 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, 158 void **bufs, snd_pcm_uframes_t frames); 160 void **bufs, snd_pcm_uframes_t frames);
|
D | pcm_oss.c | 585 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() 1030 snd_pcm_uframes_t frames; in snd_pcm_oss_change_params_locked() local 1031 frames = runtime->period_size + 16; in snd_pcm_oss_change_params_locked() 1032 if (frames > runtime->buffer_size) in snd_pcm_oss_change_params_locked() 1033 frames = runtime->buffer_size; in snd_pcm_oss_change_params_locked() 1034 sw_params->silence_threshold = frames; in snd_pcm_oss_change_params_locked() 1035 sw_params->silence_size = frames; in snd_pcm_oss_change_params_locked() 1213 snd_pcm_uframes_t frames; in snd_pcm_oss_capture_position_fixup() local 1225 frames = (*delay - runtime->buffer_size) + runtime->period_size - 1; in snd_pcm_oss_capture_position_fixup() [all …]
|
/sound/core/ |
D | pcm_compat.c | 29 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() 288 u32 frames; member 295 u32 frames; in snd_pcm_ioctl_xferi_compat() local 306 get_user(frames, &data32->frames)) in snd_pcm_ioctl_xferi_compat() 310 err = snd_pcm_lib_write(substream, compat_ptr(buf), frames); in snd_pcm_ioctl_xferi_compat() [all …]
|
D | pcm_lib.c | 34 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 …]
|
D | pcm_native.c | 718 snd_pcm_uframes_t frames; in snd_pcm_hw_params() local 791 frames = 1; in snd_pcm_hw_params() 794 frames *= 2; in snd_pcm_hw_params() 797 runtime->min_align = frames; in snd_pcm_hw_params() 2931 snd_pcm_uframes_t frames, in forward_appl_ptr() argument 2940 if (frames > (snd_pcm_uframes_t)avail) in forward_appl_ptr() 2941 frames = avail; in forward_appl_ptr() 2942 appl_ptr = runtime->control->appl_ptr + frames; in forward_appl_ptr() 2946 return ret < 0 ? ret : frames; in forward_appl_ptr() 2951 snd_pcm_uframes_t frames, in rewind_appl_ptr() argument [all …]
|
/sound/firewire/ |
D | amdtp-am824.c | 151 __be32 *buffer, unsigned int frames, in write_pcm_s32() argument 169 for (i = 0; i < frames; ++i) { in write_pcm_s32() 182 __be32 *buffer, unsigned int frames, in read_pcm_s32() argument 200 for (i = 0; i < frames; ++i) { in read_pcm_s32() 212 __be32 *buffer, unsigned int frames) in write_pcm_silence() argument 217 for (i = 0; i < frames; ++i) { in write_pcm_silence() 298 unsigned int frames, unsigned int data_block_counter) in write_midi_messages() argument 304 for (f = 0; f < frames; f++) { in write_midi_messages() 326 unsigned int frames, unsigned int data_block_counter) in read_midi_messages() argument 333 for (f = 0; f < frames; f++) { in read_midi_messages()
|
/sound/firewire/fireface/ |
D | amdtp-ff.c | 31 __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/ |
D | ua101.c | 211 unsigned int frames) in copy_playback_data() argument 220 if (stream->buffer_pos + frames <= runtime->buffer_size) { in copy_playback_data() 221 memcpy(urb->transfer_buffer, source, frames * frame_bytes); in copy_playback_data() 227 runtime->dma_area, (frames - frames1) * frame_bytes); in copy_playback_data() 230 stream->buffer_pos += frames; in copy_playback_data() 233 stream->period_pos += frames; in copy_playback_data() 253 unsigned int frames; in playback_work() local 276 frames = ua->rate_feedback[ua->rate_feedback_start]; in playback_work() 287 frames * ua->playback.frame_bytes; in playback_work() 291 frames); in playback_work() [all …]
|
/sound/firewire/motu/ |
D | amdtp-motu.c | 257 static void __maybe_unused copy_sph(u32 *frames, __be32 *buffer, in copy_sph() argument 264 *frames = be32_to_cpu(*buffer); in copy_sph() 266 frames++; in copy_sph() 271 static void __maybe_unused copy_message(u64 *frames, __be32 *buffer, in copy_message() argument 279 *frames = be32_to_cpu(buffer[1]); in copy_message() 280 *frames <<= 16; in copy_message() 281 *frames |= be32_to_cpu(buffer[2]) >> 16; in copy_message() 282 ++frames; in copy_message()
|
D | amdtp-motu-trace.h | 18 static void copy_message(u64 *frames, __be32 *buffer, unsigned int data_blocks,
|
/sound/firewire/tascam/ |
D | amdtp-tascam.c | 36 __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/ |
D | ac97c.c | 418 snd_pcm_uframes_t frames; in atmel_ac97c_playback_pointer() local 424 frames = bytes_to_frames(runtime, bytes); in atmel_ac97c_playback_pointer() 425 if (frames >= runtime->buffer_size) in atmel_ac97c_playback_pointer() 426 frames -= runtime->buffer_size; in atmel_ac97c_playback_pointer() 427 return frames; in atmel_ac97c_playback_pointer() 435 snd_pcm_uframes_t frames; in atmel_ac97c_capture_pointer() local 441 frames = bytes_to_frames(runtime, bytes); in atmel_ac97c_capture_pointer() 442 if (frames >= runtime->buffer_size) in atmel_ac97c_capture_pointer() 443 frames -= runtime->buffer_size; in atmel_ac97c_capture_pointer() 444 return frames; in atmel_ac97c_capture_pointer()
|
/sound/usb/line6/ |
D | capture.c | 92 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()
|
D | playback.c | 68 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/ |
D | amdtp-dot.c | 146 __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/ |
D | pcm.c | 1259 unsigned int stride, frames, bytes, oldptr; in retire_capture_urb() local 1284 frames = bytes / stride; in retire_capture_urb() 1286 bytes = frames * stride; in retire_capture_urb() 1289 bytes = frames * stride; in retire_capture_urb() 1300 frames = (bytes + (oldptr % stride)) / stride; in retire_capture_urb() 1301 subs->transfer_done += frames; in retire_capture_urb() 1466 unsigned int frames, bytes; in prepare_playback_urb() local 1475 frames = 0; in prepare_playback_urb() 1500 urb->iso_frame_desc[i].offset = frames * stride; in prepare_playback_urb() 1502 frames += counts; in prepare_playback_urb() [all …]
|
/sound/soc/fsl/ |
D | fsl_dma.c | 680 snd_pcm_uframes_t frames; in fsl_dma_pointer() local 716 frames = bytes_to_frames(runtime, position - dma_private->dma_buf_phys); in fsl_dma_pointer() 722 if (frames == runtime->buffer_size) in fsl_dma_pointer() 723 frames = 0; in fsl_dma_pointer() 725 return frames; in fsl_dma_pointer()
|
/sound/soc/ti/ |
D | omap-mcbsp.c | 760 struct snd_interval frames; in omap_mcbsp_hwrule_min_buffersize() local 763 snd_interval_any(&frames); in omap_mcbsp_hwrule_min_buffersize() 766 frames.min = size / channels->min; in omap_mcbsp_hwrule_min_buffersize() 767 frames.integer = 1; in omap_mcbsp_hwrule_min_buffersize() 768 return snd_interval_refine(buffer_size, &frames); in omap_mcbsp_hwrule_min_buffersize()
|