Lines Matching full:format

45 static bool valid_format(snd_pcm_format_t format)  in valid_format()  argument
47 return (INT)format >= 0 && (INT)format <= (INT)SNDRV_PCM_FORMAT_LAST; in valid_format()
194 /* FIXME: the following format is not defined properly yet */
258 * snd_pcm_format_signed - Check the PCM format is signed linear
259 * @format: the format to check
261 * Return: 1 if the given PCM format is signed linear, 0 if unsigned
264 int snd_pcm_format_signed(snd_pcm_format_t format) in snd_pcm_format_signed() argument
267 if (!valid_format(format)) in snd_pcm_format_signed()
269 val = pcm_formats[(INT)format].signd; in snd_pcm_format_signed()
277 * snd_pcm_format_unsigned - Check the PCM format is unsigned linear
278 * @format: the format to check
280 * Return: 1 if the given PCM format is unsigned linear, 0 if signed
283 int snd_pcm_format_unsigned(snd_pcm_format_t format) in snd_pcm_format_unsigned() argument
287 val = snd_pcm_format_signed(format); in snd_pcm_format_unsigned()
295 * snd_pcm_format_linear - Check the PCM format is linear
296 * @format: the format to check
298 * Return: 1 if the given PCM format is linear, 0 if not.
300 int snd_pcm_format_linear(snd_pcm_format_t format) in snd_pcm_format_linear() argument
302 return snd_pcm_format_signed(format) >= 0; in snd_pcm_format_linear()
307 * snd_pcm_format_little_endian - Check the PCM format is little-endian
308 * @format: the format to check
310 * Return: 1 if the given PCM format is little-endian, 0 if
313 int snd_pcm_format_little_endian(snd_pcm_format_t format) in snd_pcm_format_little_endian() argument
316 if (!valid_format(format)) in snd_pcm_format_little_endian()
318 val = pcm_formats[(INT)format].le; in snd_pcm_format_little_endian()
326 * snd_pcm_format_big_endian - Check the PCM format is big-endian
327 * @format: the format to check
329 * Return: 1 if the given PCM format is big-endian, 0 if
332 int snd_pcm_format_big_endian(snd_pcm_format_t format) in snd_pcm_format_big_endian() argument
336 val = snd_pcm_format_little_endian(format); in snd_pcm_format_big_endian()
344 * snd_pcm_format_width - return the bit-width of the format
345 * @format: the format to check
347 * Return: The bit-width of the format, or a negative error code
348 * if unknown format.
350 int snd_pcm_format_width(snd_pcm_format_t format) in snd_pcm_format_width() argument
353 if (!valid_format(format)) in snd_pcm_format_width()
355 val = pcm_formats[(INT)format].width; in snd_pcm_format_width()
363 * snd_pcm_format_physical_width - return the physical bit-width of the format
364 * @format: the format to check
366 * Return: The physical bit-width of the format, or a negative error code
367 * if unknown format.
369 int snd_pcm_format_physical_width(snd_pcm_format_t format) in snd_pcm_format_physical_width() argument
372 if (!valid_format(format)) in snd_pcm_format_physical_width()
374 val = pcm_formats[(INT)format].phys; in snd_pcm_format_physical_width()
382 * snd_pcm_format_size - return the byte size of samples on the given format
383 * @format: the format to check
386 * Return: The byte size of the given samples for the format, or a
387 * negative error code if unknown format.
389 ssize_t snd_pcm_format_size(snd_pcm_format_t format, size_t samples) in snd_pcm_format_size() argument
391 int phys_width = snd_pcm_format_physical_width(format); in snd_pcm_format_size()
400 * @format: the format to check
402 * Return: The format pattern to fill or %NULL if error.
404 const unsigned char *snd_pcm_format_silence_64(snd_pcm_format_t format) in snd_pcm_format_silence_64() argument
406 if (!valid_format(format)) in snd_pcm_format_silence_64()
408 if (! pcm_formats[(INT)format].phys) in snd_pcm_format_silence_64()
410 return pcm_formats[(INT)format].silence; in snd_pcm_format_silence_64()
416 * @format: the PCM format
424 int snd_pcm_format_set_silence(snd_pcm_format_t format, void *data, unsigned int samples) in snd_pcm_format_set_silence() argument
430 if (!valid_format(format)) in snd_pcm_format_set_silence()
434 width = pcm_formats[(INT)format].phys; /* physical width */ in snd_pcm_format_set_silence()
435 pat = pcm_formats[(INT)format].silence; in snd_pcm_format_set_silence()
439 if (pcm_formats[(INT)format].signd == 1 || width <= 8) { in snd_pcm_format_set_silence()