From naddy@mips.inka.de  Fri May 11 08:30:52 2001
Return-Path: <naddy@mips.inka.de>
Received: from mail.inka.de (quechua.inka.de [212.227.14.2])
	by hub.freebsd.org (Postfix) with ESMTP id 7AC2237B423
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 11 May 2001 08:30:51 -0700 (PDT)
	(envelope-from naddy@mips.inka.de)
Received: from kemoauc.mips.inka.de (uucp@)
	by mail.inka.de with local-bsmtp 
	id 14yEsT-0002sV-00; Fri, 11 May 2001 17:30:49 +0200
Received: (from naddy@localhost)
	by kemoauc.mips.inka.de (8.11.3/8.11.1) id f4BF0Dl12537;
	Fri, 11 May 2001 17:00:13 +0200 (CEST)
	(envelope-from naddy)
Message-Id: <200105111500.f4BF0Dl12537@kemoauc.mips.inka.de>
Date: Fri, 11 May 2001 17:00:13 +0200 (CEST)
From: Christian Weisgerber <naddy@mips.inka.de>
Reply-To: naddy@mips.inka.de
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: sys/soundcard.h fails to define AFMT_S16_NE
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         27270
>Category:       bin
>Synopsis:       sys/soundcard.h fails to define AFMT_S16_NE
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    cg
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 11 08:40:02 PDT 2001
>Closed-Date:    Mon Apr 28 14:44:42 PDT 2003
>Last-Modified:  Mon Apr 28 14:44:42 PDT 2003
>Originator:     Christian Weisgerber
>Release:        FreeBSD 5.0-CURRENT alpha
>Organization:
>Environment:
System: FreeBSD kemoauc.mips.inka.de 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Mon May 7 16:13:13 CEST 2001 naddy@kemoauc.mips.inka.de:/home/obj/usr/src/sys/KEMOAUC alpha

>Description:

<sys/soundcard.h> fails to define AFMT_S16_NE for "16-bit signed
format in machine's native endian convention".  This is defined in
the OSS specs, it's available on Linux and NetBSD/OpenBSD, and some
third party software expects it to be available.

Bizarrely, there are no further _NE defines for unsigned or 32-bit
values.

>How-To-Repeat:

>Fix:

Index: sys/soundcard.h
===================================================================
RCS file: /home/ncvs/src/sys/sys/soundcard.h,v
retrieving revision 1.35
diff -u -r1.35 soundcard.h
--- sys/soundcard.h	2000/09/01 17:38:32	1.35
+++ sys/soundcard.h	2001/05/11 14:52:25
@@ -160,6 +160,13 @@
 #   define AFMT_U32_LE		0x00004000	/* Little endian unsigned 32 */
 #   define AFMT_U32_BE		0x00008000	/* big endian unsigned 32 */
 
+#include <machine/endian.h>
+#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
+
 #   define AFMT_STEREO		0x10000000	/* can do/want stereo	*/
 
 /*
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->cg 
Responsible-Changed-By: kris 
Responsible-Changed-When: Sun Aug 19 02:53:43 PDT 2001 
Responsible-Changed-Why:  
Over to Mr. Sound 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=27270 
State-Changed-From-To: open->closed 
State-Changed-By: mbr 
State-Changed-When: Mon Apr 28 14:43:57 PDT 2003 
State-Changed-Why:  
Committed, thanks ! MFC will happen in two weeks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=27270 
>Unformatted:
