audio-msg.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /* SPDX-License-Identifier: LGPL-2.1-or-later */
  2. /*
  3. *
  4. * BlueZ - Bluetooth protocol stack for Linux
  5. *
  6. * Copyright (C) 2014 Intel Corporation. All rights reserved.
  7. *
  8. *
  9. */
  10. #define BLUEZ_AUDIO_MTU 1024
  11. static const char BLUEZ_AUDIO_SK_PATH[] = "\0bluez_audio_socket";
  12. #define AUDIO_SERVICE_ID 0
  13. #define AUDIO_SERVICE_ID_MAX AUDIO_SERVICE_ID
  14. #define AUDIO_STATUS_SUCCESS IPC_STATUS_SUCCESS
  15. #define AUDIO_STATUS_FAILED 0x01
  16. #define AUDIO_OP_STATUS IPC_OP_STATUS
  17. #define AUDIO_OP_OPEN 0x01
  18. struct audio_preset {
  19. uint8_t len;
  20. uint8_t data[0];
  21. } __attribute__((packed));
  22. struct audio_cmd_open {
  23. uint8_t uuid[16];
  24. uint8_t codec;
  25. uint8_t presets;
  26. struct audio_preset preset[0];
  27. } __attribute__((packed));
  28. struct audio_rsp_open {
  29. uint8_t id;
  30. } __attribute__((packed));
  31. #define AUDIO_OP_CLOSE 0x02
  32. struct audio_cmd_close {
  33. uint8_t id;
  34. } __attribute__((packed));
  35. #define AUDIO_OP_OPEN_STREAM 0x03
  36. struct audio_cmd_open_stream {
  37. uint8_t id;
  38. } __attribute__((packed));
  39. struct audio_rsp_open_stream {
  40. uint16_t id;
  41. uint16_t mtu;
  42. struct audio_preset preset[0];
  43. } __attribute__((packed));
  44. #define AUDIO_OP_CLOSE_STREAM 0x04
  45. struct audio_cmd_close_stream {
  46. uint8_t id;
  47. } __attribute__((packed));
  48. #define AUDIO_OP_RESUME_STREAM 0x05
  49. struct audio_cmd_resume_stream {
  50. uint8_t id;
  51. } __attribute__((packed));
  52. #define AUDIO_OP_SUSPEND_STREAM 0x06
  53. struct audio_cmd_suspend_stream {
  54. uint8_t id;
  55. } __attribute__((packed));