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>
9 * Application interface library for the ALSA driver
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.
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.
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
32 * \defgroup BConv Binary Value Conversion
33 * Helper macros to convert binary values to/from a specific byte order.
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)
56 #endif /* __ALSA_CONV_H */