diff options
Diffstat (limited to 'dvb-spec/API/dvb_api/audio.xml')
-rw-r--r-- | dvb-spec/API/dvb_api/audio.xml | 571 |
1 files changed, 571 insertions, 0 deletions
diff --git a/dvb-spec/API/dvb_api/audio.xml b/dvb-spec/API/dvb_api/audio.xml new file mode 100644 index 000000000..4d6f31575 --- /dev/null +++ b/dvb-spec/API/dvb_api/audio.xml @@ -0,0 +1,571 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><title> + linuxtv.org|DVB Audio API</title></head><body bgcolor="#000000" +link="#ffcc00" text="#ffffff" vlink="#ffdd00"><table border="0" +cellpadding="0" cellspacing="0" width="100%"><tr><td><table border="0" +cellpadding="0" cellspacing="0" width="100%"><tr><td width="610"><table +border="0" cellpadding="0" cellspacing="0"><tr valign="top"><td><table +border="0" cellpadding="0" cellspacing="0" width="180"><tr align="right" +valign="top"><td><img height="30" src="/images/top01.gif" +width="180"></td></tr><tr><td align="center" height="38" +valign="bottom"><img border="0" height="38" src="/images/cimlogo02.gif" +width="45"></td></tr></table></td><td><table border="0" cellpadding="0" +cellspacing="0" width="50"><tr><td><img height="30" +src="/images/top02.gif" width="284"></td></tr><tr><td><img height="45" +src="/images/top06.gif" width="20"> + + </td></tr></table></td><td><table border="0" cellpadding="0" +cellspacing="0" width="170"><tr><td background="/images/squares05.gif" +colspan="2"><img height="68" src="/images/squares04.gif" +width="32"></td></tr></table></td></tr><tr><td></td></tr></table></td><td +height="68" valign="top" width="100%"><table border="0" cellpadding="0" +cellspacing="0" width="100%"><tr><td background="/images/squares05.gif" +height="68" +width="100%"> </td></tr></table></td></tr></table></td></tr><tr><td height="30"> + + </td></tr></table><table border="0" cellpadding="0" +cellspacing="0"><tr><td width="181"><table border="0" cellpadding="0" +cellspacing="0" width="181"><tr><td bgcolor="#000000" valign="top" +width="20"><img height="22" src="/images/gruen.gif" width="20"></td><td +bgcolor="#003d19" valign="top" width="19"><img height="22" +src="/images/pfeilgruen.gif" width="19"></td><td bgcolor="#000000" +valign="top" width="2"></td><td bgcolor="#003d19" width="120"><a +href="http://www.convergence.de"><font color="#ffcc00" +face="arial, helvetica" size="2"><b> + convergence.de + </b></font></a></td><td align="right" bgcolor="#003d19" +valign="bottom" width="20"><img height="22" +src="/images/eckeswgruen.gif" width="8"></td></tr><tr><td +height="2"></td></tr><tr><td bgcolor="#000000" valign="top" +width="20"><img height="22" src="/images/gruen.gif" width="20"></td><td +bgcolor="#003d19" valign="top" width="19"><img height="22" +src="/images/pfeilgruen.gif" width="19"></td><td bgcolor="#000000" +valign="top" width="2"></td><td bgcolor="#003d19" width="120"><a +href="http://www.cryptolabs.org"><font color="#ffcc00" +face="arial, helvetica" size="2"><b> + cryptolabs.org</b></font></a></td><td align="right" +bgcolor="#003d19" valign="bottom" width="20"><img height="22" +src="/images/eckeswgruen.gif" width="8"></td></tr><tr><td +height="2"></td></tr><tr><td bgcolor="#000000" valign="top" +width="20"><img height="22" src="/images/gruen.gif" width="20"></td><td +bgcolor="#003d19" valign="top" width="19"><img height="22" +src="/images/pfeilgruen.gif" width="19"></td><td bgcolor="#000000" +valign="top" width="2"></td><td bgcolor="#003d19" width="120"><a +href="http://www.directfb.org"><font color="#ffcc00" +face="arial, helvetica" size="2"><b> + directfb.org + </b></font></a></td><td align="right" bgcolor="#003d19" +valign="bottom" width="20"><img height="22" +src="/images/eckeswgruen.gif" width="8"></td></tr><tr><td +height="2"></td></tr><tr><td bgcolor="#000000" valign="top" +width="20"><img height="22" src="/images/gleb.gif" width="20"></td><td +bgcolor="#ffcc00" valign="top" width="19"><img height="22" +src="/images/pfeilgelb.gif" width="19"></td><td bgcolor="#000000" +valign="top" width="2"></td><td bgcolor="#ffcc00" width="120"><a +href="/"><font color="#003d19" face="arial, helvetica" size="2"><b> + linuxtv.org + </b></font></a></td><td align="right" bgcolor="#ffcc00" +valign="bottom" width="20"><img height="22" src="/images/eckeswgelb.gif" +width="8"></td></tr><tr><td height="2"></td></tr></table></td><td width="20"> + + </td><td valign="top" width="500"><img height="60" +src="/images/linuxtv.gif" width="245"></td></tr><tr><td align="left" +valign="top" width="181"><table bgcolor="#ffcc00" border="0" +cellpadding="0" cellspacing="0" width="185"><tr><td bgcolor="#000000" +valign="top" width="20"><img height="22" src="/images/gleb.gif" +width="20"></td><td bgcolor="#ffcc00" width="19"><img height="22" +src="/images/arrow_main.gif" width="19"></td><td bgcolor="#000000" +width="2"></td><td bgcolor="#ffcc00" width="131"> + <a href="/"><font color="#003d19" face="helvetica" +size="2"><b>linuxtv</b></font></a></td><td bgcolor="#000000" +width="9"></td></tr><tr><td bgcolor="#000000" colspan="5" +height="2"></td></tr><tr><td bgcolor="#000000" valign="top" +width="20"><img height="22" src="/images/gleb.gif" width="20"></td><td +bgcolor="#ffcc00" width="19"><img height="22" +src="/images/arrow_main.gif" width="19"></td><td bgcolor="#000000" +width="2"></td><td bgcolor="#ffcc00" width="131"> + <a href="/projects.xml"><font color="#003d19" face="helvetica" +size="2"><b>projects</b></font></a></td><td bgcolor="#000000" +width="9"></td></tr><tr><td bgcolor="#000000" colspan="5" +height="2"></td></tr><tr><td bgcolor="#000000" valign="top" +width="20"><img height="22" src="/images/gleb.gif" width="20"></td><td +bgcolor="#ffcc00" width="19"><img height="22" +src="/images/arrow_main_open.gif" width="19"></td><td bgcolor="#000000" +width="2"></td><td bgcolor="#ffcc00" width="131"> + <a href="/developer/"><font color="#003d19" face="helvetica" +size="2"><b>developer</b></font></a></td><td bgcolor="#000000" +width="9"></td></tr><tr><td bgcolor="#000000" width="20"></td><td +bgcolor="#ffcc00" width="19"> </td><td bgcolor="#000000" +width="2"></td><td width="131"><img height="13" +src="/images/arrow_sub_open.gif" width="13"> + <a href="/developer/dvb.xml"><font color="#000000" +face="helvetica" size="2">DVB</font></a></td><td bgcolor="#000000" +width="9"></td></tr><tr><td bgcolor="#000000" width="20"></td><td +width="19"> </td><td bgcolor="#000000" width="2"></td><td width="131"> + <img height="13" src="/images/space_sub.gif" width="13"><img +height="13" src="/images/kulleropen.gif" width="13"><a +href="/developer/dvb_api.xml"><font color="#000000" face="helvetica" size="2"> + API</font></a></td><td bgcolor="#000000" +width="9"></td></tr><tr><td bgcolor="#000000" width="20"></td><td +bgcolor="#ffcc00" width="19"> </td><td bgcolor="#000000" +width="2"></td><td width="131"><img height="13" +src="/images/arrow_sub.gif" width="13"> + <a href="/developer/dvd.xml"><font color="#000000" +face="helvetica" size="2">DVD</font></a></td><td bgcolor="#000000" +width="9"></td></tr><tr><td bgcolor="#000000" width="20"></td><td +bgcolor="#ffcc00" width="19"> </td><td bgcolor="#000000" +width="2"></td><td width="131"><img height="13" +src="/images/arrow_sub.gif" width="13"> + <a href="/developer/mbone.xml"><font color="#000000" +face="helvetica" size="2">Mbone</font></a></td><td bgcolor="#000000" +width="9"></td></tr><tr><td bgcolor="#000000" width="20"></td><td +bgcolor="#ffcc00" width="19"> </td><td bgcolor="#000000" +width="2"></td><td width="131"><img height="13" +src="/images/arrow_sub.gif" width="13"> + <a href="/cvs/"><font color="#000000" face="helvetica" +size="2">CVS</font></a></td><td bgcolor="#000000" +width="9"></td></tr><tr><td bgcolor="#000000" colspan="5" +height="2"></td></tr><tr><td bgcolor="#000000" valign="top" +width="20"><img height="22" src="/images/gleb.gif" width="20"></td><td +bgcolor="#ffcc00" width="19"><img height="22" +src="/images/arrow_main.gif" width="19"></td><td bgcolor="#000000" +width="2"></td><td bgcolor="#ffcc00" width="131"> + <a href="/download/"><font color="#003d19" face="helvetica" +size="2"><b>download</b></font></a></td><td bgcolor="#000000" +width="9"></td></tr><tr><td bgcolor="#000000" colspan="5" +height="2"></td></tr><tr><td bgcolor="#000000" valign="top" +width="20"><img height="22" src="/images/gleb.gif" width="20"></td><td +bgcolor="#ffcc00" width="19"><img height="22" +src="/images/arrow_main.gif" width="19"></td><td bgcolor="#000000" +width="2"></td><td bgcolor="#ffcc00" width="131"> + <a href="/contact.xml"><font color="#003d19" face="helvetica" +size="2"><b>contact</b></font></a></td><td bgcolor="#000000" +width="9"></td></tr><tr><td bgcolor="#000000" colspan="5" +height="2"></td></tr></table></td><td width="20"> + + </td><td valign="top" width="500"><font color="#ffcc00" face="arial, helvetica"><h2>DVB Audio API</h2></font> + + <p> + The DVB audio device controls the MPEG2 audio decoder of the DVB hardware. + It can be accessed through /dev/ost/audio. + </p> + + <p> + The function calls defined in the include file + <a href="audio.h">audio.h</a> are described in detail below: + </p> + <p> + <font face="arial, helvetica" size="+1">Audio API IO control calls</font> + + +<p> +<pre> + +int open(const char *deviceName, int flags); + + DESCRIPTION + + This system call opens a named audio device (e.g. /dev/ost/audio) for subsequent + use. When an open() call has succeeded, the device will be ready for use. + The significance of blocking or non-blocking mode is described in the + documentation for functions where there is a difference. It does not affect + the semantics of the open() call itself. A device opened in blocking mode can + later be put into non-blocking mode (and vice versa) using the F_SETFL command + of the fcntl system call. This is a standard system call, documented in the + Linux manual page for fcntl. + Only one user can open the Audio Device in O_RDWR mode. All other attempts to + open the device in this mode will fail, and an errorcode will be returned. + If the Audio Device is opened in O_RDONLY mode, the only ioctl call that can + be used is AUDIO_GET_STATUS. All other call will return with an error code. + + + PARAMETERS + + const char *deviceName Name of specific audio device. + + int flags A bit-wise OR of the following flags: + + O_RDONLY read-only access + + O_RDWR read/write access + + O_NONBLOCK open in non-blocking mode + (blocking mode is the default) + + RETURNS + + ENODEV Device driver not loaded/available. + + EINTERNAL Internal error + + EBUSY Device or resource busy. + + EINVAL Invalid argument. + + + +</pre> +</p> + +<p> +<pre> + +int close(int fd); + + DESCRIPTION + + This system call closes a previously opened audio device + + PARAMETERS + + int fd File descriptor returned by a previous call to open(). + + RETURNS + + EBADF fd is not a valid open file descriptor + + + +</pre> +</p> + +<p> +<pre> + +size_t write(int fd, const void *buf, size_t count); + + DESCRIPTION + + This system call can only be used if AUDIO_SOURCE_MEMORY is selected in the + ioctl call AUDIO_SELECT_SOURCE. The data provided shall be in PES format. + If O_NONBLOCK is not specified the function will block until buffer space is + available. The amount of data to be transferred is implied by count. + + PARAMETERS + + int fd File descriptor returned by a previous call to open(). + + void *buf Pointer to the buffer containing the PES data. + + size_t count Size of buf. + + RETURNS + + EPERM Mode VIDEO_SOURCE_INTERNAL not selected. + + ENOMEM Attempted to write more data than the internal + buffer can hold. + + EBADF fd is not a valid open file descriptor + + + +</pre> +</p> + +<p> +<pre> + +int ioctl(int fd, int request = AUDIO_STOP); + + DESCRIPTION + + This ioctl call asks the Audio Device to stop playing the current stream. + + + PARAMETERS + + int fd File descriptor returned by a previous call to open(). + + int request Equals AUDIO_STOP for this command. + + RETURNS + + EBADF fd is not a valid open file descriptor + + EINTERNAL Internal error + + + +</pre> +</p> + +<p> +<pre> + +int ioctl(int fd, int request = AUDIO_PLAY); + + DESCRIPTION + + This ioctl call asks the Audio Device to start playing an audio stream from the + selected source. + + PARAMETERS + + int fd File descriptor returned by a previous call to open(). + + int request Equals AUDIO_PLAY for this command. + + RETURNS + + EBADF fd is not a valid open file descriptor. + + EINTERNAL Internal error + + + +</pre> +</p> + +<p> +<pre> + +int ioctl(int fd, int request = AUDIO_PAUSE); + + DESCRIPTION + + This ioctl call suspends the audio stream being played. Decoding and playing are + paused. It is then possible to restart again decoding and playing process of the + audio stream using AUDIO_CONTINUE command. + If AUDIO_SOURCE_MEMORY is selected in the ioctl call AUDIO_SELECT_SOURCE, the + DVB-subsystem will not decode (consume) any more data until the ioctl call + AUDIO_CONTINUE or AUDIO_PLAY is performed. + + PARAMETERS + + int fd File descriptor returned by a previous call to open(). + + int request Equals AUDIO_PAUSE for this command. + + RETURNS + + + EBADF fd is not a valid open file descriptor. + + EINTERNAL Internal error + + + +</pre> +</p> + +<p> +<pre> + +int ioctl(int fd, int request = AUDIO_CONTINUE); + + DESCRIPTION + + This ioctl call restarts decoding and playing processes of the audio stream, + which was played before, a call to AUDIO_PAUSE was made. + + PARAMETERS + + int fd File descriptor returned by a previous call to open(). + + int request Equals AUDIO_CONTINUE for this command. + + RETURNS + + EBADF fd is not a valid open file descriptor. + + EINTERNAL Internal error, possibly in the communication + with the DVB subsystem. + + + +</pre> +</p> + +<p> +<pre> + +int ioctl(int fd, int request = AUDIO_SELECT_SOURCE, audioStreamSource_t source); + + DESCRIPTION + + This ioctl call informs the audio device which source shall be used for the + input data. The possible sources are demux or memory. If AUDIO_SOURCE_MEMORY + is selected, the data is fed to the Audio Device through the write command. + + PARAMETERS + + int fd File descriptor returned by a previous call to open(). + + int request Equals AUDIO_SELECT_SOURCE for this command. + + audioStreamSource_t source Indicates the source that shall be used for the + Audio stream. + + RETURNS + + EBADF fd is not a valid open file descriptor. + + EINTERNAL Internal error + + + +</pre> +</p> + +<p> +<pre> + +int ioctl(int fd, int request = AUDIO_SET_MUTE, boolean state); + + DESCRIPTION + + This ioctl call asks the audio device to mute the stream that is currently being + played. + + PARAMETERS + + int fd File descriptor returned by a previous call to open(). + + int request Equals AUDIO_SET_MUTE for this command. + + boolean state Indicates if audio device shall mute or not. + TRUE Audio Mute + FALSE Audio Unmute + + RETURNS + + EBADF fd is not a valid open file descriptor. + + EINTERNAL Internal error, + + EINVAL Illegal input parameter. + +</pre> +</p> + +<p> +<pre> +int ioctl(int fd, int request = AUDIO_SET_AV_SYNC, boolean state); + + DESCRIPTION + + This ioctl call asks the Audio Device to turn ON or OFF A/V synchronisation. + + PARAMETERS + + int fd File descriptor returned by a previous call to open(). + + int request Equals AUDIO_AV_SYNC for this command. + + boolean state Tells the DVB subsystem if A/V synchronisation shall be ON or OFF. + TRUE AV-sync ON + FALSE AV-sync OFF + + RETURNS + + EBADF fd is not a valid open file descriptor. + + EINTERNAL Internal error + + EINVAL Illegal input parameter. + + + +</pre> +</p> + +<p> +<pre> + +int ioctl(int fd, int request = AUDIO_SET_BYPASS_MODE, boolean mode); + + DESCRIPTION + + This ioctl call asks the Audio Device to bypass the Audio decoder and forward + the stream without decoding. This mode shall be used if streams that can't be + handled by the DVB system shall be decoded. Dolby DigitalTM streams are + automatically forwarded by the DVB subsystem. + + PARAMETERS + + int fd File descriptor returned by a previous call to open(). + + int request Equals AUDIO_SET_BYPASS_MODE for this command. + + boolean mode Enables or disables the decoding of the current + Audio stream in the DVB subsystem. + TRUE Bypass is disabled + FALSE Bypass is enabled + + RETURNS + + EBADF fd is not a valid open file descriptor. + + EINTERNAL Internal error + + EINVAL Illegal pointer mode. + + +</pre> +</p> + +<p> +<pre> +int ioctl(int fd, int request = AUDIO_CHANNEL_SELECT, audioChannelSelect_t) + + DESCRIPTION + + This ioctl call asks the Audio Device to select the requested channel if possible. + + PARAMETERS + + int fd File descriptor returned by a previous call to open(). + + int request Equals AUDIO_CHANNEL_SELECT for this command. + + audioChannelSelect_t ch Select the output format of the audio (Mono, stereo) + + RETURNS + + EBADF fd is not a valid open file descriptor. + + EINTERNAL Internal error + + EINVAL Illegal pointer ch. + + + +</pre> +</p> + +<p> +<pre> + +int ioctl(int fd, int request = AUDIO_GET_STATUS, struct audioStatus *status) + + DESCRIPTION + + This ioctl call asks the Audio Device to return the current state of the Audio + Device. + + PARAMETERS + + int fd File descriptor returned by a previous call to open(). + + int request Equals AUDIO_GET_STATUS for this command. + + struct audioStatus *status Returns the current state of Audio Device + + RETURNS + + EBADF fd is not a valid open file descriptor. + + EINTERNAL Internal error + + EFAULT status points to invalid address + + + +</pre> +</p> + + </p> + </td></tr></table></body></html> + +<!-- This page was served in 1610 milliseconds by Cocoon 1.7.4 --> |