media: add tuner standby op, use where needed
The v4l2_subdev core s_power op was used for two different things: power on/off sensors or video decoders/encoders and to put a tuner in standby (and only the tuner!). There is no 'tuner wakeup' op, that's done automatically when the tuner is accessed. The danger with calling (s_power, 0) to put a tuner into standby is that it is usually broadcast for all subdevs. So a video receiver subdev that supports s_power will also be powered off, and since there is no corresponding (s_power, 1) they will never be powered on again. In addition, this is specifically meant for tuners only since they draw the most current. This patch adds a new tuner op called 'standby' and replaces all calls to (core, s_power, 0) by (tuner, standby). This prevents confusion between the two uses of s_power. Note that there is no overlap: bridge drivers either just want to put the tuner into standby, or they deal with powering on/off sensors. Never both. This also makes it easier to replace s_power for the remaining bridge drivers with some PM code later. Whether we want something cleaner for tuners in the future is a separate topic. There is a lot of legacy code surrounding tuners, and I am very hesitant about making changes there. Signed-off-by:Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@s-opensource.com>
Showing
- drivers/media/pci/cx23885/cx23885-core.c 1 addition, 1 deletiondrivers/media/pci/cx23885/cx23885-core.c
- drivers/media/pci/cx23885/cx23885-dvb.c 2 additions, 2 deletionsdrivers/media/pci/cx23885/cx23885-dvb.c
- drivers/media/pci/cx88/cx88-cards.c 1 addition, 1 deletiondrivers/media/pci/cx88/cx88-cards.c
- drivers/media/pci/cx88/cx88-dvb.c 2 additions, 2 deletionsdrivers/media/pci/cx88/cx88-dvb.c
- drivers/media/pci/saa7134/saa7134-video.c 1 addition, 1 deletiondrivers/media/pci/saa7134/saa7134-video.c
- drivers/media/tuners/e4000.c 3 additions, 13 deletionsdrivers/media/tuners/e4000.c
- drivers/media/tuners/fc2580.c 3 additions, 13 deletionsdrivers/media/tuners/fc2580.c
- drivers/media/tuners/msi001.c 3 additions, 16 deletionsdrivers/media/tuners/msi001.c
- drivers/media/usb/au0828/au0828-video.c 2 additions, 2 deletionsdrivers/media/usb/au0828/au0828-video.c
- drivers/media/usb/cx231xx/cx231xx-video.c 1 addition, 1 deletiondrivers/media/usb/cx231xx/cx231xx-video.c
- drivers/media/usb/em28xx/em28xx-video.c 2 additions, 2 deletionsdrivers/media/usb/em28xx/em28xx-video.c
- drivers/media/v4l2-core/tuner-core.c 3 additions, 12 deletionsdrivers/media/v4l2-core/tuner-core.c
- include/media/v4l2-subdev.h 4 additions, 0 deletionsinclude/media/v4l2-subdev.h
Loading
Please register or sign in to comment