mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
Merge "asoc: pcm-noirq: set substream state to disconnect when ssr happens"
This commit is contained in:
commit
e9b221b2ee
1 changed files with 14 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue