1// Copyright (C) 2024 The Android Open Source Project
2// Licensed under the Apache License, Version 2.0 (the "License");
3// you may not use this file except in compliance with the License.
4// You may obtain a copy of the License at
5// http://www.apache.org/licenses/LICENSE-2.0
6// Unless required by applicable law or agreed to in writing, software
7// distributed under the License is distributed on an "AS IS" BASIS,
8// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9// See the License for the specific language governing permissions and
10// limitations under the License.
11
12syntax = "proto3";
13
14package pandora.vcp;
15
16import "pandora/host.proto";
17option java_outer_classname = "VcpProto";
18import "google/protobuf/empty.proto";
19
20service VCP {
21  // set absolute volume on remote device
22  rpc SetDeviceVolume(SetDeviceVolumeRequest) returns (google.protobuf.Empty);
23  // set volume offset on remote device
24  rpc SetVolumeOffset(SetVolumeOffsetRequest) returns (google.protobuf.Empty);
25  // Wait for device to be connected.
26  rpc WaitConnect(WaitConnectRequest) returns (google.protobuf.Empty);
27
28  // TODO: AICS interfaces could be made a bit more generic by first fetching
29  // what are the available instances and using them like the Connection object
30  // is used.
31
32  rpc SetGainSetting(SetGainSettingRequest) returns (google.protobuf.Empty);
33  rpc SetMute(SetMuteRequest) returns (google.protobuf.Empty);
34  rpc SetGainMode(SetGainModeRequest) returns (google.protobuf.Empty);
35}
36
37// Request of the `SetDeviceVolume` method
38message SetDeviceVolumeRequest{
39  // Connection crafted by grpc server
40  Connection connection = 1;
41  // Volume value to be set
42  int32 volume = 2;
43}
44
45// Request of the `SetVolumeOffset` method
46message SetVolumeOffsetRequest{
47  // Connection crafted by grpc server
48  Connection connection = 1;
49  // Volume offset value to be set
50  int32 offset = 2;
51}
52
53message WaitConnectRequest {
54  Connection connection = 1;
55}
56
57message SetGainSettingRequest {
58  Connection connection = 1;
59  int32 gainSetting = 2;
60}
61message SetMuteRequest {
62  Connection connection = 1;
63  // See Mute.aidl for valid values
64  int32 mute = 2;
65}
66message SetGainModeRequest {
67  Connection connection = 1;
68  // See GainMode.aidl for valid values
69  int32 gainMode = 2;
70}
71