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

Commit e9b221b2 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "asoc: pcm-noirq: set substream state to disconnect when ssr happens"

parents 4aa9a955 e0705ab0
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -153,6 +153,8 @@ static const struct soc_enum msm_pcm_fe_topology_enum[] = {
static void event_handler(uint32_t opcode,
		uint32_t token, uint32_t *payload, void *priv)
{
	struct msm_audio *prtd = priv;
	struct snd_pcm_substream *substream;
	uint32_t *ptrmem = (uint32_t *)payload;

	switch (opcode) {
@@ -171,6 +173,18 @@ static void event_handler(uint32_t opcode,
			break;
		}
		break;
	case RESET_EVENTS:
		if (!prtd || !prtd->substream) {
			pr_err("%s: prtd or substream is NULL\n", __func__);
			return;
		}
		substream = prtd->substream;
		if (!substream->runtime || !substream->runtime->status) {
			pr_err("%s: runtime or runtime->status is NULL\n", __func__);
			return;
		}
		substream->runtime->status->state = SNDRV_PCM_STATE_DISCONNECTED;
		break;
	default:
		pr_debug("Not Supported Event opcode[0x%x]\n", opcode);
		break;