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

Commit 3e010845 authored by Darron Broad's avatar Darron Broad Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (9069): cx88: Bugfix: all client disconnects put the frontend to sleep.



From the author:

"This fixes the problem where previously all client disconnects
put the analogue frontend into standby.

In the following example, the first command is succesfully
watching TV but the second command which returns EBUSY
detunes the receiver by entering it into the standby state.

tvtime -d /dev/video0 &
cat /dev/video0
"

Signed-off-by: default avatarSteven Toth <stoth@linuxtv.org>
Signed-off-by: default avatarDarron Broad <darron@kewl.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent f907c020
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -839,6 +839,8 @@ static int video_open(struct inode *inode, struct file *file)
	}
	unlock_kernel();

	atomic_inc(&core->users);

	return 0;
}

@@ -926,6 +928,7 @@ static int video_release(struct inode *inode, struct file *file)
	file->private_data = NULL;
	kfree(fh);

	if(atomic_dec_and_test(&dev->core->users))
		cx88_call_i2c_clients (dev->core, TUNER_SET_STANDBY, NULL);

	return 0;
+1 −0
Original line number Diff line number Diff line
@@ -349,6 +349,7 @@ struct cx88_core {
	struct mutex               lock;
	/* various v4l controls */
	u32                        freq;
	atomic_t		   users;

	/* cx88-video needs to access cx8802 for hybrid tuner pll access. */
	struct cx8802_dev          *dvbdev;