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

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

Merge 07c54eab on remote branch

Change-Id: I173d4495e4ceda482a33026ebb7a4f0a2335feba
parents edbbe9d0 07c54eab
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -663,6 +663,11 @@ static void hpcm_copy_playback_data_from_queue(struct dai_data *dai_data,
				struct hpcm_buf_node, list);
		list_del(&buf_node->list);
		*len = buf_node->frame.len;
		if (*len > HPCM_MAX_VOC_PKT_SIZE) {
			pr_err("%s: Playback data len %d overflow\n",
					__func__, *len);
			return;
		}
		memcpy((u8 *)dai_data->vocpcm_ion_buffer.kvaddr,
		       &buf_node->frame.voc_pkt[0],
		       buf_node->frame.len);
@@ -690,6 +695,12 @@ static void hpcm_copy_capture_data_to_queue(struct dai_data *dai_data,
	if (dai_data->substream == NULL)
		return;

	if (len > HPCM_MAX_VOC_PKT_SIZE) {
		pr_err("%s: Copy capture data len %d overflow\n",
			__func__, len);
		return;
	}

	/* Copy out buffer packet into free_queue */
	spin_lock_irqsave(&dai_data->dsp_lock, dsp_flags);

@@ -732,6 +743,13 @@ void hpcm_notify_evt_processing(uint8_t *data, char *session,
		return;
	}

	if (prtd->mixer_conf.sess_indx < VOICE_INDEX ||
		prtd->mixer_conf.sess_indx >= MAX_SESSION) {
		pr_err("%s:: Invalid session idx %d\n",
			__func__, prtd->mixer_conf.sess_indx);
		return;
	}

	if (notify_evt->tap_point == VSS_IVPCM_TAP_POINT_TX_DEFAULT) {
		tp = &prtd->session[prtd->mixer_conf.sess_indx].tx_tap_point;
		tmd = &prtd->mixer_conf.tx;
+3 −0
Original line number Diff line number Diff line
@@ -475,6 +475,8 @@ static int32_t aprv2_core_fn_q(struct apr_client_data *data, void *priv)
	case AVCS_CMD_RSP_LOAD_MODULES:
		pr_debug("%s: Received AVCS_CMD_RSP_LOAD_MODULES\n",
			 __func__);
		if (!rsp_payload)
			return -EINVAL;
		if (data->payload_size != ((sizeof(struct avcs_load_unload_modules_sec_payload)
			* rsp_payload->num_modules) + sizeof(uint32_t))) {
			pr_err("%s: payload size greater than expected size %d\n",
@@ -1061,6 +1063,7 @@ int32_t q6core_avcs_load_unload_modules(struct avcs_load_unload_modules_payload
done:
	kfree(mod);
	kfree(rsp_payload);
	rsp_payload = NULL;
	mutex_unlock(&(q6core_lcl.cmd_lock));
	return ret;
}
+7 −1
Original line number Diff line number Diff line
@@ -472,6 +472,10 @@ static int q6lsm_apr_send_pkt(struct lsm_client *client, void *handle,
	}

	pr_debug("%s: enter wait %d\n", __func__, wait);
	if (mmap_handle_p) {
		pr_debug("%s: Invalid mmap_handle\n", __func__);
		return -EINVAL;
	}
	if (wait)
		mutex_lock(&lsm_common.apr_lock);
	if (mmap_p) {
@@ -517,6 +521,7 @@ static int q6lsm_apr_send_pkt(struct lsm_client *client, void *handle,

	if (mmap_p && *mmap_p == 0)
		ret = -ENOMEM;
	mmap_handle_p = NULL;
	pr_debug("%s: leave ret %d\n", __func__, ret);
	return ret;
}
@@ -2040,6 +2045,7 @@ static int q6lsm_mmapcallback(struct apr_client_data *data, void *priv)
	case LSM_SESSION_CMDRSP_SHARED_MEM_MAP_REGIONS:
		if (atomic_read(&client->cmd_state) == CMD_STATE_WAIT_RESP) {
			spin_lock_irqsave(&mmap_lock, flags);
			if (mmap_handle_p)
				*mmap_handle_p = command;
			/* spin_unlock_irqrestore implies barrier */
			spin_unlock_irqrestore(&mmap_lock, flags);