summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAniket Kumar Lata <alata@codeaurora.org>2017-05-02 12:33:46 -0700
committerEthan Chen <intervigil@gmail.com>2018-01-07 14:11:24 -0800
commit5d117bd5204992d89dd65c66f6989d35848490fc (patch)
tree62ad25ed023b951b8ec36bcbc0bffad906022c65
parente5a8d3fb84bb81a2f5341f98a13a21e1bc0461a3 (diff)
downloadhardware_qcom_audio-staging/lineage-15.1-caf-8952.tar.gz
hardware_qcom_audio-staging/lineage-15.1-caf-8952.tar.bz2
hardware_qcom_audio-staging/lineage-15.1-caf-8952.zip
hal: Update prefixes for audio system propertiesstaging/lineage-15.1-caf-8952
Vendor created android system properties are required to have vendor/qti prefix. Update vendor specific audio system properties used in HAL. CRs-Fixed: 2034869 Change-Id: Ibdb1d12fedee1ce12073e8b90fdec814318f3acf
-rw-r--r--hal/audio_extn/audio_extn.c10
-rw-r--r--hal/audio_extn/dolby.c4
-rw-r--r--hal/audio_extn/dts_eagle.c14
-rw-r--r--hal/audio_extn/spkr_protection.c8
-rw-r--r--hal/audio_extn/ssr.c4
-rw-r--r--hal/audio_extn/utils.c4
-rw-r--r--hal/audio_hw.c8
-rw-r--r--hal/voice_extn/compress_voip.c2
-rw-r--r--post_proc/effect_util.c6
9 files changed, 30 insertions, 30 deletions
diff --git a/hal/audio_extn/audio_extn.c b/hal/audio_extn/audio_extn.c
index f63dc5a6..c46e87f8 100644
--- a/hal/audio_extn/audio_extn.c
+++ b/hal/audio_extn/audio_extn.c
@@ -155,7 +155,7 @@ void audio_extn_hpx_set_parameters(struct audio_device *adev,
struct mixer_ctl *ctl = NULL;
ALOGV("%s", __func__);
- property_get("use.dts_eagle", prop, "0");
+ property_get("vendor.audio.use.dts_eagle", prop, "0");
if (strncmp("true", prop, sizeof("true")))
return;
@@ -202,7 +202,7 @@ static int audio_extn_hpx_get_parameters(struct str_parms *query,
void audio_extn_check_and_set_dts_hpx_state(const struct audio_device *adev)
{
char prop[PROPERTY_VALUE_MAX];
- property_get("use.dts_eagle", prop, "0");
+ property_get("vendor.audio.use.dts_eagle", prop, "0");
if (strncmp("true", prop, sizeof("true")))
return;
if (adev->offload_effects_set_hpx_state)
@@ -221,7 +221,7 @@ bool audio_extn_can_use_vbat(void)
{
char prop_vbat_enabled[PROPERTY_VALUE_MAX] = "false";
- property_get("persist.audio.vbat.enabled", prop_vbat_enabled, "0");
+ property_get("persist.vendor.audio.vbat.enabled", prop_vbat_enabled, "0");
if (!strncmp("true", prop_vbat_enabled, 4)) {
aextnmod.vbat_enabled = 1;
}
@@ -244,7 +244,7 @@ bool audio_extn_should_use_handset_anc(int in_channels)
{
char prop_aanc[PROPERTY_VALUE_MAX] = "false";
- property_get("persist.aanc.enable", prop_aanc, "0");
+ property_get("persist.vendor.audio.aanc.enable", prop_aanc, "0");
if (!strncmp("true", prop_aanc, 4)) {
ALOGD("%s: AANC enabled in the property", __func__);
aextnmod.aanc_enabled = 1;
@@ -258,7 +258,7 @@ bool audio_extn_should_use_fb_anc(void)
{
char prop_anc[PROPERTY_VALUE_MAX] = "feedforward";
- property_get("persist.headset.anc.type", prop_anc, "0");
+ property_get("persist.vendor.audio.headset.anc.type", prop_anc, "0");
if (!strncmp("feedback", prop_anc, sizeof("feedback"))) {
ALOGD("%s: FB ANC headset type enabled\n", __func__);
return true;
diff --git a/hal/audio_extn/dolby.c b/hal/audio_extn/dolby.c
index e95611fb..49459a35 100644
--- a/hal/audio_extn/dolby.c
+++ b/hal/audio_extn/dolby.c
@@ -574,7 +574,7 @@ void audio_extn_dolby_set_dmid(struct audio_device *adev)
if (!send)
return;
- property_get("dmid",c_dmid,"0");
+ property_get("vendor.audio.dmid",c_dmid,"0");
i_dmid = atoll(c_dmid);
ctl = mixer_get_ctl_by_name(adev->mixer, mixer_ctl_name);
@@ -759,7 +759,7 @@ void audio_extn_dolby_set_license(struct audio_device *adev __unused)
/* As ACDB based license mechanism is disabled, force set the license key to 0*/
i_key = 0;
#endif
- property_get("dmid",c_dmid,"0");
+ property_get("vendor.audio.dmid",c_dmid,"0");
i_dmid = atoll(c_dmid);
ALOGV("%s Setting DS1 License, key:0x%x dmid %d",__func__, i_key,i_dmid);
dolby_license.dmid = i_dmid;
diff --git a/hal/audio_extn/dts_eagle.c b/hal/audio_extn/dts_eagle.c
index 7608a611..d6570fd3 100644
--- a/hal/audio_extn/dts_eagle.c
+++ b/hal/audio_extn/dts_eagle.c
@@ -145,7 +145,7 @@ static int do_DTS_Eagle_params(const struct audio_device *adev, struct dts_eagle
static void fade_node(bool need_data) {
char prop[PROPERTY_VALUE_MAX];
- property_get("use.dts_eagle", prop, "0");
+ property_get("vendor.audio.use.dts_eagle", prop, "0");
if (strncmp("true", prop, sizeof("true")))
return;
int fd, n = 0;
@@ -172,7 +172,7 @@ int audio_extn_dts_eagle_fade(const struct audio_device *adev, bool fade_in, con
ALOGV("DTS_EAGLE_HAL (%s): enter with fade %s requested", __func__, fade_in ? "in" : "out");
- property_get("use.dts_eagle", prop, "0");
+ property_get("vendor.audio.use.dts_eagle", prop, "0");
if (strncmp("true", prop, sizeof("true")))
return 0;
@@ -195,7 +195,7 @@ void audio_extn_dts_eagle_set_parameters(struct audio_device *adev, struct str_p
ALOGV("DTS_EAGLE_HAL (%s): enter", __func__);
- property_get("use.dts_eagle", prop, "0");
+ property_get("vendor.audio.use.dts_eagle", prop, "0");
if (strncmp("true", prop, sizeof("true")))
return;
@@ -328,7 +328,7 @@ int audio_extn_dts_eagle_get_parameters(const struct audio_device *adev,
ALOGV("DTS_EAGLE_HAL (%s): enter", __func__);
- property_get("use.dts_eagle", prop, "0");
+ property_get("vendor.audio.use.dts_eagle", prop, "0");
if (strncmp("true", prop, sizeof("true")))
return 0;
@@ -421,7 +421,7 @@ void audio_extn_dts_create_state_notifier_node(int stream_out)
char path[PATH_MAX];
char value[MAX_LENGTH_OF_INTEGER_IN_STRING];
int fd;
- property_get("use.dts_eagle", prop, "0");
+ property_get("vendor.audio.use.dts_eagle", prop, "0");
if ((!strncmp("true", prop, sizeof("true")) || atoi(prop))) {
ALOGV("DTS_EAGLE_NODE_STREAM (%s): create_state_notifier_node - stream_out: %d", __func__, stream_out);
strlcpy(path, STATE_NOTIFY_FILE, sizeof(path));
@@ -454,7 +454,7 @@ void audio_extn_dts_notify_playback_state(int stream_out, int has_video, int sam
char value[MAX_LENGTH_OF_INTEGER_IN_STRING];
char buf[1024];
int fd;
- property_get("use.dts_eagle", prop, "0");
+ property_get("vendor.audio.use.dts_eagle", prop, "0");
if ((!strncmp("true", prop, sizeof("true")) || atoi(prop))) {
ALOGV("DTS_EAGLE_NODE_STREAM (%s): notify_playback_state - is_playing: %d", __func__, is_playing);
strlcpy(path, STATE_NOTIFY_FILE, sizeof(path));
@@ -481,7 +481,7 @@ void audio_extn_dts_remove_state_notifier_node(int stream_out)
char path[PATH_MAX];
char value[MAX_LENGTH_OF_INTEGER_IN_STRING];
int fd;
- property_get("use.dts_eagle", prop, "0");
+ property_get("vendor.audio.use.dts_eagle", prop, "0");
if ((!strncmp("true", prop, sizeof("true")) || atoi(prop)) && (stream_out)) {
ALOGV("DTS_EAGLE_NODE_STREAM (%s): remove_state_notifier_node: stream_out - %d", __func__, stream_out);
strlcpy(path, STATE_NOTIFY_FILE, sizeof(path));
diff --git a/hal/audio_extn/spkr_protection.c b/hal/audio_extn/spkr_protection.c
index 3f81ac1a..f63f8730 100644
--- a/hal/audio_extn/spkr_protection.c
+++ b/hal/audio_extn/spkr_protection.c
@@ -354,7 +354,7 @@ static int set_spkr_prot_cal(int cal_fd,
cal_data.cal_type.cal_info.t0[SP_V2_SPKR_1] = protCfg->t0[SP_V2_SPKR_1];
cal_data.cal_type.cal_info.t0[SP_V2_SPKR_2] = protCfg->t0[SP_V2_SPKR_2];
cal_data.cal_type.cal_info.mode = protCfg->mode;
- property_get("persist.spkr.cal.duration", value, "0");
+ property_get("persist.vendor.audio.spkr.cal.duration", value, "0");
if (atoi(value) > 0) {
ALOGD("%s: quick calibration enabled", __func__);
cal_data.cal_type.cal_info.quick_calib_flag = 1;
@@ -654,12 +654,12 @@ static void* spkr_calibration_thread()
char buf[32] = {0};
int ret;
- /* If the value of this persist.spkr.cal.duration is 0
+ /* If the value of this persist.vendor.audio.spkr.cal.duration is 0
* then it means it will take 30min to calibrate
* and if the value is greater than zero then it would take
* that much amount of time to calibrate.
*/
- property_get("persist.spkr.cal.duration", value, "0");
+ property_get("persist.vendor.audio.spkr.cal.duration", value, "0");
if (atoi(value) > 0)
min_idle_time = atoi(value);
handle.speaker_prot_threadid = pthread_self();
@@ -946,7 +946,7 @@ void audio_extn_spkr_prot_init(void *adev)
ALOGE("%s: Invalid params", __func__);
return;
}
- property_get("persist.speaker.prot.enable", value, "");
+ property_get("persist.vendor.audio.speaker.prot.enable", value, "");
handle.spkr_prot_enable = false;
if (!strncmp("true", value, 4))
handle.spkr_prot_enable = true;
diff --git a/hal/audio_extn/ssr.c b/hal/audio_extn/ssr.c
index 195a6c91..d5932607 100644
--- a/hal/audio_extn/ssr.c
+++ b/hal/audio_extn/ssr.c
@@ -311,7 +311,7 @@ void audio_extn_ssr_update_enabled()
{
char ssr_enabled[PROPERTY_VALUE_MAX] = "false";
- property_get("ro.qc.sdk.audio.ssr",ssr_enabled,"0");
+ property_get("ro.vendor.audio.sdk.ssr",ssr_enabled,"0");
if (!strncmp("true", ssr_enabled, 4)) {
ALOGD("%s: surround sound recording is supported", __func__);
ssrmod.is_ssr_enabled = true;
@@ -538,7 +538,7 @@ int32_t audio_extn_ssr_init(struct stream_in *in, int num_out_chan)
pthread_mutex_unlock(&ssrmod.ssr_process_lock);
- property_get("ssr.pcmdump",c_multi_ch_dump,"0");
+ property_get("vendor.audio.ssr.pcmdump",c_multi_ch_dump,"0");
if (0 == strncmp("true", c_multi_ch_dump, sizeof("ssr.dump-pcm"))) {
/* Remember to change file system permission of data(e.g. chmod 777 data/),
otherwise, fopen may fail */
diff --git a/hal/audio_extn/utils.c b/hal/audio_extn/utils.c
index 30d6c6bd..17b885f9 100644
--- a/hal/audio_extn/utils.c
+++ b/hal/audio_extn/utils.c
@@ -498,7 +498,7 @@ void audio_extn_utils_update_stream_app_type_cfg(void *platform,
ALOGI("%s Allowing 24-bit playback on speaker ONLY at default sampling rate", __func__);
}
- property_get("audio.playback.mch.downsample",value,"");
+ property_get("vendor.audio.playback.mch.downsample",value,"");
if (!strncmp("true", value, sizeof("true"))) {
if ((popcount(channel_mask) > 2) &&
(sample_rate > CODEC_BACKEND_DEFAULT_SAMPLE_RATE) &&
@@ -601,7 +601,7 @@ int audio_extn_utils_send_app_type_cfg(struct audio_usecase *usecase)
}
sample_rate = out->app_type_cfg.sample_rate;
- property_get("audio.playback.mch.downsample",value,"");
+ property_get("vendor.audio.playback.mch.downsample",value,"");
if (!strncmp("true", value, sizeof("true"))) {
if ((popcount(out->channel_mask) > 2) &&
(out->sample_rate > CODEC_BACKEND_DEFAULT_SAMPLE_RATE) &&
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index fdd4d188..8ee48178 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -422,7 +422,7 @@ static int check_and_set_gapless_mode(struct audio_device *adev, bool enable_gap
struct mixer_ctl *ctl;
ALOGV("%s:", __func__);
- gapless_enabled = property_get_bool("audio.offload.gapless.enabled", false);
+ gapless_enabled = property_get_bool("vendor.audio.offload.gapless.enabled", false);
/*Disable gapless if its AV playback*/
gapless_enabled = gapless_enabled && enable_gapless;
@@ -4268,7 +4268,7 @@ static int adev_open(const hw_module_t *module, const char *name,
char value[PROPERTY_VALUE_MAX];
int trial;
- if (property_get("audio_hal.period_size", value, NULL) > 0) {
+ if (property_get("vendor.audio_hal.period_size", value, NULL) > 0) {
trial = atoi(value);
if (period_size_is_plausible_for_low_latency(trial)) {
pcm_config_low_latency.period_size = trial;
@@ -4277,14 +4277,14 @@ static int adev_open(const hw_module_t *module, const char *name,
configured_low_latency_capture_period_size = trial;
}
}
- if (property_get("audio_hal.in_period_size", value, NULL) > 0) {
+ if (property_get("vendor.audio_hal.in_period_size", value, NULL) > 0) {
trial = atoi(value);
if (period_size_is_plausible_for_low_latency(trial)) {
configured_low_latency_capture_period_size = trial;
}
}
- adev->multi_offload_enable = property_get_bool("audio.offload.multiple.enabled", false);
+ adev->multi_offload_enable = property_get_bool("vendor.audio.offload.multiple.enabled", false);
pthread_mutex_unlock(&adev_init_lock);
diff --git a/hal/voice_extn/compress_voip.c b/hal/voice_extn/compress_voip.c
index c2283f00..6243cdcc 100644
--- a/hal/voice_extn/compress_voip.c
+++ b/hal/voice_extn/compress_voip.c
@@ -672,7 +672,7 @@ bool voice_extn_compress_voip_pcm_prop_check()
{
char prop_value[PROPERTY_VALUE_MAX] = {0};
- property_get("use.voice.path.for.pcm.voip", prop_value, "0");
+ property_get("vendor.voice.path.for.pcm.voip", prop_value, "0");
if (!strncmp("true", prop_value, sizeof("true")))
{
ALOGD("%s: VoIP PCM property is enabled", __func__);
diff --git a/post_proc/effect_util.c b/post_proc/effect_util.c
index b401f6ad..4719cf68 100644
--- a/post_proc/effect_util.c
+++ b/post_proc/effect_util.c
@@ -57,7 +57,7 @@ void create_effect_state_node(int device_id)
char path[PATH_MAX];
char value[MAX_LENGTH_OF_INTEGER_IN_STRING];
- property_get("use.dts_eagle", prop, "0");
+ property_get("vendor.audio.use.dts_eagle", prop, "0");
if (!strncmp("true", prop, sizeof("true")) || atoi(prop)) {
ALOGV("create_effect_node for - device_id: %d", device_id);
strlcpy(path, EFFECT_FILE, sizeof(path));
@@ -95,7 +95,7 @@ void update_effects_node(int device_id, int effect_type, int enable_or_set, int
char resultBuf[1024];
int index1 = -1;
//ALOGV("value of device_id and effect_type is %d and %d", device_id, effect_type);
- property_get("use.dts_eagle", prop, "0");
+ property_get("vendor.audio.use.dts_eagle", prop, "0");
if (!strncmp("true", prop, sizeof("true")) || atoi(prop)) {
strlcpy(path, EFFECT_FILE, sizeof(path));
snprintf(value, sizeof(value), "%d", device_id);
@@ -192,7 +192,7 @@ void remove_effect_state_node(int device_id)
char path[PATH_MAX];
char value[MAX_LENGTH_OF_INTEGER_IN_STRING];
- property_get("use.dts_eagle", prop, "0");
+ property_get("vendor.audio.use.dts_eagle", prop, "0");
if (!strncmp("true", prop, sizeof("true")) || atoi(prop)) {
ALOGV("remove_state_notifier_node: device_id - %d", device_id);
strlcpy(path, EFFECT_FILE, sizeof(path));