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

Commit c65f2512 authored by Prasad Kumpatla's avatar Prasad Kumpatla Committed by Gerrit - the friendly Code Review server
Browse files

hal: Add Native Audio mode check for moorea target



Add check to enable hifi filter in native_audio mode for moorea
target.In moorea NATIVE_AUDIO_MODE_MULTIPLE_MIX_IN_DSP is unsupported,
so add na_mode check as NATIVE_AUDIO_MODE_TRUE_44_1.

Change-Id: I6983cec7c3dae5c71c46b4c8ebbf42c366167406
Signed-off-by: default avatarPrasad Kumpatla <nkumpat@codeaurora.org>
parent fc603683
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
/*
/*
 * Copyright (c) 2013-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2013-2020, The Linux Foundation. All rights reserved.
 * Not a Contribution.
 * Not a Contribution.
 *
 *
 * Copyright (C) 2013 The Android Open Source Project
 * Copyright (C) 2013 The Android Open Source Project
@@ -5217,7 +5217,8 @@ bool audio_extn_is_hifi_filter_enabled(struct audio_device* adev, struct stream_
    if (audio_extn_hifi_filter_enabled) {
    if (audio_extn_hifi_filter_enabled) {
        /*Restricting the feature for Tavil and WCD9375 codecs only*/
        /*Restricting the feature for Tavil and WCD9375 codecs only*/
        if ((strstr(codec_variant, "WCD9385") || strstr(codec_variant, "WCD9375"))
        if ((strstr(codec_variant, "WCD9385") || strstr(codec_variant, "WCD9375"))
            && (na_mode == NATIVE_AUDIO_MODE_MULTIPLE_MIX_IN_DSP) && channels <=2) {
            && (na_mode == NATIVE_AUDIO_MODE_MULTIPLE_MIX_IN_DSP || na_mode ==
                       NATIVE_AUDIO_MODE_TRUE_44_1) && channels <=2) {
            /*Upsampling 8 time should be restricited to headphones playback only */
            /*Upsampling 8 time should be restricited to headphones playback only */
            if (snd_device == SND_DEVICE_OUT_HEADPHONES
            if (snd_device == SND_DEVICE_OUT_HEADPHONES
                || snd_device == SND_DEVICE_OUT_HEADPHONES_44_1
                || snd_device == SND_DEVICE_OUT_HEADPHONES_44_1