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

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

Merge 2b79066d on remote branch

Change-Id: Ia4edd744d189ed3c344adf4f6b887c1b67532888
parents a918946c 2b79066d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -4325,6 +4325,9 @@ static const struct snd_kcontrol_new afe_dec_config_controls[] = {
	SOC_ENUM_EXT("AFE Output Bit Format", afe_bit_format_enum[0],
		     msm_dai_q6_afe_output_bit_format_get,
		     msm_dai_q6_afe_output_bit_format_put),
	SOC_ENUM_EXT("AFE Output Channels SLIM7", afe_chs_enum[0],
		     msm_dai_q6_afe_output_channel_get,
		     msm_dai_q6_afe_output_channel_put),
};

static const struct snd_kcontrol_new afe_ttp_config_controls[] = {
@@ -4570,6 +4573,9 @@ static int msm_dai_q6_dai_probe(struct snd_soc_dai *dai)
		rc = snd_ctl_add(dai->component->card->snd_card,
				 snd_ctl_new1(&afe_dec_config_controls[0],
				 dai_data));
		rc = snd_ctl_add(dai->component->card->snd_card,
				 snd_ctl_new1(&afe_dec_config_controls[4],
				 dai_data));
		break;
	case SLIMBUS_9_TX:
		rc = snd_ctl_add(dai->component->card->snd_card,
+1 −1
Original line number Diff line number Diff line
@@ -1426,7 +1426,7 @@ int msm_pcm_routing_set_stream_ec_ref_chmix_cfg(
			pr_debug("%s: ch[%d][%d] weight = %d",
				 __func__, i, j, cfg_data->channel_weight[i][j]);
	if (fedai_id < 0 || fedai_id > MSM_FRONTEND_DAI_MAX) {
	if (fedai_id < 0 || fedai_id >= MSM_FRONTEND_DAI_MAX) {
		pr_err("%s: Received out of bounds fedai_id %d\n",
			__func__, fedai_id);
		ret = -EINVAL;
+51 −1
Original line number Diff line number Diff line
@@ -446,7 +446,6 @@ static int q6afe_load_avcs_modules(int num_modules, u16 port_id,
				if (format_id == ASM_MEDIA_FMT_LC3) {
					pm[i]->payload->load_unload_info[0].id1 =
					AVS_MODULE_ID_DEPACKETIZER_COP_V2;
					goto load_unload;
				}

				pm[i]->payload->load_unload_info[1].module_type =
@@ -4981,6 +4980,7 @@ static int q6afe_send_dec_config(u16 port_id,
	struct asm_aptx_ad_speech_mode_cfg_t speech_codec_init_param;
	struct param_hdr_v3 param_hdr;
	struct avs_cop_v2_param_id_stream_info_t lc3_enc_stream_info;
	struct afe_lc3_dec_cfg_t lc3_dec_config_init;
	int ret;
	u32 dec_fmt;

@@ -4991,6 +4991,7 @@ static int q6afe_send_dec_config(u16 port_id,
	memset(&matched_port_param, 0, sizeof(matched_port_param));
	memset(&speech_codec_init_param, 0, sizeof(speech_codec_init_param));
	memset(&lc3_enc_stream_info, 0, sizeof(lc3_enc_stream_info));
	memset(&lc3_dec_config_init, 0, sizeof(lc3_dec_config_init));
	memset(&param_hdr, 0, sizeof(param_hdr));

	param_hdr.module_id = AFE_MODULE_ID_DECODER;
@@ -5176,6 +5177,55 @@ static int q6afe_send_dec_config(u16 port_id,
	}

	if (format == ASM_MEDIA_FMT_LC3) {
		if (cfg->data.lc3_dec_config.dec_codec.from_Air_cfg
			    .stream_map_size != 0) {
			/* create LC3 deocder before sending init params */
			pr_debug("%s: sending AFE_DECODER_PARAM_ID_DEC_MEDIA_FMT to DSP payload\n",
				  __func__);
			param_hdr.module_id = AFE_MODULE_ID_DECODER;
			param_hdr.instance_id = INSTANCE_ID_0;
			param_hdr.param_id = AFE_DECODER_PARAM_ID_DEC_FMT_ID;
			param_hdr.param_size = sizeof(dec_fmt);
			dec_fmt = format;
			ret = q6afe_pack_and_set_param_in_band(port_id,
							       q6audio_get_port_index(port_id),
							       param_hdr, (u8 *) &dec_fmt);
			if (ret) {
				pr_err("%s: AFE_DECODER_PARAM_ID_DEC_MEDIA_FMT for port 0x%x failed %d\n",
					__func__, port_id, ret);
				goto exit;
			}

			pr_debug("%s: sending CAPI_V2_PARAM_LC3_DEC_MODULE_INIT to DSP\n",
				__func__);
			param_hdr.param_id = CAPI_V2_PARAM_LC3_DEC_MODULE_INIT;
			param_hdr.param_size = sizeof(struct afe_lc3_dec_cfg_t);
			lc3_dec_config_init =
				cfg->data.lc3_dec_config.dec_codec.from_Air_cfg;
			ret = q6afe_pack_and_set_param_in_band(
				port_id, q6audio_get_port_index(port_id),
				param_hdr, (u8 *)&lc3_dec_config_init);
			if (ret) {
				pr_err("%s: CAPI_V2_PARAM_LC3_DEC_MODULE_INIT for port 0x%x failed %d\n",
				       __func__, port_id, ret);
				goto exit;
			}

			pr_debug("%s: sending AVS_COP_V2_PARAM_ID_STREAM_INFO to DSP\n",
				__func__);
			param_hdr.param_id = AVS_COP_V2_PARAM_ID_STREAM_INFO;
			param_hdr.param_size = sizeof(
				struct avs_cop_v2_param_id_stream_info_t);
			lc3_enc_stream_info = cfg->data.lc3_dec_config.dec_codec.streamMapFromAir;
			ret = q6afe_pack_and_set_param_in_band(
				port_id, q6audio_get_port_index(port_id),
				param_hdr, (u8 *)&lc3_enc_stream_info);
			if (ret) {
				pr_err("%s: AVS_COP_V2_PARAM_ID_STREAM_INFO for port 0x%x failed %d\n",
				       __func__, port_id, ret);
				goto exit;
			}
		}
		pr_debug("%s: sending AVS_COP_V2_PARAM_ID_STREAM_INFO to DSP\n",
			 __func__);
		param_hdr.module_id = AFE_MODULE_ID_DECODER;
+3 −3
Original line number Diff line number Diff line
@@ -3546,7 +3546,7 @@ static int q6asm_open_read_version_adaptor(struct audio_client *ac,
int q6asm_open_read_with_retry(struct audio_client *ac, uint32_t format,
			uint16_t bits_per_sample, bool ts_mode)
{
	int i, rc;
	int i = 0, rc = 0;

	mutex_lock(&session_lock);
	for (i = 0; i < ASM_ACTIVE_STREAMS_ALLOWED; i++) {
@@ -3921,7 +3921,7 @@ static int q6asm_open_write_version_adaptor(struct audio_client *ac,
int q6asm_open_write_with_retry(struct audio_client *ac, uint32_t format,
			uint16_t bits_per_sample)
{
	int i, rc;
	int i = 0, rc = 0;

	mutex_lock(&session_lock);
	for (i = 0; i < ASM_ACTIVE_STREAMS_ALLOWED; i++) {
@@ -4366,7 +4366,7 @@ EXPORT_SYMBOL(q6asm_open_loopback_v2);
int q6asm_open_loopback_with_retry(struct audio_client *ac,
				uint16_t bits_per_sample)
{
	int i, rc;
	int i = 0, rc = 0;

	mutex_lock(&session_lock);
	for (i = 0; i < ASM_ACTIVE_STREAMS_ALLOWED; i++) {
+4 −2
Original line number Diff line number Diff line
@@ -4672,16 +4672,18 @@ struct afe_lc3_dec_cfg_t {
	struct afe_lc3_cfg_t FromAir;
	uint32_t decoder_output_channel;
	uint32_t stream_map_size;
	struct afe_stream_map_t streamMapIn[16];
	struct afe_stream_map_t streamMapIn[2];
} __packed;

struct avs_cop_v2_param_id_stream_info_t {
	uint32_t stream_map_size;
	struct afe_lc3_stream_map_t streamMap[16];
	struct afe_lc3_stream_map_t streamMap[2];
} __packed;

struct afe_lc3_dec_config_t {
	struct afe_lc3_dec_cfg_t from_Air_cfg;
	struct avs_cop_v2_param_id_stream_info_t streamMapToAir;
	struct avs_cop_v2_param_id_stream_info_t streamMapFromAir;
} __packed;

struct afe_lc3_enc_config_t {
Loading