audio.xml 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203
  1. <title>DVB Audio Device</title>
  2. <para>The DVB audio device controls the MPEG2 audio decoder of the DVB hardware. It
  3. can be accessed through <emphasis role="tt">/dev/dvb/adapter0/audio0</emphasis>. Data types and and
  4. ioctl definitions can be accessed by including <emphasis role="tt">linux/dvb/video.h</emphasis> in your
  5. application.
  6. </para>
  7. <para>Please note that some DVB cards don&#8217;t have their own MPEG decoder, which results in
  8. the omission of the audio and video device.
  9. </para>
  10. <section id="audio_data_types">
  11. <title>Audio Data Types</title>
  12. <para>This section describes the structures, data types and defines used when talking to the
  13. audio device.
  14. </para>
  15. <section id="audio-stream-source-t">
  16. <title>audio_stream_source_t</title>
  17. <para>The audio stream source is set through the AUDIO_SELECT_SOURCE call and can take
  18. the following values, depending on whether we are replaying from an internal (demux) or
  19. external (user write) source.
  20. </para>
  21. <programlisting>
  22. typedef enum {
  23. AUDIO_SOURCE_DEMUX,
  24. AUDIO_SOURCE_MEMORY
  25. } audio_stream_source_t;
  26. </programlisting>
  27. <para>AUDIO_SOURCE_DEMUX selects the demultiplexer (fed either by the frontend or the
  28. DVR device) as the source of the video stream. If AUDIO_SOURCE_MEMORY
  29. is selected the stream comes from the application through the <emphasis role="tt">write()</emphasis> system
  30. call.
  31. </para>
  32. </section>
  33. <section id="audio-play-state-t">
  34. <title>audio_play_state_t</title>
  35. <para>The following values can be returned by the AUDIO_GET_STATUS call representing the
  36. state of audio playback.
  37. </para>
  38. <programlisting>
  39. typedef enum {
  40. AUDIO_STOPPED,
  41. AUDIO_PLAYING,
  42. AUDIO_PAUSED
  43. } audio_play_state_t;
  44. </programlisting>
  45. </section>
  46. <section id="audio-channel-select-t">
  47. <title>audio_channel_select_t</title>
  48. <para>The audio channel selected via AUDIO_CHANNEL_SELECT is determined by the
  49. following values.
  50. </para>
  51. <programlisting>
  52. typedef enum {
  53. AUDIO_STEREO,
  54. AUDIO_MONO_LEFT,
  55. AUDIO_MONO_RIGHT,
  56. AUDIO_MONO,
  57. AUDIO_STEREO_SWAPPED
  58. } audio_channel_select_t;
  59. </programlisting>
  60. </section>
  61. <section id="audio-status">
  62. <title>struct audio_status</title>
  63. <para>The AUDIO_GET_STATUS call returns the following structure informing about various
  64. states of the playback operation.
  65. </para>
  66. <programlisting>
  67. typedef struct audio_status {
  68. boolean AV_sync_state;
  69. boolean mute_state;
  70. audio_play_state_t play_state;
  71. audio_stream_source_t stream_source;
  72. audio_channel_select_t channel_select;
  73. boolean bypass_mode;
  74. audio_mixer_t mixer_state;
  75. } audio_status_t;
  76. </programlisting>
  77. </section>
  78. <section id="audio-mixer">
  79. <title>struct audio_mixer</title>
  80. <para>The following structure is used by the AUDIO_SET_MIXER call to set the audio
  81. volume.
  82. </para>
  83. <programlisting>
  84. typedef struct audio_mixer {
  85. unsigned int volume_left;
  86. unsigned int volume_right;
  87. } audio_mixer_t;
  88. </programlisting>
  89. </section>
  90. <section id="audio_encodings">
  91. <title>audio encodings</title>
  92. <para>A call to AUDIO_GET_CAPABILITIES returns an unsigned integer with the following
  93. bits set according to the hardwares capabilities.
  94. </para>
  95. <programlisting>
  96. #define AUDIO_CAP_DTS 1
  97. #define AUDIO_CAP_LPCM 2
  98. #define AUDIO_CAP_MP1 4
  99. #define AUDIO_CAP_MP2 8
  100. #define AUDIO_CAP_MP3 16
  101. #define AUDIO_CAP_AAC 32
  102. #define AUDIO_CAP_OGG 64
  103. #define AUDIO_CAP_SDDS 128
  104. #define AUDIO_CAP_AC3 256
  105. </programlisting>
  106. </section>
  107. <section id="audio-karaoke">
  108. <title>struct audio_karaoke</title>
  109. <para>The ioctl AUDIO_SET_KARAOKE uses the following format:
  110. </para>
  111. <programlisting>
  112. typedef
  113. struct audio_karaoke {
  114. int vocal1;
  115. int vocal2;
  116. int melody;
  117. } audio_karaoke_t;
  118. </programlisting>
  119. <para>If Vocal1 or Vocal2 are non-zero, they get mixed into left and right t at 70% each. If both,
  120. Vocal1 and Vocal2 are non-zero, Vocal1 gets mixed into the left channel and Vocal2 into the
  121. right channel at 100% each. Ff Melody is non-zero, the melody channel gets mixed into left
  122. and right.
  123. </para>
  124. </section>
  125. <section id="audio-attributes-t">
  126. <title>audio attributes</title>
  127. <para>The following attributes can be set by a call to AUDIO_SET_ATTRIBUTES:
  128. </para>
  129. <programlisting>
  130. typedef uint16_t audio_attributes_t;
  131. /&#x22C6; bits: descr. &#x22C6;/
  132. /&#x22C6; 15-13 audio coding mode (0=ac3, 2=mpeg1, 3=mpeg2ext, 4=LPCM, 6=DTS, &#x22C6;/
  133. /&#x22C6; 12 multichannel extension &#x22C6;/
  134. /&#x22C6; 11-10 audio type (0=not spec, 1=language included) &#x22C6;/
  135. /&#x22C6; 9- 8 audio application mode (0=not spec, 1=karaoke, 2=surround) &#x22C6;/
  136. /&#x22C6; 7- 6 Quantization / DRC (mpeg audio: 1=DRC exists)(lpcm: 0=16bit, &#x22C6;/
  137. /&#x22C6; 5- 4 Sample frequency fs (0=48kHz, 1=96kHz) &#x22C6;/
  138. /&#x22C6; 2- 0 number of audio channels (n+1 channels) &#x22C6;/
  139. </programlisting>
  140. </section></section>
  141. <section id="audio_function_calls">
  142. <title>Audio Function Calls</title>
  143. <section id="audio_fopen">
  144. <title>open()</title>
  145. <para>DESCRIPTION
  146. </para>
  147. <informaltable><tgroup cols="1"><tbody><row><entry
  148. align="char">
  149. <para>This system call opens a named audio device (e.g. /dev/dvb/adapter0/audio0)
  150. for subsequent use. When an open() call has succeeded, the device will be ready
  151. for use. The significance of blocking or non-blocking mode is described in the
  152. documentation for functions where there is a difference. It does not affect the
  153. semantics of the open() call itself. A device opened in blocking mode can later
  154. be put into non-blocking mode (and vice versa) using the F_SETFL command
  155. of the fcntl system call. This is a standard system call, documented in the Linux
  156. manual page for fcntl. Only one user can open the Audio Device in O_RDWR
  157. mode. All other attempts to open the device in this mode will fail, and an error
  158. code will be returned. If the Audio Device is opened in O_RDONLY mode, the
  159. only ioctl call that can be used is AUDIO_GET_STATUS. All other call will
  160. return with an error code.</para>
  161. </entry>
  162. </row></tbody></tgroup></informaltable>
  163. <para>SYNOPSIS
  164. </para>
  165. <informaltable><tgroup cols="1"><tbody><row><entry
  166. align="char">
  167. <para>int open(const char &#x22C6;deviceName, int flags);</para>
  168. </entry>
  169. </row></tbody></tgroup></informaltable>
  170. <para>PARAMETERS
  171. </para>
  172. <informaltable><tgroup cols="2"><tbody><row><entry
  173. align="char">
  174. <para>const char
  175. *deviceName</para>
  176. </entry><entry
  177. align="char">
  178. <para>Name of specific audio device.</para>
  179. </entry>
  180. </row><row><entry
  181. align="char">
  182. <para>int flags</para>
  183. </entry><entry
  184. align="char">
  185. <para>A bit-wise OR of the following flags:</para>
  186. </entry>
  187. </row><row><entry
  188. align="char">
  189. </entry><entry
  190. align="char">
  191. <para>O_RDONLY read-only access</para>
  192. </entry>
  193. </row><row><entry
  194. align="char">
  195. </entry><entry
  196. align="char">
  197. <para>O_RDWR read/write access</para>
  198. </entry>
  199. </row><row><entry
  200. align="char">
  201. </entry><entry
  202. align="char">
  203. <para>O_NONBLOCK open in non-blocking mode</para>
  204. </entry>
  205. </row><row><entry
  206. align="char">
  207. </entry><entry
  208. align="char">
  209. <para>(blocking mode is the default)</para>
  210. </entry>
  211. </row></tbody></tgroup></informaltable>
  212. <para>RETURN VALUE</para>
  213. <informaltable><tgroup cols="2"><tbody><row><entry
  214. align="char">
  215. <para>ENODEV</para>
  216. </entry><entry
  217. align="char">
  218. <para>Device driver not loaded/available.</para>
  219. </entry>
  220. </row><row><entry
  221. align="char">
  222. <para>EBUSY</para>
  223. </entry><entry
  224. align="char">
  225. <para>Device or resource busy.</para>
  226. </entry>
  227. </row><row><entry
  228. align="char">
  229. <para>EINVAL</para>
  230. </entry><entry
  231. align="char">
  232. <para>Invalid argument.</para>
  233. </entry>
  234. </row></tbody></tgroup></informaltable>
  235. </section>
  236. <section id="audio_fclose">
  237. <title>close()</title>
  238. <para>DESCRIPTION
  239. </para>
  240. <informaltable><tgroup cols="1"><tbody><row><entry
  241. align="char">
  242. <para>This system call closes a previously opened audio device.</para>
  243. </entry>
  244. </row></tbody></tgroup></informaltable>
  245. <para>SYNOPSIS
  246. </para>
  247. <informaltable><tgroup cols="1"><tbody><row><entry
  248. align="char">
  249. <para>int close(int fd);</para>
  250. </entry>
  251. </row></tbody></tgroup></informaltable>
  252. <para>PARAMETERS
  253. </para>
  254. <informaltable><tgroup cols="2"><tbody><row><entry
  255. align="char">
  256. <para>int fd</para>
  257. </entry><entry
  258. align="char">
  259. <para>File descriptor returned by a previous call to open().</para>
  260. </entry>
  261. </row></tbody></tgroup></informaltable>
  262. <para>RETURN VALUE</para>
  263. <informaltable><tgroup cols="2"><tbody><row><entry
  264. align="char">
  265. <para>EBADF</para>
  266. </entry><entry
  267. align="char">
  268. <para>fd is not a valid open file descriptor.</para>
  269. </entry>
  270. </row></tbody></tgroup></informaltable>
  271. </section>
  272. <section id="audio_fwrite">
  273. <title>write()</title>
  274. <para>DESCRIPTION
  275. </para>
  276. <informaltable><tgroup cols="1"><tbody><row><entry
  277. align="char">
  278. <para>This system call can only be used if AUDIO_SOURCE_MEMORY is selected
  279. in the ioctl call AUDIO_SELECT_SOURCE. The data provided shall be in
  280. PES format. If O_NONBLOCK is not specified the function will block until
  281. buffer space is available. The amount of data to be transferred is implied by
  282. count.</para>
  283. </entry>
  284. </row></tbody></tgroup></informaltable>
  285. <para>SYNOPSIS
  286. </para>
  287. <informaltable><tgroup cols="1"><tbody><row><entry
  288. align="char">
  289. <para>size_t write(int fd, const void &#x22C6;buf, size_t count);</para>
  290. </entry>
  291. </row></tbody></tgroup></informaltable>
  292. <para>PARAMETERS
  293. </para>
  294. <informaltable><tgroup cols="2"><tbody><row><entry
  295. align="char">
  296. <para>int fd</para>
  297. </entry><entry
  298. align="char">
  299. <para>File descriptor returned by a previous call to open().</para>
  300. </entry>
  301. </row><row><entry
  302. align="char">
  303. <para>void *buf</para>
  304. </entry><entry
  305. align="char">
  306. <para>Pointer to the buffer containing the PES data.</para>
  307. </entry>
  308. </row><row><entry
  309. align="char">
  310. <para>size_t count</para>
  311. </entry><entry
  312. align="char">
  313. <para>Size of buf.</para>
  314. </entry>
  315. </row></tbody></tgroup></informaltable>
  316. <para>RETURN VALUE</para>
  317. <informaltable><tgroup cols="2"><tbody><row><entry
  318. align="char">
  319. <para>EPERM</para>
  320. </entry><entry
  321. align="char">
  322. <para>Mode AUDIO_SOURCE_MEMORY not selected.</para>
  323. </entry>
  324. </row><row><entry
  325. align="char">
  326. <para>ENOMEM</para>
  327. </entry><entry
  328. align="char">
  329. <para>Attempted to write more data than the internal buffer can
  330. hold.</para>
  331. </entry>
  332. </row><row><entry
  333. align="char">
  334. <para>EBADF</para>
  335. </entry><entry
  336. align="char">
  337. <para>fd is not a valid open file descriptor.</para>
  338. </entry>
  339. </row></tbody></tgroup></informaltable>
  340. </section><section id="AUDIO_STOP"
  341. role="subsection"><title>AUDIO_STOP</title>
  342. <para>DESCRIPTION
  343. </para>
  344. <informaltable><tgroup cols="1"><tbody><row><entry
  345. align="char">
  346. <para>This ioctl call asks the Audio Device to stop playing the current stream.</para>
  347. </entry>
  348. </row></tbody></tgroup></informaltable>
  349. <para>SYNOPSIS
  350. </para>
  351. <informaltable><tgroup cols="1"><tbody><row><entry
  352. align="char">
  353. <para>int ioctl(int fd, int request = AUDIO_STOP);</para>
  354. </entry>
  355. </row></tbody></tgroup></informaltable>
  356. <para>PARAMETERS
  357. </para>
  358. <informaltable><tgroup cols="2"><tbody><row><entry
  359. align="char">
  360. <para>int fd</para>
  361. </entry><entry
  362. align="char">
  363. <para>File descriptor returned by a previous call to open().</para>
  364. </entry>
  365. </row><row><entry
  366. align="char">
  367. <para>int request</para>
  368. </entry><entry
  369. align="char">
  370. <para>Equals AUDIO_STOP for this command.</para>
  371. </entry>
  372. </row></tbody></tgroup></informaltable>
  373. &return-value-dvb;
  374. </section><section id="AUDIO_PLAY"
  375. role="subsection"><title>AUDIO_PLAY</title>
  376. <para>DESCRIPTION
  377. </para>
  378. <informaltable><tgroup cols="1"><tbody><row><entry
  379. align="char">
  380. <para>This ioctl call asks the Audio Device to start playing an audio stream from the
  381. selected source.</para>
  382. </entry>
  383. </row></tbody></tgroup></informaltable>
  384. <para>SYNOPSIS
  385. </para>
  386. <informaltable><tgroup cols="1"><tbody><row><entry
  387. align="char">
  388. <para>int ioctl(int fd, int request = AUDIO_PLAY);</para>
  389. </entry>
  390. </row></tbody></tgroup></informaltable>
  391. <para>PARAMETERS
  392. </para>
  393. <informaltable><tgroup cols="2"><tbody><row><entry
  394. align="char">
  395. <para>int fd</para>
  396. </entry><entry
  397. align="char">
  398. <para>File descriptor returned by a previous call to open().</para>
  399. </entry>
  400. </row><row><entry
  401. align="char">
  402. <para>int request</para>
  403. </entry><entry
  404. align="char">
  405. <para>Equals AUDIO_PLAY for this command.</para>
  406. </entry>
  407. </row></tbody></tgroup></informaltable>
  408. &return-value-dvb;
  409. </section><section id="AUDIO_PAUSE"
  410. role="subsection"><title>AUDIO_PAUSE</title>
  411. <para>DESCRIPTION
  412. </para>
  413. <informaltable><tgroup cols="1"><tbody><row><entry
  414. align="char">
  415. <para>This ioctl call suspends the audio stream being played. Decoding and playing
  416. are paused. It is then possible to restart again decoding and playing process of
  417. the audio stream using AUDIO_CONTINUE command.</para>
  418. </entry>
  419. </row><row><entry
  420. align="char">
  421. <para>If AUDIO_SOURCE_MEMORY is selected in the ioctl call
  422. AUDIO_SELECT_SOURCE, the DVB-subsystem will not decode (consume)
  423. any more data until the ioctl call AUDIO_CONTINUE or AUDIO_PLAY is
  424. performed.</para>
  425. </entry>
  426. </row></tbody></tgroup></informaltable>
  427. <para>SYNOPSIS
  428. </para>
  429. <informaltable><tgroup cols="1"><tbody><row><entry
  430. align="char">
  431. <para>int ioctl(int fd, int request = AUDIO_PAUSE);</para>
  432. </entry>
  433. </row></tbody></tgroup></informaltable>
  434. <para>PARAMETERS
  435. </para>
  436. <informaltable><tgroup cols="2"><tbody><row><entry
  437. align="char">
  438. <para>int fd</para>
  439. </entry><entry
  440. align="char">
  441. <para>File descriptor returned by a previous call to open().</para>
  442. </entry>
  443. </row><row><entry
  444. align="char">
  445. <para>int request</para>
  446. </entry><entry
  447. align="char">
  448. <para>Equals AUDIO_PAUSE for this command.</para>
  449. </entry>
  450. </row></tbody></tgroup></informaltable>
  451. &return-value-dvb;
  452. </section><section id="AUDIO_CONTINUE"
  453. role="subsection"><title>AUDIO_CONTINUE</title>
  454. <para>DESCRIPTION
  455. </para>
  456. <informaltable><tgroup cols="1"><tbody><row><entry
  457. align="char">
  458. <para>This ioctl restarts the decoding and playing process previously paused
  459. with AUDIO_PAUSE command.</para>
  460. </entry>
  461. </row><row><entry
  462. align="char">
  463. <para>It only works if the stream were previously stopped with AUDIO_PAUSE</para>
  464. </entry>
  465. </row></tbody></tgroup></informaltable>
  466. <para>SYNOPSIS
  467. </para>
  468. <informaltable><tgroup cols="1"><tbody><row><entry
  469. align="char">
  470. <para>int ioctl(int fd, int request = AUDIO_CONTINUE);</para>
  471. </entry>
  472. </row></tbody></tgroup></informaltable>
  473. <para>PARAMETERS
  474. </para>
  475. <informaltable><tgroup cols="2"><tbody><row><entry
  476. align="char">
  477. <para>int fd</para>
  478. </entry><entry
  479. align="char">
  480. <para>File descriptor returned by a previous call to open().</para>
  481. </entry>
  482. </row><row><entry
  483. align="char">
  484. <para>int request</para>
  485. </entry><entry
  486. align="char">
  487. <para>Equals AUDIO_CONTINUE for this command.</para>
  488. </entry>
  489. </row></tbody></tgroup></informaltable>
  490. &return-value-dvb;
  491. </section><section id="AUDIO_SELECT_SOURCE"
  492. role="subsection"><title>AUDIO_SELECT_SOURCE</title>
  493. <para>DESCRIPTION
  494. </para>
  495. <informaltable><tgroup cols="1"><tbody><row><entry
  496. align="char">
  497. <para>This ioctl call informs the audio device which source shall be used
  498. for the input data. The possible sources are demux or memory. If
  499. AUDIO_SOURCE_MEMORY is selected, the data is fed to the Audio Device
  500. through the write command.</para>
  501. </entry>
  502. </row></tbody></tgroup></informaltable>
  503. <para>SYNOPSIS
  504. </para>
  505. <informaltable><tgroup cols="1"><tbody><row><entry
  506. align="char">
  507. <para>int ioctl(int fd, int request = AUDIO_SELECT_SOURCE,
  508. audio_stream_source_t source);</para>
  509. </entry>
  510. </row></tbody></tgroup></informaltable>
  511. <para>PARAMETERS
  512. </para>
  513. <informaltable><tgroup cols="2"><tbody><row><entry
  514. align="char">
  515. <para>int fd</para>
  516. </entry><entry
  517. align="char">
  518. <para>File descriptor returned by a previous call to open().</para>
  519. </entry>
  520. </row><row><entry
  521. align="char">
  522. <para>int request</para>
  523. </entry><entry
  524. align="char">
  525. <para>Equals AUDIO_SELECT_SOURCE for this command.</para>
  526. </entry>
  527. </row><row><entry
  528. align="char">
  529. <para>audio_stream_source_t
  530. source</para>
  531. </entry><entry
  532. align="char">
  533. <para>Indicates the source that shall be used for the Audio
  534. stream.</para>
  535. </entry>
  536. </row></tbody></tgroup></informaltable>
  537. &return-value-dvb;
  538. </section><section id="AUDIO_SET_MUTE"
  539. role="subsection"><title>AUDIO_SET_MUTE</title>
  540. <para>DESCRIPTION
  541. </para>
  542. <informaltable><tgroup cols="1"><tbody><row><entry
  543. align="char">
  544. <para>This ioctl call asks the audio device to mute the stream that is currently being
  545. played.</para>
  546. </entry>
  547. </row></tbody></tgroup></informaltable>
  548. <para>SYNOPSIS
  549. </para>
  550. <informaltable><tgroup cols="1"><tbody><row><entry
  551. align="char">
  552. <para>int ioctl(int fd, int request = AUDIO_SET_MUTE,
  553. boolean state);</para>
  554. </entry>
  555. </row></tbody></tgroup></informaltable>
  556. <para>PARAMETERS
  557. </para>
  558. <informaltable><tgroup cols="2"><tbody><row><entry
  559. align="char">
  560. <para>int fd</para>
  561. </entry><entry
  562. align="char">
  563. <para>File descriptor returned by a previous call to open().</para>
  564. </entry>
  565. </row><row><entry
  566. align="char">
  567. <para>int request</para>
  568. </entry><entry
  569. align="char">
  570. <para>Equals AUDIO_SET_MUTE for this command.</para>
  571. </entry>
  572. </row><row><entry
  573. align="char">
  574. <para>boolean state</para>
  575. </entry><entry
  576. align="char">
  577. <para>Indicates if audio device shall mute or not.</para>
  578. </entry>
  579. </row><row><entry
  580. align="char">
  581. </entry><entry
  582. align="char">
  583. <para>TRUE Audio Mute</para>
  584. </entry>
  585. </row><row><entry
  586. align="char">
  587. </entry><entry
  588. align="char">
  589. <para>FALSE Audio Un-mute</para>
  590. </entry>
  591. </row></tbody></tgroup></informaltable>
  592. &return-value-dvb;
  593. </section><section id="AUDIO_SET_AV_SYNC"
  594. role="subsection"><title>AUDIO_SET_AV_SYNC</title>
  595. <para>DESCRIPTION
  596. </para>
  597. <informaltable><tgroup cols="1"><tbody><row><entry
  598. align="char">
  599. <para>This ioctl call asks the Audio Device to turn ON or OFF A/V synchronization.</para>
  600. </entry>
  601. </row></tbody></tgroup></informaltable>
  602. <para>SYNOPSIS
  603. </para>
  604. <informaltable><tgroup cols="1"><tbody><row><entry
  605. align="char">
  606. <para>int ioctl(int fd, int request = AUDIO_SET_AV_SYNC,
  607. boolean state);</para>
  608. </entry>
  609. </row></tbody></tgroup></informaltable>
  610. <para>PARAMETERS
  611. </para>
  612. <informaltable><tgroup cols="2"><tbody><row><entry
  613. align="char">
  614. <para>int fd</para>
  615. </entry><entry
  616. align="char">
  617. <para>File descriptor returned by a previous call to open().</para>
  618. </entry>
  619. </row><row><entry
  620. align="char">
  621. <para>int request</para>
  622. </entry><entry
  623. align="char">
  624. <para>Equals AUDIO_AV_SYNC for this command.</para>
  625. </entry>
  626. </row><row><entry
  627. align="char">
  628. <para>boolean state</para>
  629. </entry><entry
  630. align="char">
  631. <para>Tells the DVB subsystem if A/V synchronization shall be
  632. ON or OFF.</para>
  633. </entry>
  634. </row><row><entry
  635. align="char">
  636. </entry><entry
  637. align="char">
  638. <para>TRUE AV-sync ON</para>
  639. </entry>
  640. </row><row><entry
  641. align="char">
  642. </entry><entry
  643. align="char">
  644. <para>FALSE AV-sync OFF</para>
  645. </entry>
  646. </row></tbody></tgroup></informaltable>
  647. &return-value-dvb;
  648. </section><section id="AUDIO_SET_BYPASS_MODE"
  649. role="subsection"><title>AUDIO_SET_BYPASS_MODE</title>
  650. <para>DESCRIPTION
  651. </para>
  652. <informaltable><tgroup cols="1"><tbody><row><entry
  653. align="char">
  654. <para>This ioctl call asks the Audio Device to bypass the Audio decoder and forward
  655. the stream without decoding. This mode shall be used if streams that can&#8217;t be
  656. handled by the DVB system shall be decoded. Dolby DigitalTM streams are
  657. automatically forwarded by the DVB subsystem if the hardware can handle it.</para>
  658. </entry>
  659. </row></tbody></tgroup></informaltable>
  660. <para>SYNOPSIS
  661. </para>
  662. <informaltable><tgroup cols="1"><tbody><row><entry
  663. align="char">
  664. <para>int ioctl(int fd, int request =
  665. AUDIO_SET_BYPASS_MODE, boolean mode);</para>
  666. </entry>
  667. </row></tbody></tgroup></informaltable>
  668. <para>PARAMETERS
  669. </para>
  670. <informaltable><tgroup cols="2"><tbody><row><entry
  671. align="char">
  672. <para>int fd</para>
  673. </entry><entry
  674. align="char">
  675. <para>File descriptor returned by a previous call to open().</para>
  676. </entry>
  677. </row><row><entry
  678. align="char">
  679. <para>int request</para>
  680. </entry><entry
  681. align="char">
  682. <para>Equals AUDIO_SET_BYPASS_MODE for this
  683. command.</para>
  684. </entry>
  685. </row><row><entry
  686. align="char">
  687. <para>boolean mode</para>
  688. </entry><entry
  689. align="char">
  690. <para>Enables or disables the decoding of the current Audio
  691. stream in the DVB subsystem.</para>
  692. </entry>
  693. </row><row><entry
  694. align="char">
  695. </entry><entry
  696. align="char">
  697. <para>TRUE Bypass is disabled</para>
  698. </entry>
  699. </row><row><entry
  700. align="char">
  701. </entry><entry
  702. align="char">
  703. <para>FALSE Bypass is enabled</para>
  704. </entry>
  705. </row></tbody></tgroup></informaltable>
  706. &return-value-dvb;
  707. </section><section id="AUDIO_CHANNEL_SELECT"
  708. role="subsection"><title>AUDIO_CHANNEL_SELECT</title>
  709. <para>DESCRIPTION
  710. </para>
  711. <informaltable><tgroup cols="1"><tbody><row><entry
  712. align="char">
  713. <para>This ioctl call asks the Audio Device to select the requested channel if possible.</para>
  714. </entry>
  715. </row></tbody></tgroup></informaltable>
  716. <para>SYNOPSIS
  717. </para>
  718. <informaltable><tgroup cols="1"><tbody><row><entry
  719. align="char">
  720. <para>int ioctl(int fd, int request =
  721. AUDIO_CHANNEL_SELECT, audio_channel_select_t);</para>
  722. </entry>
  723. </row></tbody></tgroup></informaltable>
  724. <para>PARAMETERS
  725. </para>
  726. <informaltable><tgroup cols="2"><tbody><row><entry
  727. align="char">
  728. <para>int fd</para>
  729. </entry><entry
  730. align="char">
  731. <para>File descriptor returned by a previous call to open().</para>
  732. </entry>
  733. </row><row><entry
  734. align="char">
  735. <para>int request</para>
  736. </entry><entry
  737. align="char">
  738. <para>Equals AUDIO_CHANNEL_SELECT for this
  739. command.</para>
  740. </entry>
  741. </row><row><entry
  742. align="char">
  743. <para>audio_channel_select_t
  744. ch</para>
  745. </entry><entry
  746. align="char">
  747. <para>Select the output format of the audio (mono left/right,
  748. stereo).</para>
  749. </entry>
  750. </row></tbody></tgroup></informaltable>
  751. &return-value-dvb;
  752. </section><section id="AUDIO_GET_STATUS"
  753. role="subsection"><title>AUDIO_GET_STATUS</title>
  754. <para>DESCRIPTION
  755. </para>
  756. <informaltable><tgroup cols="1"><tbody><row><entry
  757. align="char">
  758. <para>This ioctl call asks the Audio Device to return the current state of the Audio
  759. Device.</para>
  760. </entry>
  761. </row></tbody></tgroup></informaltable>
  762. <para>SYNOPSIS
  763. </para>
  764. <informaltable><tgroup cols="1"><tbody><row><entry
  765. align="char">
  766. <para>int ioctl(int fd, int request = AUDIO_GET_STATUS,
  767. struct audio_status &#x22C6;status);</para>
  768. </entry>
  769. </row></tbody></tgroup></informaltable>
  770. <para>PARAMETERS
  771. </para>
  772. <informaltable><tgroup cols="2"><tbody><row><entry
  773. align="char">
  774. <para>int fd</para>
  775. </entry><entry
  776. align="char">
  777. <para>File descriptor returned by a previous call to open().</para>
  778. </entry>
  779. </row><row><entry
  780. align="char">
  781. <para>int request</para>
  782. </entry><entry
  783. align="char">
  784. <para>Equals AUDIO_GET_STATUS for this command.</para>
  785. </entry>
  786. </row><row><entry
  787. align="char">
  788. <para>struct audio_status
  789. *status</para>
  790. </entry><entry
  791. align="char">
  792. <para>Returns the current state of Audio Device.</para>
  793. </entry>
  794. </row></tbody></tgroup></informaltable>
  795. &return-value-dvb;
  796. </section><section id="AUDIO_GET_CAPABILITIES"
  797. role="subsection"><title>AUDIO_GET_CAPABILITIES</title>
  798. <para>DESCRIPTION
  799. </para>
  800. <informaltable><tgroup cols="1"><tbody><row><entry
  801. align="char">
  802. <para>This ioctl call asks the Audio Device to tell us about the decoding capabilities
  803. of the audio hardware.</para>
  804. </entry>
  805. </row></tbody></tgroup></informaltable>
  806. <para>SYNOPSIS
  807. </para>
  808. <informaltable><tgroup cols="1"><tbody><row><entry
  809. align="char">
  810. <para>int ioctl(int fd, int request =
  811. AUDIO_GET_CAPABILITIES, unsigned int &#x22C6;cap);</para>
  812. </entry>
  813. </row></tbody></tgroup></informaltable>
  814. <para>PARAMETERS
  815. </para>
  816. <informaltable><tgroup cols="2"><tbody><row><entry
  817. align="char">
  818. <para>int fd</para>
  819. </entry><entry
  820. align="char">
  821. <para>File descriptor returned by a previous call to open().</para>
  822. </entry>
  823. </row><row><entry
  824. align="char">
  825. <para>int request</para>
  826. </entry><entry
  827. align="char">
  828. <para>Equals AUDIO_GET_CAPABILITIES for this
  829. command.</para>
  830. </entry>
  831. </row><row><entry
  832. align="char">
  833. <para>unsigned int *cap</para>
  834. </entry><entry
  835. align="char">
  836. <para>Returns a bit array of supported sound formats.</para>
  837. </entry>
  838. </row></tbody></tgroup></informaltable>
  839. &return-value-dvb;
  840. </section><section id="AUDIO_CLEAR_BUFFER"
  841. role="subsection"><title>AUDIO_CLEAR_BUFFER</title>
  842. <para>DESCRIPTION
  843. </para>
  844. <informaltable><tgroup cols="1"><tbody><row><entry
  845. align="char">
  846. <para>This ioctl call asks the Audio Device to clear all software and hardware buffers
  847. of the audio decoder device.</para>
  848. </entry>
  849. </row></tbody></tgroup></informaltable>
  850. <para>SYNOPSIS
  851. </para>
  852. <informaltable><tgroup cols="1"><tbody><row><entry
  853. align="char">
  854. <para>int ioctl(int fd, int request = AUDIO_CLEAR_BUFFER);</para>
  855. </entry>
  856. </row></tbody></tgroup></informaltable>
  857. <para>PARAMETERS
  858. </para>
  859. <informaltable><tgroup cols="2"><tbody><row><entry
  860. align="char">
  861. <para>int fd</para>
  862. </entry><entry
  863. align="char">
  864. <para>File descriptor returned by a previous call to open().</para>
  865. </entry>
  866. </row><row><entry
  867. align="char">
  868. <para>int request</para>
  869. </entry><entry
  870. align="char">
  871. <para>Equals AUDIO_CLEAR_BUFFER for this command.</para>
  872. </entry>
  873. </row></tbody></tgroup></informaltable>
  874. &return-value-dvb;
  875. </section><section id="AUDIO_SET_ID"
  876. role="subsection"><title>AUDIO_SET_ID</title>
  877. <para>DESCRIPTION
  878. </para>
  879. <informaltable><tgroup cols="1"><tbody><row><entry
  880. align="char">
  881. <para>This ioctl selects which sub-stream is to be decoded if a program or system
  882. stream is sent to the video device. If no audio stream type is set the id has to be
  883. in [0xC0,0xDF] for MPEG sound, in [0x80,0x87] for AC3 and in [0xA0,0xA7]
  884. for LPCM. More specifications may follow for other stream types. If the stream
  885. type is set the id just specifies the substream id of the audio stream and only
  886. the first 5 bits are recognized.</para>
  887. </entry>
  888. </row></tbody></tgroup></informaltable>
  889. <para>SYNOPSIS
  890. </para>
  891. <informaltable><tgroup cols="1"><tbody><row><entry
  892. align="char">
  893. <para>int ioctl(int fd, int request = AUDIO_SET_ID, int
  894. id);</para>
  895. </entry>
  896. </row></tbody></tgroup></informaltable>
  897. <para>PARAMETERS
  898. </para>
  899. <informaltable><tgroup cols="2"><tbody><row><entry
  900. align="char">
  901. <para>int fd</para>
  902. </entry><entry
  903. align="char">
  904. <para>File descriptor returned by a previous call to open().</para>
  905. </entry>
  906. </row><row><entry
  907. align="char">
  908. <para>int request</para>
  909. </entry><entry
  910. align="char">
  911. <para>Equals AUDIO_SET_ID for this command.</para>
  912. </entry>
  913. </row><row><entry
  914. align="char">
  915. <para>int id</para>
  916. </entry><entry
  917. align="char">
  918. <para>audio sub-stream id</para>
  919. </entry>
  920. </row></tbody></tgroup></informaltable>
  921. &return-value-dvb;
  922. </section><section id="AUDIO_SET_MIXER"
  923. role="subsection"><title>AUDIO_SET_MIXER</title>
  924. <para>DESCRIPTION
  925. </para>
  926. <informaltable><tgroup cols="1"><tbody><row><entry
  927. align="char">
  928. <para>This ioctl lets you adjust the mixer settings of the audio decoder.</para>
  929. </entry>
  930. </row></tbody></tgroup></informaltable>
  931. <para>SYNOPSIS
  932. </para>
  933. <informaltable><tgroup cols="1"><tbody><row><entry
  934. align="char">
  935. <para>int ioctl(int fd, int request = AUDIO_SET_MIXER,
  936. audio_mixer_t &#x22C6;mix);</para>
  937. </entry>
  938. </row></tbody></tgroup></informaltable>
  939. <para>PARAMETERS
  940. </para>
  941. <informaltable><tgroup cols="2"><tbody><row><entry
  942. align="char">
  943. <para>int fd</para>
  944. </entry><entry
  945. align="char">
  946. <para>File descriptor returned by a previous call to open().</para>
  947. </entry>
  948. </row><row><entry
  949. align="char">
  950. <para>int request</para>
  951. </entry><entry
  952. align="char">
  953. <para>Equals AUDIO_SET_ID for this command.</para>
  954. </entry>
  955. </row><row><entry
  956. align="char">
  957. <para>audio_mixer_t *mix</para>
  958. </entry><entry
  959. align="char">
  960. <para>mixer settings.</para>
  961. </entry>
  962. </row></tbody></tgroup></informaltable>
  963. &return-value-dvb;
  964. </section><section id="AUDIO_SET_STREAMTYPE"
  965. role="subsection"><title>AUDIO_SET_STREAMTYPE</title>
  966. <para>DESCRIPTION
  967. </para>
  968. <informaltable><tgroup cols="1"><tbody><row><entry
  969. align="char">
  970. <para>This ioctl tells the driver which kind of audio stream to expect. This is useful
  971. if the stream offers several audio sub-streams like LPCM and AC3.</para>
  972. </entry>
  973. </row></tbody></tgroup></informaltable>
  974. <para>SYNOPSIS
  975. </para>
  976. <informaltable><tgroup cols="1"><tbody><row><entry
  977. align="char">
  978. <para>int ioctl(fd, int request = AUDIO_SET_STREAMTYPE,
  979. int type);</para>
  980. </entry>
  981. </row></tbody></tgroup></informaltable>
  982. <para>PARAMETERS
  983. </para>
  984. <informaltable><tgroup cols="2"><tbody><row><entry
  985. align="char">
  986. <para>int fd</para>
  987. </entry><entry
  988. align="char">
  989. <para>File descriptor returned by a previous call to open().</para>
  990. </entry>
  991. </row><row><entry
  992. align="char">
  993. <para>int request</para>
  994. </entry><entry
  995. align="char">
  996. <para>Equals AUDIO_SET_STREAMTYPE for this
  997. command.</para>
  998. </entry>
  999. </row><row><entry
  1000. align="char">
  1001. <para>int type</para>
  1002. </entry><entry
  1003. align="char">
  1004. <para>stream type</para>
  1005. </entry>
  1006. </row></tbody></tgroup></informaltable>
  1007. &return-value-dvb;
  1008. <informaltable><tgroup cols="2"><tbody><row><entry
  1009. align="char">
  1010. <para>EINVAL</para>
  1011. </entry><entry
  1012. align="char">
  1013. <para>type is not a valid or supported stream type.</para>
  1014. </entry>
  1015. </row></tbody></tgroup></informaltable>
  1016. </section><section id="AUDIO_SET_EXT_ID"
  1017. role="subsection"><title>AUDIO_SET_EXT_ID</title>
  1018. <para>DESCRIPTION
  1019. </para>
  1020. <informaltable><tgroup cols="1"><tbody><row><entry
  1021. align="char">
  1022. <para>This ioctl can be used to set the extension id for MPEG streams in DVD
  1023. playback. Only the first 3 bits are recognized.</para>
  1024. </entry>
  1025. </row></tbody></tgroup></informaltable>
  1026. <para>SYNOPSIS
  1027. </para>
  1028. <informaltable><tgroup cols="1"><tbody><row><entry
  1029. align="char">
  1030. <para>int ioctl(fd, int request = AUDIO_SET_EXT_ID, int
  1031. id);</para>
  1032. </entry>
  1033. </row></tbody></tgroup></informaltable>
  1034. <para>PARAMETERS
  1035. </para>
  1036. <informaltable><tgroup cols="2"><tbody><row><entry
  1037. align="char">
  1038. <para>int fd</para>
  1039. </entry><entry
  1040. align="char">
  1041. <para>File descriptor returned by a previous call to open().</para>
  1042. </entry>
  1043. </row><row><entry
  1044. align="char">
  1045. <para>int request</para>
  1046. </entry><entry
  1047. align="char">
  1048. <para>Equals AUDIO_SET_EXT_ID for this command.</para>
  1049. </entry>
  1050. </row><row><entry
  1051. align="char">
  1052. <para>int id</para>
  1053. </entry><entry
  1054. align="char">
  1055. <para>audio sub_stream_id</para>
  1056. </entry>
  1057. </row></tbody></tgroup></informaltable>
  1058. &return-value-dvb;
  1059. <informaltable><tgroup cols="2"><tbody><row><entry
  1060. align="char">
  1061. <para>EINVAL</para>
  1062. </entry><entry
  1063. align="char">
  1064. <para>id is not a valid id.</para>
  1065. </entry>
  1066. </row></tbody></tgroup></informaltable>
  1067. </section><section id="AUDIO_SET_ATTRIBUTES"
  1068. role="subsection"><title>AUDIO_SET_ATTRIBUTES</title>
  1069. <para>DESCRIPTION
  1070. </para>
  1071. <informaltable><tgroup cols="1"><tbody><row><entry
  1072. align="char">
  1073. <para>This ioctl is intended for DVD playback and allows you to set certain
  1074. information about the audio stream.</para>
  1075. </entry>
  1076. </row></tbody></tgroup></informaltable>
  1077. <para>SYNOPSIS
  1078. </para>
  1079. <informaltable><tgroup cols="1"><tbody><row><entry
  1080. align="char">
  1081. <para>int ioctl(fd, int request = AUDIO_SET_ATTRIBUTES,
  1082. audio_attributes_t attr );</para>
  1083. </entry>
  1084. </row></tbody></tgroup></informaltable>
  1085. <para>PARAMETERS
  1086. </para>
  1087. <informaltable><tgroup cols="2"><tbody><row><entry
  1088. align="char">
  1089. <para>int fd</para>
  1090. </entry><entry
  1091. align="char">
  1092. <para>File descriptor returned by a previous call to open().</para>
  1093. </entry>
  1094. </row><row><entry
  1095. align="char">
  1096. <para>int request</para>
  1097. </entry><entry
  1098. align="char">
  1099. <para>Equals AUDIO_SET_ATTRIBUTES for this command.</para>
  1100. </entry>
  1101. </row><row><entry
  1102. align="char">
  1103. <para>audio_attributes_t
  1104. attr</para>
  1105. </entry><entry
  1106. align="char">
  1107. <para>audio attributes according to section ??</para>
  1108. </entry>
  1109. </row></tbody></tgroup></informaltable>
  1110. &return-value-dvb;
  1111. <informaltable><tgroup cols="2"><tbody><row><entry
  1112. align="char">
  1113. <para>EINVAL</para>
  1114. </entry><entry
  1115. align="char">
  1116. <para>attr is not a valid or supported attribute setting.</para>
  1117. </entry>
  1118. </row></tbody></tgroup></informaltable>
  1119. </section><section id="AUDIO_SET_KARAOKE"
  1120. role="subsection"><title>AUDIO_SET_KARAOKE</title>
  1121. <para>DESCRIPTION
  1122. </para>
  1123. <informaltable><tgroup cols="1"><tbody><row><entry
  1124. align="char">
  1125. <para>This ioctl allows one to set the mixer settings for a karaoke DVD.</para>
  1126. </entry>
  1127. </row></tbody></tgroup></informaltable>
  1128. <para>SYNOPSIS
  1129. </para>
  1130. <informaltable><tgroup cols="1"><tbody><row><entry
  1131. align="char">
  1132. <para>int ioctl(fd, int request = AUDIO_SET_KARAOKE,
  1133. audio_karaoke_t &#x22C6;karaoke);</para>
  1134. </entry>
  1135. </row></tbody></tgroup></informaltable>
  1136. <para>PARAMETERS
  1137. </para>
  1138. <informaltable><tgroup cols="2"><tbody><row><entry
  1139. align="char">
  1140. <para>int fd</para>
  1141. </entry><entry
  1142. align="char">
  1143. <para>File descriptor returned by a previous call to open().</para>
  1144. </entry>
  1145. </row><row><entry
  1146. align="char">
  1147. <para>int request</para>
  1148. </entry><entry
  1149. align="char">
  1150. <para>Equals AUDIO_SET_KARAOKE for this
  1151. command.</para>
  1152. </entry>
  1153. </row><row><entry
  1154. align="char">
  1155. <para>audio_karaoke_t
  1156. *karaoke</para>
  1157. </entry><entry
  1158. align="char">
  1159. <para>karaoke settings according to section ??.</para>
  1160. </entry>
  1161. </row></tbody></tgroup></informaltable>
  1162. &return-value-dvb;
  1163. <informaltable><tgroup cols="2"><tbody><row><entry
  1164. align="char">
  1165. <para>EINVAL</para>
  1166. </entry><entry
  1167. align="char">
  1168. <para>karaoke is not a valid or supported karaoke setting.</para>
  1169. </entry>
  1170. </row></tbody></tgroup></informaltable>
  1171. </section>
  1172. </section>