dsp: add support for aptX dual mono

Send sync mode parameter to DSP for supporting aptX dual mono.

Change-Id: I1c43b0dec6661a77644e28df45ca6c1a182745de
Signed-off-by: Aniket Kumar Lata <alata@codeaurora.org>
diff --git a/dsp/q6afe.c b/dsp/q6afe.c
index 8e96f6f..2bdfd10 100644
--- a/dsp/q6afe.c
+++ b/dsp/q6afe.c
@@ -2895,6 +2895,24 @@
 		goto exit;
 	}
 
+	if (format == ASM_MEDIA_FMT_APTX) {
+		config.param.payload_size =
+			payload_size + sizeof(config.port.sync_mode_param);
+		pr_debug("%s: sending AFE_PARAM_ID_APTX_SYNC_MODE to DSP",
+			__func__);
+		config.pdata.param_id = AFE_PARAM_ID_APTX_SYNC_MODE;
+		config.pdata.param_size = sizeof(config.port.sync_mode_param);
+		config.port.sync_mode_param.sync_mode =
+			config.port.enc_blk_param.enc_blk_config.aptx_config.
+				aptx_v2_cfg.sync_mode;
+		ret = afe_apr_send_pkt(&config, &this_afe.wait[index]);
+		if (ret) {
+			pr_err("%s: AFE_PARAM_ID_APTX_SYNC_MODE for port 0x%x failed %d\n",
+				__func__, port_id, ret);
+			goto exit;
+		}
+	}
+
 	config.param.payload_size =
 			payload_size + sizeof(config.port.enc_pkt_id_param);
 	pr_debug("%s:sending AFE_ENCODER_PARAM_ID_PACKETIZER to DSP payload = %d",