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

Commit b03882a5 authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Merge dc1728e3 on remote branch

Change-Id: Ia3d274e495f4db995cc70582ff6bb5364cdc9e5c
parents a04ea06b dc1728e3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -547,6 +547,7 @@ struct afe_param_id_clock_set_v2_t global_dyn_mclk_cfg = {
};

static int afe_dyn_clk_root_enum[] = {
	Q6AFE_LPASS_CLK_ROOT_DEFAULT,
	Q6AFE_LPASS_MCLK_IN0,
	Q6AFE_LPASS_MCLK_IN1,
};
@@ -555,6 +556,7 @@ static int afe_dyn_clk_attri_enum[] = {
	Q6AFE_LPASS_CLK_ATTRIBUTE_COUPLE_NO,
	Q6AFE_LPASS_CLK_ATTRIBUTE_COUPLE_DIVIDEND,
	Q6AFE_LPASS_CLK_ATTRIBUTE_COUPLE_DIVISOR,
	Q6AFE_LPASS_CLK_ATTRIBUTE_INVERT_COUPLE_NO,
};

static int afe_dyn_clk_id_enum[] = {

asoc/msm-pcm-routing-auto.c

100644 → 100755
+20 −11
Original line number Diff line number Diff line
@@ -2475,14 +2475,20 @@ int msm_pcm_routing_reg_phy_stream(int fedai_id, int perf_mode,
			bits_per_sample = msm_routing_get_bit_width(
						msm_bedais[i].format);
			topology = msm_routing_get_adm_topology(fedai_id,
								session_type,
								i);
			app_type =
			fe_dai_app_type_cfg[fedai_id][session_type][i].app_type;
			if (app_type) {
				app_type_idx =
				msm_pcm_routing_get_app_type_idx(app_type);
				sample_rate =
				fe_dai_app_type_cfg[fedai_id][session_type][i]
					.sample_rate;
				if ((fe_dai_app_type_cfg[fedai_id][session_type][i].sample_rate != msm_bedais[i].sample_rate) &&
					(topology == AUDIO_COPP_MFC)) {
					pr_debug("%s: FE and BE SR is not equal", __func__);
					sample_rate = msm_bedais[i].sample_rate;
				} else
					sample_rate = fe_dai_app_type_cfg[fedai_id][session_type][i].sample_rate;
				bits_per_sample =
					(fe_dai_app_type_cfg[fedai_id][session_type][i].bit_width) ?
					fe_dai_app_type_cfg[fedai_id][session_type][i].bit_width :
@@ -2496,9 +2502,7 @@ int msm_pcm_routing_reg_phy_stream(int fedai_id, int perf_mode,
			acdb_dev_id =
			fe_dai_app_type_cfg[fedai_id][session_type][i]
				.acdb_dev_id;
			topology = msm_routing_get_adm_topology(fedai_id,
								session_type,
								i);
			be_bit_width = msm_routing_get_bit_width(
                                                msm_bedais[i].format);
			copp_perf_mode = get_copp_perf_mode(fedai_id, session_type, i);
@@ -2563,11 +2567,16 @@ int msm_pcm_routing_reg_phy_stream(int fedai_id, int perf_mode,
				&session_copp_map[fedai_id][session_type][i]);
			if (msm_is_resample_needed(
				sample_rate,
				msm_bedais[i].sample_rate))
				fe_dai_app_type_cfg[fedai_id][session_type][i].sample_rate,
				msm_bedais[i].sample_rate)) {
				if ((session_type == SESSION_TYPE_TX) && (topology == AUDIO_COPP_MFC)) {
					adm_copp_mfc_cfg(port_id, copp_idx,
						fe_dai_app_type_cfg[fedai_id][session_type][i].sample_rate);
				} else {
					adm_copp_mfc_cfg(port_id, copp_idx,
						msm_bedais[i].sample_rate);
				}
			}
			for (j = 0; j < MAX_COPPS_PER_PORT; j++) {
				unsigned long copp =
				    session_copp_map[fedai_id][session_type][i];
+25 −0
Original line number Diff line number Diff line
@@ -9851,6 +9851,9 @@ static int afe_set_lpass_clk_cfg_ext_mclk(int index, struct afe_clk_set *cfg,
	return ret;
}

static int ext_dyn_mclk_port_id;
static int ext_dyn_clk_root = Q6AFE_LPASS_CLK_ROOT_DEFAULT;
static struct afe_param_id_clock_set_v2_t ext_dyn_mclk;
int afe_set_lpass_clk_cfg_ext_mclk_v2(int index, struct afe_param_id_clock_set_v2_t *dyn_mclk_cfg,
							uint32_t mclk_freq)
{
@@ -9915,6 +9918,21 @@ int afe_set_lpass_clk_cfg_ext_mclk_v2(int index, struct afe_param_id_clock_set_v

	mutex_unlock(&this_afe.afe_cmd_lock);

	if (ext_dyn_clk_root != dyn_mclk_cfg->clk_root) {
		ext_dyn_mclk_port_id = index;
		ext_dyn_mclk.clk_set_minor_version = dyn_mclk_cfg->clk_set_minor_version;
		ext_dyn_mclk.clk_id = dyn_mclk_cfg->clk_id;
		ext_dyn_mclk.clk_freq_in_hz = dyn_mclk_cfg->clk_freq_in_hz;
		ext_dyn_mclk.clk_attri = dyn_mclk_cfg->clk_attri;
		ext_dyn_mclk.clk_root = dyn_mclk_cfg->clk_root;
		ext_dyn_mclk.enable = dyn_mclk_cfg->enable;
		ext_dyn_mclk.divider_2x = dyn_mclk_cfg->divider_2x;
		ext_dyn_mclk.m = dyn_mclk_cfg->m;
		ext_dyn_mclk.n = dyn_mclk_cfg->n;
		ext_dyn_mclk.d = dyn_mclk_cfg->d;

		ext_dyn_clk_root = dyn_mclk_cfg->clk_root;
	}
	if (ret >= 0)
		return ret;

@@ -10032,6 +10050,7 @@ int afe_set_lpass_clock_v2(u16 port_id, struct afe_clk_set *cfg)
		return -EINVAL;
	}

	ext_dyn_mclk.enable = cfg->enable;
	if (clkinfo_per_port[idx].mclk_src_id != MCLK_SRC_INT) {
		pr_debug("%s: ext MCLK src %d\n",
			__func__, clkinfo_per_port[idx].mclk_src_id);
@@ -10062,6 +10081,12 @@ int afe_set_lpass_clock_v2(u16 port_id, struct afe_clk_set *cfg)

		ret = afe_set_lpass_clk_cfg_ext_mclk(index, cfg,
					clkinfo_per_port[idx].mclk_freq);
	} else if (ext_dyn_mclk.clk_root != Q6AFE_LPASS_CLK_ROOT_DEFAULT) {
		ret = afe_set_lpass_clk_cfg_ext_mclk_v2(ext_dyn_mclk_port_id,
			&ext_dyn_mclk, 0);
		if (ret)
			pr_err("%s: AFE port logging setting for port 0x%x failed %d\n",
			__func__, ext_dyn_mclk_port_id, ret);
	} else {
		ret = afe_set_lpass_clk_cfg(index, cfg);
	}
+10 −6
Original line number Diff line number Diff line
@@ -8526,10 +8526,11 @@ static int voice_alloc_oob_shared_mem(void)
			bufsz * bufcnt,
			&phys, &len,
			&mem_addr);
	if (rc < 0) {
	if (rc) {
		pr_err("%s: audio ION alloc failed, rc = %d\n",
			__func__, rc);

		rc = -EINVAL;
		goto done;
	}

@@ -8578,10 +8579,11 @@ static int voice_alloc_oob_mem_table(void)
				&v->shmem_info.memtbl.phys,
				&len,
				&(v->shmem_info.memtbl.data));
	if (rc < 0) {
	if (rc) {
		pr_err("%s: audio ION alloc failed, rc = %d\n",
			__func__, rc);

		rc = -EINVAL;
		goto done;
	}

@@ -8964,9 +8966,10 @@ static int voice_alloc_cal_mem_map_table(void)
				&common.cal_mem_map_table.phys,
				&len,
				&(common.cal_mem_map_table.data));
	if ((ret < 0) && (ret != -EPROBE_DEFER)) {
	if ((ret) && (ret != -EPROBE_DEFER)) {
		pr_err("%s: audio ION alloc failed, rc = %d\n",
			__func__, ret);
		ret = -EINVAL;
		goto done;
	}

@@ -8990,9 +8993,10 @@ static int voice_alloc_rtac_mem_map_table(void)
			&common.rtac_mem_map_table.phys,
			&len,
			&(common.rtac_mem_map_table.data));
	if (ret < 0) {
	if (ret) {
		pr_err("%s: audio ION alloc failed, rc = %d\n",
			__func__, ret);
		ret = -EINVAL;
		goto done;
	}

@@ -9722,7 +9726,7 @@ static int voice_alloc_source_tracking_shared_memory(void)
		&(common.source_tracking_sh_mem.sh_mem_block.phys),
		(size_t *)&(common.source_tracking_sh_mem.sh_mem_block.size),
		&(common.source_tracking_sh_mem.sh_mem_block.data));
	if (ret < 0) {
	if (ret) {
		pr_err("%s: audio ION alloc failed for sh_mem block, ret = %d\n",
			__func__, ret);

@@ -9744,7 +9748,7 @@ static int voice_alloc_source_tracking_shared_memory(void)
		&(common.source_tracking_sh_mem.sh_mem_table.phys),
		(size_t *)&(common.source_tracking_sh_mem.sh_mem_table.size),
		&(common.source_tracking_sh_mem.sh_mem_table.data));
	if (ret < 0) {
	if (ret) {
		pr_err("%s: audio ION alloc failed for sh_mem table, ret = %d\n",
			__func__, ret);

+2 −1
Original line number Diff line number Diff line
@@ -159,9 +159,10 @@ int rtac_allocate_cal_buffer(uint32_t cal_type)
		&rtac_cal[cal_type].cal_data.paddr,
		&len,
		&rtac_cal[cal_type].cal_data.kvaddr);
	if (result < 0) {
	if (result) {
		pr_err("%s: ION create client for RTAC failed\n",
		       __func__);
		result = -EINVAL;
		goto done;
	}

Loading