audio-ipc-api.txt 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. Bluetooth Audio Plugin
  2. ======================
  3. The audio plugin happen to be in a different socket but all the rules for
  4. HAL socket apply here as well, the abstract socket name is
  5. "\0bluez_audio_socket" (tentative):
  6. .---Audio---. .--Android--.
  7. | Plugin | | Daemon |
  8. | | Command | |
  9. | | --------------------------> | |
  10. | | | |
  11. | | <-------------------------- | |
  12. | | Response | |
  13. | | | |
  14. | | | |
  15. | | | |
  16. '-----------' '-----------'
  17. Audio HAL Daemon
  18. ----------------------------------------------------
  19. call dev->open() --> command 0x01
  20. return dev->open() <-- response 0x01
  21. call dev->open_output_stream() --> command 0x03
  22. return dev->open_output_stream() <-- response 0x03
  23. call stream->write() --> command 0x05
  24. return stream->write() <-- response 0x05
  25. call stream->common.standby() --> command 0x06
  26. return stream->common.standby() <-- response 0x06
  27. call dev->close_output_stream() --> command 0x04
  28. return dev->close_output_stream() <-- response 0x04
  29. call dev->close() --> command 0x02
  30. return dev->close() <-- response 0x02
  31. Audio Service (ID 0)
  32. ====================
  33. Opcode 0x00 - Error response
  34. Response parameters: Status (1 octet)
  35. Opcode 0x01 - Open Audio Endpoint commmand
  36. Command parameters: Service UUID (16 octets)
  37. Codec ID (1 octet)
  38. Number of codec presets (1 octet)
  39. Codec capabilities length (1 octet)
  40. Codec capabilities (variable)
  41. Codec preset # length (1 octet)
  42. Codec preset # configuration (variable)
  43. ...
  44. Response parameters: Endpoint ID (1 octet)
  45. Opcode 0x02 - Close Audio Endpoint command
  46. Command parameters: Endpoint ID (1 octet)
  47. Response parameters: <none>
  48. Opcode 0x03 - Open Stream command
  49. Command parameters: Endpoint ID (1 octet)
  50. Response parameters: Outgoing MTU (2 octets)
  51. Codec configuration length (1 octet)
  52. Codec configuration (1 octet)
  53. File descriptor (inline)
  54. Opcode 0x04 - Close Stream command
  55. Command parameters: Endpoint ID (1 octet)
  56. Response parameters: <none>
  57. Opcode 0x05 - Resume Stream command
  58. Command parameters: Endpoint ID (1 octet)
  59. Response parameters: <none>
  60. Opcode 0x06 - Suspend Stream command
  61. Command parameters: Endpoint ID (1 octet)
  62. Response parameters: <none>