Lines Matching full:format
189 /* FIXME: the following format is not defined properly yet */
253 * snd_pcm_format_signed - Check the PCM format is signed linear
254 * @format: the format to check
256 * Return: 1 if the given PCM format is signed linear, 0 if unsigned
259 int snd_pcm_format_signed(snd_pcm_format_t format) in snd_pcm_format_signed() argument
262 if ((INT)format < 0 || (INT)format > (INT)SNDRV_PCM_FORMAT_LAST) in snd_pcm_format_signed()
264 if ((val = pcm_formats[(INT)format].signd) < 0) in snd_pcm_format_signed()
271 * snd_pcm_format_unsigned - Check the PCM format is unsigned linear
272 * @format: the format to check
274 * Return: 1 if the given PCM format is unsigned linear, 0 if signed
277 int snd_pcm_format_unsigned(snd_pcm_format_t format) in snd_pcm_format_unsigned() argument
281 val = snd_pcm_format_signed(format); in snd_pcm_format_unsigned()
289 * snd_pcm_format_linear - Check the PCM format is linear
290 * @format: the format to check
292 * Return: 1 if the given PCM format is linear, 0 if not.
294 int snd_pcm_format_linear(snd_pcm_format_t format) in snd_pcm_format_linear() argument
296 return snd_pcm_format_signed(format) >= 0; in snd_pcm_format_linear()
301 * snd_pcm_format_little_endian - Check the PCM format is little-endian
302 * @format: the format to check
304 * Return: 1 if the given PCM format is little-endian, 0 if
307 int snd_pcm_format_little_endian(snd_pcm_format_t format) in snd_pcm_format_little_endian() argument
310 if ((INT)format < 0 || (INT)format > (INT)SNDRV_PCM_FORMAT_LAST) in snd_pcm_format_little_endian()
312 if ((val = pcm_formats[(INT)format].le) < 0) in snd_pcm_format_little_endian()
319 * snd_pcm_format_big_endian - Check the PCM format is big-endian
320 * @format: the format to check
322 * Return: 1 if the given PCM format is big-endian, 0 if
325 int snd_pcm_format_big_endian(snd_pcm_format_t format) in snd_pcm_format_big_endian() argument
329 val = snd_pcm_format_little_endian(format); in snd_pcm_format_big_endian()
337 * snd_pcm_format_width - return the bit-width of the format
338 * @format: the format to check
340 * Return: The bit-width of the format, or a negative error code
341 * if unknown format.
343 int snd_pcm_format_width(snd_pcm_format_t format) in snd_pcm_format_width() argument
346 if ((INT)format < 0 || (INT)format > (INT)SNDRV_PCM_FORMAT_LAST) in snd_pcm_format_width()
348 if ((val = pcm_formats[(INT)format].width) == 0) in snd_pcm_format_width()
355 * snd_pcm_format_physical_width - return the physical bit-width of the format
356 * @format: the format to check
358 * Return: The physical bit-width of the format, or a negative error code
359 * if unknown format.
361 int snd_pcm_format_physical_width(snd_pcm_format_t format) in snd_pcm_format_physical_width() argument
364 if ((INT)format < 0 || (INT)format > (INT)SNDRV_PCM_FORMAT_LAST) in snd_pcm_format_physical_width()
366 if ((val = pcm_formats[(INT)format].phys) == 0) in snd_pcm_format_physical_width()
373 * snd_pcm_format_size - return the byte size of samples on the given format
374 * @format: the format to check
377 * Return: The byte size of the given samples for the format, or a
378 * negative error code if unknown format.
380 ssize_t snd_pcm_format_size(snd_pcm_format_t format, size_t samples) in snd_pcm_format_size() argument
382 int phys_width = snd_pcm_format_physical_width(format); in snd_pcm_format_size()
391 * @format: the format to check
393 * Return: The format pattern to fill or %NULL if error.
395 const unsigned char *snd_pcm_format_silence_64(snd_pcm_format_t format) in snd_pcm_format_silence_64() argument
397 if ((INT)format < 0 || (INT)format > (INT)SNDRV_PCM_FORMAT_LAST) in snd_pcm_format_silence_64()
399 if (! pcm_formats[(INT)format].phys) in snd_pcm_format_silence_64()
401 return pcm_formats[(INT)format].silence; in snd_pcm_format_silence_64()
407 * @format: the PCM format
415 int snd_pcm_format_set_silence(snd_pcm_format_t format, void *data, unsigned int samples) in snd_pcm_format_set_silence() argument
420 if ((INT)format < 0 || (INT)format > (INT)SNDRV_PCM_FORMAT_LAST) in snd_pcm_format_set_silence()
424 width = pcm_formats[(INT)format].phys; /* physical width */ in snd_pcm_format_set_silence()
425 pat = pcm_formats[(INT)format].silence; in snd_pcm_format_set_silence()
429 if (pcm_formats[(INT)format].signd == 1 || width <= 8) { in snd_pcm_format_set_silence()