Module Name: src
Committed By: jmcneill
Date: Wed Sep 7 00:11:58 UTC 2011
Modified Files:
src/sys/dev: auconv.c
Log Message:
auconv_exact_match: don't check precision, validbits, or channels for AC3
To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/auconv.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/auconv.c
diff -u src/sys/dev/auconv.c:1.23 src/sys/dev/auconv.c:1.24
--- src/sys/dev/auconv.c:1.23 Tue Sep 6 01:16:44 2011
+++ src/sys/dev/auconv.c Wed Sep 7 00:11:58 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: auconv.c,v 1.23 2011/09/06 01:16:44 jmcneill Exp $ */
+/* $NetBSD: auconv.c,v 1.24 2011/09/07 00:11:58 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.23 2011/09/06 01:16:44 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: auconv.c,v 1.24 2011/09/07 00:11:58 jmcneill Exp $");
#include <sys/types.h>
#include <sys/audioio.h>
@@ -826,14 +826,16 @@
/**
* XXX we need encoding-dependent check.
* XXX Is to check precision/channels meaningful for
- * MPEG/AC3 encodings?
+ * MPEG encodings?
*/
- if (formats[i].validbits != param->validbits)
- continue;
- if (formats[i].precision != param->precision)
- continue;
- if (formats[i].channels != param->channels)
- continue;
+ if (enc != AUDIO_ENCODING_AC3) {
+ if (formats[i].validbits != param->validbits)
+ continue;
+ if (formats[i].precision != param->precision)
+ continue;
+ if (formats[i].channels != param->channels)
+ continue;
+ }
if (!auconv_is_supported_rate(&formats[i],
param->sample_rate))
continue;