summaryrefslogtreecommitdiff
path: root/sys/dev/pci/cmpci.c
diff options
context:
space:
mode:
authorJacob Meuser <jakemsr@cvs.openbsd.org>2008-05-29 07:20:16 +0000
committerJacob Meuser <jakemsr@cvs.openbsd.org>2008-05-29 07:20:16 +0000
commit518ab18a332a7f800ee41b06f35f75612dd98cc2 (patch)
tree6265105414d70d9846a127e3d63d4a5e626a7831 /sys/dev/pci/cmpci.c
parent008a1587034d4d02528c1afa89c7cf943a3921b5 (diff)
specify alternate default audio parameters to make the default expansion
factor 1 also obsoletes a XXX workaround in azalia ok ratchov@
Diffstat (limited to 'sys/dev/pci/cmpci.c')
-rw-r--r--sys/dev/pci/cmpci.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/sys/dev/pci/cmpci.c b/sys/dev/pci/cmpci.c
index e36689fc89b..753fb0569f8 100644
--- a/sys/dev/pci/cmpci.c
+++ b/sys/dev/pci/cmpci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmpci.c,v 1.19 2008/05/13 02:24:08 brad Exp $ */
+/* $OpenBSD: cmpci.c,v 1.20 2008/05/29 07:20:15 jakemsr Exp $ */
/* $NetBSD: cmpci.c,v 1.25 2004/10/26 06:32:20 xtraeme Exp $ */
/*
@@ -133,6 +133,7 @@ int cmpci_query_encoding(void *, struct audio_encoding *);
int cmpci_set_params(void *, int, int,
struct audio_params *,
struct audio_params *);
+void cmpci_get_default_params(void *, int, struct audio_params*);
int cmpci_round_blocksize(void *, int);
int cmpci_halt_output(void *);
int cmpci_halt_input(void *);
@@ -179,7 +180,7 @@ struct audio_hw_if cmpci_hw_if = {
cmpci_get_props, /* get_props */
cmpci_trigger_output, /* trigger_output */
cmpci_trigger_input, /* trigger_input */
- NULL
+ cmpci_get_default_params
};
/*
@@ -632,6 +633,17 @@ cmpci_query_encoding(void *handle, struct audio_encoding *fp)
return 0;
}
+void
+cmpci_get_default_params(void *addr, int mode, struct audio_params *params)
+{
+ params->sample_rate = 48000;
+ params->encoding = AUDIO_ENCODING_SLINEAR_LE;
+ params->precision = 16;
+ params->channels = 2;
+ params->sw_code = NULL;
+ params->factor = 1;
+}
+
int
cmpci_set_params(void *handle, int setmode, int usemode,
struct audio_params *play, struct audio_params *rec)