diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-05-18 16:25:46 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-05-29 10:11:11 +0200 |
commit | 9502dcad6c1138a3ce2bae23ccd4be44c718d2a9 (patch) | |
tree | 008d96ca9953b55ba1bf3255e61e28de25997a0f /include/sound/pcm.h | |
parent | e5b3f45f5d442b57dd07dd4f914f7e6cf4d183f1 (diff) | |
download | kernel_samsung_smdk4412-9502dcad6c1138a3ce2bae23ccd4be44c718d2a9.zip kernel_samsung_smdk4412-9502dcad6c1138a3ce2bae23ccd4be44c718d2a9.tar.gz kernel_samsung_smdk4412-9502dcad6c1138a3ce2bae23ccd4be44c718d2a9.tar.bz2 |
[ALSA] Export missing snd_pcm_format_*()
PCM Midlevel
Export snd_pcm_format_size(). This function is used by some out-of-kernel
drivers.
Make snd_pcm_format_cpu_endian() macro for optimization.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound/pcm.h')
-rw-r--r-- | include/sound/pcm.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index 53fc04d..50a6ee1 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h @@ -922,8 +922,22 @@ int snd_pcm_format_unsigned(snd_pcm_format_t format); int snd_pcm_format_linear(snd_pcm_format_t format); int snd_pcm_format_little_endian(snd_pcm_format_t format); int snd_pcm_format_big_endian(snd_pcm_format_t format); +/** + * snd_pcm_format_cpu_endian - Check the PCM format is CPU-endian + * @format: the format to check + * + * Returns 1 if the given PCM format is CPU-endian, 0 if + * opposite, or a negative error code if endian not specified. + */ +/* int snd_pcm_format_cpu_endian(snd_pcm_format_t format); */ +#ifdef SNDRV_LITTLE_ENDIAN +#define snd_pcm_format_cpu_endian snd_pcm_format_little_endian +#else +#define snd_pcm_format_cpu_endian snd_pcm_format_big_endian +#endif int snd_pcm_format_width(snd_pcm_format_t format); /* in bits */ int snd_pcm_format_physical_width(snd_pcm_format_t format); /* in bits */ +ssize_t snd_pcm_format_size(snd_pcm_format_t format, size_t samples); const unsigned char *snd_pcm_format_silence_64(snd_pcm_format_t format); int snd_pcm_format_set_silence(snd_pcm_format_t format, void *buf, unsigned int frames); snd_pcm_format_t snd_pcm_build_linear_format(int width, int unsignd, int big_endian); |