From e169e990eabe69efc1d43b1cea17caec61d99268 Mon Sep 17 00:00:00 2001 From: Satya Krishna Pindiproli Date: Fri, 22 Sep 2017 11:34:35 +0530 Subject: [PATCH] audio-lnx: dsp: codecs: modify API to configure output PCM block Pass valid channel count and sample rate information to configure AAC decoder component and modify the API used to configure the output PCM block when multi AAC decoder component is used in non-tunnelled mode. Change-Id: I5938f316a39b722924416b6910e6c8b835e7855e Signed-off-by: Satya Krishna Pindiproli --- dsp/codecs/audio_aac.c | 4 +++- dsp/codecs/audio_multi_aac.c | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dsp/codecs/audio_aac.c b/dsp/codecs/audio_aac.c index 0f371fd1aa..006b21c679 100644 --- a/dsp/codecs/audio_aac.c +++ b/dsp/codecs/audio_aac.c @@ -48,7 +48,9 @@ static long audio_ioctl_shared(struct file *file, unsigned int cmd, audio->ac->session); if (audio->feedback == NON_TUNNEL_MODE) { /* Configure PCM output block */ - rc = q6asm_enc_cfg_blk_pcm(audio->ac, 0, 0); + rc = q6asm_enc_cfg_blk_pcm(audio->ac, + audio->pcm_cfg.sample_rate, + audio->pcm_cfg.channel_count); if (rc < 0) { pr_err("pcm output block config failed\n"); break; diff --git a/dsp/codecs/audio_multi_aac.c b/dsp/codecs/audio_multi_aac.c index 01c3dc5ada..5d407e0c5e 100644 --- a/dsp/codecs/audio_multi_aac.c +++ b/dsp/codecs/audio_multi_aac.c @@ -59,9 +59,9 @@ static long audio_ioctl_shared(struct file *file, unsigned int cmd, audio->ac->session); if (audio->feedback == NON_TUNNEL_MODE) { /* Configure PCM output block */ - rc = q6asm_enc_cfg_blk_pcm_native(audio->ac, - aac_cfg.sample_rate, - aac_cfg.ch_cfg); + rc = q6asm_enc_cfg_blk_pcm(audio->ac, + audio->pcm_cfg.sample_rate, + audio->pcm_cfg.channel_count); if (rc < 0) { pr_err("pcm output block config failed\n"); break;