Lines Matching full:format

51 	struct snd_pcm_plugin_format *format;  in snd_pcm_plugin_alloc()  local
58 format = &plugin->src_format; in snd_pcm_plugin_alloc()
60 format = &plugin->dst_format; in snd_pcm_plugin_alloc()
62 if ((width = snd_pcm_format_physical_width(format->format)) < 0) in snd_pcm_plugin_alloc()
64 size = frames * format->channels * width; in snd_pcm_plugin_alloc()
79 for (channel = 0; channel < format->channels; channel++, c++) { in snd_pcm_plugin_alloc()
85 c->area.step = format->channels * width; in snd_pcm_plugin_alloc()
88 if (snd_BUG_ON(size % format->channels)) in snd_pcm_plugin_alloc()
90 size /= format->channels; in snd_pcm_plugin_alloc()
91 for (channel = 0; channel < format->channels; channel++, c++) { in snd_pcm_plugin_alloc()
168 plugin->src_width = snd_pcm_format_physical_width(src_format->format); in snd_pcm_plugin_build()
171 plugin->dst_width = snd_pcm_format_physical_width(dst_format->format); in snd_pcm_plugin_build()
274 snd_pcm_format_t format) in snd_pcm_plug_formats() argument
292 return snd_mask_test(&formats, (__force int)format); in snd_pcm_plug_formats()
316 snd_pcm_format_t snd_pcm_plug_slave_format(snd_pcm_format_t format, in snd_pcm_plug_slave_format() argument
321 if (snd_mask_test(format_mask, (__force int)format)) in snd_pcm_plug_slave_format()
322 return format; in snd_pcm_plug_slave_format()
323 if (!snd_pcm_plug_formats(format_mask, format)) in snd_pcm_plug_slave_format()
325 if (snd_pcm_format_linear(format)) { in snd_pcm_plug_slave_format()
326 unsigned int width = snd_pcm_format_width(format); in snd_pcm_plug_slave_format()
327 int unsignd = snd_pcm_format_unsigned(format) > 0; in snd_pcm_plug_slave_format()
328 int big = snd_pcm_format_big_endian(format) > 0; in snd_pcm_plug_slave_format()
353 switch (format) { in snd_pcm_plug_slave_format()
383 dstformat.format = params_format(slave_params); in snd_pcm_plug_format_plugins()
386 srcformat.format = params_format(params); in snd_pcm_plug_format_plugins()
394 dstformat.format = params_format(params); in snd_pcm_plug_format_plugins()
397 srcformat.format = params_format(slave_params); in snd_pcm_plug_format_plugins()
410 pdprintf("srcformat: format=%i, rate=%i, channels=%i\n", in snd_pcm_plug_format_plugins()
411 srcformat.format, in snd_pcm_plug_format_plugins()
414 pdprintf("dstformat: format=%i, rate=%i, channels=%i\n", in snd_pcm_plug_format_plugins()
415 dstformat.format, in snd_pcm_plug_format_plugins()
419 /* Format change (linearization) */ in snd_pcm_plug_format_plugins()
421 ! snd_pcm_format_linear(srcformat.format)) { in snd_pcm_plug_format_plugins()
422 if (srcformat.format != SNDRV_PCM_FORMAT_MU_LAW) in snd_pcm_plug_format_plugins()
424 tmpformat.format = SNDRV_PCM_FORMAT_S16; in snd_pcm_plug_format_plugins()
457 if (srcformat.format != SNDRV_PCM_FORMAT_S16) { in snd_pcm_plug_format_plugins()
459 tmpformat.format = SNDRV_PCM_FORMAT_S16; in snd_pcm_plug_format_plugins()
489 /* format change */ in snd_pcm_plug_format_plugins()
490 if (srcformat.format != dstformat.format) { in snd_pcm_plug_format_plugins()
491 tmpformat.format = dstformat.format; in snd_pcm_plug_format_plugins()
492 if (srcformat.format == SNDRV_PCM_FORMAT_MU_LAW || in snd_pcm_plug_format_plugins()
493 tmpformat.format == SNDRV_PCM_FORMAT_MU_LAW) { in snd_pcm_plug_format_plugins()
498 else if (snd_pcm_format_linear(srcformat.format) && in snd_pcm_plug_format_plugins()
499 snd_pcm_format_linear(tmpformat.format)) { in snd_pcm_plug_format_plugins()
506 pdprintf("format change: src=%i, dst=%i returns %i\n", srcformat.format, tmpformat.format, err); in snd_pcm_plug_format_plugins()
560 struct snd_pcm_plugin_format *format; in snd_pcm_plug_client_channels_buf() local
568 format = &plugin->src_format; in snd_pcm_plug_client_channels_buf()
571 format = &plugin->dst_format; in snd_pcm_plug_client_channels_buf()
575 if ((width = snd_pcm_format_physical_width(format->format)) < 0) in snd_pcm_plug_client_channels_buf()
577 nchannels = format->channels; in snd_pcm_plug_client_channels_buf()
579 format->channels > 1)) in snd_pcm_plug_client_channels_buf()
664 size_t samples, snd_pcm_format_t format) in snd_pcm_area_silence() argument
674 width = snd_pcm_format_physical_width(format); in snd_pcm_area_silence()
678 return snd_pcm_format_set_silence(format, dst, samples); in snd_pcm_area_silence()
679 silence = snd_pcm_format_silence_64(format); in snd_pcm_area_silence()
711 size_t samples, snd_pcm_format_t format) in snd_pcm_area_copy() argument
719 return snd_pcm_area_silence(dst_area, dst_offset, samples, format); in snd_pcm_area_copy()
723 width = snd_pcm_format_physical_width(format); in snd_pcm_area_copy()