Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Add AUDIO_ENCODING_AC3 encoding type.
details: https://anonhg.NetBSD.org/src/rev/4c7c20224eab
branches: trunk
changeset: 769293:4c7c20224eab
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Tue Sep 06 01:16:43 2011 +0000
description:
Add AUDIO_ENCODING_AC3 encoding type.
diffstat:
sys/dev/auconv.c | 13 ++++++++-----
sys/dev/audio.c | 6 ++++--
sys/sys/audioio.h | 4 +++-
3 files changed, 15 insertions(+), 8 deletions(-)
diffs (114 lines):
diff -r e4b454cbb385 -r 4c7c20224eab sys/dev/auconv.c
--- a/sys/dev/auconv.c Mon Sep 05 21:38:05 2011 +0000
+++ b/sys/dev/auconv.c Tue Sep 06 01:16:43 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: auconv.c,v 1.22 2009/01/03 03:43:21 yamt Exp $ */
+/* $NetBSD: auconv.c,v 1.23 2011/09/06 01:16:44 jmcneill Exp $ */
/*
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: auconv.c,v 1.22 2009/01/03 03:43:21 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: auconv.c,v 1.23 2011/09/06 01:16:44 jmcneill Exp $");
#include <sys/types.h>
#include <sys/audioio.h>
@@ -205,7 +205,8 @@
AudioEslinear, AudioEulinear,
AudioEmpeg_l1_stream, AudioEmpeg_l1_packets,
AudioEmpeg_l1_system, AudioEmpeg_l2_stream,
- AudioEmpeg_l2_packets, AudioEmpeg_l2_system
+ AudioEmpeg_l2_packets, AudioEmpeg_l2_system,
+ AudioEac3
};
#endif
@@ -825,7 +826,7 @@
/**
* XXX we need encoding-dependent check.
* XXX Is to check precision/channels meaningful for
- * MPEG encodings?
+ * MPEG/AC3 encodings?
*/
if (formats[i].validbits != param->validbits)
continue;
@@ -1036,6 +1037,7 @@
case AUDIO_ENCODING_MPEG_L2_STREAM:
case AUDIO_ENCODING_MPEG_L2_PACKETS:
case AUDIO_ENCODING_MPEG_L2_SYSTEM:
+ case AUDIO_ENCODING_AC3:
ADD_ENCODING(formats[i].encoding,
formats[i].precision, 0);
break;
@@ -1075,7 +1077,8 @@
AudioEslinear, AudioEulinear,
AudioEmpeg_l1_stream, AudioEmpeg_l1_packets,
AudioEmpeg_l1_system, AudioEmpeg_l2_stream,
- AudioEmpeg_l2_packets, AudioEmpeg_l2_system
+ AudioEmpeg_l2_packets, AudioEmpeg_l2_system,
+ AudioEac3
};
struct audio_encoding_set *set;
struct audio_encoding_set *new_buf;
diff -r e4b454cbb385 -r 4c7c20224eab sys/dev/audio.c
--- a/sys/dev/audio.c Mon Sep 05 21:38:05 2011 +0000
+++ b/sys/dev/audio.c Tue Sep 06 01:16:43 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audio.c,v 1.252 2010/11/20 18:03:49 tsutsui Exp $ */
+/* $NetBSD: audio.c,v 1.253 2011/09/06 01:16:44 jmcneill Exp $ */
/*
* Copyright (c) 1991-1993 Regents of the University of California.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.252 2010/11/20 18:03:49 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.253 2011/09/06 01:16:44 jmcneill Exp $");
#include "audio.h"
#if NAUDIO > 0
@@ -1845,6 +1845,7 @@
case AUDIO_ENCODING_MPEG_L2_STREAM:
case AUDIO_ENCODING_MPEG_L2_PACKETS:
case AUDIO_ENCODING_MPEG_L2_SYSTEM:
+ case AUDIO_ENCODING_AC3:
case AUDIO_ENCODING_ADPCM: /* is this right XXX */
case AUDIO_ENCODING_SLINEAR_LE:
case AUDIO_ENCODING_SLINEAR_BE:
@@ -2972,6 +2973,7 @@
case AUDIO_ENCODING_MPEG_L2_STREAM:
case AUDIO_ENCODING_MPEG_L2_PACKETS:
case AUDIO_ENCODING_MPEG_L2_SYSTEM:
+ case AUDIO_ENCODING_AC3:
break;
default:
return EINVAL;
diff -r e4b454cbb385 -r 4c7c20224eab sys/sys/audioio.h
--- a/sys/sys/audioio.h Mon Sep 05 21:38:05 2011 +0000
+++ b/sys/sys/audioio.h Tue Sep 06 01:16:43 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audioio.h,v 1.33 2009/09/29 15:58:54 sborrill Exp $ */
+/* $NetBSD: audioio.h,v 1.34 2011/09/06 01:16:43 jmcneill Exp $ */
/*
* Copyright (c) 1991-1993 Regents of the University of California.
@@ -132,6 +132,7 @@
#define AUDIO_ENCODING_MPEG_L2_STREAM 15
#define AUDIO_ENCODING_MPEG_L2_PACKETS 16
#define AUDIO_ENCODING_MPEG_L2_SYSTEM 17
+#define AUDIO_ENCODING_AC3 18
typedef struct audio_encoding {
int index;
@@ -325,6 +326,7 @@
#define AudioEmpeg_l2_stream "mpeg_l2_stream"
#define AudioEmpeg_l2_packets "mpeg_l2_packets"
#define AudioEmpeg_l2_system "mpeg_l2_system"
+#define AudioEac3 "ac3"
#define AudioCinputs "inputs"
#define AudioCoutputs "outputs"
Home |
Main Index |
Thread Index |
Old Index