audio: hal: enable dynamic DSP bitwidth configuration
DSP Bitwidth can be dynamically configured. ASM bitwidth
is configured via mixer ctl, while ADM and AFE are set
by HAL interface.
CRs-Fixed: 2080987
Change-Id: I6f35ac8036e3e4ddc3714c7a2c03272d9da5d584
diff --git a/hal/msm8916/platform.c b/hal/msm8916/platform.c
index 3fc1ef2..257d3bc 100644
--- a/hal/msm8916/platform.c
+++ b/hal/msm8916/platform.c
@@ -5748,6 +5748,10 @@
backend_cfg.format = usecase->stream.out->format;
backend_cfg.channels = audio_channel_count_from_out_mask(usecase->stream.out->channel_mask);
}
+ /* enforce AFE bitwidth mode via backend_cfg */
+ if (audio_extn_is_dsp_bit_width_enforce_mode_supported(usecase->stream.out->flags) &&
+ (adev->dsp_bit_width_enforce_mode > backend_cfg.bit_width))
+ backend_cfg.bit_width = adev->dsp_bit_width_enforce_mode;
/*this is populated by check_codec_backend_cfg hence set default value to false*/
backend_cfg.passthrough_enabled = false;