diff options
author | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2010-07-15 03:43:13 +0000 |
---|---|---|
committer | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2010-07-15 03:43:13 +0000 |
commit | 59cb4ff01f7202d2e69dd3011fd755605b7cc8da (patch) | |
tree | 454f4c2562bc96d6f292a0ddccc5df0e49f30ea2 /sys/arch/hppa | |
parent | a6e9a1c865707ccd6904e98b221c6be74b97f4d9 (diff) |
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/arch/hppa')
-rw-r--r-- | sys/arch/hppa/gsc/harmony.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/arch/hppa/gsc/harmony.c b/sys/arch/hppa/gsc/harmony.c index 8dc70d91c79..a9b6bf36fd7 100644 --- a/sys/arch/hppa/gsc/harmony.c +++ b/sys/arch/hppa/gsc/harmony.c @@ -1,4 +1,4 @@ -/* $OpenBSD: harmony.c,v 1.26 2008/04/21 00:32:42 jakemsr Exp $ */ +/* $OpenBSD: harmony.c,v 1.27 2010/07/15 03:43:11 jakemsr Exp $ */ /* * Copyright (c) 2003 Jason L. Wright (jason@thought.net) @@ -464,6 +464,8 @@ harmony_query_encoding(void *vsc, struct audio_encoding *fp) default: err = EINVAL; } + fp->bps = AUDIO_BPS(fp->precision); + fp->msb = 1; return (err); } @@ -558,9 +560,13 @@ harmony_set_params(void *vsc, int setmode, int usemode, else return (EINVAL); - bits |= harmony_speed_bits(sc, &p->sample_rate); p->sw_code = pswcode; r->sw_code = rswcode; + p->bps = AUDIO_BPS(p->precision); + r->bps = AUDIO_BPS(r->precision); + p->msb = r->msb = 1; + + bits |= harmony_speed_bits(sc, &p->sample_rate); sc->sc_cntlbits = bits; sc->sc_need_commit = 1; |