policy_hal: Update prefixes for audio system properties
Vendor created android system properties are required to have
vendor/qti prefixes. Update vendor specific audio system
properties used in policy HAL.
CRs-Fixed: 2034869
Change-Id: I2bbe9ff9d8576fc62886679bfc419411422a3d20
diff --git a/policy_hal/AudioPolicyManager.cpp b/policy_hal/AudioPolicyManager.cpp
index 228152b..03f3924 100644
--- a/policy_hal/AudioPolicyManager.cpp
+++ b/policy_hal/AudioPolicyManager.cpp
@@ -62,7 +62,7 @@
audio_output_flags_t flag = AUDIO_OUTPUT_FLAG_FAST;
char propValue[PROPERTY_VALUE_MAX];
- if (property_get("voice.conc.fallbackpath", propValue, NULL)) {
+ if (property_get("vendor.voice.conc.fallbackpath", propValue, NULL)) {
if (!strncmp(propValue, "deep-buffer", 11)) {
flag = AUDIO_OUTPUT_FLAG_DEEP_BUFFER;
}
@@ -70,15 +70,15 @@
flag = AUDIO_OUTPUT_FLAG_FAST;
}
else {
- ALOGD("voice_conc:not a recognised path(%s) in prop voice.conc.fallbackpath",
- propValue);
+ ALOGD("voice_conc:not a recognised path(%s) in prop
+ vendor.voice.conc.fallbackpath", propValue);
}
}
else {
- ALOGD("voice_conc:prop voice.conc.fallbackpath not set");
+ ALOGD("voice_conc:prop vendor.voice.conc.fallbackpath not set");
}
- ALOGD("voice_conc:picked up flag(0x%x) from prop voice.conc.fallbackpath",
+ ALOGD("voice_conc:picked up flag(0x%x) from prop vendor.voice.conc.fallbackpath",
flag);
return flag;
@@ -459,7 +459,7 @@
#ifdef VOICE_CONCURRENCY
char concpropValue[PROPERTY_VALUE_MAX];
- if (property_get("voice.playback.conc.disabled", concpropValue, NULL)) {
+ if (property_get("vendor.voice.playback.conc.disabled", concpropValue, NULL)) {
bool propenabled = atoi(concpropValue) || !strncmp("true", concpropValue, 4);
if (propenabled) {
if (isInCall())
@@ -470,7 +470,7 @@
}
}
#endif
- if (property_get_bool("voice.dsd.playback.conc.disabled", true) &&
+ if (property_get_bool("vendor.voice.dsd.playback.conc.disabled", true) &&
isInCall() && (offloadInfo.format == AUDIO_FORMAT_DSD)) {
ALOGD("blocking DSD compress offload on call mode");
return false;
@@ -479,7 +479,7 @@
char recConcPropValue[PROPERTY_VALUE_MAX];
bool prop_rec_play_enabled = false;
- if (property_get("rec.playback.conc.disabled", recConcPropValue, NULL)) {
+ if (property_get("vendor.audio.rec.playback.conc.disabled", recConcPropValue, NULL)) {
prop_rec_play_enabled = atoi(recConcPropValue) || !strncmp("true", recConcPropValue, 4);
}
@@ -563,10 +563,11 @@
return false;
}
- const bool allowOffloadStreamingWithVideo = property_get_bool("av.streaming.offload.enable",
- false /*default value*/);
+ const bool allowOffloadStreamingWithVideo =
+ property_get_bool("vendor.audio.av.streaming.offload.enable", false /*default value*/);
if (offloadInfo.has_video && offloadInfo.is_streaming && !allowOffloadStreamingWithVideo) {
- ALOGW("offload disabled by av.streaming.offload.enable %d",allowOffloadStreamingWithVideo);
+ ALOGW("offload disabled by vendor.audio.av.streaming.offload.enable %d",
+ allowOffloadStreamingWithVideo);
return false;
}
@@ -663,15 +664,15 @@
char propValue[PROPERTY_VALUE_MAX];
bool prop_playback_enabled = false, prop_rec_enabled=false, prop_voip_enabled = false;
- if(property_get("voice.playback.conc.disabled", propValue, NULL)) {
+ if(property_get("vendor.voice.playback.conc.disabled", propValue, NULL)) {
prop_playback_enabled = atoi(propValue) || !strncmp("true", propValue, 4);
}
- if(property_get("voice.record.conc.disabled", propValue, NULL)) {
+ if(property_get("vendor.voice.record.conc.disabled", propValue, NULL)) {
prop_rec_enabled = atoi(propValue) || !strncmp("true", propValue, 4);
}
- if(property_get("voice.voip.conc.disabled", propValue, NULL)) {
+ if(property_get("vendor.voice.voip.conc.disabled", propValue, NULL)) {
prop_voip_enabled = atoi(propValue) || !strncmp("true", propValue, 4);
}
@@ -832,7 +833,7 @@
continue;
}
- if (property_get_bool("voice.dsd.playback.conc.disabled", true) &&
+ if (property_get_bool("vendor.voice.dsd.playback.conc.disabled", true) &&
(outputDesc->mFlags & AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD) &&
(outputDesc->mFormat == AUDIO_FORMAT_DSD)) {
ALOGD("voice_conc:calling closeOutput on call mode for DSD COMPRESS output");
@@ -847,7 +848,7 @@
char recConcPropValue[PROPERTY_VALUE_MAX];
bool prop_rec_play_enabled = false;
- if (property_get("rec.playback.conc.disabled", recConcPropValue, NULL)) {
+ if (property_get("vendor.audio.rec.playback.conc.disabled", recConcPropValue, NULL)) {
prop_rec_play_enabled = atoi(recConcPropValue) || !strncmp("true", recConcPropValue, 4);
}
if (prop_rec_play_enabled) {
@@ -1361,7 +1362,7 @@
bool trackDirectPCM = false; // Output request for track created by other apps
if (flags == AUDIO_OUTPUT_FLAG_NONE) {
- trackDirectPCM = property_get_bool("audio.offload.track.enable", true);
+ trackDirectPCM = property_get_bool("vendor.audio.offload.track.enable", true);
}
return trackDirectPCM;
}
@@ -1500,7 +1501,7 @@
((voipSampleRate == 0) || (voipSampleRate == samplingRate))) {
if (audio_is_linear_pcm(format)) {
char propValue[PROPERTY_VALUE_MAX] = {0};
- property_get("use.voice.path.for.pcm.voip", propValue, "0");
+ property_get("vendor.voice.path.for.pcm.voip", propValue, "0");
bool voipPcmSysPropEnabled = !strncmp("true", propValue, sizeof("true"));
if (voipPcmSysPropEnabled && (format == AUDIO_FORMAT_PCM_16_BIT)) {
flags = (audio_output_flags_t)(AUDIO_OUTPUT_FLAG_VOIP_RX |
@@ -1534,11 +1535,11 @@
char propValue[PROPERTY_VALUE_MAX];
bool prop_play_enabled=false, prop_voip_enabled = false;
- if(property_get("voice.playback.conc.disabled", propValue, NULL)) {
+ if(property_get("vendor.voice.playback.conc.disabled", propValue, NULL)) {
prop_play_enabled = atoi(propValue) || !strncmp("true", propValue, 4);
}
- if(property_get("voice.voip.conc.disabled", propValue, NULL)) {
+ if(property_get("vendor.voice.voip.conc.disabled", propValue, NULL)) {
prop_voip_enabled = atoi(propValue) || !strncmp("true", propValue, 4);
}
@@ -1598,7 +1599,7 @@
char recConcPropValue[PROPERTY_VALUE_MAX];
bool prop_rec_play_enabled = false;
- if (property_get("rec.playback.conc.disabled", recConcPropValue, NULL)) {
+ if (property_get("vendor.audio.rec.playback.conc.disabled", recConcPropValue, NULL)) {
prop_rec_play_enabled = atoi(recConcPropValue) || !strncmp("true", recConcPropValue, 4);
}
if ((prop_rec_play_enabled) &&
@@ -1733,7 +1734,7 @@
// if multiple concurrent offload decode is supported
// do no check for reuse and also don't close previous output if its offload
// previous output will be closed during track destruction
- if (!(property_get_bool("audio.offload.multiple.enabled", false) &&
+ if (!(property_get_bool("vendor.audio.offload.multiple.enabled", false) &&
((flags & AUDIO_OUTPUT_FLAG_DIRECT) != 0))) {
for (size_t i = 0; i < mOutputs.size(); i++) {
sp<SwAudioOutputDescriptor> desc = mOutputs.valueAt(i);
@@ -1893,11 +1894,11 @@
char propValue[PROPERTY_VALUE_MAX];
bool prop_rec_enabled=false, prop_voip_enabled = false;
- if(property_get("voice.record.conc.disabled", propValue, NULL)) {
+ if(property_get("vendor.voice.record.conc.disabled", propValue, NULL)) {
prop_rec_enabled = atoi(propValue) || !strncmp("true", propValue, 4);
}
- if(property_get("voice.voip.conc.disabled", propValue, NULL)) {
+ if(property_get("vendor.voice.voip.conc.disabled", propValue, NULL)) {
prop_voip_enabled = atoi(propValue) || !strncmp("true", propValue, 4);
}
@@ -1997,7 +1998,7 @@
char getPropValue[PROPERTY_VALUE_MAX];
bool prop_rec_play_enabled = false;
- if (property_get("rec.playback.conc.disabled", getPropValue, NULL)) {
+ if (property_get("vendor.audio.rec.playback.conc.disabled", getPropValue, NULL)) {
prop_rec_play_enabled = atoi(getPropValue) || !strncmp("true", getPropValue, 4);
}
@@ -2101,7 +2102,7 @@
char propValue[PROPERTY_VALUE_MAX];
bool prop_rec_play_enabled = false;
- if (property_get("rec.playback.conc.disabled", propValue, NULL)) {
+ if (property_get("vendor.audio.rec.playback.conc.disabled", propValue, NULL)) {
prop_rec_play_enabled = atoi(propValue) || !strncmp("true", propValue, 4);
}