summaryrefslogtreecommitdiff
path: root/misc/man9ossddk/ossddk_dmap_get_qhead.9ossddk
blob: 93a82719117f801c6af0eb94569f70c4f7c8e15d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
'\" te
.\"  Copyright (c) 2005, 4Front Technologies 2005\&.
.TH ossddk_dmap_get_qhead 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services"
.SH "NAME"
ossddk_dmap_get_qhead, ossddk_dmap_get_qtail \- Return the DMA buffer head/tail fragment numbers.
.PP
.SH "SYNOPSIS"
.nf
#include <sys/soundcard.h>
.LP
#include <sys/ossddk/ossddk.h>
.fi
.LP
\fBint\fR ossddk_dmap_get_qhead(\fBdmap_t *\fIdmap\fP);
\fBint\fR ossddk_dmap_get_qtail(\fBdmap_t *\fIdmap\fP);
.PP
.SH "INTERFACE LEVEL"
.PP
Open Sound System specific (OSS 4.0 DDK)\&.
.PP
.SH "ARGUMENTS"
.PP
.sp
.ne 2
.mk
\fB\fIdmap\fR
.in +16n
.rt
Audio buffer handle.
.in -16n
.PP
.SH "DESCRIPTION"
.PP
Some drivers need to know which fragment it should copy to/from the device. 
The \fIossddk_dmap_get_qhead\fR function can be used to get the current
fragment number during playback. The \fIossddk_dmap_get_qtail\fR function
returns the current fragment the device is expected to fill in next during
recording. The fragment number will be in range 0 to num_fragments-1.
.PP
Pointer to the current fragment can be computed using formula
\fptr =d mabuf_address + Ifragment_number*fragment_size\fR.
.PP
.SH "RETURN VALUES"
These functions return the current fragment number.
.PP
.SH "SEE ALSO"
.PP
\fIWriting Sound Device Drivers with OSS DDK\fR
.LP
\fIOpen Sound System Programmer's Guide\fR