Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e12152f authored by Aniket Kumar Lata's avatar Aniket Kumar Lata Committed by Gerrit - the friendly Code Review server
Browse files

hal: Update prefixes for audio system properties

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
parent 349dddbb
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -251,10 +251,10 @@ static void update_offload_codec_capabilities()
{
    char value[PROPERTY_VALUE_MAX] = {'\0'};

    property_get("persist.bt.a2dp_offload_cap", value, "false");
    property_get("persist.vendor.bt.a2dp_offload_cap", value, "false");
    ALOGD("get_offload_codec_capabilities = %s",value);
    a2dp.is_a2dp_offload_supported =
            property_get_bool("persist.bt.a2dp_offload_cap", false);
            property_get_bool("persist.vendor.bt.a2dp_offload_cap", false);
    if (strcmp(value, "false") != 0)
        a2dp_offload_codec_cap_parser(value);
    ALOGD("%s: codec cap = %s",__func__,value);
@@ -883,7 +883,7 @@ uint32_t audio_extn_a2dp_get_encoder_latency()
    char value[PROPERTY_VALUE_MAX];

    memset(value, '\0', sizeof(char)*PROPERTY_VALUE_MAX);
    avsync_runtime_prop = property_get("audio.a2dp.codec.latency", value, NULL);
    avsync_runtime_prop = property_get("vendor.audio.a2dp.codec.latency", value, NULL);
    if (avsync_runtime_prop > 0) {
        if (sscanf(value, "%d/%d/%d/%d",
                  &sbc_offset, &aptx_offset, &aptxhd_offset, &aac_offset) != 4) {
+7 −7
Original line number Diff line number Diff line
@@ -316,7 +316,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;

@@ -363,7 +363,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)
@@ -383,7 +383,7 @@ bool audio_extn_is_hifi_audio_supported(void)
    /*
     * for internal codec, check for hifiaudio property to enable hifi audio
     */
    if (property_get_bool("persist.audio.hifi.int_codec", false))
    if (property_get_bool("persist.vendor.audio.hifi.int_codec", false))
    {
        ALOGD("%s: hifi audio supported on internal codec", __func__);
        aextnmod.hifi_audio_enabled = 1;
@@ -404,7 +404,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;
    }
@@ -423,7 +423,7 @@ bool audio_extn_is_ras_enabled(void)

bool audio_extn_can_use_ras(void)
{
    if (property_get_bool("persist.audio.ras.enabled", false))
    if (property_get_bool("persist.vendor.audio.ras.enabled", false))
        aextnmod.ras_enabled = 1;

    ALOGD("%s: ras.enabled property is set to %d", __func__, aextnmod.ras_enabled);
@@ -444,7 +444,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;
@@ -458,7 +458,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;
+1 −1
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ bool audio_extn_compr_cap_enabled()
    char prop_value[PROPERTY_VALUE_MAX] = {0};
    bool tunnel_encode = false;

    property_get("tunnel.audio.encode",prop_value,"0");
    property_get("vendor.audio.tunnel.encode",prop_value,"0");
    if (!strncmp("true", prop_value, sizeof("true")))
        return true;
    else
+1 −1
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@ static audio_usecase_t get_cin_usecase(void)
    unsigned int i, num_usecase = sizeof(cin_usecases) / sizeof(cin_usecases[0]);
    char value[PROPERTY_VALUE_MAX] = {0};

    property_get("audio.record.multiple.enabled", value, NULL);
    property_get("vendor.audio.record.multiple.enabled", value, NULL);
    if (!(atoi(value) || !strncmp("true", value, 4)))
        num_usecase = 1; /* If prop is not set, limit the num of record usecases to 1 */

+3 −3
Original line number Diff line number Diff line
@@ -430,7 +430,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);
@@ -565,7 +565,7 @@ int audio_extn_ds2_enable(struct audio_device *adev) {
    const char *mixer_ctl_name = "DS2 OnOff";
    struct mixer_ctl *ctl;

    property_get("audio.dolby.ds2.enabled", value, NULL);
    property_get("vendor.audio.dolby.ds2.enabled", value, NULL);
    ds2_enabled = atoi(value) || !strncmp("true", value, 4);

    ALOGV("%s:", __func__);
@@ -612,7 +612,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;
Loading