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

Commit dc167fe1 authored by lintaopei's avatar lintaopei
Browse files

[ALM:10872983][FP4-99][Audio]Aw update

parent d2c67f2e
Loading
Loading
Loading
Loading
+9 −7
Original line number Original line Diff line number Diff line
@@ -270,6 +270,7 @@ static int aw_mtk_send_module_enable(void *buf, uint8_t type)
	case AW_RX_MODULE:
	case AW_RX_MODULE:
		ret = aw_mtk_write_data_to_dsp(AFE_PARAM_ID_AWDSP_RX_SET_ENABLE,
		ret = aw_mtk_write_data_to_dsp(AFE_PARAM_ID_AWDSP_RX_SET_ENABLE,
					buf, sizeof(uint32_t), 0);
					buf, sizeof(uint32_t), 0);
		break;
	case AW_TX_MODULE:
	case AW_TX_MODULE:
		ret = aw_mtk_write_data_to_dsp(AFE_PARAM_ID_AWDSP_TX_SET_ENABLE,
		ret = aw_mtk_write_data_to_dsp(AFE_PARAM_ID_AWDSP_TX_SET_ENABLE,
					buf, sizeof(uint32_t), 0);
					buf, sizeof(uint32_t), 0);
@@ -290,6 +291,7 @@ static int aw_mtk_get_module_enable(void *buf, uint8_t type)
	case AW_RX_MODULE:
	case AW_RX_MODULE:
		ret = aw_mtk_read_data_from_dsp(INDEX_PARAMS_ID_RX_ENBALE,
		ret = aw_mtk_read_data_from_dsp(INDEX_PARAMS_ID_RX_ENBALE,
					buf, sizeof(uint32_t), 0);
					buf, sizeof(uint32_t), 0);
		break;
	case AW_TX_MODULE:
	case AW_TX_MODULE:
		ret = aw_mtk_read_data_from_dsp(INDEX_PARAMS_ID_TX_ENABLE,
		ret = aw_mtk_read_data_from_dsp(INDEX_PARAMS_ID_TX_ENABLE,
					buf, sizeof(uint32_t), 0);
					buf, sizeof(uint32_t), 0);
@@ -306,15 +308,15 @@ static int aw_mtk_get_module_enable(void *buf, uint8_t type)
/******************qcom dsp communication function start**********************/
/******************qcom dsp communication function start**********************/
static int aw_check_dsp_ready(void)
static int aw_check_dsp_ready(void)
{
{
	int ret;
	int topo_id;


	ret = afe_get_topology(AFE_PORT_ID_AWDSP_RX);
	topo_id = afe_get_topology(AFE_PORT_ID_AWDSP_RX);
	pr_debug("%s: topo_id 0x%x\n", __func__, ret);
	pr_debug("%s: topo_id 0x%x\n", __func__, topo_id);


	if (ret <= 0)
	if (topo_id == AW_RX_TOPO_ID)
		return false;
	else
		return true;
		return true;
	else
		return false;
}
}


static int aw_qcom_write_data_to_dsp(int index, void *data, int data_size, int channel)
static int aw_qcom_write_data_to_dsp(int index, void *data, int data_size, int channel)
@@ -337,7 +339,7 @@ static int aw_qcom_write_data_to_dsp(int index, void *data, int data_size, int c
		} else {
		} else {
			try++;
			try++;
			msleep(AW_DSP_SLEEP_TIME);
			msleep(AW_DSP_SLEEP_TIME);
			pr_debug("%s: afe not ready try again\n", __func__);
			pr_err("%s: afe not ready try again\n", __func__);
		}
		}
	}
	}


+1 −0
Original line number Original line Diff line number Diff line
@@ -11,6 +11,7 @@
#define AW_DSP_SLEEP_TIME (10)
#define AW_DSP_SLEEP_TIME (10)


#define AFE_PORT_ID_AWDSP_RX (0x1016)     /*plt fp4 AFE_PORT_ID_QUINARY_MI2S_RX*/
#define AFE_PORT_ID_AWDSP_RX (0x1016)     /*plt fp4 AFE_PORT_ID_QUINARY_MI2S_RX*/
#define AW_RX_TOPO_ID					(0x1000FF01)	/*RX topology id*/


#define AW_COPP_MODULE_ID (0X10013D02)			/*SKT module id*/
#define AW_COPP_MODULE_ID (0X10013D02)			/*SKT module id*/
#define AW_COPP_MODULE_PARAMS_ID_EN (0X10013D14)	/*SKT enable param id*/
#define AW_COPP_MODULE_PARAMS_ID_EN (0X10013D14)	/*SKT enable param id*/