xref: /aosp_15_r20/hardware/interfaces/radio/config/1.1/IRadioConfig.hal (revision 4d7e907c777eeecc4c5bd7cf640a754fac206ff7)
1*4d7e907cSAndroid Build Coastguard Worker/*
2*4d7e907cSAndroid Build Coastguard Worker * Copyright (C) 2018 The Android Open Source Project
3*4d7e907cSAndroid Build Coastguard Worker *
4*4d7e907cSAndroid Build Coastguard Worker * Licensed under the Apache License, Version 2.0 (the "License");
5*4d7e907cSAndroid Build Coastguard Worker * you may not use this file except in compliance with the License.
6*4d7e907cSAndroid Build Coastguard Worker * You may obtain a copy of the License at
7*4d7e907cSAndroid Build Coastguard Worker *
8*4d7e907cSAndroid Build Coastguard Worker *      http://www.apache.org/licenses/LICENSE-2.0
9*4d7e907cSAndroid Build Coastguard Worker *
10*4d7e907cSAndroid Build Coastguard Worker * Unless required by applicable law or agreed to in writing, software
11*4d7e907cSAndroid Build Coastguard Worker * distributed under the License is distributed on an "AS IS" BASIS,
12*4d7e907cSAndroid Build Coastguard Worker * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*4d7e907cSAndroid Build Coastguard Worker * See the License for the specific language governing permissions and
14*4d7e907cSAndroid Build Coastguard Worker * limitations under the License.
15*4d7e907cSAndroid Build Coastguard Worker */
16*4d7e907cSAndroid Build Coastguard Worker
17*4d7e907cSAndroid Build Coastguard Workerpackage [email protected];
18*4d7e907cSAndroid Build Coastguard Worker
19*4d7e907cSAndroid Build Coastguard Workerimport @1.0::IRadioConfig;
20*4d7e907cSAndroid Build Coastguard Workerimport @1.1::IRadioConfigResponse;
21*4d7e907cSAndroid Build Coastguard Workerimport @1.1::PhoneCapability;
22*4d7e907cSAndroid Build Coastguard Workerimport @1.1::ModemsConfig;
23*4d7e907cSAndroid Build Coastguard Worker
24*4d7e907cSAndroid Build Coastguard Worker/**
25*4d7e907cSAndroid Build Coastguard Worker * Note: IRadioConfig 1.1 is an intermediate layer between Android P and Android Q.
26*4d7e907cSAndroid Build Coastguard Worker * It's specifically designed for CBRS related interfaces. All other interfaces
27*4d7e907cSAndroid Build Coastguard Worker * for Q are added in IRadioConfig 1.2.
28*4d7e907cSAndroid Build Coastguard Worker *
29*4d7e907cSAndroid Build Coastguard Worker * This interface is used by telephony and telecom to talk to cellular radio for the purpose of
30*4d7e907cSAndroid Build Coastguard Worker * radio configuration, and it is not associated with any specific modem or slot.
31*4d7e907cSAndroid Build Coastguard Worker * All the functions have minimum one parameter:
32*4d7e907cSAndroid Build Coastguard Worker * serial: which corresponds to serial no. of request. Serial numbers must only be memorized for the
33*4d7e907cSAndroid Build Coastguard Worker * duration of a method call. If clients provide colliding serials (including passing the same
34*4d7e907cSAndroid Build Coastguard Worker * serial to different methods), multiple responses (one for each method call) must still be served.
35*4d7e907cSAndroid Build Coastguard Worker */
36*4d7e907cSAndroid Build Coastguard Workerinterface IRadioConfig extends @1.0::IRadioConfig {
37*4d7e907cSAndroid Build Coastguard Worker   /**
38*4d7e907cSAndroid Build Coastguard Worker     * Request current phone capability.
39*4d7e907cSAndroid Build Coastguard Worker     *
40*4d7e907cSAndroid Build Coastguard Worker     * @param serial Serial number of request.
41*4d7e907cSAndroid Build Coastguard Worker     *
42*4d7e907cSAndroid Build Coastguard Worker     * Response callback is IRadioResponse.getPhoneCapabilityResponse() which
43*4d7e907cSAndroid Build Coastguard Worker     * will return <@1.1::PhoneCapability>.
44*4d7e907cSAndroid Build Coastguard Worker     */
45*4d7e907cSAndroid Build Coastguard Worker    oneway getPhoneCapability(int32_t serial);
46*4d7e907cSAndroid Build Coastguard Worker
47*4d7e907cSAndroid Build Coastguard Worker   /**
48*4d7e907cSAndroid Build Coastguard Worker     * Set preferred data modem Id.
49*4d7e907cSAndroid Build Coastguard Worker     * In a multi-SIM device, notify modem layer which logical modem will be used primarily
50*4d7e907cSAndroid Build Coastguard Worker     * for data. It helps modem with resource optimization and decisions of what data connections
51*4d7e907cSAndroid Build Coastguard Worker     * should be satisfied.
52*4d7e907cSAndroid Build Coastguard Worker     *
53*4d7e907cSAndroid Build Coastguard Worker     * @param serial Serial number of request.
54*4d7e907cSAndroid Build Coastguard Worker     * @param modem Id the logical modem ID, which should match one of modem IDs returned
55*4d7e907cSAndroid Build Coastguard Worker     * from getPhoneCapability().
56*4d7e907cSAndroid Build Coastguard Worker     *
57*4d7e907cSAndroid Build Coastguard Worker     * Response callback is IRadioConfigResponse.setPreferredDataModemResponse()
58*4d7e907cSAndroid Build Coastguard Worker     */
59*4d7e907cSAndroid Build Coastguard Worker    oneway setPreferredDataModem(int32_t serial, uint8_t modemId);
60*4d7e907cSAndroid Build Coastguard Worker
61*4d7e907cSAndroid Build Coastguard Worker   /**
62*4d7e907cSAndroid Build Coastguard Worker     * Set modems configurations by specifying the number of live modems (i.e modems that are
63*4d7e907cSAndroid Build Coastguard Worker     * enabled and actively working as part of a working telephony stack).
64*4d7e907cSAndroid Build Coastguard Worker     *
65*4d7e907cSAndroid Build Coastguard Worker     * Example: this interface can be used to switch to single/multi sim mode by specifying
66*4d7e907cSAndroid Build Coastguard Worker     * the number of live modems as 1, 2, etc
67*4d7e907cSAndroid Build Coastguard Worker     *
68*4d7e907cSAndroid Build Coastguard Worker     * Note: by setting the number of live modems in this API, that number of modems will
69*4d7e907cSAndroid Build Coastguard Worker     * subsequently get enabled/disabled
70*4d7e907cSAndroid Build Coastguard Worker     *
71*4d7e907cSAndroid Build Coastguard Worker     * @param serial serial number of request.
72*4d7e907cSAndroid Build Coastguard Worker     * @param modemsConfig ModemsConfig object including the number of live modems
73*4d7e907cSAndroid Build Coastguard Worker     *
74*4d7e907cSAndroid Build Coastguard Worker     * Response callback is IRadioResponse.setModemsConfigResponse()
75*4d7e907cSAndroid Build Coastguard Worker     */
76*4d7e907cSAndroid Build Coastguard Worker    oneway setModemsConfig(int32_t serial, ModemsConfig modemsConfig);
77*4d7e907cSAndroid Build Coastguard Worker
78*4d7e907cSAndroid Build Coastguard Worker   /**
79*4d7e907cSAndroid Build Coastguard Worker     * Get modems configurations. This interface is used to get modem configurations
80*4d7e907cSAndroid Build Coastguard Worker     * which includes the number of live modems (i.e modems that are
81*4d7e907cSAndroid Build Coastguard Worker     * enabled and actively working as part of a working telephony stack)
82*4d7e907cSAndroid Build Coastguard Worker     *
83*4d7e907cSAndroid Build Coastguard Worker     * Note: in order to get the overall number of modems available on the phone,
84*4d7e907cSAndroid Build Coastguard Worker     * refer to getPhoneCapability API
85*4d7e907cSAndroid Build Coastguard Worker     *
86*4d7e907cSAndroid Build Coastguard Worker     * @param serial Serial number of request.
87*4d7e907cSAndroid Build Coastguard Worker     *
88*4d7e907cSAndroid Build Coastguard Worker     * Response callback is IRadioResponse.getModemsConfigResponse() which
89*4d7e907cSAndroid Build Coastguard Worker     * will return <@1.1::ModemsConfig>.
90*4d7e907cSAndroid Build Coastguard Worker     */
91*4d7e907cSAndroid Build Coastguard Worker    oneway getModemsConfig(int32_t serial);
92*4d7e907cSAndroid Build Coastguard Worker};
93