aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/sound/pcm.h14
-rw-r--r--sound/core/pcm.c1
-rw-r--r--sound/core/pcm_misc.c16
3 files changed, 15 insertions, 16 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 53fc04d75bad..50a6ee1aeab2 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);
922int snd_pcm_format_linear(snd_pcm_format_t format); 922int snd_pcm_format_linear(snd_pcm_format_t format);
923int snd_pcm_format_little_endian(snd_pcm_format_t format); 923int snd_pcm_format_little_endian(snd_pcm_format_t format);
924int snd_pcm_format_big_endian(snd_pcm_format_t format); 924int snd_pcm_format_big_endian(snd_pcm_format_t format);
925/**
926 * snd_pcm_format_cpu_endian - Check the PCM format is CPU-endian
927 * @format: the format to check
928 *
929 * Returns 1 if the given PCM format is CPU-endian, 0 if
930 * opposite, or a negative error code if endian not specified.
931 */
932/* int snd_pcm_format_cpu_endian(snd_pcm_format_t format); */
933#ifdef SNDRV_LITTLE_ENDIAN
934#define snd_pcm_format_cpu_endian snd_pcm_format_little_endian
935#else
936#define snd_pcm_format_cpu_endian snd_pcm_format_big_endian
937#endif
925int snd_pcm_format_width(snd_pcm_format_t format); /* in bits */ 938int snd_pcm_format_width(snd_pcm_format_t format); /* in bits */
926int snd_pcm_format_physical_width(snd_pcm_format_t format); /* in bits */ 939int snd_pcm_format_physical_width(snd_pcm_format_t format); /* in bits */
940ssize_t snd_pcm_format_size(snd_pcm_format_t format, size_t samples);
927const unsigned char *snd_pcm_format_silence_64(snd_pcm_format_t format); 941const unsigned char *snd_pcm_format_silence_64(snd_pcm_format_t format);
928int snd_pcm_format_set_silence(snd_pcm_format_t format, void *buf, unsigned int frames); 942int snd_pcm_format_set_silence(snd_pcm_format_t format, void *buf, unsigned int frames);
929snd_pcm_format_t snd_pcm_build_linear_format(int width, int unsignd, int big_endian); 943snd_pcm_format_t snd_pcm_build_linear_format(int width, int unsignd, int big_endian);
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index a2757fcec1f0..d57f4ec3b08b 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -1069,6 +1069,7 @@ EXPORT_SYMBOL(snd_pcm_format_little_endian);
1069EXPORT_SYMBOL(snd_pcm_format_big_endian); 1069EXPORT_SYMBOL(snd_pcm_format_big_endian);
1070EXPORT_SYMBOL(snd_pcm_format_width); 1070EXPORT_SYMBOL(snd_pcm_format_width);
1071EXPORT_SYMBOL(snd_pcm_format_physical_width); 1071EXPORT_SYMBOL(snd_pcm_format_physical_width);
1072EXPORT_SYMBOL(snd_pcm_format_size);
1072EXPORT_SYMBOL(snd_pcm_format_silence_64); 1073EXPORT_SYMBOL(snd_pcm_format_silence_64);
1073EXPORT_SYMBOL(snd_pcm_format_set_silence); 1074EXPORT_SYMBOL(snd_pcm_format_set_silence);
1074EXPORT_SYMBOL(snd_pcm_build_linear_format); 1075EXPORT_SYMBOL(snd_pcm_build_linear_format);
diff --git a/sound/core/pcm_misc.c b/sound/core/pcm_misc.c
index 422b8db14154..1453743e4da0 100644
--- a/sound/core/pcm_misc.c
+++ b/sound/core/pcm_misc.c
@@ -270,22 +270,6 @@ int snd_pcm_format_big_endian(snd_pcm_format_t format)
270} 270}
271 271
272/** 272/**
273 * snd_pcm_format_cpu_endian - Check the PCM format is CPU-endian
274 * @format: the format to check
275 *
276 * Returns 1 if the given PCM format is CPU-endian, 0 if
277 * opposite, or a negative error code if endian not specified.
278 */
279int snd_pcm_format_cpu_endian(snd_pcm_format_t format)
280{
281#ifdef SNDRV_LITTLE_ENDIAN
282 return snd_pcm_format_little_endian(format);
283#else
284 return snd_pcm_format_big_endian(format);
285#endif
286}
287
288/**
289 * snd_pcm_format_width - return the bit-width of the format 273 * snd_pcm_format_width - return the bit-width of the format
290 * @format: the format to check 274 * @format: the format to check
291 * 275 *