[AudioPolicy][EngineConfigurable] Cleanup warn / error logs
-Add remote submix in legacy address as criterion type value
-Add volume curves for all device cat for rerouting/patch streams
-Silent reset input device
Test: build
Bug:
Change-Id: I3578f9a05899f20847c123477451f1eb97ed5cee
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
[AudioPolicy][Engine] Add remote submix in legacy address
Bug:
Test: build
Change-Id: Ic00e892a03c3b6f6ce3748ea1eb02452bf01c23f
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
diff --git a/services/audiopolicy/engineconfigurable/src/InputSource.cpp b/services/audiopolicy/engineconfigurable/src/InputSource.cpp
index d252d3f..aa06ae3 100644
--- a/services/audiopolicy/engineconfigurable/src/InputSource.cpp
+++ b/services/audiopolicy/engineconfigurable/src/InputSource.cpp
@@ -30,7 +30,7 @@
return BAD_VALUE;
}
mIdentifier = identifier;
- ALOGD("%s: InputSource %s identifier 0x%X", __FUNCTION__, getName().c_str(), identifier);
+ ALOGV("%s: InputSource %s identifier 0x%X", __FUNCTION__, getName().c_str(), identifier);
return NO_ERROR;
}
@@ -46,15 +46,18 @@
template <>
status_t Element<audio_source_t>::set(audio_devices_t devices)
{
- if (devices != AUDIO_DEVICE_NONE) {
- devices |= AUDIO_DEVICE_BIT_IN;
+ if (devices == AUDIO_DEVICE_NONE) {
+ // Reset
+ mApplicableDevices = devices;
+ return NO_ERROR;
}
+ devices |= AUDIO_DEVICE_BIT_IN;
if (!audio_is_input_device(devices)) {
ALOGE("%s: trying to set an invalid device 0x%X for input source %s",
__FUNCTION__, devices, getName().c_str());
return BAD_VALUE;
}
- ALOGD("%s: 0x%X for input source %s", __FUNCTION__, devices, getName().c_str());
+ ALOGV("%s: 0x%X for input source %s", __FUNCTION__, devices, getName().c_str());
mApplicableDevices = devices;
return NO_ERROR;
}
diff --git a/services/audiopolicy/engineconfigurable/src/InputSource.h b/services/audiopolicy/engineconfigurable/src/InputSource.h
index e1865cc..d64a60a 100644
--- a/services/audiopolicy/engineconfigurable/src/InputSource.h
+++ b/services/audiopolicy/engineconfigurable/src/InputSource.h
@@ -73,10 +73,11 @@
Element(const Element &object);
Element &operator=(const Element &object);
- std::string mName; /**< Unique literal Identifier of a policy base element*/
- audio_source_t mIdentifier; /**< Unique numerical Identifier of a policy base element*/
-
- audio_devices_t mApplicableDevices; /**< Applicable input device for this input source. */
+ const std::string mName; /**< Unique literal Identifier of a policy base element*/
+ /** Unique numerical Identifier of a policy base element */
+ audio_source_t mIdentifier = AUDIO_SOURCE_DEFAULT;
+ /** Applicable input device for this input source. */
+ audio_devices_t mApplicableDevices = AUDIO_DEVICE_NONE;
};
typedef Element<audio_source_t> InputSource;
diff --git a/services/audiopolicy/engineconfigurable/src/Stream.cpp b/services/audiopolicy/engineconfigurable/src/Stream.cpp
index 297eb02..e64ba4b 100644
--- a/services/audiopolicy/engineconfigurable/src/Stream.cpp
+++ b/services/audiopolicy/engineconfigurable/src/Stream.cpp
@@ -30,7 +30,7 @@
return BAD_VALUE;
}
mIdentifier = identifier;
- ALOGD("%s: Stream %s identifier 0x%X", __FUNCTION__, getName().c_str(), identifier);
+ ALOGV("%s: Stream %s identifier 0x%X", __FUNCTION__, getName().c_str(), identifier);
return NO_ERROR;
}
@@ -41,7 +41,7 @@
return BAD_VALUE;
}
mVolumeProfile = volumeProfile;
- ALOGD("%s: 0x%X for Stream %s", __FUNCTION__, mVolumeProfile, getName().c_str());
+ ALOGV("%s: 0x%X for Stream %s", __FUNCTION__, mVolumeProfile, getName().c_str());
return NO_ERROR;
}