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

Commit 3f73eb4c 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: unblock the calls sent to the driver during SSR"

parents fce236ab 832c7210
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -1563,14 +1563,13 @@ static int msm_compr_pointer(struct snd_compr_stream *cstream,
	tstamp.byte_offset = prtd->byte_offset;
	tstamp.copied_total = prtd->copied_total;
	first_buffer = prtd->first_buffer;

	if (atomic_read(&prtd->error)) {
		pr_err("%s Got RESET EVENTS notification, return error",
			__func__);
		tstamp.pcm_io_frames = 0;
		memcpy(arg, &tstamp, sizeof(struct snd_compr_tstamp));
		spin_unlock_irqrestore(&prtd->lock, flags);
		return -EINVAL;
		return -ENETRESET;
	}

	spin_unlock_irqrestore(&prtd->lock, flags);
@@ -1584,6 +1583,9 @@ static int msm_compr_pointer(struct snd_compr_stream *cstream,
		if (rc < 0) {
			pr_err("%s: Get Session Time return value =%lld\n",
				__func__, timestamp);
			if (atomic_read(&prtd->error))
				return -ENETRESET;
			else
				return -EAGAIN;
		}
	} else {
@@ -1667,7 +1669,7 @@ static int msm_compr_copy(struct snd_compr_stream *cstream,
	if (atomic_read(&prtd->error)) {
		pr_err("%s Got RESET EVENTS notification", __func__);
		spin_unlock_irqrestore(&prtd->lock, flags);
		return -EINVAL;
		return -ENETRESET;
	}
	spin_unlock_irqrestore(&prtd->lock, flags);

+4 −0
Original line number Diff line number Diff line
@@ -1400,6 +1400,10 @@ static int32_t q6asm_callback(struct apr_client_data *data, void *priv)
		if (ac->cb)
			ac->cb(data->opcode, data->token,
				data->payload, ac->priv);
		atomic_set(&ac->time_flag, 0);
		atomic_set(&ac->cmd_state, 0);
		wake_up(&ac->time_wait);
		wake_up(&ac->cmd_wait);
		ac->apr = NULL;
		return 0;
	}
+3 −2
Original line number Diff line number Diff line
@@ -680,14 +680,15 @@ static int soc_compr_pointer(struct snd_compr_stream *cstream,
{
	struct snd_soc_pcm_runtime *rtd = cstream->private_data;
	struct snd_soc_platform *platform = rtd->platform;
	int ret = 0;

	mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);

	if (platform->driver->compr_ops && platform->driver->compr_ops->pointer)
		 platform->driver->compr_ops->pointer(cstream, tstamp);
		ret = platform->driver->compr_ops->pointer(cstream, tstamp);

	mutex_unlock(&rtd->pcm_mutex);
	return 0;
	return ret;
}

static int soc_compr_copy(struct snd_compr_stream *cstream,