Squeezelite.proto 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. syntax = "proto3";
  2. import "customoptions.proto";
  3. import "nanopb.proto";
  4. option (nanopb_fileopt).enum_to_string = true;
  5. package sys;
  6. enum OutputTypeEnum {
  7. OUTPUT_UNKNOWN = 0;
  8. OUTPUT_I2S = 1;
  9. OUTPUT_SPDIF = 2;
  10. OUTPUT_Bluetooth = 3;
  11. }
  12. message OutputBT {
  13. option (nanopb_msgopt).msgid = 10039;
  14. string sink_name = 1 [(nanopb).max_length= 128];
  15. string pin = 2 [(nanopb).max_length= 16];
  16. }
  17. // Enum for the type of resampling algorithm
  18. enum ResampleAlgorithm {
  19. RA_DISABLED = 0;
  20. RA_BASIC_LINEAR = 1; // Basic linear interpolation
  21. RA_THIRTEEN_TAPS = 2; // 13 taps
  22. RA_TWENTY_ONE_TAPS = 3; // 21 taps
  23. }
  24. // ResampleOptions represents the resampling options for Squeezelite
  25. message ResampleOptions {
  26. option (nanopb_msgopt).msgid = 10040;
  27. ResampleAlgorithm algorithm = 1; // The resampling algorithm to use
  28. bool interpolate_filter_coefficients = 2; // Whether to interpolate filter coefficients
  29. }
  30. enum SampleRate {
  31. SAMPLE_RATE_UNSPECIFIED = 0; // Default value, can be used to represent an unspecified rate
  32. SAMPLE_RATE_8000 = 8000;
  33. SAMPLE_RATE_11025 = 11025;
  34. SAMPLE_RATE_12000 = 12000;
  35. SAMPLE_RATE_16000 = 16000;
  36. SAMPLE_RATE_22050 = 22050;
  37. SAMPLE_RATE_24000 = 24000;
  38. SAMPLE_RATE_32000 = 32000;
  39. SAMPLE_RATE_44100 = 44100;
  40. SAMPLE_RATE_48000 = 48000;
  41. SAMPLE_RATE_88200 = 88200;
  42. SAMPLE_RATE_96000 = 96000;
  43. SAMPLE_RATE_176400 = 176400;
  44. SAMPLE_RATE_192000 = 192000;
  45. SAMPLE_RATE_352800 = 352800;
  46. SAMPLE_RATE_384000 = 384000;
  47. SAMPLE_RATE_705600 = 705600;
  48. SAMPLE_RATE_768000 = 768000;
  49. }
  50. enum DebugLevelEnum {
  51. DEFAULT = 0;
  52. ERROR = 1;
  53. WARN = 2;
  54. INFO = 3;
  55. DEBUG = 4;
  56. SDEBUG = 5;
  57. }
  58. enum CodexEnum {
  59. c_undefined = 0;
  60. c_alac = 1;
  61. c_ogg = 2;
  62. c_ops = 3;
  63. c_flac = 4;
  64. c_pcm = 5;
  65. c_mp3 = 6;
  66. c_mad = 7;
  67. c_mpg = 8;
  68. }
  69. message RatesOption {
  70. option (nanopb_msgopt).msgid = 10041;
  71. SampleRate min = 1;
  72. SampleRate max = 2;
  73. repeated SampleRate list = 3 [(nanopb).type = FT_POINTER]; // [(nanopb).max_count= 10];
  74. }
  75. message BufferOption {
  76. option (nanopb_msgopt).msgid = 10042;
  77. uint32 stream = 1 [(cust_field).v_uint32 = 500];
  78. uint32 output = 2 [(cust_field).v_uint32 = 2000];
  79. }
  80. message DebugOptions {
  81. DebugLevelEnum output = 1 [(cust_field).v_string = "WARN"];
  82. DebugLevelEnum stream = 2 [(cust_field).v_string = "WARN"];
  83. DebugLevelEnum decode = 3 [(cust_field).v_string = "WARN"];
  84. DebugLevelEnum slimproto = 4 [(cust_field).v_string = "WARN"];
  85. DebugLevelEnum ir = 5 [(cust_field).v_string = "WARN"];
  86. }
  87. message Squeezelite {
  88. option (nanopb_msgopt).msgid = 10044;
  89. // Output device configuration
  90. OutputTypeEnum output_type = 1 [(cust_field).v_string = "OUTPUT_I2S"];
  91. // Sample rates supported
  92. RatesOption rates = 2;
  93. // Timeout (seconds) for switching off amp GPIO
  94. // default is to keep the device 'on' all the time
  95. int32 amp_gpio_timeout = 3 [(cust_field).v_int32 = 30];
  96. // tRead wave and aiff format from header, ignore server parameters
  97. bool wav_aiff_header_parsing = 4;
  98. // Server connection options
  99. string server_name_ip = 5 [(nanopb).max_length= 128];
  100. uint32 server_port = 6;
  101. // Allow disabling squeezelite to use the
  102. // device in "detached mode"
  103. bool enabled = 7;
  104. OutputBT output_bt = 8;
  105. // enable debugging here
  106. DebugOptions log = 9 ;
  107. // Max sample rate reported to server
  108. uint32 max_rate = 10;
  109. BufferOption buffers = 11;
  110. string resample = 12 [(nanopb).type = FT_POINTER];
  111. repeated CodexEnum included_codex = 13 [(nanopb).type = FT_POINTER];
  112. repeated CodexEnum excluded_codex = 14 [(nanopb).type = FT_POINTER];
  113. }