summaryrefslogtreecommitdiff
path: root/sys/dev/pci/cs4281.c
diff options
context:
space:
mode:
authorJacob Meuser <jakemsr@cvs.openbsd.org>2010-07-15 03:43:13 +0000
committerJacob Meuser <jakemsr@cvs.openbsd.org>2010-07-15 03:43:13 +0000
commit59cb4ff01f7202d2e69dd3011fd755605b7cc8da (patch)
tree454f4c2562bc96d6f292a0ddccc5df0e49f30ea2 /sys/dev/pci/cs4281.c
parenta6e9a1c865707ccd6904e98b221c6be74b97f4d9 (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/dev/pci/cs4281.c')
-rw-r--r--sys/dev/pci/cs4281.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/pci/cs4281.c b/sys/dev/pci/cs4281.c
index 3f2f658ccee..43e3147e948 100644
--- a/sys/dev/pci/cs4281.c
+++ b/sys/dev/pci/cs4281.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cs4281.c,v 1.22 2008/10/25 22:30:43 jakemsr Exp $ */
+/* $OpenBSD: cs4281.c,v 1.23 2010/07/15 03:43:11 jakemsr Exp $ */
/* $Tera: cs4281.c,v 1.18 2000/12/27 14:24:45 tacha Exp $ */
/*
@@ -494,6 +494,9 @@ cs4281_query_encoding(addr, fp)
default:
return EINVAL;
}
+ fp->bps = AUDIO_BPS(fp->precision);
+ fp->msb = 1;
+
return (0);
}
@@ -558,6 +561,8 @@ cs4281_set_params(addr, setmode, usemode, play, rec)
default:
return (EINVAL);
}
+ p->bps = AUDIO_BPS(p->precision);
+ p->msb = 1;
}
/* set sample rate */