summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjakemsr <jakemsr@openbsd.org>2008-11-01 07:21:48 +0000
committerjakemsr <jakemsr@openbsd.org>2008-11-01 07:21:48 +0000
commit1d9481ed4bc95edd29aad3021df1383c703dc08b (patch)
tree002656f8c5bd26c86b1301c89611f4081e81b63b
parentfix some typos in log messages; ok djm@ (diff)
downloadwireguard-openbsd-1d9481ed4bc95edd29aad3021df1383c703dc08b.tar.xz
wireguard-openbsd-1d9481ed4bc95edd29aad3021df1383c703dc08b.zip
set the appropriate value (0, not emulated) in the flags field of
struct audio_encoding in azalia_query_encodings. otherwise it will be some random value. makes AUDIO_GETENC and thus sio_getcap(3) much more useful here.
-rw-r--r--sys/dev/pci/azalia.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/pci/azalia.c b/sys/dev/pci/azalia.c
index cac0961a309..5033fb7c404 100644
--- a/sys/dev/pci/azalia.c
+++ b/sys/dev/pci/azalia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: azalia.c,v 1.66 2008/10/31 21:39:50 deraadt Exp $ */
+/* $OpenBSD: azalia.c,v 1.67 2008/11/01 07:21:48 jakemsr Exp $ */
/* $NetBSD: azalia.c,v 1.20 2006/05/07 08:31:44 kent Exp $ */
/*-
@@ -2281,6 +2281,7 @@ azalia_query_encoding(void *v, audio_encoding_t *enc)
if (i == enc->index) {
enc->encoding = codec->formats[j].encoding;
enc->precision = codec->formats[j].precision;
+ enc->flags = 0;
switch (enc->encoding) {
case AUDIO_ENCODING_SLINEAR_LE:
strlcpy(enc->name, enc->precision == 8 ?