summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-06-03 14:35:44 +0200
committerTakashi Iwai <tiwai@suse.de>2011-06-03 14:35:44 +0200
commit36d642f4481b54c035782ec1a71f7c67f64ed3bf (patch)
treeb16ba663a0922ccfe6513d44bc50879ffbee73d1
parentce2d64b48addd16c2ba25c76b795a9f7b277e642 (diff)
downloadalsa-utils-36d642f4481b54c035782ec1a71f7c67f64ed3bf.tar.gz
aplay: Use standard endian convesions
asm/*.h stuff shouldn't be used directly from the user-space apps. Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--aplay/aplay.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/aplay/aplay.c b/aplay/aplay.c
index 7175652..50e01ef 100644
--- a/aplay/aplay.c
+++ b/aplay/aplay.c
@@ -48,7 +48,7 @@
#include <sys/signal.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include <asm/byteorder.h>
+#include <endian.h>
#include "aconfig.h"
#include "gettext.h"
#include "formats.h"
@@ -1508,9 +1508,9 @@ static void compute_max_peak(u_char *data, size_t count)
c = 0;
while (count-- > 0) {
if (format_little_endian)
- sval = __le16_to_cpu(*valp);
+ sval = le16toh(*valp);
else
- sval = __be16_to_cpu(*valp);
+ sval = be16toh(*valp);
sval = abs(sval) ^ mask;
if (max_peak[c] < sval)
max_peak[c] = sval;
@@ -1553,9 +1553,9 @@ static void compute_max_peak(u_char *data, size_t count)
c = 0;
while (count-- > 0) {
if (format_little_endian)
- val = __le32_to_cpu(*valp);
+ val = le32toh(*valp);
else
- val = __be32_to_cpu(*valp);
+ val = be32toh(*valp);
val = abs(val) ^ mask;
if (max_peak[c] < val)
max_peak[c] = val;