From 13327e596da9017c7180b49d53b493be0956a3a8 Mon Sep 17 00:00:00 2001 From: Jacob Meuser Date: Thu, 29 May 2008 02:10:02 +0000 Subject: 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@ --- sys/dev/pci/esa.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'sys/dev/pci/esa.c') 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) -- cgit v1.2.3