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

Commit d99897f5 authored by Xiaoyu Ye's avatar Xiaoyu Ye Committed by Gerrit - the friendly Code Review server
Browse files

dsp: codecs: add support to enable multiaac 5.1 channel playback



Channel number of multiaac audio decoder is hard-coded to two during
the configuration. Modify it to accept different channel numbers to
enable 5.1 channel playback.

Change-Id: Ibc33ddc7f2ac810a6a34cdbd7a832e58531dfa4f
Signed-off-by: default avatarXiaoyu Ye <benyxy@codeaurora.org>
parent 9326b2df
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -111,7 +111,14 @@ static long audio_ioctl_shared(struct file *file, unsigned int cmd,
			pr_err("cmd media format block failed\n");
			break;
		}
		rc = q6asm_set_encdec_chan_map(audio->ac, 2);

		/* Fall back to the default number of channels
		 * if aac_cfg.ch_cfg is not between 1-6
		 */
		if ((aac_cfg.ch_cfg == 0) || (aac_cfg.ch_cfg > 6))
			aac_cfg.ch_cfg = 2;

		rc = q6asm_set_encdec_chan_map(audio->ac, aac_cfg.ch_cfg);
		if (rc < 0) {
			pr_err("%s: cmd set encdec_chan_map failed\n",
				__func__);