#include <sound/pcm.h>
#define SND_PCM_FORMAT_UNKNOWN (-1)
+/* NOTE: "signed" prefix must be given below since the default char is
+ * unsigned on some architectures!
+ */
struct pcm_format_data {
- char width; /* bit width */
- char phys; /* physical bit width */
- char le; /* 0 = big-endian, 1 = little-endian, -1 = others */
- char signd; /* 0 = unsigned, 1 = signed, -1 = others */
+ unsigned char width; /* bit width */
+ unsigned char phys; /* physical bit width */
+ signed char le; /* 0 = big-endian, 1 = little-endian, -1 = others */
+ signed char signd; /* 0 = unsigned, 1 = signed, -1 = others */
unsigned char silence[8]; /* silence data to fill */
};
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
*
* Returns zero if successful.
*/
-int snd_pcm_limit_hw_rates(snd_pcm_runtime_t *runtime)
+int snd_pcm_limit_hw_rates(struct snd_pcm_runtime *runtime)
{
static unsigned rates[] = {
/* ATTENTION: these values depend on the definition in pcm.h! */