summaryrefslogtreecommitdiff
path: root/debian/include-alsa/alsa/conv.h
diff options
context:
space:
mode:
authorMichael Gilbert <mgilbert@debian.org>2012-12-16 01:04:52 +0000
committerIgor Pashev <pashev.igor@gmail.com>2013-05-03 21:08:44 +0400
commit76c556de8989df3905e066f13cd91190093402ff (patch)
treef417353f49aa7ad35745c6cdd6148f1651b0a903 /debian/include-alsa/alsa/conv.h
parent1058def8e7827e56ce4a70afb4aeacb5dc44148f (diff)
downloadoss4-debian/4.2-build2006-2+deb7u1.tar.gz
Imported Debian patch 4.2-build2006-2+deb7u1debian/4.2-build2006-2+deb7u1
Diffstat (limited to 'debian/include-alsa/alsa/conv.h')
-rw-r--r--debian/include-alsa/alsa/conv.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/debian/include-alsa/alsa/conv.h b/debian/include-alsa/alsa/conv.h
new file mode 100644
index 0000000..a326898
--- /dev/null
+++ b/debian/include-alsa/alsa/conv.h
@@ -0,0 +1,57 @@
+/**
+ * \file <file/conv.h>
+ * \brief Application interface library for the ALSA driver
+ * \author Jaroslav Kysela <perex@suse.cz>
+ * \author Abramo Bagnara <abramo@alsa-project.org>
+ * \author Takashi Iwai <tiwai@suse.de>
+ * \date 1998-2001
+ *
+ * Application interface library for the ALSA driver
+ */
+/*
+ * This library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#ifndef __ALSA_CONV_H
+#define __ALSA_CONV_H
+
+/**
+ * \defgroup BConv Binary Value Conversion
+ * Helper macros to convert binary values to/from a specific byte order.
+ * \{
+ */
+
+/** Converts a 16-bit value from host to little endian byte order. */
+#define snd_host_to_LE_16(val) __cpu_to_le16(val)
+/** Converts a 16-bit value from little endian to host byte order. */
+#define snd_LE_to_host_16(val) __le16_to_cpu(val)
+/** Converts a 32-bit value from host to little endian byte order. */
+#define snd_host_to_LE_32(val) __cpu_to_le32(val)
+/** Converts a 32-bit value from little endian to host byte order. */
+#define snd_LE_to_host_32(val) __le32_to_cpu(val)
+/** Converts a 16-bit value from host to big endian byte order. */
+#define snd_host_to_BE_16(val) __cpu_to_be16(val)
+/** Converts a 16-bit value from big endian to host byte order. */
+#define snd_BE_to_host_16(val) __be16_to_cpu(val)
+/** Converts a 32-bit value from host to big endian byte order. */
+#define snd_host_to_BE_32(val) __cpu_to_be32(val)
+/** Converts a 32-bit value from big endian to host byte order. */
+#define snd_BE_to_host_32(val) __be32_to_cpu(val)
+
+/** \} */
+
+#endif /* __ALSA_CONV_H */
+