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

Commit 7bb7cc3e authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "misc: qcom: qdsp6v2: SSR recovery support for NT decoder"

parents 129e6b5b 233208fe
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -692,7 +692,7 @@ static int audio_aio_events_pending(struct q6audio_aio *audio)
	spin_lock_irqsave(&audio->event_queue_lock, flags);
	empty = !list_empty(&audio->event_queue);
	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,
@@ -720,6 +720,12 @@ static long audio_aio_process_event_req_common(struct q6audio_aio *audio,
	if (rc < 0)
		return rc;

	if (audio->reset_event) {
		audio->reset_event = false;
		pr_err("In SSR, post ENETRESET err\n");
		return -ENETRESET;
	}

	if (audio->event_abort) {
		audio->event_abort = 0;
		return -ENODEV;
@@ -1326,6 +1332,7 @@ int audio_aio_open(struct q6audio_aio *audio, struct file *file)

	audio->drv_ops.out_flush(audio);
	audio->opened = 1;
	audio->reset_event = false;
	file->private_data = audio;
	audio->codec_ioctl = audio_aio_ioctl;
	audio->codec_compat_ioctl = audio_aio_compat_ioctl;
+2 −1
Original line number Diff line number Diff line
/* Copyright (C) 2008 Google, Inc.
 * 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
 * License version 2, as published by the Free Software Foundation, and
@@ -199,6 +199,7 @@ struct q6audio_aio {
	int feedback;
	int rflush;             /* Read  flush */
	int wflush;             /* Write flush */
	bool reset_event;
	long (*codec_ioctl)(struct file *, unsigned int, unsigned long);
	long (*codec_compat_ioctl)(struct file *, unsigned int, unsigned long);
};
+3 −2
Original line number Diff line number Diff line
/* 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
 * 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);
		break;
	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->reset_event = true;
		wake_up(&audio->event_wait);
		break;
	default: