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

Commit 052d63be authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: msm: qdsp6v2: fix callback handling of removing silence cmds"

parents 0f09447c 96bbeed5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -742,6 +742,7 @@ int msm_pcm_routing_reg_phy_stream(int fedai_id, int perf_mode,
				(copp_idx >= MAX_COPPS_PER_PORT)) {
				pr_err("%s: adm open failed copp_idx:%d\n",
					__func__, copp_idx);
				mutex_unlock(&routing_lock);
				return -EINVAL;
			}
			pr_debug("%s: setting idx bit of fe:%d, type: %d, be:%d\n",
@@ -5465,6 +5466,7 @@ static int msm_pcm_routing_prepare(struct snd_pcm_substream *substream)
			if ((copp_idx < 0) ||
				(copp_idx >= MAX_COPPS_PER_PORT)) {
				pr_err("%s: adm open failed\n", __func__);
				mutex_unlock(&routing_lock);
				return -EINVAL;
			}
			pr_debug("%s: setting idx bit of fe:%d, type: %d, be:%d\n",
+6 −0
Original line number Diff line number Diff line
@@ -1405,6 +1405,8 @@ static int32_t is_no_wait_cmd_rsp(uint32_t opcode, uint32_t *cmd_type)
			case ASM_SESSION_CMD_RUN_V2:
			case ASM_SESSION_CMD_PAUSE:
			case ASM_DATA_CMD_EOS:
			case ASM_DATA_CMD_REMOVE_INITIAL_SILENCE:
			case ASM_DATA_CMD_REMOVE_TRAILING_SILENCE:
				return 1;
			default:
				pr_err("%s: default err 0x%x\n",
@@ -5646,18 +5648,22 @@ int __q6asm_send_meta_data(struct audio_client *ac, uint32_t stream_id,
	silence.hdr.opcode = ASM_DATA_CMD_REMOVE_INITIAL_SILENCE;
	silence.num_samples_to_remove    = initial_samples;

	atomic_inc(&ac->nowait_cmd_cnt);
	rc = apr_send_pkt(ac->apr, (uint32_t *) &silence);
	if (rc < 0) {
		pr_err("%s: Commmand silence failed[%d]", __func__, rc);
		atomic_dec(&ac->nowait_cmd_cnt);
		goto fail_cmd;
	}

	silence.hdr.opcode = ASM_DATA_CMD_REMOVE_TRAILING_SILENCE;
	silence.num_samples_to_remove    = trailing_samples;

	atomic_inc(&ac->nowait_cmd_cnt);
	rc = apr_send_pkt(ac->apr, (uint32_t *) &silence);
	if (rc < 0) {
		pr_err("%s: Commmand silence failed[%d]", __func__, rc);
		atomic_dec(&ac->nowait_cmd_cnt);
		goto fail_cmd;
	}