summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorJacob Meuser <jakemsr@cvs.openbsd.org>2008-04-21 00:32:44 +0000
committerJacob Meuser <jakemsr@cvs.openbsd.org>2008-04-21 00:32:44 +0000
commit36bf5b189175ea403450119f66c0fc6b0065200b (patch)
treeaaa8e60176bd1cd2a387e885e469287cf38c8497 /share
parente2c0d8670c0c4a94f1c1a1fce050bead469315cf (diff)
allow low level audio drivers to specify a default sample format,
instead of 8-bit mono mulaw @ 8kHz. this is just the infrastructure; no drivers are specifying a default yet. ok ratchov@, deanna@
Diffstat (limited to 'share')
-rw-r--r--share/man/man4/audio.411
-rw-r--r--share/man/man9/audio.920
2 files changed, 24 insertions, 7 deletions
diff --git a/share/man/man4/audio.4 b/share/man/man4/audio.4
index e14a6893489..0c54211e815 100644
--- a/share/man/man4/audio.4
+++ b/share/man/man4/audio.4
@@ -1,4 +1,4 @@
-.\" $OpenBSD: audio.4,v 1.51 2008/03/22 11:05:31 ratchov Exp $
+.\" $OpenBSD: audio.4,v 1.52 2008/04/21 00:32:42 jakemsr Exp $
.\" $NetBSD: audio.4,v 1.20 1998/05/28 17:27:15 augustss Exp $
.\"
.\" Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: March 22 2008 $
+.Dd $Mdocdate: April 21 2008 $
.Dt AUDIO 4
.Os
.Sh NAME
@@ -87,14 +87,15 @@ device while it is in use.
.Sh SAMPLING DEVICES
When
.Pa /dev/audio
-is opened, it automatically directs the underlying driver to manipulate
-monaural 8-bit mu-law samples.
+is opened, it automatically configures the underlying driver for the
+hardware's default sample format, or monaural 8-bit mu-law if a default
+sample format has not been specified by the underlying driver.
In addition, if it is opened read-only
(write-only) the device is set to half-duplex record (play) mode with
recording (playing) unpaused and playing (recording) paused.
When
.Pa /dev/sound
-is opened, it maintains the previous audio sample mode and
+is opened, it maintains the previous audio sample format and
record/playback mode.
In all other respects
.Pa /dev/audio
diff --git a/share/man/man9/audio.9 b/share/man/man9/audio.9
index d54a2e79558..0be2a30e59c 100644
--- a/share/man/man9/audio.9
+++ b/share/man/man9/audio.9
@@ -1,4 +1,4 @@
-.\" $OpenBSD: audio.9,v 1.17 2007/05/31 19:20:00 jmc Exp $
+.\" $OpenBSD: audio.9,v 1.18 2008/04/21 00:32:42 jakemsr Exp $
.\" $NetBSD: audio.9,v 1.14 2000/02/11 22:56:15 kleink Exp $
.\"
.\" Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: May 31 2007 $
+.Dd $Mdocdate: April 21 2008 $
.Dt AUDIO 9
.Os
.Sh NAME
@@ -93,6 +93,7 @@ struct audio_hw_if {
void (*)(void *), void *, struct audio_params *);
int (*trigger_input)(void *, void *, void *, int,
void (*)(void *), void *, struct audio_params *);
+ void (*get_default_params)(void *, int, struct audio_params *);
};
struct audio_params {
@@ -469,6 +470,21 @@ will be called with the argument
Once started, the transfer may be stopped using
.Fn halt_input .
This function returns 0 on success, otherwise an error code.
+.It Fn "void (*get_default_params)" "void *hdl" "int direction" \
+"struct audio_params *param"
+This function is optional.
+If supplied, it is called to retrieve the default configuration
+for the given
+.Fa direction ,
+parameterized in
+.Fa param .
+.Fa direction
+is
+.Dv AUMODE_PLAY
+or
+.Dv AUMODE_RECORD .
+The default configuration should not include emulated formats, and should
+reflect the optimal operating configuration for the underlying hardware.
.El
.Pp
The