Files
squeezelite-esp32/protobuf/proto/Squeezelite.proto
2025-03-18 17:38:34 -04:00

139 lines
3.8 KiB
Protocol Buffer

syntax = "proto3";
import "customoptions.proto";
import "nanopb.proto";
option (nanopb_fileopt).enum_to_string = true;
package sys.squeezelite;
enum outputs {
UNKNOWN = 0;
I2S = 1;
SPDIF = 2;
BT = 3;
}
message bt {
option (nanopb_msgopt).packed_struct = true;
option (nanopb_msgopt).msgid = 10039;
string sink_name = 1 [(nanopb).max_length= 128];
string pin = 2 [(nanopb).max_length= 16];
}
// Enum for the type of resampling algorithm
enum algorythms {
DISABLED = 0;
BASIC_LINEAR = 1; // Basic linear interpolation
THIRTEEN_TAPS = 2; // 13 taps
TWENTY_ONE_TAPS = 3; // 21 taps
}
// ResampleOptions represents the resampling options for Squeezelite
message options {
option (nanopb_msgopt).packed_struct = true;
option (nanopb_msgopt).msgid = 10040;
algorythms algorithm = 1; // The resampling algorithm to use
bool interpolate_filter_coefficients = 2; // Whether to interpolate filter coefficients
}
enum rates {
R_NONE = 0; // Default value, can be used to represent an unspecified rate
R_8000 = 8000;
R_11025 = 11025;
R_12000 = 12000;
R_16000 = 16000;
R_22050 = 22050;
R_24000 = 24000;
R_32000 = 32000;
R_44100 = 44100;
R_48000 = 48000;
R_88200 = 88200;
R_96000 = 96000;
R_176400 = 176400;
R_192000 = 192000;
R_352800 = 352800;
R_384000 = 384000;
R_705600 = 705600;
R_768000 = 768000;
}
enum debug_levels {
DEFAULT = 0;
ERROR = 1;
WARN = 2;
INFO = 3;
DEBUG = 4;
SDEBUG = 5;
}
enum codecs {
c_undefined = 0;
c_alac = 1;
c_ogg = 2;
c_ops = 3;
c_flac = 4;
c_pcm = 5;
c_mp3 = 6;
c_mad = 7;
c_mpg = 8;
}
message rates_opt {
option (nanopb_msgopt).packed_struct = true;
option (nanopb_msgopt).msgid = 10041;
rates min = 1;
rates max = 2;
repeated rates list = 3 [(nanopb).type = FT_POINTER]; // [(nanopb).max_count= 10];
}
message buffer_opt {
option (nanopb_msgopt).packed_struct = true;
option (nanopb_msgopt).msgid = 10042;
uint32 stream = 1 [(cust_field).v_uint32 = 500];
uint32 output = 2 [(cust_field).v_uint32 = 2000];
}
message logging_opt {
option (nanopb_msgopt).packed_struct = true;
debug_levels output = 1 [(cust_field).v_string = "DEBUG"];
debug_levels stream = 2 [(cust_field).v_string = "DEBUG"];
debug_levels decode = 3 [(cust_field).v_string = "DEBUG"];
debug_levels slimproto = 4 [(cust_field).v_string = "DEBUG"];
debug_levels ir = 5 [(cust_field).v_string = "DEBUG"];
debug_levels all = 6 [(cust_field).v_string = "DEBUG"];
}
message config {
option (nanopb_msgopt).packed_struct = true;
option (nanopb_msgopt).msgid = 10044;
// Output device configuration
outputs output_type = 1 ;
// Sample rates supported
rates_opt rates = 2;
// Timeout (seconds) for switching off amp GPIO
// default is to keep the device 'on' all the time
int32 amp_gpio_timeout = 3 [(cust_field).v_int32 = 30];
// tRead wave and aiff format from header, ignore server parameters
bool wav_aiff_header_parsing = 4;
// Server connection options
string server_name_ip = 5 [(nanopb).max_length= 128];
uint32 server_port = 6;
// Allow disabling squeezelite to use the
// device in "detached mode"
bool enabled = 7 [(cust_field).v_bool = true];
bt output_bt = 8;
// enable debugging here
logging_opt log = 9 ;
// Max sample rate reported to server
uint32 max_rate = 10;
buffer_opt buffers = 11;
string resample = 12 [(nanopb).type = FT_POINTER];
repeated codecs included_codex = 13 [(nanopb).type = FT_POINTER];
repeated codecs excluded_codex = 14 [(nanopb).type = FT_POINTER];
}
message profile {
option (nanopb_msgopt).packed_struct = true;
string name = 1 [(nanopb).type = FT_POINTER];
config profile = 2 ;
}