diff options
author | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2008-05-29 02:10:02 +0000 |
---|---|---|
committer | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2008-05-29 02:10:02 +0000 |
commit | 13327e596da9017c7180b49d53b493be0956a3a8 (patch) | |
tree | 4549fab2a604f77f37fdc4b0d97dff4f5981b9b4 /sys/dev/pci/eap.c | |
parent | c496441ad96ff1d247439f6f966240d5f8e657fd (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/eap.c')
-rw-r--r-- | sys/dev/pci/eap.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/dev/pci/eap.c b/sys/dev/pci/eap.c index afcd912929a..d9382df3e84 100644 --- a/sys/dev/pci/eap.c +++ b/sys/dev/pci/eap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eap.c,v 1.32 2008/04/21 00:32:43 jakemsr Exp $ */ +/* $OpenBSD: eap.c,v 1.33 2008/05/29 02:10:01 jakemsr Exp $ */ /* $NetBSD: eap.c,v 1.46 2001/09/03 15:07:37 reinoud Exp $ */ /* @@ -176,6 +176,7 @@ int eap_trigger_input(void *, void *, void *, int, void (*)(void *), void *, struct audio_params *); int eap_halt_output(void *); int eap_halt_input(void *); +void eap_get_default_params(void *, int, struct audio_params *); void eap1370_write_codec(struct eap_softc *, int, int); int eap_getdev(void *, struct audio_device *); int eap1370_mixer_set_port(void *, mixer_ctrl_t *); @@ -234,7 +235,7 @@ struct audio_hw_if eap1370_hw_if = { eap_get_props, eap_trigger_output, eap_trigger_input, - NULL + eap_get_default_params }; struct audio_hw_if eap1371_hw_if = { @@ -264,7 +265,7 @@ struct audio_hw_if eap1371_hw_if = { eap_get_props, eap_trigger_output, eap_trigger_input, - NULL + eap_get_default_params }; #if NMIDI > 0 @@ -911,6 +912,12 @@ eap_query_encoding(void *addr, struct audio_encoding *fp) } } +void +eap_get_default_params(void *addr, int mode, struct audio_params *params) +{ + ac97_get_default_params(params); +} + int eap_set_params(void *addr, int setmode, int usemode, struct audio_params *play, struct audio_params *rec) |