Discussion:
[android-porting] AOSP: How to initialize the VehicleProperty::AUDIO_VOLUME property (.initialValues in the DefaultConfig.h) in vehicl hal ?
Sibiraj T
2018-06-22 06:38:26 UTC
Permalink
Trying to add AUDIO_VOLUME property to the demo vehicle hal code present in
/hardware/interfaces/automotive/vehicle/2.0/default/impl/vhal_v2_0/

File name: DefaultConfig.h
tried adding like below, but it is crashing.

{.config =
{
.prop = toInt(VehicleProperty::AUDIO_VOLUME),
.access = VehiclePropertyAccess::READ_WRITE,
.changeMode = VehiclePropertyChangeMode::ON_CHANGE,
.configArray = {
toInt(VehicleAudioContextFlag::MUSIC_FLAG),
toInt(VehicleAudioVolumeCapabilityFlag::MASTER_VOLUME_ONLY),0,0,100 },
},
.initialValue = {.int32Values = {
toInt(VehicleAudioContextFlag::MUSIC_FLAG), 80,
toInt(VehicleAudioVolumeState::STATE_OK) } }
},

AUDIO_VOLUME property as defined in
/hardware/interfaces/automotive/vehicle/2.0/types.hal
* @change_mode VehiclePropertyChangeMode:ON_CHANGE
* @access VehiclePropertyAccess:READ_WRITE
* @config_flags all audio contexts supported.
*/
AUDIO_VOLUME = (
0x0901
| VehiclePropertyGroup:SYSTEM
| VehiclePropertyType:INT32_VEC
| VehicleArea:GLOBAL),


reference OSP code available in http://androidxref.com/8.0.0_r4/xref/

Thanks in advance.!!
--
--
unsubscribe: android-porting+***@googlegroups.com
website: http://groups.google.com/group/android-porting

---
You received this message because you are subscribed to the Google Groups "android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-porting+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...