summaryrefslogtreecommitdiff
path: root/sys/dev/pci/esa.c
diff options
context:
space:
mode:
authorJacob Meuser <jakemsr@cvs.openbsd.org>2008-05-29 02:10:02 +0000
committerJacob Meuser <jakemsr@cvs.openbsd.org>2008-05-29 02:10:02 +0000
commit13327e596da9017c7180b49d53b493be0956a3a8 (patch)
tree4549fab2a604f77f37fdc4b0d97dff4f5981b9b4 /sys/dev/pci/esa.c
parentc496441ad96ff1d247439f6f966240d5f8e657fd (diff)
use ac97 default parameters for these ac97 based drivers.
this makes the emulation expansion factor 1 by default since there's no emulation. previously the factor was 2 because these drivers emulate 8-bit ulaw playback with 16-bit linear encodings. having a factor other than 1 by default creates block size and hiwat/lowat issues with applications that set the block size and hiwat before other parameters. ok ratchov@
Diffstat (limited to 'sys/dev/pci/esa.c')
-rw-r--r--sys/dev/pci/esa.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/pci/esa.c b/sys/dev/pci/esa.c
index 91f03545bc9..c549cd9d09b 100644
--- a/sys/dev/pci/esa.c
+++ b/sys/dev/pci/esa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: esa.c,v 1.14 2008/04/21 00:32:43 jakemsr Exp $ */
+/* $OpenBSD: esa.c,v 1.15 2008/05/29 02:10:01 jakemsr Exp $ */
/* $NetBSD: esa.c,v 1.12 2002/03/24 14:17:35 jmcneill Exp $ */
/*
@@ -109,6 +109,7 @@ void esa_close(void *);
int esa_query_encoding(void *, struct audio_encoding *);
int esa_set_params(void *, int, int, struct audio_params *,
struct audio_params *);
+void esa_get_default_params(void *, int, struct audio_params *);
int esa_round_blocksize(void *, int);
int esa_commit_settings(void *);
int esa_halt_output(void *);
@@ -208,7 +209,7 @@ struct audio_hw_if esa_hw_if = {
esa_get_props,
esa_trigger_output,
esa_trigger_input,
- NULL
+ esa_get_default_params
};
struct cfdriver esa_cd = {
@@ -249,6 +250,12 @@ esa_query_encoding(void *hdl, struct audio_encoding *ae)
return (0);
}
+void
+esa_get_default_params(void *addr, int mode, struct audio_params *params)
+{
+ ac97_get_default_params(params);
+}
+
int
esa_set_params(void *hdl, int setmode, int usemode, struct audio_params *play,
struct audio_params *rec)