From 2a0996bc17c7f67796d6c45cec92a01ea8b2432d Mon Sep 17 00:00:00 2001 From: Ramprasad Katkam Date: Tue, 25 Sep 2018 20:13:30 +0530 Subject: [PATCH] soc: swr-mstr: Fix port collision during wsa playback Fix block pack mode parameter in wsa frame params to to get proper frame allocation avoiding port collision between DAC port and SMART BOOST port. Change-Id: I3e552f189a67661d63a6cd0affc1cb233b53bda7 Signed-off-by: Ramprasad Katkam --- soc/swr-mstr-ctrl.c | 9 ++++++--- soc/swrm_port_config.h | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/soc/swr-mstr-ctrl.c b/soc/swr-mstr-ctrl.c index 7232fe83caa8..6d91d26a2d1a 100644 --- a/soc/swr-mstr-ctrl.c +++ b/soc/swr-mstr-ctrl.c @@ -843,7 +843,8 @@ static void swrm_copy_data_port_config(struct swr_master *master, u8 bank) port_req->dev_num, 0x00, SWRS_DP_BLOCK_CONTROL_1(slv_id)); } - if (mport->blk_pack_mode != SWR_INVALID_PARAM) { + if (mport->blk_pack_mode != SWR_INVALID_PARAM + && swrm->master_id != MASTER_ID_WSA) { reg[len] = SWRM_CMD_FIFO_WR_CMD; val[len++] = SWR_REG_VAL_PACK(mport->blk_pack_mode, @@ -871,8 +872,10 @@ static void swrm_copy_data_port_config(struct swr_master *master, u8 bank) } value = ((mport->req_ch) << SWRM_DP_PORT_CTRL_EN_CHAN_SHFT); - value |= ((mport->offset2) - << SWRM_DP_PORT_CTRL_OFFSET2_SHFT); + + if (mport->offset2 != SWR_INVALID_PARAM) + value |= ((mport->offset2) + << SWRM_DP_PORT_CTRL_OFFSET2_SHFT); value |= ((mport->offset1) << SWRM_DP_PORT_CTRL_OFFSET1_SHFT); value |= mport->sinterval; diff --git a/soc/swrm_port_config.h b/soc/swrm_port_config.h index 86cc9221a1da..81bab1c90bff 100644 --- a/soc/swrm_port_config.h +++ b/soc/swrm_port_config.h @@ -24,10 +24,10 @@ struct port_params wsa_frame_superset[SWR_MSTR_PORT_LEN] = { {7, 1, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}, {31, 2, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}, - {63, 12, 31, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}, + {63, 12, 31, 0xFF, 0xFF, 0xFF, 0x1, 0xFF, 0xFF}, {7, 6, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}, {31, 18, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}, - {63, 13, 31, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}, + {63, 13, 31, 0xFF, 0xFF, 0xFF, 0x1, 0xFF, 0xFF}, {15, 7, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}, {15, 10, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}, };