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

Commit 98c85cec 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: post ENETRESET error during SSR"

parents 2b3f5d6a 444d9a6f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -658,6 +658,7 @@ static int aac_in_open(struct inode *inode, struct file *file)
		goto fail;
	}
	audio->opened = 1;
	audio->reset_event = false;
	atomic_set(&audio->in_count, PCM_BUF_COUNT);
	atomic_set(&audio->out_count, 0x00);
	audio->enc_compat_ioctl = aac_in_compat_ioctl;
+7 −1
Original line number Diff line number Diff line
/* Copyright (c) 2010-2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2010-2015, 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
@@ -651,6 +651,9 @@ ssize_t audio_in_read(struct file *file,
	memset(&meta, 0, sizeof(meta));
	pr_debug("%s:session id %d: read - %zd\n", __func__, audio->ac->session,
			count);
	if (audio->reset_event)
		return -ENETRESET;

	if (!audio->enabled)
		return -EFAULT;
	mutex_lock(&audio->read_lock);
@@ -788,6 +791,9 @@ ssize_t audio_in_write(struct file *file,

	pr_debug("%s:session id %d: to write[%zd]\n", __func__,
			audio->ac->session, count);
	if (audio->reset_event)
		return -ENETRESET;

	if (!audio->enabled)
		return -EFAULT;
	mutex_lock(&audio->write_lock);
+2 −1
Original line number Diff line number Diff line
/* Copyright (c) 2010-2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2010-2015, 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
@@ -89,6 +89,7 @@ struct q6audio_in {
	int				buf_alloc;
	uint16_t			min_frame_size;
	uint16_t			max_frames_per_buf;
	bool				reset_event;
	long (*enc_ioctl)(struct file *, unsigned int, unsigned long);
	long (*enc_compat_ioctl)(struct file *, unsigned int, unsigned long);
};
+2 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2013, 2015, 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
@@ -56,6 +56,7 @@ void q6asm_in_cb(uint32_t opcode, uint32_t token,
		audio->enabled = 0;
		audio->stopped = 1;
		audio->event_abort = 1;
		audio->reset_event = true;
		wake_up(&audio->read_wait);
		wake_up(&audio->write_wait);
		break;