Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jun 2009 03:56:24 +0000 (UTC)
From:      Ariff Abdullah <ariff@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r193886 - in head/sys: dev/sound/pcm sys
Message-ID:  <200906100356.n5A3uOWj093185@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ariff
Date: Wed Jun 10 03:56:24 2009
New Revision: 193886
URL: http://svn.freebsd.org/changeset/base/193886

Log:
  Move machine dependant AFMT_* definition from sound.h
  to global soundcard.h .

Modified:
  head/sys/dev/sound/pcm/sound.h
  head/sys/sys/soundcard.h

Modified: head/sys/dev/sound/pcm/sound.h
==============================================================================
--- head/sys/dev/sound/pcm/sound.h	Wed Jun 10 03:35:40 2009	(r193885)
+++ head/sys/dev/sound/pcm/sound.h	Wed Jun 10 03:56:24 2009	(r193886)
@@ -257,36 +257,6 @@ struct snd_mixer;
 #define AFMT_U8_NE	AFMT_U8
 #define AFMT_S8_NE	AFMT_S8
 
-#undef AFMT_S16_NE
-
-#if BYTE_ORDER == LITTLE_ENDIAN
-#define AFMT_S16_NE	AFMT_S16_LE
-#define AFMT_S24_NE	AFMT_S24_LE
-#define AFMT_S32_NE	AFMT_S32_LE
-#define AFMT_U16_NE	AFMT_U16_LE
-#define AFMT_U24_NE	AFMT_U24_LE
-#define AFMT_U32_NE	AFMT_U32_LE
-#define AFMT_S16_OE	AFMT_S16_BE
-#define AFMT_S24_OE	AFMT_S24_BE
-#define AFMT_S32_OE	AFMT_S32_BE
-#define AFMT_U16_OE	AFMT_U16_BE
-#define AFMT_U24_OE	AFMT_U24_BE
-#define AFMT_U32_OE	AFMT_U32_BE
-#else
-#define AFMT_S16_OE	AFMT_S16_LE
-#define AFMT_S24_OE	AFMT_S24_LE
-#define AFMT_S32_OE	AFMT_S32_LE
-#define AFMT_U16_OE	AFMT_U16_LE
-#define AFMT_U24_OE	AFMT_U24_LE
-#define AFMT_U32_OE	AFMT_U32_LE
-#define AFMT_S16_NE	AFMT_S16_BE
-#define AFMT_S24_NE	AFMT_S24_BE
-#define AFMT_S32_NE	AFMT_S32_BE
-#define AFMT_U16_NE	AFMT_U16_BE
-#define AFMT_U24_NE	AFMT_U24_BE
-#define AFMT_U32_NE	AFMT_U32_BE
-#endif
-
 #define AFMT_SIGNED_NE	(AFMT_S8_NE | AFMT_S16_NE | AFMT_S24_NE | AFMT_S32_NE)
 
 #define AFMT_NE		(AFMT_SIGNED_NE | AFMT_U8_NE | AFMT_U16_NE |	\

Modified: head/sys/sys/soundcard.h
==============================================================================
--- head/sys/sys/soundcard.h	Wed Jun 10 03:35:40 2009	(r193885)
+++ head/sys/sys/soundcard.h	Wed Jun 10 03:56:24 2009	(r193886)
@@ -171,12 +171,6 @@ struct snd_size {
 #define AFMT_MPEG	0x00000200	/* MPEG MP2/MP3 audio */
 #define AFMT_AC3	0x00000400	/* Dolby Digital AC3 */
 
-#if _BYTE_ORDER == _LITTLE_ENDIAN
-#define AFMT_S16_NE	AFMT_S16_LE	/* native endian signed 16 */
-#else
-#define AFMT_S16_NE	AFMT_S16_BE
-#endif
-
 /*
  * 32-bit formats below used for 24-bit audio data where the data is stored
  * in the 24 most significant bits and the least significant bits are not used
@@ -191,6 +185,35 @@ struct snd_size {
 #define AFMT_U24_LE	0x00040000	/* Little endian unsigned 24-bit */
 #define AFMT_U24_BE	0x00080000	/* Big endian unsigned 24-bit */
 
+/* Machine dependant AFMT_* definitions. */
+#if BYTE_ORDER == LITTLE_ENDIAN
+#define AFMT_S16_NE	AFMT_S16_LE
+#define AFMT_S24_NE	AFMT_S24_LE
+#define AFMT_S32_NE	AFMT_S32_LE
+#define AFMT_U16_NE	AFMT_U16_LE
+#define AFMT_U24_NE	AFMT_U24_LE
+#define AFMT_U32_NE	AFMT_U32_LE
+#define AFMT_S16_OE	AFMT_S16_BE
+#define AFMT_S24_OE	AFMT_S24_BE
+#define AFMT_S32_OE	AFMT_S32_BE
+#define AFMT_U16_OE	AFMT_U16_BE
+#define AFMT_U24_OE	AFMT_U24_BE
+#define AFMT_U32_OE	AFMT_U32_BE
+#else
+#define AFMT_S16_OE	AFMT_S16_LE
+#define AFMT_S24_OE	AFMT_S24_LE
+#define AFMT_S32_OE	AFMT_S32_LE
+#define AFMT_U16_OE	AFMT_U16_LE
+#define AFMT_U24_OE	AFMT_U24_LE
+#define AFMT_U32_OE	AFMT_U32_LE
+#define AFMT_S16_NE	AFMT_S16_BE
+#define AFMT_S24_NE	AFMT_S24_BE
+#define AFMT_S32_NE	AFMT_S32_BE
+#define AFMT_U16_NE	AFMT_U16_BE
+#define AFMT_U24_NE	AFMT_U24_BE
+#define AFMT_U32_NE	AFMT_U32_BE
+#endif
+
 #define AFMT_STEREO	0x10000000	/* can do/want stereo	*/
 
 /*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906100356.n5A3uOWj093185>