misc: qcom: qdsp6v2: SSR recovery support for NT decoder
Post ENETRESET error to omx component during SSR. CRs-Fixed: 1044635 Change-Id: I8c5b8ffc62d34a44bfb47ec4f11477d4320d30a8 Signed-off-by: Dhanalakshmi Siddani <dsiddani@codeaurora.org>
This commit is contained in:
parent
d2afad6a90
commit
a605f4fab2
3 changed files with 13 additions and 4 deletions
|
@ -692,7 +692,7 @@ static int audio_aio_events_pending(struct q6audio_aio *audio)
|
||||||
spin_lock_irqsave(&audio->event_queue_lock, flags);
|
spin_lock_irqsave(&audio->event_queue_lock, flags);
|
||||||
empty = !list_empty(&audio->event_queue);
|
empty = !list_empty(&audio->event_queue);
|
||||||
spin_unlock_irqrestore(&audio->event_queue_lock, flags);
|
spin_unlock_irqrestore(&audio->event_queue_lock, flags);
|
||||||
return empty || audio->event_abort;
|
return empty || audio->event_abort || audio->reset_event;
|
||||||
}
|
}
|
||||||
|
|
||||||
static long audio_aio_process_event_req_common(struct q6audio_aio *audio,
|
static long audio_aio_process_event_req_common(struct q6audio_aio *audio,
|
||||||
|
@ -720,6 +720,12 @@ static long audio_aio_process_event_req_common(struct q6audio_aio *audio,
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
|
if (audio->reset_event) {
|
||||||
|
audio->reset_event = false;
|
||||||
|
pr_err("In SSR, post ENETRESET err\n");
|
||||||
|
return -ENETRESET;
|
||||||
|
}
|
||||||
|
|
||||||
if (audio->event_abort) {
|
if (audio->event_abort) {
|
||||||
audio->event_abort = 0;
|
audio->event_abort = 0;
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
@ -1327,6 +1333,7 @@ int audio_aio_open(struct q6audio_aio *audio, struct file *file)
|
||||||
|
|
||||||
audio->drv_ops.out_flush(audio);
|
audio->drv_ops.out_flush(audio);
|
||||||
audio->opened = 1;
|
audio->opened = 1;
|
||||||
|
audio->reset_event = false;
|
||||||
file->private_data = audio;
|
file->private_data = audio;
|
||||||
audio->codec_ioctl = audio_aio_ioctl;
|
audio->codec_ioctl = audio_aio_ioctl;
|
||||||
audio->codec_compat_ioctl = audio_aio_compat_ioctl;
|
audio->codec_compat_ioctl = audio_aio_compat_ioctl;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* Copyright (C) 2008 Google, Inc.
|
/* Copyright (C) 2008 Google, Inc.
|
||||||
* Copyright (C) 2008 HTC Corporation
|
* Copyright (C) 2008 HTC Corporation
|
||||||
* Copyright (c) 2009-2015, The Linux Foundation. All rights reserved.
|
* Copyright (c) 2009-2016, The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* This software is licensed under the terms of the GNU General Public
|
* This software is licensed under the terms of the GNU General Public
|
||||||
* License version 2, as published by the Free Software Foundation, and
|
* License version 2, as published by the Free Software Foundation, and
|
||||||
|
@ -199,6 +199,7 @@ struct q6audio_aio {
|
||||||
int feedback;
|
int feedback;
|
||||||
int rflush; /* Read flush */
|
int rflush; /* Read flush */
|
||||||
int wflush; /* Write flush */
|
int wflush; /* Write flush */
|
||||||
|
bool reset_event;
|
||||||
long (*codec_ioctl)(struct file *, unsigned int, unsigned long);
|
long (*codec_ioctl)(struct file *, unsigned int, unsigned long);
|
||||||
long (*codec_compat_ioctl)(struct file *, unsigned int, unsigned long);
|
long (*codec_compat_ioctl)(struct file *, unsigned int, unsigned long);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
|
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License version 2 and
|
* it under the terms of the GNU General Public License version 2 and
|
||||||
|
@ -107,8 +107,9 @@ void audio_aio_cb(uint32_t opcode, uint32_t token,
|
||||||
audio_aio_post_event(audio, AUDIO_EVENT_STREAM_INFO, e_payload);
|
audio_aio_post_event(audio, AUDIO_EVENT_STREAM_INFO, e_payload);
|
||||||
break;
|
break;
|
||||||
case RESET_EVENTS:
|
case RESET_EVENTS:
|
||||||
pr_debug("%s: Received opcode:0x%x\n", __func__, opcode);
|
pr_err("%s: Received opcode:0x%x\n", __func__, opcode);
|
||||||
audio->stopped = 1;
|
audio->stopped = 1;
|
||||||
|
audio->reset_event = true;
|
||||||
wake_up(&audio->event_wait);
|
wake_up(&audio->event_wait);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Add table
Reference in a new issue