mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[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>
This commit is contained in:
parent
e5b3f45f5d
commit
9502dcad6c
3 changed files with 15 additions and 16 deletions
|
@ -269,22 +269,6 @@ int snd_pcm_format_big_endian(snd_pcm_format_t format)
|
|||
return !val;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
return snd_pcm_format_little_endian(format);
|
||||
#else
|
||||
return snd_pcm_format_big_endian(format);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* snd_pcm_format_width - return the bit-width of the format
|
||||
* @format: the format to check
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue