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/msm8974/platform.c b/hal/msm8974/platform.c
old mode 100755
new mode 100644
index 9c23f16..d7a36a6
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -5598,6 +5598,9 @@
backend_cfg.format = usecase->stream.out->format;
backend_cfg.channels = audio_channel_count_from_out_mask(usecase->stream.out->channel_mask);
}
+ 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;