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/yds.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/yds.c')
-rw-r--r-- | sys/dev/pci/yds.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/pci/yds.c b/sys/dev/pci/yds.c index d43184596df..64d3885ea7a 100644 --- a/sys/dev/pci/yds.c +++ b/sys/dev/pci/yds.c @@ -1,4 +1,4 @@ -/* $OpenBSD: yds.c,v 1.29 2008/04/21 00:32:43 jakemsr Exp $ */ +/* $OpenBSD: yds.c,v 1.30 2008/05/29 02:10:01 jakemsr Exp $ */ /* $NetBSD: yds.c,v 1.5 2001/05/21 23:55:04 minoura Exp $ */ /* @@ -158,6 +158,7 @@ void yds_close(void *); int yds_query_encoding(void *, struct audio_encoding *); int yds_set_params(void *, int, int, struct audio_params *, struct audio_params *); +void yds_get_default_params(void *, int, struct audio_params *); int yds_round_blocksize(void *, int); int yds_trigger_output(void *, void *, void *, int, void (*)(void *), void *, struct audio_params *); @@ -233,7 +234,7 @@ static struct audio_hw_if yds_hw_if = { yds_get_props, yds_trigger_output, yds_trigger_input, - NULL + yds_get_default_params }; struct audio_device yds_device = { @@ -1188,6 +1189,12 @@ yds_query_encoding(addr, fp) } } +void +yds_get_default_params(void *addr, int mode, struct audio_params *params) +{ + ac97_get_default_params(params); +} + int yds_set_params(addr, setmode, usemode, play, rec) void *addr; |