Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
translate ▾

Modern-Apps.git / auto / protocol / src / main / proto / gal / services.proto

services.proto127 lines · 3.7 KiBRaw
1// Google Automotive Link service descriptors -- the payloads a head unit puts inside each
2// Service entry of its discovery response.
3//
4// GAL 11/12 GAP (Phase 4, MA Auto sender): the APK teardown recovered the service
5// descriptor fields but not the MEDIA_PLAYBACK_STATUS / MEDIA_BROWSER channel message
6// IDs, so MA Auto does not speak services 11/12. Now-playing is served from the
7// on-device media session and rendered into the ch2 video stream instead; inbound
8// 11/12 traffic is NOT_SUPPORTED (observed, never answered). See gal/media.proto.
9//
10// Field numbers recovered from the APK's protobuf-lite descriptors and exact; names follow
11// aasdk/openauto. See gal/control.proto for the provenance note.
12
13syntax = "proto2";
14
15package gal;
16
17option java_package = "com.vayunmathur.auto.protocol.gal";
18option java_multiple_files = true;
19
20enum MediaCodecType {
21 MEDIA_CODEC_AUDIO_PCM = 1;
22 MEDIA_CODEC_AUDIO_AAC_LC = 2;
23 MEDIA_CODEC_VIDEO_H264_BP = 3;
24 MEDIA_CODEC_AUDIO_AAC_LC_ADTS = 4;
25 MEDIA_CODEC_VIDEO_VP9 = 5;
26 MEDIA_CODEC_VIDEO_AV1 = 6;
27 MEDIA_CODEC_VIDEO_H265 = 7;
28}
29
30enum VideoResolution {
31 VIDEO_800x480 = 1;
32 VIDEO_1280x720 = 2;
33 VIDEO_1920x1080 = 3;
34 VIDEO_2560x1440 = 4;
35 VIDEO_3840x2160 = 5;
36 VIDEO_720x1280 = 6;
37 VIDEO_1080x1920 = 7;
38 VIDEO_1440x2560 = 8;
39 VIDEO_2160x3840 = 9;
40}
41
42// All three are `required`: a head unit that omits one is malformed, and protobuf-lite will
43// refuse to build it, which is the behaviour we want.
44message AudioConfiguration {
45 required uint32 sampling_rate = 1;
46 required uint32 number_of_bits = 2;
47 required uint32 number_of_channels = 3;
48}
49
50message VideoConfiguration {
51 optional VideoResolution codec_resolution = 1;
52 optional int32 frame_rate = 2;
53 optional uint32 width_margin = 3;
54 optional uint32 height_margin = 4;
55 optional uint32 density = 5;
56 optional uint32 field6 = 6;
57 optional uint32 field8 = 8;
58 optional uint32 field9 = 9;
59 optional int32 field10 = 10;
60 optional bytes field11 = 11;
61 // Field 7 is absent from this build.
62}
63
64// Carries both audio and video sinks; which one it is depends on the codec type.
65message MediaSinkService {
66 optional MediaCodecType available_type = 1;
67 optional int32 audio_type = 2;
68 repeated AudioConfiguration audio_configs = 3;
69 repeated VideoConfiguration video_configs = 4;
70 optional uint32 available_while_in_call = 6;
71 optional int32 field7 = 7;
72 optional int32 field8 = 8;
73 optional int32 field9 = 9;
74 // Field 5 is absent from this build.
75}
76
77// The car's microphone. The phone receives this audio and acks it.
78message MediaSourceService {
79 optional MediaCodecType available_type = 1;
80 optional AudioConfiguration audio_config = 2;
81}
82
83message TouchConfig {
84 required int32 width = 1;
85 required int32 height = 2;
86 optional int32 type = 3;
87}
88
89message InputSourceService {
90 repeated int32 keycodes_supported = 1 [packed = true];
91 repeated TouchConfig touchscreen = 2;
92 repeated TouchConfig touchpad = 3;
93 repeated int32 feedback_events_supported = 4;
94 optional uint32 field5 = 5;
95}
96
97message Sensor {
98 required int32 type = 1;
99}
100
101message SensorSourceService {
102 repeated Sensor sensors = 1;
103 optional uint32 location_characterization = 2;
104 repeated int32 fuel_types = 3;
105 repeated int32 ev_connector_types = 4;
106}
107
108message BluetoothService {
109 required string car_address = 1;
110 repeated int32 supported_pairing_methods = 2 [packed = true];
111}
112
113message NavigationStatusService {
114 required int32 minimum_interval_ms = 1;
115 required int32 type = 2;
116 optional bytes image_options = 3;
117}
118
119message VendorExtensionService {
120 required string name = 1;
121 repeated string package_allowlist = 2;
122 optional bytes data = 3;
123}
124
125message WifiProjectionService {
126 optional string car_wifi_bssid = 1;
127}