Lines Matching full:format
36 struct snd_pcm_plugin_format *format; in snd_pcm_plugin_alloc() local
43 format = &plugin->src_format; in snd_pcm_plugin_alloc()
45 format = &plugin->dst_format; in snd_pcm_plugin_alloc()
47 width = snd_pcm_format_physical_width(format->format); in snd_pcm_plugin_alloc()
50 size = array3_size(frames, format->channels, width); in snd_pcm_plugin_alloc()
68 for (channel = 0; channel < format->channels; channel++, c++) { in snd_pcm_plugin_alloc()
74 c->area.step = format->channels * width; in snd_pcm_plugin_alloc()
77 if (snd_BUG_ON(size % format->channels)) in snd_pcm_plugin_alloc()
79 size /= format->channels; in snd_pcm_plugin_alloc()
80 for (channel = 0; channel < format->channels; channel++, c++) { in snd_pcm_plugin_alloc()
157 plugin->src_width = snd_pcm_format_physical_width(src_format->format); in snd_pcm_plugin_build()
160 plugin->dst_width = snd_pcm_format_physical_width(dst_format->format); in snd_pcm_plugin_build()
263 snd_pcm_format_t format) in snd_pcm_plug_formats() argument
281 return snd_mask_test(&formats, (__force int)format); in snd_pcm_plug_formats()
305 snd_pcm_format_t snd_pcm_plug_slave_format(snd_pcm_format_t format, in snd_pcm_plug_slave_format() argument
310 if (snd_mask_test(format_mask, (__force int)format)) in snd_pcm_plug_slave_format()
311 return format; in snd_pcm_plug_slave_format()
312 if (!snd_pcm_plug_formats(format_mask, format)) in snd_pcm_plug_slave_format()
314 if (snd_pcm_format_linear(format)) { in snd_pcm_plug_slave_format()
315 unsigned int width = snd_pcm_format_width(format); in snd_pcm_plug_slave_format()
316 int unsignd = snd_pcm_format_unsigned(format) > 0; in snd_pcm_plug_slave_format()
317 int big = snd_pcm_format_big_endian(format) > 0; in snd_pcm_plug_slave_format()
342 switch (format) { in snd_pcm_plug_slave_format()
372 dstformat.format = params_format(slave_params); in snd_pcm_plug_format_plugins()
375 srcformat.format = params_format(params); in snd_pcm_plug_format_plugins()
383 dstformat.format = params_format(params); in snd_pcm_plug_format_plugins()
386 srcformat.format = params_format(slave_params); in snd_pcm_plug_format_plugins()
399 pdprintf("srcformat: format=%i, rate=%i, channels=%i\n", in snd_pcm_plug_format_plugins()
400 srcformat.format, in snd_pcm_plug_format_plugins()
403 pdprintf("dstformat: format=%i, rate=%i, channels=%i\n", in snd_pcm_plug_format_plugins()
404 dstformat.format, in snd_pcm_plug_format_plugins()
408 /* Format change (linearization) */ in snd_pcm_plug_format_plugins()
410 ! snd_pcm_format_linear(srcformat.format)) { in snd_pcm_plug_format_plugins()
411 if (srcformat.format != SNDRV_PCM_FORMAT_MU_LAW) in snd_pcm_plug_format_plugins()
413 tmpformat.format = SNDRV_PCM_FORMAT_S16; in snd_pcm_plug_format_plugins()
446 if (srcformat.format != SNDRV_PCM_FORMAT_S16) { in snd_pcm_plug_format_plugins()
448 tmpformat.format = SNDRV_PCM_FORMAT_S16; in snd_pcm_plug_format_plugins()
478 /* format change */ in snd_pcm_plug_format_plugins()
479 if (srcformat.format != dstformat.format) { in snd_pcm_plug_format_plugins()
480 tmpformat.format = dstformat.format; in snd_pcm_plug_format_plugins()
481 if (srcformat.format == SNDRV_PCM_FORMAT_MU_LAW || in snd_pcm_plug_format_plugins()
482 tmpformat.format == SNDRV_PCM_FORMAT_MU_LAW) { in snd_pcm_plug_format_plugins()
487 else if (snd_pcm_format_linear(srcformat.format) && in snd_pcm_plug_format_plugins()
488 snd_pcm_format_linear(tmpformat.format)) { in snd_pcm_plug_format_plugins()
495 pdprintf("format change: src=%i, dst=%i returns %i\n", srcformat.format, tmpformat.format, err); in snd_pcm_plug_format_plugins()
549 struct snd_pcm_plugin_format *format; in snd_pcm_plug_client_channels_buf() local
557 format = &plugin->src_format; in snd_pcm_plug_client_channels_buf()
560 format = &plugin->dst_format; in snd_pcm_plug_client_channels_buf()
564 width = snd_pcm_format_physical_width(format->format); in snd_pcm_plug_client_channels_buf()
567 nchannels = format->channels; in snd_pcm_plug_client_channels_buf()
569 format->channels > 1)) in snd_pcm_plug_client_channels_buf()
658 size_t samples, snd_pcm_format_t format) in snd_pcm_area_silence() argument
668 width = snd_pcm_format_physical_width(format); in snd_pcm_area_silence()
672 return snd_pcm_format_set_silence(format, dst, samples); in snd_pcm_area_silence()
673 silence = snd_pcm_format_silence_64(format); in snd_pcm_area_silence()
705 size_t samples, snd_pcm_format_t format) in snd_pcm_area_copy() argument
713 return snd_pcm_area_silence(dst_area, dst_offset, samples, format); in snd_pcm_area_copy()
717 width = snd_pcm_format_physical_width(format); in snd_pcm_area_copy()