OSDN Git Service

original
[gb-231r1-is01/Gingerbread_2.3.3_r1_IS01.git] / prebuilt / linux-x86 / toolchain / i686-linux-glibc2.7-4.4.3 / sysroot / usr / include / alsa / conv.h
1 /**
2  * \file include/conv.h
3  * \brief Application interface library for the ALSA driver
4  * \author Jaroslav Kysela <perex@perex.cz>
5  * \author Abramo Bagnara <abramo@alsa-project.org>
6  * \author Takashi Iwai <tiwai@suse.de>
7  * \date 1998-2001
8  *
9  * Application interface library for the ALSA driver
10  */
11 /*
12  *   This library is free software; you can redistribute it and/or modify
13  *   it under the terms of the GNU Lesser General Public License as
14  *   published by the Free Software Foundation; either version 2.1 of
15  *   the License, or (at your option) any later version.
16  *
17  *   This program is distributed in the hope that it will be useful,
18  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
19  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  *   GNU Lesser General Public License for more details.
21  *
22  *   You should have received a copy of the GNU Lesser General Public
23  *   License along with this library; if not, write to the Free Software
24  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
25  *
26  */
27
28 #ifndef __ALSA_CONV_H
29 #define __ALSA_CONV_H
30
31 /**
32  *  \defgroup BConv Binary Value Conversion
33  *  Helper macros to convert binary values to/from a specific byte order.
34  *  \{
35  */
36
37 /** Converts a 16-bit value from host to little endian byte order. */
38 #define snd_host_to_LE_16(val)  __cpu_to_le16(val)
39 /** Converts a 16-bit value from little endian to host byte order. */
40 #define snd_LE_to_host_16(val)  __le16_to_cpu(val)
41 /** Converts a 32-bit value from host to little endian byte order. */
42 #define snd_host_to_LE_32(val)  __cpu_to_le32(val)
43 /** Converts a 32-bit value from little endian to host byte order. */
44 #define snd_LE_to_host_32(val)  __le32_to_cpu(val)
45 /** Converts a 16-bit value from host to big endian byte order. */
46 #define snd_host_to_BE_16(val)  __cpu_to_be16(val)
47 /** Converts a 16-bit value from big endian to host byte order. */
48 #define snd_BE_to_host_16(val)  __be16_to_cpu(val)
49 /** Converts a 32-bit value from host to big endian byte order. */
50 #define snd_host_to_BE_32(val)  __cpu_to_be32(val)
51 /** Converts a 32-bit value from big endian to host byte order. */
52 #define snd_BE_to_host_32(val)  __be32_to_cpu(val)
53
54 /** \} */
55
56 #endif /* __ALSA_CONV_H */
57