diff options
author | 2010-07-15 03:43:11 +0000 | |
---|---|---|
committer | 2010-07-15 03:43:11 +0000 | |
commit | 1657931791df6f774accbb48ba9d42eac31d77d9 (patch) | |
tree | f169ff6fea6eb5c7ec3fbe461df83e1dd60f66e3 /sys/dev/isa/gus.c | |
parent | limit the pools from 14 bits down. We cannot use PAGE_SIZE because it (diff) | |
download | wireguard-openbsd-1657931791df6f774accbb48ba9d42eac31d77d9.tar.xz wireguard-openbsd-1657931791df6f774accbb48ba9d42eac31d77d9.zip |
add two new members to structs audio_encoding and audio_prinfo.
for both structs, the new members are 'bps' and 'msb', which
describe the number of bytes per sample and data alignment in the
sample, respectively. drivers must properly set these fields in
the 'query_encoding', 'set_parameters' and 'get_default_params'
hardware interface methods.
discussed with ratchov, deraadt
Diffstat (limited to 'sys/dev/isa/gus.c')
-rw-r--r-- | sys/dev/isa/gus.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/isa/gus.c b/sys/dev/isa/gus.c index f71de03e445..b370c587cf0 100644 --- a/sys/dev/isa/gus.c +++ b/sys/dev/isa/gus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gus.c,v 1.33 2009/08/26 22:29:09 jasper Exp $ */ +/* $OpenBSD: gus.c,v 1.34 2010/07/15 03:43:11 jakemsr Exp $ */ /* $NetBSD: gus.c,v 1.51 1998/01/25 23:48:06 mycroft Exp $ */ /*- @@ -1573,6 +1573,9 @@ gus_set_params(addr, setmode, usemode, p, r) r->sw_code = p->sw_code = swap_bytes; break; } + p->bps = AUDIO_BPS(p->precision); + r->bps = AUDIO_BPS(r->precision); + p->msb = r->msb = 1; return 0; } @@ -3310,6 +3313,9 @@ gus_query_encoding(addr, fp) return(EINVAL); /*NOTREACHED*/ } + fp->bps = AUDIO_BPS(fp->precision); + fp->msb = 1; + return (0); } |