audio-fopen.rst 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. .. -*- coding: utf-8; mode: rst -*-
  2. .. _audio_fopen:
  3. =======================
  4. Digital TV audio open()
  5. =======================
  6. Name
  7. ----
  8. Digital TV audio open()
  9. .. attention:: This ioctl is deprecated
  10. Synopsis
  11. --------
  12. .. c:function:: int open(const char *deviceName, int flags)
  13. :name: dvb-audio-open
  14. Arguments
  15. ---------
  16. .. flat-table::
  17. :header-rows: 0
  18. :stub-columns: 0
  19. - .. row 1
  20. - const char \*deviceName
  21. - Name of specific audio device.
  22. - .. row 2
  23. - int flags
  24. - A bit-wise OR of the following flags:
  25. - .. row 3
  26. -
  27. - O_RDONLY read-only access
  28. - .. row 4
  29. -
  30. - O_RDWR read/write access
  31. - .. row 5
  32. -
  33. - O_NONBLOCK open in non-blocking mode
  34. - .. row 6
  35. -
  36. - (blocking mode is the default)
  37. Description
  38. -----------
  39. This system call opens a named audio device (e.g.
  40. /dev/dvb/adapter0/audio0) for subsequent use. When an open() call has
  41. succeeded, the device will be ready for use. The significance of
  42. blocking or non-blocking mode is described in the documentation for
  43. functions where there is a difference. It does not affect the semantics
  44. of the open() call itself. A device opened in blocking mode can later be
  45. put into non-blocking mode (and vice versa) using the F_SETFL command
  46. of the fcntl system call. This is a standard system call, documented in
  47. the Linux manual page for fcntl. Only one user can open the Audio Device
  48. in O_RDWR mode. All other attempts to open the device in this mode will
  49. fail, and an error code will be returned. If the Audio Device is opened
  50. in O_RDONLY mode, the only ioctl call that can be used is
  51. AUDIO_GET_STATUS. All other call will return with an error code.
  52. Return Value
  53. ------------
  54. .. tabularcolumns:: |p{2.5cm}|p{15.0cm}|
  55. .. flat-table::
  56. :header-rows: 0
  57. :stub-columns: 0
  58. - .. row 1
  59. - ``ENODEV``
  60. - Device driver not loaded/available.
  61. - .. row 2
  62. - ``EBUSY``
  63. - Device or resource busy.
  64. - .. row 3
  65. - ``EINVAL``
  66. - Invalid argument.