0128-rpi-update-vc_vchi_audioserv_defs.h.patch 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. From d7d03f10e6da33cd732e25499977c88f172732a4 Mon Sep 17 00:00:00 2001
  2. From: wm4 <wm4@nowhere>
  3. Date: Wed, 13 Jan 2016 19:42:48 +0100
  4. Subject: [PATCH] rpi: update vc_vchi_audioserv_defs.h
  5. Add audioserv 3 extensions. The changes were taken from the paste
  6. linked here:
  7. https://github.com/raspberrypi/linux/pull/1166#issuecomment-151917067
  8. ---
  9. sound/arm/vc_vchi_audioserv_defs.h | 13 +++++++++++--
  10. 1 file changed, 11 insertions(+), 2 deletions(-)
  11. --- a/sound/arm/vc_vchi_audioserv_defs.h
  12. +++ b/sound/arm/vc_vchi_audioserv_defs.h
  13. @@ -16,7 +16,7 @@
  14. #define _VC_AUDIO_DEFS_H_
  15. #define VC_AUDIOSERV_MIN_VER 1
  16. -#define VC_AUDIOSERV_VER 2
  17. +#define VC_AUDIOSERV_VER 3
  18. // FourCC code used for VCHI connection
  19. #define VC_AUDIO_SERVER_NAME MAKE_FOURCC("AUDS")
  20. @@ -36,6 +36,7 @@ typedef enum {
  21. VC_AUDIO_MSG_TYPE_START, // Configure audio
  22. VC_AUDIO_MSG_TYPE_STOP, // Configure audio
  23. VC_AUDIO_MSG_TYPE_WRITE, // Configure audio
  24. + VC_AUDIO_MSG_TYPE_LATENCY, // request latency in cycles
  25. VC_AUDIO_MSG_TYPE_MAX
  26. } VC_AUDIO_MSG_TYPE;
  27. @@ -44,6 +45,7 @@ typedef struct {
  28. uint32_t channels;
  29. uint32_t samplerate;
  30. uint32_t bps;
  31. + uint32_t channelmap;
  32. } VC_AUDIO_CONFIG_T;
  33. @@ -84,6 +86,12 @@ typedef struct {
  34. uint16_t max_packet;
  35. } VC_AUDIO_WRITE_T;
  36. +// query latency in samples of sink
  37. +typedef struct
  38. +{
  39. + uint32_t dummy;
  40. +} VC_AUDIO_LATENCY_T;
  41. +
  42. // Generic result for a request (VC->HOST)
  43. typedef struct {
  44. int32_t success; // Success value
  45. @@ -108,9 +116,10 @@ typedef struct {
  46. VC_AUDIO_START_T start;
  47. VC_AUDIO_STOP_T stop;
  48. VC_AUDIO_WRITE_T write;
  49. + VC_AUDIO_LATENCY_T latency;
  50. VC_AUDIO_RESULT_T result;
  51. VC_AUDIO_COMPLETE_T complete;
  52. } u;
  53. } VC_AUDIO_MSG_T;
  54. -#endif // _VC_AUDIO_DEFS_H_
  55. +#endif // _VC_AUDIO_DEFS_H_
  56. \ No newline at end of file