[ALSA] Export missing snd_pcm_format_*()
authorTakashi Iwai <tiwai@suse.de>
Wed, 18 May 2005 14:25:46 +0000 (16:25 +0200)
committerJaroslav Kysela <perex@suse.cz>
Sun, 29 May 2005 08:11:11 +0000 (10:11 +0200)
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>
include/sound/pcm.h
sound/core/pcm.c
sound/core/pcm_misc.c

index 53fc04d75badf3be8c27075d2d84afe1965bf1f3..50a6ee1aeab20b064696b6ce7f8ec4c5cbafa6ef 100644 (file)
@@ -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);
index a2757fcec1f0ebf2311c83cec25055dee1816b25..d57f4ec3b08bf021f75dddbfe5205bd6d3b9f37a 100644 (file)
@@ -1069,6 +1069,7 @@ EXPORT_SYMBOL(snd_pcm_format_little_endian);
 EXPORT_SYMBOL(snd_pcm_format_big_endian);
 EXPORT_SYMBOL(snd_pcm_format_width);
 EXPORT_SYMBOL(snd_pcm_format_physical_width);
+EXPORT_SYMBOL(snd_pcm_format_size);
 EXPORT_SYMBOL(snd_pcm_format_silence_64);
 EXPORT_SYMBOL(snd_pcm_format_set_silence);
 EXPORT_SYMBOL(snd_pcm_build_linear_format);
index 422b8db141547fe07b1c69b817ad7de79a651a3b..1453743e4da0ed1f1eb9169bbb7651af63aaf7e0 100644 (file)
@@ -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