• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/sound/core/

Lines Matching defs:format

208  * snd_pcm_format_signed - Check the PCM format is signed linear
209 * @format: the format to check
211 * Returns 1 if the given PCM format is signed linear, 0 if unsigned
214 int snd_pcm_format_signed(snd_pcm_format_t format)
217 if (format < 0 || format > SNDRV_PCM_FORMAT_LAST)
219 if ((val = pcm_formats[format].signd) < 0)
227 * snd_pcm_format_unsigned - Check the PCM format is unsigned linear
228 * @format: the format to check
230 * Returns 1 if the given PCM format is unsigned linear, 0 if signed
233 int snd_pcm_format_unsigned(snd_pcm_format_t format)
237 val = snd_pcm_format_signed(format);
246 * snd_pcm_format_linear - Check the PCM format is linear
247 * @format: the format to check
249 * Returns 1 if the given PCM format is linear, 0 if not.
251 int snd_pcm_format_linear(snd_pcm_format_t format)
253 return snd_pcm_format_signed(format) >= 0;
259 * snd_pcm_format_little_endian - Check the PCM format is little-endian
260 * @format: the format to check
262 * Returns 1 if the given PCM format is little-endian, 0 if
265 int snd_pcm_format_little_endian(snd_pcm_format_t format)
268 if (format < 0 || format > SNDRV_PCM_FORMAT_LAST)
270 if ((val = pcm_formats[format].le) < 0)
278 * snd_pcm_format_big_endian - Check the PCM format is big-endian
279 * @format: the format to check
281 * Returns 1 if the given PCM format is big-endian, 0 if
284 int snd_pcm_format_big_endian(snd_pcm_format_t format)
288 val = snd_pcm_format_little_endian(format);
297 * snd_pcm_format_width - return the bit-width of the format
298 * @format: the format to check
300 * Returns the bit-width of the format, or a negative error code
301 * if unknown format.
303 int snd_pcm_format_width(snd_pcm_format_t format)
306 if (format < 0 || format > SNDRV_PCM_FORMAT_LAST)
308 if ((val = pcm_formats[format].width) == 0)
316 * snd_pcm_format_physical_width - return the physical bit-width of the format
317 * @format: the format to check
319 * Returns the physical bit-width of the format, or a negative error code
320 * if unknown format.
322 int snd_pcm_format_physical_width(snd_pcm_format_t format)
325 if (format < 0 || format > SNDRV_PCM_FORMAT_LAST)
327 if ((val = pcm_formats[format].phys) == 0)
335 * snd_pcm_format_size - return the byte size of samples on the given format
336 * @format: the format to check
339 * Returns the byte size of the given samples for the format, or a
340 * negative error code if unknown format.
342 ssize_t snd_pcm_format_size(snd_pcm_format_t format, size_t samples)
344 int phys_width = snd_pcm_format_physical_width(format);
354 * @format: the format to check
356 * Returns the format pattern to fill or NULL if error.
358 const unsigned char *snd_pcm_format_silence_64(snd_pcm_format_t format)
360 if (format < 0 || format > SNDRV_PCM_FORMAT_LAST)
362 if (! pcm_formats[format].phys)
364 return pcm_formats[format].silence;
371 * @format: the PCM format
379 int snd_pcm_format_set_silence(snd_pcm_format_t format, void *data, unsigned int samples)
384 if (format < 0 || format > SNDRV_PCM_FORMAT_LAST)
388 width = pcm_formats[format].phys; /* physical width */
389 pat = pcm_formats[format].silence;
393 if (pcm_formats[format].signd == 1 || width <= 8) {