1 /*
2  * Copyright (C) 2015 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef ANDROID_VEHICLE_INTERNAL_H
18 #define ANDROID_VEHICLE_INTERNAL_H
19 
20 #include <hardware/vehicle.h>
21 
22 __BEGIN_DECLS
23 
24 /**
25  * Define all internal properties used in VNS. This is not shared with vehicle HAL, but
26  * used for internal synchronization / testing purpose.
27  */
28 
29 /**
30  * Represents state of audio stream. Audio HAL should set this when a steam is starting or ending.
31  * Actual streaming of data should be done only after getting focus for the given stream from
32  * car audio module. Focus can be already granted when stream is started. Focus state can be
33  * monitored by monitoring VEHICLE_PROPERTY_AUDIO_FOCUS. If car does not support
34  * VEHICLE_PROPERTY_AUDIO_FOCUS, there is no need to monitor focus as focus is assumed to be
35  * granted always.
36  * Data has the following format:
37  *   int32_array[0] : vehicle_audio_stream_state
38  *   int32_array[1] : stream number
39  *
40  * @value_type VEHICLE_VALUE_TYPE_INT32_VEC2
41  * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
42  * @access VEHICLE_PROP_ACCESS_READ_WRITE
43  * @data_member int32_array
44  */
45 #define VEHICLE_PROPERTY_INTERNAL_AUDIO_STREAM_STATE      (0x74000000)
46 
47 enum vehicle_audio_stream_state {
48     VEHICLE_AUDIO_STREAM_STATE_STOPPED = 0,
49     VEHICLE_AUDIO_STREAM_STATE_STARTED = 1,
50 };
51 
52 enum vehicle_audio_stream_state_index {
53     VEHICLE_AUDIO_STREAM_STATE_INDEX_STATE = 0,
54     VEHICLE_AUDIO_STREAM_STATE_INDEX_STREAM = 1,
55 };
56 
57 __END_DECLS
58 
59 #endif /* ANDROID_VEHICLE_INTERNAL_H */
60