diff options
author | Aniket Kumar Lata <alata@codeaurora.org> | 2018-08-06 15:36:20 -0700 |
---|---|---|
committer | Petri Gynther <pgynther@google.com> | 2018-08-16 19:43:13 +0000 |
commit | 523fdea385b9fdef0bd4630d0f54898d6d241d1d (patch) | |
tree | 0d5f5766128d90ab4a12fdc42ec4f7ff83a9d05b | |
parent | 9b236065a5ec3f8b861768877b30cb0bee369571 (diff) | |
download | msm-extra-android-msm-crosshatch-4.9-pie-qpr1.tar.gz |
dsp: Do not send ABR parameters if bitrate is fixedandroid-9.0.0_r0.66android-9.0.0_r0.63android-9.0.0_r0.50android-9.0.0_r0.35android-msm-crosshatch-4.9-pie-qpr1android-msm-bluecross-4.9-pie-qpr1
ABR encoder config parameters should be sent to DSP
only when ABR is enabled. Do not send these parameters
for fixed bitrate.
Bug: 112197037
Change-Id: I200b1c3a06567e65cbda012d2a26574b924e3bb2
Signed-off-by: Aniket Kumar Lata <alata@codeaurora.org>
-rw-r--r-- | dsp/q6afe.c | 3 | ||||
-rw-r--r-- | include/dsp/apr_audio-v2.h | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/dsp/q6afe.c b/dsp/q6afe.c index 1d23f997..8b801c38 100644 --- a/dsp/q6afe.c +++ b/dsp/q6afe.c @@ -3170,7 +3170,8 @@ static int q6afe_send_enc_config(u16 port_id, goto exit; } - if (format == ASM_MEDIA_FMT_LDAC) { + if (format == ASM_MEDIA_FMT_LDAC && + cfg->ldac_config.abr_config.is_abr_enabled) { config.param.payload_size = payload_size + sizeof(config.port.map_param); pr_debug("%s:sending AFE_ENCODER_PARAM_ID_BIT_RATE_LEVEL_MAP to DSP payload = %d\n", diff --git a/include/dsp/apr_audio-v2.h b/include/dsp/apr_audio-v2.h index fa9738d5..811dad64 100644 --- a/include/dsp/apr_audio-v2.h +++ b/include/dsp/apr_audio-v2.h @@ -3138,6 +3138,10 @@ struct afe_abr_enc_cfg_t { * Information to set up IMC between decoder and encoder. */ struct afe_imc_dec_enc_info imc_info; + /* + * Flag to indicate whether ABR is enabled. + */ + bool is_abr_enabled; } __packed; #define AFE_PARAM_ID_APTX_SYNC_MODE 0x00013205 |