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

Commit 904dd55b authored by Karthik Reddy Katta's avatar Karthik Reddy Katta Committed by Gerrit - the friendly Code Review server
Browse files

ASOC : Remove .flush function of voice SVC driver



IMS_RTP_D uses Popen and Pclose for obtaining IP address.
Popen creates a child process by fork(). This creates
a copy of audio FD. This new audio FD is closed on
child process termination. Hence flush is invoked.
Move .flush() implementation to .release() to avoid closing
CVS and MVM handles inside audio driver when child process
terminates.

CRs-fixed: 686488
Change-Id: I7e2cbd5aab986be7f9698a2ed564fafa404009fc
Signed-off-by: default avatarKarthik Reddy Katta <a_katta@codeaurora.org>
parent d2d9cb96
Loading
Loading
Loading
Loading
+3 −11
Original line number Diff line number Diff line
@@ -504,7 +504,7 @@ static int voice_svc_open(struct inode *inode, struct file *file)
	return 0;
}

static int voice_svc_flush(struct file *file, fl_owner_t id)
static int voice_svc_release(struct inode *inode, struct file *file)
{
	int ret = 0;
	struct apr_response_list *resp = NULL;
@@ -553,18 +553,11 @@ static int voice_svc_flush(struct file *file, fl_owner_t id)

	spin_unlock_irqrestore(&prtd->response_lock, spin_flags);

done:
	return ret;
}

static int voice_svc_release(struct inode *inode, struct file *file)
{
	pr_debug("%s\n", __func__);

	kfree(file->private_data);
	file->private_data = NULL;

	return 0;
done:
	return ret;
}

static const struct file_operations voice_svc_fops = {
@@ -572,7 +565,6 @@ static const struct file_operations voice_svc_fops = {
	.open =                 voice_svc_open,
	.read =                 voice_svc_read,
	.write =                voice_svc_write,
	.flush =                voice_svc_flush,
	.release =              voice_svc_release,
};