vehicle hal update
- add zones to subscribe to allow selected subscription for
zoned properties
- extend config to uint32[4] to allow passing more informaiton
from configs
- change audio volume to be per context, not physical stream.
This maps better to android side's logical streams.
- renamed APP_CONTEXT to AUDIO_CONTEXT: It is useful only for
audio.
- add more audio contexts: safety alert, CD, aux audio
bug: 25183740, 26233321
Change-Id: I29de7b6c9d9a770cf87e7f50991c875d7ce9fdbe
diff --git a/modules/vehicle/vehicle.c b/modules/vehicle/vehicle.c
index 7e92ddd..38c38ee 100644
--- a/modules/vehicle/vehicle.c
+++ b/modules/vehicle/vehicle.c
@@ -372,6 +372,10 @@
}
break;
default: // unsupported
+ if (sub->impl == NULL) {
+ ALOGE("subscription impl NULL");
+ return;
+ }
if (sub->impl->error_fn_ != NULL) {
sub->impl->error_fn_(VEHICLE_ERROR_UNKNOWN, VEHICLE_PROPERTY_INVALID,
VEHICLE_OPERATION_GENERIC);
@@ -402,7 +406,8 @@
}
}
-static int vdev_subscribe(vehicle_hw_device_t* device, int32_t prop, float sample_rate) {
+static int vdev_subscribe(vehicle_hw_device_t* device, int32_t prop, float sample_rate,
+ int32_t zones) {
ALOGD("vdev_subscribe 0x%x, %f", prop, sample_rate);
vehicle_device_impl_t* impl = (vehicle_device_impl_t*)device;
// Check that the device is initialized.