Lines Matching +full:convert +full:- +full:rate

2  *  PCM Interface - misc routines
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 #define SND_PCM_FORMAT_UNKNOWN (-1)
37 signed char le; /* 0 = big-endian, 1 = little-endian, -1 = others */
38 signed char signd; /* 0 = unsigned, 1 = signed, -1 = others */
52 .width = 8, .phys = 8, .le = -1, .signd = 1,
56 .width = 8, .phys = 8, .le = -1, .signd = 0,
108 .width = 32, .phys = 32, .le = 1, .signd = -1,
112 .width = 32, .phys = 32, .le = 0, .signd = -1,
116 .width = 64, .phys = 64, .le = 1, .signd = -1,
120 .width = 64, .phys = 64, .le = 0, .signd = -1,
124 .width = 32, .phys = 32, .le = 1, .signd = -1,
128 .width = 32, .phys = 32, .le = 0, .signd = -1,
132 .width = 8, .phys = 8, .le = -1, .signd = -1,
136 .width = 8, .phys = 8, .le = -1, .signd = -1,
140 .width = 4, .phys = 4, .le = -1, .signd = -1,
144 .width = 3, .phys = 3, .le = -1, .signd = -1,
148 .width = 5, .phys = 5, .le = -1, .signd = -1,
173 .le = -1, .signd = -1,
176 .le = -1, .signd = -1,
196 .le = -1, .signd = -1,
247 .width = 3, .phys = 8, .le = -1, .signd = -1,
251 .width = 5, .phys = 8, .le = -1, .signd = -1,
258 * snd_pcm_format_signed - Check the PCM format is signed linear
262 * linear, and a negative error code for non-linear formats.
268 return -EINVAL; in snd_pcm_format_signed()
271 return -EINVAL; in snd_pcm_format_signed()
277 * snd_pcm_format_unsigned - Check the PCM format is unsigned linear
281 * linear, and a negative error code for non-linear formats.
295 * snd_pcm_format_linear - Check the PCM format is linear
307 * snd_pcm_format_little_endian - Check the PCM format is little-endian
310 * Return: 1 if the given PCM format is little-endian, 0 if
311 * big-endian, or a negative error code if endian not specified.
317 return -EINVAL; in snd_pcm_format_little_endian()
320 return -EINVAL; in snd_pcm_format_little_endian()
326 * snd_pcm_format_big_endian - Check the PCM format is big-endian
329 * Return: 1 if the given PCM format is big-endian, 0 if
330 * little-endian, or a negative error code if endian not specified.
344 * snd_pcm_format_width - return the bit-width of the format
347 * Return: The bit-width of the format, or a negative error code
354 return -EINVAL; in snd_pcm_format_width()
357 return -EINVAL; in snd_pcm_format_width()
363 * snd_pcm_format_physical_width - return the physical bit-width of the format
366 * Return: The physical bit-width of the format, or a negative error code
373 return -EINVAL; in snd_pcm_format_physical_width()
376 return -EINVAL; in snd_pcm_format_physical_width()
382 * snd_pcm_format_size - return the byte size of samples on the given format
384 * @samples: sampling rate
393 return -EINVAL; in snd_pcm_format_size()
399 * snd_pcm_format_silence_64 - return the silent data in 8 bytes array
415 * snd_pcm_format_set_silence - set the silence data on the buffer
431 return -EINVAL; in snd_pcm_format_set_silence()
437 return -EINVAL; in snd_pcm_format_set_silence()
444 /* non-zero samples, fill using a loop */ in snd_pcm_format_set_silence()
448 while (samples--) { in snd_pcm_format_set_silence()
456 while (samples--) { in snd_pcm_format_set_silence()
462 while (samples--) { in snd_pcm_format_set_silence()
468 while (samples--) { in snd_pcm_format_set_silence()
474 while (samples--) { in snd_pcm_format_set_silence()
486 * snd_pcm_hw_limit_rates - determine rate_min/rate_max fields
502 if (hw->rates & (1 << i)) { in snd_pcm_hw_limit_rates()
508 return -EINVAL; in snd_pcm_hw_limit_rates()
509 hw->rate_min = rmin; in snd_pcm_hw_limit_rates()
510 hw->rate_max = rmax; in snd_pcm_hw_limit_rates()
516 * snd_pcm_rate_to_rate_bit - converts sample rate to SNDRV_PCM_RATE_xxx bit
517 * @rate: the sample rate to convert
519 * Return: The SNDRV_PCM_RATE_xxx flag that corresponds to the given rate, or
520 * SNDRV_PCM_RATE_KNOT for an unknown rate.
522 unsigned int snd_pcm_rate_to_rate_bit(unsigned int rate) in snd_pcm_rate_to_rate_bit() argument
527 if (snd_pcm_known_rates.list[i] == rate) in snd_pcm_rate_to_rate_bit()
534 * snd_pcm_rate_bit_to_rate - converts SNDRV_PCM_RATE_xxx bit to sample rate
535 * @rate_bit: the rate bit to convert
537 * Return: The sample rate that corresponds to the given SNDRV_PCM_RATE_xxx flag
538 * or 0 for an unknown rate bit.
561 * snd_pcm_rate_mask_intersect - computes the intersection between two rate masks
562 * @rates_a: The first rate mask
563 * @rates_b: The second rate mask
565 * This function computes the rates that are supported by both rate masks passed
569 * Return: A rate mask containing the rates that are supported by both rates_a
591 * snd_pcm_rate_range_to_bits - converts rate range to SNDRV_PCM_RATE_xxx bit
592 * @rate_min: the minimum sample rate
593 * @rate_max: the maximum sample rate
596 * only the pre-defined rates like 44100 or 16000.
598 * Return: The SNDRV_PCM_RATE_xxx flag that corresponds to the given rate range,