]> git.baikalelectronics.ru Git - kernel.git/commit
[media] bttv: do not switch to the radio tuner unless it is accessed
authorHans Verkuil <hans.verkuil@cisco.com>
Sun, 10 Feb 2013 12:24:14 +0000 (09:24 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 5 Mar 2013 17:24:58 +0000 (14:24 -0300)
commitaf5d2cd939977f344c8f985f9371e51d7d42c753
treeb7391eff8a9ec1fbefeb5b8262971264cd06f71a
parent21e7b2b446798d2de3fb422688d304dfd052c76b
[media] bttv: do not switch to the radio tuner unless it is accessed

Just opening the radio tuner should not cause a switch to the radio tuner.
Only after calling g/s_tuner or g/s_frequency should this happen.
This prevents audio being unmuted as soon as the driver is loaded because
some process opens /dev/radioX just to see what sort of node it is, which
switches on the radio tuner and unmutes audio.
This code can be improved further by actually keeping track of who owns the
tuner and returning -EBUSY if switching tuner modes will cause problems.
But for now just fix the annoying case where on boot the radio turns on
automatically.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/pci/bt8xx/bttv-driver.c
drivers/media/pci/bt8xx/bttvp.h