Reorganize media Kconfig
Subsystems (9)
PATCH v3 2/22 media: Kconfig: add an option to filter in/out platform drivers
In reply to Mauro Carvalho ChehabMost systems don't need support for those, while others only need those, instead of the others.
So, add an option to filter in/out platform drivers.
--- drivers/media/Kconfig | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-)
drivers/media/Kconfig +16 -5
@@ -87,6 +87,18 @@ config MEDIA_CEC_SUPPORT Say Y when you have an HDMI receiver, transmitter or a USB CEC adapter that supports HDMI CEC. +config MEDIA_PLATFORM_SUPPORT + bool "Platform-specific devices" + help + Enable support for complex cameras, codecs, and other hardware + that are integrated at the CPU, GPU or on Image Signalling Processor + and don't use PCI, USB or Firewire buses. + + This is found on Embedded hardware (SoC), on V4L2 codecs and + on some GPU and newer CPU chipsets. + + Say Y when you want to be able so see such devices. + source "drivers/media/cec/Kconfig" source "drivers/media/mc/Kconfig"
@@ -161,15 +173,14 @@ source "drivers/media/dvb-core/Kconfig" comment "Media drivers" -# -# V4L platform/mem2mem drivers -# - source "drivers/media/usb/Kconfig" source "drivers/media/pci/Kconfig" +source "drivers/media/radio/Kconfig" + +if MEDIA_PLATFORM_SUPPORT source "drivers/media/platform/Kconfig" source "drivers/media/mmc/Kconfig" -source "drivers/media/radio/Kconfig" +endif comment "Supported FireWire (IEEE 1394) Adapters" depends on DVB_CORE && FIREWIRE
Signature · 1 line
2.25.1
PATCH v3 3/22 media: Kconfig: not all V4L2 platform drivers are for camera
In reply to Mauro Carvalho ChehabWhen the platform drivers got added, they were all part of complex camera support. This is not the case anymore, as we now have codecs and other stuff there too.
So, fix the dependencies, in order to not require users to manually select something that it doesn't make sense.
--- drivers/media/Kconfig | 3 +-- drivers/media/platform/Kconfig | 3 --- 2 files changed, 1 insertion(+), 5 deletions(-)
drivers/media/Kconfig +1 -2
@@ -111,8 +111,7 @@ source "drivers/media/mc/Kconfig" config VIDEO_DEV tristate depends on MEDIA_SUPPORT - depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT - default y + default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT config VIDEO_V4L2_SUBDEV_API bool "V4L2 sub-device userspace API"
drivers/media/platform/Kconfig +0 -3
@@ -5,7 +5,6 @@ menuconfig V4L_PLATFORM_DRIVERS bool "V4L platform devices" - depends on MEDIA_CAMERA_SUPPORT help Say Y here to enable support for platform-specific V4L drivers.
@@ -43,7 +42,6 @@ config VIDEO_ASPEED config VIDEO_SH_VOU tristate "SuperH VOU video output driver" - depends on MEDIA_CAMERA_SUPPORT depends on VIDEO_DEV && I2C depends on ARCH_SHMOBILE || COMPILE_TEST select VIDEOBUF2_DMA_CONTIG
@@ -165,7 +163,6 @@ endif # V4L_PLATFORM_DRIVERS menuconfig V4L_MEM2MEM_DRIVERS bool "Memory-to-memory multimedia devices" depends on VIDEO_V4L2 - depends on MEDIA_CAMERA_SUPPORT help Say Y here to enable selecting drivers for V4L devices that use system memory for both source and destination buffers, as opposed
Signature · 1 line
2.25.1
PATCH v3 7/22 media: Kconfig: use a sub-menu to select supported devices
In reply to Mauro Carvalho ChehabThe media subsystem has hundreds of driver-specific options. The *_SUPPORT config options work as a sort of filter, allowing to reduce its complexity for users that won't want to dig into thousands of options they don't need.
Yet, it the filtering options are becoming large. So, let's place it on a sub-menu.
--- drivers/media/Kconfig | 21 ++++++++++++--------- drivers/media/mmc/Kconfig | 2 +- 2 files changed, 13 insertions(+), 10 deletions(-)
drivers/media/Kconfig +12 -9
@@ -25,22 +25,21 @@ menuconfig MEDIA_SUPPORT Additional info and docs are available on the web at <https://linuxtv.org> -if MEDIA_SUPPORT - -comment "Multimedia core support" +menu "Types of devices to be supported" + depends on MEDIA_SUPPORT # # Multimedia support - automatically enable V4L2 and DVB core # config MEDIA_CAMERA_SUPPORT - bool "Cameras/video grabbers support" + bool "Cameras and video grabbers" help Enable support for webcams and video grabbers. Say Y when you have a webcam or a video capture grabber board. config MEDIA_ANALOG_TV_SUPPORT - bool "Analog TV support" + bool "Analog TV" help Enable analog TV support.
@@ -52,7 +51,7 @@ config MEDIA_ANALOG_TV_SUPPORT will disable support for them. config MEDIA_DIGITAL_TV_SUPPORT - bool "Digital TV support" + bool "Digital TV" help Enable digital TV support.
@@ -60,7 +59,7 @@ config MEDIA_DIGITAL_TV_SUPPORT hybrid digital TV and analog TV. config MEDIA_RADIO_SUPPORT - bool "AM/FM radio receivers/transmitters support" + bool "AM/FM radio receivers/transmitters" help Enable AM/FM radio support.
@@ -74,7 +73,7 @@ config MEDIA_RADIO_SUPPORT disable support for them. config MEDIA_SDR_SUPPORT - bool "Software defined radio support" + bool "Software defined radio" help Enable software defined radio support.
@@ -100,6 +99,9 @@ config MEDIA_PLATFORM_SUPPORT on some GPU and newer CPU chipsets. Say Y when you want to be able so see such devices. +endmenu # Types of devices to be supported + +if MEDIA_SUPPORT source "drivers/media/cec/Kconfig"
@@ -186,7 +188,8 @@ source "drivers/media/platform/Kconfig" source "drivers/media/mmc/Kconfig" endif -comment "Supported FireWire (IEEE 1394) Adapters" + +comment "FireWire (IEEE 1394) Adapters" depends on DVB_CORE && FIREWIRE source "drivers/media/firewire/Kconfig"
drivers/media/mmc/Kconfig +1 -1
@@ -1,3 +1,3 @@ # SPDX-License-Identifier: GPL-2.0-only -comment "Supported MMC/SDIO adapters" +comment "MMC/SDIO adapters" source "drivers/media/mmc/siano/Kconfig"
Signature · 1 line
2.25.1
v3 cover Reorganize media Kconfig
This patch series do lots of reorg at the media Kconfig options. It also move test drivers from platform dir to a new one.
After this change, the main config is organized on menus, allowing to select:
- type of devices selection - the filtering options
- Media core options - with API and other core stuff
- Media core extra options
- Media drivers
- Media ancillary drivers
The "type of devices" menu has the filtering options for:
- Cameras and video grabbers
- Analog TV
- Digital TV
- AM/FM radio receivers/transmitters
- SDR
- CEC
- Embeded devices (SoC)
- Test drivers
This way, one interested only on embedded devices can unselect everything but "Embedded devices (SoC)" option.
Distros for PC/Laptops can enable everything but
"Embedded devices (SoC)" and "Test drivers".
Users can select just what they want, without bothering with hundreds of options that he won't have any clue about their meanings.
-
v3:
- as suggested by Ezequiel, fix dependencies for M2M and use
MEDIA_PLATFORM_SUPPORT to cover all platform drivers;
- Fix a longstanding issue related to hybrid devices filtering:
for those, both DVB and V4L cores are needed.
(well, in fact, it could be fine-grained, but that may require
some changes inside some drivers, so let's postpone such changes for some future patch series)
Mauro Carvalho Chehab (22):
media: dvb-usb: auto-select CYPRESS_FIRMWARE
media: Kconfig: add an option to filter in/out platform drivers
media: Kconfig: not all V4L2 platform drivers are for camera
media: pci: move VIDEO_PCI_SKELETON to a different Kconfig
media: reorganize the drivers menu options
media: Kconfig: update the MEDIA_SUPPORT help message
media: Kconfig: use a sub-menu to select supported devices
media: split test drivers from platform directory
media: Kconfig: make filtering devices optional
media: Kconfig: move CEC-specific options to cec/Kconfig
media: Kconfig: move comment to siano include
media: Kconfig: move DVB-specific options to dvb-core/Kconfig
media: Kconfig: move V4L2 subdev API to v4l2-core/Kconfig
media: Kconfig: move drivers-specific TTPCI_EEPROM Kconfig var
media: Kconfig: move media controller core select to main Kconfig
media: Kconfig: better organize menu items
media: Kconfig: mode firewire comment to firewire/Kconfig
media: Kconfig: place all options under a sub-menu
media: Kconfig: move the position of sub-driver autoselection
media: Kconfig: on !EMBEDDED && !EXPERT, enable driver filtering
media: Kconfig: simplify some dependencies
media: Kconfig: better support hybrid TV devices
drivers/media/Kconfig | 239 +++++++++---------
drivers/media/cec/Kconfig | 10 +
drivers/media/common/Kconfig | 2 +-
drivers/media/dvb-core/Kconfig | 26 ++
drivers/media/firewire/Kconfig | 5 +-
drivers/media/mc/Kconfig | 9 -
drivers/media/mmc/Kconfig | 1 -
drivers/media/mmc/siano/Kconfig | 2 +
drivers/media/pci/Kconfig | 21 +-
drivers/media/pci/bt8xx/Kconfig | 5 +-
drivers/media/pci/cx18/Kconfig | 2 +-
drivers/media/pci/cx23885/Kconfig | 4 +-
drivers/media/pci/cx88/Kconfig | 4 +-
drivers/media/pci/saa7134/Kconfig | 4 +-
drivers/media/pci/saa7164/Kconfig | 2 +-
drivers/media/platform/Kconfig | 26 --
drivers/media/platform/Makefile | 5 -
drivers/media/test_drivers/Kconfig | 28 ++
drivers/media/test_drivers/Makefile | 9 +
.../vicodec/Kconfig | 0
.../vicodec/Makefile | 0
.../vicodec/codec-fwht.c | 0
.../vicodec/codec-fwht.h | 0
.../vicodec/codec-v4l2-fwht.c | 0
.../vicodec/codec-v4l2-fwht.h | 0
.../vicodec/vicodec-core.c | 0
.../media/{platform => test_drivers}/vim2m.c | 0
.../{platform => test_drivers}/vimc/Kconfig | 0
.../{platform => test_drivers}/vimc/Makefile | 0
.../vimc/vimc-capture.c | 0
.../vimc/vimc-common.c | 0
.../vimc/vimc-common.h | 0
.../vimc/vimc-core.c | 0
.../vimc/vimc-debayer.c | 0
.../vimc/vimc-scaler.c | 0
.../vimc/vimc-sensor.c | 0
.../vimc/vimc-streamer.c | 0
.../vimc/vimc-streamer.h | 0
.../{platform => test_drivers}/vivid/Kconfig | 0
.../{platform => test_drivers}/vivid/Makefile | 0
.../vivid/vivid-cec.c | 0
.../vivid/vivid-cec.h | 0
.../vivid/vivid-core.c | 0
.../vivid/vivid-core.h | 0
.../vivid/vivid-ctrls.c | 0
.../vivid/vivid-ctrls.h | 0
.../vivid/vivid-kthread-cap.c | 0
.../vivid/vivid-kthread-cap.h | 0
.../vivid/vivid-kthread-out.c | 0
.../vivid/vivid-kthread-out.h | 0
.../vivid/vivid-kthread-touch.c | 0
.../vivid/vivid-kthread-touch.h | 0
.../vivid/vivid-meta-cap.c | 0
.../vivid/vivid-meta-cap.h | 0
.../vivid/vivid-meta-out.c | 0
.../vivid/vivid-meta-out.h | 0
.../vivid/vivid-osd.c | 0
.../vivid/vivid-osd.h | 0
.../vivid/vivid-radio-common.c | 0
.../vivid/vivid-radio-common.h | 0
.../vivid/vivid-radio-rx.c | 0
.../vivid/vivid-radio-rx.h | 0
.../vivid/vivid-radio-tx.c | 0
.../vivid/vivid-radio-tx.h | 0
.../vivid/vivid-rds-gen.c | 0
.../vivid/vivid-rds-gen.h | 0
.../vivid/vivid-sdr-cap.c | 0
.../vivid/vivid-sdr-cap.h | 0
.../vivid/vivid-touch-cap.c | 0
.../vivid/vivid-touch-cap.h | 0
.../vivid/vivid-vbi-cap.c | 0
.../vivid/vivid-vbi-cap.h | 0
.../vivid/vivid-vbi-gen.c | 0
.../vivid/vivid-vbi-gen.h | 0
.../vivid/vivid-vbi-out.c | 0
.../vivid/vivid-vbi-out.h | 0
.../vivid/vivid-vid-cap.c | 0
.../vivid/vivid-vid-cap.h | 0
.../vivid/vivid-vid-common.c | 0
.../vivid/vivid-vid-common.h | 0
.../vivid/vivid-vid-out.c | 0
.../vivid/vivid-vid-out.h | 0
drivers/media/usb/Kconfig | 14 +-
drivers/media/usb/au0828/Kconfig | 6 +-
drivers/media/usb/cx231xx/Kconfig | 4 +-
drivers/media/usb/dvb-usb/Kconfig | 1 +
drivers/media/usb/pvrusb2/Kconfig | 4 +-
drivers/media/usb/tm6000/Kconfig | 4 +-
drivers/media/v4l2-core/Kconfig | 19 +-
89 files changed, 261 insertions(+), 195 deletions(-)
create mode 100644 drivers/media/test_drivers/Kconfig
create mode 100644 drivers/media/test_drivers/Makefile
rename drivers/media/{platform => test_drivers}/vicodec/Kconfig (100%)
rename drivers/media/{platform => test_drivers}/vicodec/Makefile (100%)
rename drivers/media/{platform => test_drivers}/vicodec/codec-fwht.c (100%)
rename drivers/media/{platform => test_drivers}/vicodec/codec-fwht.h (100%)
rename drivers/media/{platform => test_drivers}/vicodec/codec-v4l2-fwht.c (100%)
rename drivers/media/{platform => test_drivers}/vicodec/codec-v4l2-fwht.h (100%)
rename drivers/media/{platform => test_drivers}/vicodec/vicodec-core.c (100%)
rename drivers/media/{platform => test_drivers}/vim2m.c (100%)
rename drivers/media/{platform => test_drivers}/vimc/Kconfig (100%)
rename drivers/media/{platform => test_drivers}/vimc/Makefile (100%)
rename drivers/media/{platform => test_drivers}/vimc/vimc-capture.c (100%)
rename drivers/media/{platform => test_drivers}/vimc/vimc-common.c (100%)
rename drivers/media/{platform => test_drivers}/vimc/vimc-common.h (100%)
rename drivers/media/{platform => test_drivers}/vimc/vimc-core.c (100%)
rename drivers/media/{platform => test_drivers}/vimc/vimc-debayer.c (100%)
rename drivers/media/{platform => test_drivers}/vimc/vimc-scaler.c (100%)
rename drivers/media/{platform => test_drivers}/vimc/vimc-sensor.c (100%)
rename drivers/media/{platform => test_drivers}/vimc/vimc-streamer.c (100%)
rename drivers/media/{platform => test_drivers}/vimc/vimc-streamer.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/Kconfig (100%)
rename drivers/media/{platform => test_drivers}/vivid/Makefile (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-cec.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-cec.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-core.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-core.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-ctrls.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-ctrls.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-kthread-cap.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-kthread-cap.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-kthread-out.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-kthread-out.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-kthread-touch.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-kthread-touch.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-meta-cap.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-meta-cap.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-meta-out.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-meta-out.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-osd.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-osd.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-radio-common.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-radio-common.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-radio-rx.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-radio-rx.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-radio-tx.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-radio-tx.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-rds-gen.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-rds-gen.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-sdr-cap.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-sdr-cap.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-touch-cap.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-touch-cap.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-vbi-cap.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-vbi-cap.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-vbi-gen.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-vbi-gen.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-vbi-out.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-vbi-out.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-vid-cap.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-vid-cap.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-vid-common.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-vid-common.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-vid-out.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-vid-out.h (100%)Signature · 1 line
2.25.1
PATCH v3 12/22 media: Kconfig: move DVB-specific options to dvb-core/Kconfig
In order to cleanup the main media Kconfig, move the DVB-core specific options to dvb-core/Kconfig.
--- drivers/media/Kconfig | 21 --------------------- drivers/media/dvb-core/Kconfig | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 21 deletions(-)
drivers/media/Kconfig +0 -21
@@ -168,31 +168,10 @@ config DVB_CORE default y select CRC32 -config DVB_MMAP - bool "Enable DVB memory-mapped API (EXPERIMENTAL)" - depends on DVB_CORE - depends on VIDEO_V4L2=y || VIDEO_V4L2=DVB_CORE - select VIDEOBUF2_VMALLOC help - This option enables DVB experimental memory-mapped API, which - reduces the number of context switches to read DVB buffers, as - the buffers can use mmap() syscalls. - Support for it is experimental. Use with care. If unsure, - say N. -config DVB_NET - bool "DVB Network Support" - default (NET && INET) - depends on NET && INET && DVB_CORE - help - This option enables DVB Network Support which is a part of the DVB - standard. It is used, for example, by automatic firmware updates used - on Set-Top-Boxes. It can also be used to access the Internet via the - DVB card, if the network provider supports it. - You may want to disable the network support on embedded devices. If - unsure say Y. # This Kconfig option is used by both PCI and USB drivers config TTPCI_EEPROM
drivers/media/dvb-core/Kconfig +26 -0
@@ -3,6 +3,32 @@ # DVB device configuration # +config DVB_MMAP + bool "Enable DVB memory-mapped API (EXPERIMENTAL)" + depends on DVB_CORE + depends on VIDEO_V4L2=y || VIDEO_V4L2=DVB_CORE + select VIDEOBUF2_VMALLOC + help + This option enables DVB experimental memory-mapped API, which + reduces the number of context switches to read DVB buffers, as + the buffers can use mmap() syscalls. + + Support for it is experimental. Use with care. If unsure, + say N. + +config DVB_NET + bool "DVB Network Support" + default (NET && INET) + depends on NET && INET && DVB_CORE + help + This option enables DVB Network Support which is a part of the DVB + standard. It is used, for example, by automatic firmware updates used + on Set-Top-Boxes. It can also be used to access the Internet via the + DVB card, if the network provider supports it. + + You may want to disable the network support on embedded devices. If + unsure say Y. + config DVB_MAX_ADAPTERS int "maximum number of DVB/ATSC adapters" depends on DVB_CORE
Signature · 1 line
2.25.1
PATCH v3 17/22 media: Kconfig: mode firewire comment to firewire/Kconfig
In reply to Mauro Carvalho ChehabThis comment should only be visible if the DVB_FIREDTV config will show.
--- drivers/media/Kconfig | 2 -- drivers/media/firewire/Kconfig | 5 ++++- 2 files changed, 4 insertions(+), 3 deletions(-)
drivers/media/Kconfig +0 -2
@@ -185,8 +185,6 @@ source "drivers/media/mmc/Kconfig" endif -comment "FireWire (IEEE 1394) Adapters" - depends on DVB_CORE && FIREWIRE source "drivers/media/firewire/Kconfig" comment "Media ancillary drivers (tuners, sensors, i2c, spi, frontends)"
drivers/media/firewire/Kconfig +4 -1
@@ -1,7 +1,9 @@ # SPDX-License-Identifier: GPL-2.0-only +if DVB_CORE && FIREWIRE +comment "FireWire (IEEE 1394) Adapters" + config DVB_FIREDTV tristate "FireDTV and FloppyDTV" - depends on DVB_CORE && FIREWIRE help Support for DVB receivers from Digital Everywhere which are connected via IEEE 1394 (FireWire).
@@ -18,3 +20,4 @@ config DVB_FIREDTV_INPUT def_bool INPUT = y || (INPUT = m && DVB_FIREDTV = m) endif # DVB_FIREDTV +endif # DVB_CORE && FIREWIRE
Signature · 1 line
2.25.1
PATCH v3 22/22 media: Kconfig: better support hybrid TV devices
In reply to Mauro Carvalho ChehabRight now, if one has an hybrid TV card, it has to select both analog and digital TV support, as otherwise the needed core support won't be selected.
Change the logic to auto-select the core support for those drivers, as this is a way more intuitive.
It should be noticed that, as now both DVB_CORE and VIDEO_DEV defaults depends on selecting a hybrid cards, we had to remove the explicit dependencies there, in order to avoid circular dependencies. In order to get it right, we used a little trick, to ensure that the core will be built as "y" if any driver was built with "y".
Note: while here, moved two pure V4L2 PCI drivers out of the "hybrid" part of config and consider pvrusb2 as an hybrid device.
--- drivers/media/Kconfig | 18 ++++-------------- drivers/media/pci/Kconfig | 11 +++++++++-- drivers/media/pci/bt8xx/Kconfig | 5 ++--- drivers/media/pci/cx18/Kconfig | 2 +- drivers/media/pci/cx23885/Kconfig | 4 ++-- drivers/media/pci/cx88/Kconfig | 4 ++-- drivers/media/pci/saa7134/Kconfig | 4 ++-- drivers/media/pci/saa7164/Kconfig | 2 +- drivers/media/usb/Kconfig | 8 +++++++- drivers/media/usb/au0828/Kconfig | 6 ++---- drivers/media/usb/cx231xx/Kconfig | 4 ++-- drivers/media/usb/pvrusb2/Kconfig | 4 ++-- drivers/media/usb/tm6000/Kconfig | 4 ++-- 13 files changed, 38 insertions(+), 38 deletions(-)
drivers/media/Kconfig +4 -14
@@ -76,12 +76,7 @@ config MEDIA_ANALOG_TV_SUPPORT help Enable analog TV support. - Say Y when you have a TV board with analog support or with a - hybrid analog/digital TV chipset. - - Note: There are several DVB cards that are based on chips that - support both analog and digital TV. Disabling this option - will disable support for them. + Say Y when you have a board with analog TV support. config MEDIA_DIGITAL_TV_SUPPORT bool "Digital TV"
@@ -89,8 +84,7 @@ config MEDIA_DIGITAL_TV_SUPPORT help Enable digital TV support. - Say Y when you have a board with digital support or a board with - hybrid digital TV and analog TV. + Say Y when you have a board with digital TV support. config MEDIA_RADIO_SUPPORT bool "AM/FM radio receivers/transmitters"
@@ -103,10 +97,6 @@ config MEDIA_RADIO_SUPPORT Say Y when you have a board with radio support. - Note: There are several TV cards that are based on chips that - support radio reception. Disabling this option will - disable support for them. - config MEDIA_SDR_SUPPORT bool "Software defined radio" default y if !MEDIA_SUPPORT_FILTER
@@ -156,7 +146,7 @@ menu "Media core support" config VIDEO_DEV tristate "Video4Linux core" - default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT + default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT || MEDIA_HYBRID_USB || MEDIA_HYBRID_PCI help Enables the V4L2 API, used by cameras, analog TV, video grabbers, radio devices and by some input devices.
@@ -172,7 +162,7 @@ config MEDIA_CONTROLLER config DVB_CORE tristate "Digital TV core" - default MEDIA_DIGITAL_TV_SUPPORT + default MEDIA_DIGITAL_TV_SUPPORT || MEDIA_HYBRID_USB || MEDIA_HYBRID_PCI depends on (I2C || I2C=n) select CRC32 help
drivers/media/pci/Kconfig +9 -2
@@ -1,4 +1,11 @@ # SPDX-License-Identifier: GPL-2.0-only + +# Should match the hybrid card list below +config MEDIA_HYBRID_PCI + bool + depends on VIDEO_CX18 || VIDEO_CX23885 || VIDEO_CX88 || VIDEO_BT848 || VIDEO_SAA7134 || VIDEO_SAA7164 + default y + if PCI && MEDIA_SUPPORT menuconfig MEDIA_PCI_SUPPORT
@@ -24,18 +31,18 @@ if MEDIA_ANALOG_TV_SUPPORT source "drivers/media/pci/ivtv/Kconfig" source "drivers/media/pci/saa7146/Kconfig" source "drivers/media/pci/dt3155/Kconfig" +source "drivers/media/pci/cx25821/Kconfig" +source "drivers/media/pci/cobalt/Kconfig" endif if MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT comment "Media capture/analog/hybrid TV support" source "drivers/media/pci/cx18/Kconfig" source "drivers/media/pci/cx23885/Kconfig" -source "drivers/media/pci/cx25821/Kconfig" source "drivers/media/pci/cx88/Kconfig" source "drivers/media/pci/bt8xx/Kconfig" source "drivers/media/pci/saa7134/Kconfig" source "drivers/media/pci/saa7164/Kconfig" -source "drivers/media/pci/cobalt/Kconfig" endif
drivers/media/pci/bt8xx/Kconfig +2 -3
@@ -1,11 +1,10 @@ # SPDX-License-Identifier: GPL-2.0-only config VIDEO_BT848 tristate "BT848 Video For Linux" - depends on VIDEO_DEV && PCI && I2C && VIDEO_V4L2 + depends on PCI && I2C select I2C_ALGOBIT select VIDEOBUF_DMA_SG depends on RC_CORE - depends on MEDIA_RADIO_SUPPORT select VIDEO_TUNER select VIDEO_TVEEPROM select VIDEO_MSP3400 if MEDIA_SUBDRV_AUTOSELECT
@@ -24,7 +23,7 @@ config VIDEO_BT848 config DVB_BT8XX tristate "DVB/ATSC Support for bt878 based TV cards" - depends on DVB_CORE && PCI && I2C && VIDEO_BT848 + depends on PCI && I2C && VIDEO_BT848 select DVB_MT352 if MEDIA_SUBDRV_AUTOSELECT select DVB_SP887X if MEDIA_SUBDRV_AUTOSELECT select DVB_NXT6000 if MEDIA_SUBDRV_AUTOSELECT
drivers/media/pci/cx18/Kconfig +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config VIDEO_CX18 tristate "Conexant cx23418 MPEG encoder support" - depends on VIDEO_V4L2 && DVB_CORE && PCI && I2C + depends on PCI && I2C select I2C_ALGOBIT select VIDEOBUF_VMALLOC depends on RC_CORE
drivers/media/pci/cx23885/Kconfig +2 -2
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config VIDEO_CX23885 tristate "Conexant cx23885 (2388x successor) support" - depends on DVB_CORE && VIDEO_DEV && PCI && I2C && INPUT && SND + depends on PCI && I2C && INPUT && SND select SND_PCM select I2C_ALGOBIT select VIDEO_TUNER
@@ -53,7 +53,7 @@ config VIDEO_CX23885 config MEDIA_ALTERA_CI tristate "Altera FPGA based CI module" - depends on VIDEO_CX23885 && DVB_CORE + depends on VIDEO_CX23885 select ALTERA_STAPL help An Altera FPGA CI module for NetUP Dual DVB-T/C RF CI card.
drivers/media/pci/cx88/Kconfig +2 -2
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config VIDEO_CX88 tristate "Conexant 2388x (bt878 successor) support" - depends on VIDEO_DEV && PCI && I2C && RC_CORE + depends on PCI && I2C && RC_CORE select I2C_ALGOBIT select VIDEOBUF2_DMA_SG select VIDEO_TUNER
@@ -44,7 +44,7 @@ config VIDEO_CX88_BLACKBIRD config VIDEO_CX88_DVB tristate "DVB/ATSC Support for cx2388x based TV cards" - depends on VIDEO_CX88 && DVB_CORE + depends on VIDEO_CX88 select VIDEOBUF2_DVB select DVB_PLL if MEDIA_SUBDRV_AUTOSELECT select DVB_MT352 if MEDIA_SUBDRV_AUTOSELECT
drivers/media/pci/saa7134/Kconfig +2 -2
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config VIDEO_SAA7134 tristate "Philips SAA7134 support" - depends on VIDEO_DEV && PCI && I2C + depends on PCI && I2C select VIDEOBUF2_DMA_SG select VIDEO_TUNER select VIDEO_TVEEPROM
@@ -37,7 +37,7 @@ config VIDEO_SAA7134_RC config VIDEO_SAA7134_DVB tristate "DVB/ATSC Support for saa7134 based TV cards" - depends on VIDEO_SAA7134 && DVB_CORE + depends on VIDEO_SAA7134 select VIDEOBUF2_DVB select DVB_PLL if MEDIA_SUBDRV_AUTOSELECT select DVB_MT352 if MEDIA_SUBDRV_AUTOSELECT
drivers/media/pci/saa7164/Kconfig +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config VIDEO_SAA7164 tristate "NXP SAA7164 support" - depends on DVB_CORE && VIDEO_DEV && PCI && I2C + depends on PCI && I2C select I2C_ALGOBIT select FW_LOADER select VIDEO_TUNER
drivers/media/usb/Kconfig +7 -1
@@ -5,6 +5,12 @@ config TTPCI_EEPROM tristate depends on I2C +# Should match the hybrid card list below +config MEDIA_HYBRID_USB + bool + depends on VIDEO_AU0828 || VIDEO_CX231XX || VIDEO_TM6000 || VIDEO_PVRUSB2 + default y + if USB && MEDIA_SUPPORT menuconfig MEDIA_USB_SUPPORT
@@ -29,7 +35,6 @@ endif if MEDIA_ANALOG_TV_SUPPORT comment "Analog TV USB devices" -source "drivers/media/usb/pvrusb2/Kconfig" source "drivers/media/usb/hdpvr/Kconfig" source "drivers/media/usb/stk1160/Kconfig" source "drivers/media/usb/go7007/Kconfig"
@@ -39,6 +44,7 @@ if (MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT) comment "Analog/digital TV USB devices" source "drivers/media/usb/au0828/Kconfig" source "drivers/media/usb/cx231xx/Kconfig" +source "drivers/media/usb/pvrusb2/Kconfig" source "drivers/media/usb/tm6000/Kconfig" endif
drivers/media/usb/au0828/Kconfig +2 -4
@@ -2,12 +2,12 @@ config VIDEO_AU0828 tristate "Auvitek AU0828 support" - depends on I2C && INPUT && DVB_CORE && USB && VIDEO_V4L2 + depends on I2C && INPUT && USB select MEDIA_CONTROLLER select MEDIA_CONTROLLER_DVB select I2C_ALGOBIT select VIDEO_TVEEPROM - select VIDEOBUF2_VMALLOC if VIDEO_V4L2 + select VIDEOBUF2_VMALLOC select DVB_AU8522_DTV if MEDIA_SUBDRV_AUTOSELECT select MEDIA_TUNER_XC5000 if MEDIA_SUBDRV_AUTOSELECT select MEDIA_TUNER_MXL5007T if MEDIA_SUBDRV_AUTOSELECT
@@ -22,8 +22,6 @@ config VIDEO_AU0828 config VIDEO_AU0828_V4L2 bool "Auvitek AU0828 v4l2 analog video support" depends on VIDEO_AU0828 - depends on VIDEO_V4L2=y || VIDEO_V4L2=VIDEO_AU0828 - select DVB_AU8522_V4L if MEDIA_SUBDRV_AUTOSELECT select VIDEO_TUNER default y help
drivers/media/usb/cx231xx/Kconfig +2 -2
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config VIDEO_CX231XX tristate "Conexant cx231xx USB video capture support" - depends on VIDEO_DEV && I2C && I2C_MUX + depends on I2C && I2C_MUX select VIDEO_TUNER select VIDEO_TVEEPROM select VIDEOBUF2_VMALLOC
@@ -40,7 +40,7 @@ config VIDEO_CX231XX_ALSA config VIDEO_CX231XX_DVB tristate "DVB/ATSC Support for Cx231xx based TV cards" - depends on VIDEO_CX231XX && DVB_CORE + depends on VIDEO_CX231XX select MEDIA_TUNER_XC5000 if MEDIA_SUBDRV_AUTOSELECT select MEDIA_TUNER_TDA18271 if MEDIA_SUBDRV_AUTOSELECT select DVB_MB86A20S if MEDIA_SUBDRV_AUTOSELECT
drivers/media/usb/pvrusb2/Kconfig +2 -2
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config VIDEO_PVRUSB2 tristate "Hauppauge WinTV-PVR USB2 support" - depends on VIDEO_V4L2 && I2C + depends on I2C select VIDEO_TUNER select VIDEO_TVEEPROM select VIDEO_CX2341X
@@ -36,7 +36,7 @@ config VIDEO_PVRUSB2_SYSFS config VIDEO_PVRUSB2_DVB bool "pvrusb2 ATSC/DVB support" default y - depends on VIDEO_PVRUSB2 && DVB_CORE + depends on VIDEO_PVRUSB2 select DVB_LGDT330X if MEDIA_SUBDRV_AUTOSELECT select DVB_S5H1409 if MEDIA_SUBDRV_AUTOSELECT select DVB_S5H1411 if MEDIA_SUBDRV_AUTOSELECT
drivers/media/usb/tm6000/Kconfig +2 -2
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config VIDEO_TM6000 tristate "TV Master TM5600/6000/6010 driver" - depends on VIDEO_DEV && I2C && INPUT && RC_CORE && USB + depends on I2C && INPUT && RC_CORE && USB select VIDEO_TUNER select MEDIA_TUNER_XC2028 select MEDIA_TUNER_XC5000
@@ -28,7 +28,7 @@ config VIDEO_TM6000_ALSA config VIDEO_TM6000_DVB tristate "DVB Support for tm6000 based TV cards" - depends on VIDEO_TM6000 && DVB_CORE && USB + depends on VIDEO_TM6000 && USB select DVB_ZL10353 help This adds support for DVB cards based on the tm5600/tm6000 chip.
Signature · 1 line
2.25.1
PATCH v3 8/22 media: split test drivers from platform directory
In reply to Mauro Carvalho ChehabWhen the first test device was added (vivi.c), there were just one file. I was too lazy on that time to create a separate directory just for it, so I kept it together with platform.
Now, we have vivid, vicodec, vim2m and vimc. Also, a new virtual driver has been prepared to support DVB API.
So, it is time to solve this mess, by placing test stuff on a separate directory.
It should be noticed that we also have some skeleton drivers (for V4L and for DVB). For now, we'll keep them separate, as they're not really test drivers, but instead, just examples. The DVB frontend ones will likely be part of a new DVB test driver. By that time, it should make sense to move them here as well.
---
drivers/media/Kconfig | 15 +++++++++-
drivers/media/platform/Kconfig | 23 ---------------
drivers/media/platform/Makefile | 5 ----
drivers/media/test_drivers/Kconfig | 28 +++++++++++++++++++
drivers/media/test_drivers/Makefile | 9 ++++++
.../vicodec/Kconfig | 0
.../vicodec/Makefile | 0
.../vicodec/codec-fwht.c | 0
.../vicodec/codec-fwht.h | 0
.../vicodec/codec-v4l2-fwht.c | 0
.../vicodec/codec-v4l2-fwht.h | 0
.../vicodec/vicodec-core.c | 0
.../media/{platform => test_drivers}/vim2m.c | 0
.../{platform => test_drivers}/vimc/Kconfig | 0
.../{platform => test_drivers}/vimc/Makefile | 0
.../vimc/vimc-capture.c | 0
.../vimc/vimc-common.c | 0
.../vimc/vimc-common.h | 0
.../vimc/vimc-core.c | 0
.../vimc/vimc-debayer.c | 0
.../vimc/vimc-scaler.c | 0
.../vimc/vimc-sensor.c | 0
.../vimc/vimc-streamer.c | 0
.../vimc/vimc-streamer.h | 0
.../{platform => test_drivers}/vivid/Kconfig | 0
.../{platform => test_drivers}/vivid/Makefile | 0
.../vivid/vivid-cec.c | 0
.../vivid/vivid-cec.h | 0
.../vivid/vivid-core.c | 0
.../vivid/vivid-core.h | 0
.../vivid/vivid-ctrls.c | 0
.../vivid/vivid-ctrls.h | 0
.../vivid/vivid-kthread-cap.c | 0
.../vivid/vivid-kthread-cap.h | 0
.../vivid/vivid-kthread-out.c | 0
.../vivid/vivid-kthread-out.h | 0
.../vivid/vivid-kthread-touch.c | 0
.../vivid/vivid-kthread-touch.h | 0
.../vivid/vivid-meta-cap.c | 0
.../vivid/vivid-meta-cap.h | 0
.../vivid/vivid-meta-out.c | 0
.../vivid/vivid-meta-out.h | 0
.../vivid/vivid-osd.c | 0
.../vivid/vivid-osd.h | 0
.../vivid/vivid-radio-common.c | 0
.../vivid/vivid-radio-common.h | 0
.../vivid/vivid-radio-rx.c | 0
.../vivid/vivid-radio-rx.h | 0
.../vivid/vivid-radio-tx.c | 0
.../vivid/vivid-radio-tx.h | 0
.../vivid/vivid-rds-gen.c | 0
.../vivid/vivid-rds-gen.h | 0
.../vivid/vivid-sdr-cap.c | 0
.../vivid/vivid-sdr-cap.h | 0
.../vivid/vivid-touch-cap.c | 0
.../vivid/vivid-touch-cap.h | 0
.../vivid/vivid-vbi-cap.c | 0
.../vivid/vivid-vbi-cap.h | 0
.../vivid/vivid-vbi-gen.c | 0
.../vivid/vivid-vbi-gen.h | 0
.../vivid/vivid-vbi-out.c | 0
.../vivid/vivid-vbi-out.h | 0
.../vivid/vivid-vid-cap.c | 0
.../vivid/vivid-vid-cap.h | 0
.../vivid/vivid-vid-common.c | 0
.../vivid/vivid-vid-common.h | 0
.../vivid/vivid-vid-out.c | 0
.../vivid/vivid-vid-out.h | 0
68 files changed, 51 insertions(+), 29 deletions(-)
create mode 100644 drivers/media/test_drivers/Kconfig
create mode 100644 drivers/media/test_drivers/Makefile
rename drivers/media/{platform => test_drivers}/vicodec/Kconfig (100%)
rename drivers/media/{platform => test_drivers}/vicodec/Makefile (100%)
rename drivers/media/{platform => test_drivers}/vicodec/codec-fwht.c (100%)
rename drivers/media/{platform => test_drivers}/vicodec/codec-fwht.h (100%)
rename drivers/media/{platform => test_drivers}/vicodec/codec-v4l2-fwht.c (100%)
rename drivers/media/{platform => test_drivers}/vicodec/codec-v4l2-fwht.h (100%)
rename drivers/media/{platform => test_drivers}/vicodec/vicodec-core.c (100%)
rename drivers/media/{platform => test_drivers}/vim2m.c (100%)
rename drivers/media/{platform => test_drivers}/vimc/Kconfig (100%)
rename drivers/media/{platform => test_drivers}/vimc/Makefile (100%)
rename drivers/media/{platform => test_drivers}/vimc/vimc-capture.c (100%)
rename drivers/media/{platform => test_drivers}/vimc/vimc-common.c (100%)
rename drivers/media/{platform => test_drivers}/vimc/vimc-common.h (100%)
rename drivers/media/{platform => test_drivers}/vimc/vimc-core.c (100%)
rename drivers/media/{platform => test_drivers}/vimc/vimc-debayer.c (100%)
rename drivers/media/{platform => test_drivers}/vimc/vimc-scaler.c (100%)
rename drivers/media/{platform => test_drivers}/vimc/vimc-sensor.c (100%)
rename drivers/media/{platform => test_drivers}/vimc/vimc-streamer.c (100%)
rename drivers/media/{platform => test_drivers}/vimc/vimc-streamer.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/Kconfig (100%)
rename drivers/media/{platform => test_drivers}/vivid/Makefile (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-cec.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-cec.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-core.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-core.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-ctrls.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-ctrls.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-kthread-cap.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-kthread-cap.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-kthread-out.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-kthread-out.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-kthread-touch.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-kthread-touch.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-meta-cap.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-meta-cap.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-meta-out.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-meta-out.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-osd.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-osd.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-radio-common.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-radio-common.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-radio-rx.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-radio-rx.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-radio-tx.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-radio-tx.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-rds-gen.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-rds-gen.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-sdr-cap.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-sdr-cap.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-touch-cap.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-touch-cap.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-vbi-cap.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-vbi-cap.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-vbi-gen.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-vbi-gen.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-vbi-out.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-vbi-out.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-vid-cap.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-vid-cap.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-vid-common.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-vid-common.h (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-vid-out.c (100%)
rename drivers/media/{platform => test_drivers}/vivid/vivid-vid-out.h (100%)drivers/media/Kconfig +14 -1
@@ -99,7 +99,19 @@ config MEDIA_PLATFORM_SUPPORT on some GPU and newer CPU chipsets. Say Y when you want to be able so see such devices. -endmenu # Types of devices to be supported + +config MEDIA_TEST_SUPPORT + bool "Test drivers" + help + Those drivers should not be used on production Kernels, but + can be useful on debug ones. It enables several dummy drivers + that simulate a real hardware. Very useful to test userspace + applications and to validate if the subsystem core is doesn't + have regressions. + + Say Y when you have a software defined radio device. + +endmenu # media support types if MEDIA_SUPPORT
@@ -182,6 +194,7 @@ source "drivers/media/radio/Kconfig" # Common driver options source "drivers/media/common/Kconfig" +source "drivers/media/test_drivers/Kconfig" if MEDIA_PLATFORM_SUPPORT source "drivers/media/platform/Kconfig"
drivers/media/platform/Kconfig +0 -23
@@ -529,29 +529,6 @@ config VIDEO_TI_SC config VIDEO_TI_CSC tristate -menuconfig V4L_TEST_DRIVERS - bool "Media test drivers" - depends on MEDIA_CAMERA_SUPPORT - -if V4L_TEST_DRIVERS - -source "drivers/media/platform/vimc/Kconfig" - -source "drivers/media/platform/vivid/Kconfig" - -config VIDEO_VIM2M - tristate "Virtual Memory-to-Memory Driver" - depends on VIDEO_DEV && VIDEO_V4L2 - select VIDEOBUF2_VMALLOC - select V4L2_MEM2MEM_DEV - help - This is a virtual test device for the memory-to-memory driver - framework. - -source "drivers/media/platform/vicodec/Kconfig" - -endif #V4L_TEST_DRIVERS - menuconfig DVB_PLATFORM_DRIVERS bool "DVB platform devices" depends on MEDIA_DIGITAL_TV_SUPPORT
drivers/media/platform/Makefile +0 -5
@@ -14,11 +14,6 @@ obj-$(CONFIG_VIDEO_PXA27x) += pxa_camera.o obj-$(CONFIG_VIDEO_VIU) += fsl-viu.o -obj-$(CONFIG_VIDEO_VIMC) += vimc/ -obj-$(CONFIG_VIDEO_VIVID) += vivid/ -obj-$(CONFIG_VIDEO_VIM2M) += vim2m.o -obj-$(CONFIG_VIDEO_VICODEC) += vicodec/ - obj-y += ti-vpe/ obj-$(CONFIG_VIDEO_MX2_EMMAPRP) += mx2_emmaprp.o
drivers/media/test_drivers/Kconfig new file +28 -0
@@ -0,0 +1,28 @@ +# SPDX-License-Identifier: GPL-2.0-only + +if MEDIA_TEST_SUPPORT + +menuconfig V4L_TEST_DRIVERS + bool "V4L test drivers" + depends on MEDIA_CAMERA_SUPPORT + +if V4L_TEST_DRIVERS + +source "drivers/media/test_drivers/vimc/Kconfig" + +source "drivers/media/test_drivers/vivid/Kconfig" + +config VIDEO_VIM2M + tristate "Virtual Memory-to-Memory Driver" + depends on VIDEO_DEV && VIDEO_V4L2 + select VIDEOBUF2_VMALLOC + select V4L2_MEM2MEM_DEV + help + This is a virtual test device for the memory-to-memory driver + framework. + +source "drivers/media/test_drivers/vicodec/Kconfig" + +endif #V4L_TEST_DRIVERS + +endif #MEDIA_TEST_SUPPORT
drivers/media/test_drivers/Makefile new file +9 -0
@@ -0,0 +1,9 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Makefile for the test drivers. +# + +obj-$(CONFIG_VIDEO_VIMC) += vimc/ +obj-$(CONFIG_VIDEO_VIVID) += vivid/ +obj-$(CONFIG_VIDEO_VIM2M) += vim2m.o +obj-$(CONFIG_VIDEO_VICODEC) += vicodec/
drivers/media/test_drivers/vicodec/Kconfig renamed from drivers/media/platform/vicodec/Kconfig +0 -0
drivers/media/test_drivers/vicodec/Makefile renamed from drivers/media/platform/vicodec/Makefile +0 -0
drivers/media/test_drivers/vicodec/codec-fwht.c renamed from drivers/media/platform/vicodec/codec-fwht.c +0 -0
drivers/media/test_drivers/vicodec/codec-fwht.h renamed from drivers/media/platform/vicodec/codec-fwht.h +0 -0
drivers/media/test_drivers/vicodec/codec-v4l2-fwht.c renamed from drivers/media/platform/vicodec/codec-v4l2-fwht.c +0 -0
drivers/media/test_drivers/vicodec/codec-v4l2-fwht.h renamed from drivers/media/platform/vicodec/codec-v4l2-fwht.h +0 -0
drivers/media/test_drivers/vicodec/vicodec-core.c renamed from drivers/media/platform/vicodec/vicodec-core.c +0 -0
drivers/media/test_drivers/vim2m.c renamed from drivers/media/platform/vim2m.c +0 -0
drivers/media/test_drivers/vimc/Kconfig renamed from drivers/media/platform/vimc/Kconfig +0 -0
drivers/media/test_drivers/vimc/Makefile renamed from drivers/media/platform/vimc/Makefile +0 -0
drivers/media/test_drivers/vimc/vimc-capture.c renamed from drivers/media/platform/vimc/vimc-capture.c +0 -0
drivers/media/test_drivers/vimc/vimc-common.c renamed from drivers/media/platform/vimc/vimc-common.c +0 -0
drivers/media/test_drivers/vimc/vimc-common.h renamed from drivers/media/platform/vimc/vimc-common.h +0 -0
drivers/media/test_drivers/vimc/vimc-core.c renamed from drivers/media/platform/vimc/vimc-core.c +0 -0
drivers/media/test_drivers/vimc/vimc-debayer.c renamed from drivers/media/platform/vimc/vimc-debayer.c +0 -0
drivers/media/test_drivers/vimc/vimc-scaler.c renamed from drivers/media/platform/vimc/vimc-scaler.c +0 -0
drivers/media/test_drivers/vimc/vimc-sensor.c renamed from drivers/media/platform/vimc/vimc-sensor.c +0 -0
drivers/media/test_drivers/vimc/vimc-streamer.c renamed from drivers/media/platform/vimc/vimc-streamer.c +0 -0
drivers/media/test_drivers/vimc/vimc-streamer.h renamed from drivers/media/platform/vimc/vimc-streamer.h +0 -0
drivers/media/test_drivers/vivid/Kconfig renamed from drivers/media/platform/vivid/Kconfig +0 -0
drivers/media/test_drivers/vivid/Makefile renamed from drivers/media/platform/vivid/Makefile +0 -0
drivers/media/test_drivers/vivid/vivid-cec.c renamed from drivers/media/platform/vivid/vivid-cec.c +0 -0
drivers/media/test_drivers/vivid/vivid-cec.h renamed from drivers/media/platform/vivid/vivid-cec.h +0 -0
drivers/media/test_drivers/vivid/vivid-core.c renamed from drivers/media/platform/vivid/vivid-core.c +0 -0
drivers/media/test_drivers/vivid/vivid-core.h renamed from drivers/media/platform/vivid/vivid-core.h +0 -0
drivers/media/test_drivers/vivid/vivid-ctrls.c renamed from drivers/media/platform/vivid/vivid-ctrls.c +0 -0
drivers/media/test_drivers/vivid/vivid-ctrls.h renamed from drivers/media/platform/vivid/vivid-ctrls.h +0 -0
drivers/media/test_drivers/vivid/vivid-kthread-cap.c renamed from drivers/media/platform/vivid/vivid-kthread-cap.c +0 -0
drivers/media/test_drivers/vivid/vivid-kthread-cap.h renamed from drivers/media/platform/vivid/vivid-kthread-cap.h +0 -0
drivers/media/test_drivers/vivid/vivid-kthread-out.c renamed from drivers/media/platform/vivid/vivid-kthread-out.c +0 -0
drivers/media/test_drivers/vivid/vivid-kthread-out.h renamed from drivers/media/platform/vivid/vivid-kthread-out.h +0 -0
drivers/media/test_drivers/vivid/vivid-kthread-touch.c renamed from drivers/media/platform/vivid/vivid-kthread-touch.c +0 -0
drivers/media/test_drivers/vivid/vivid-kthread-touch.h renamed from drivers/media/platform/vivid/vivid-kthread-touch.h +0 -0
drivers/media/test_drivers/vivid/vivid-meta-cap.c renamed from drivers/media/platform/vivid/vivid-meta-cap.c +0 -0
drivers/media/test_drivers/vivid/vivid-meta-cap.h renamed from drivers/media/platform/vivid/vivid-meta-cap.h +0 -0
drivers/media/test_drivers/vivid/vivid-meta-out.c renamed from drivers/media/platform/vivid/vivid-meta-out.c +0 -0
drivers/media/test_drivers/vivid/vivid-meta-out.h renamed from drivers/media/platform/vivid/vivid-meta-out.h +0 -0
drivers/media/test_drivers/vivid/vivid-osd.c renamed from drivers/media/platform/vivid/vivid-osd.c +0 -0
drivers/media/test_drivers/vivid/vivid-osd.h renamed from drivers/media/platform/vivid/vivid-osd.h +0 -0
drivers/media/test_drivers/vivid/vivid-radio-common.c renamed from drivers/media/platform/vivid/vivid-radio-common.c +0 -0
drivers/media/test_drivers/vivid/vivid-radio-common.h renamed from drivers/media/platform/vivid/vivid-radio-common.h +0 -0
drivers/media/test_drivers/vivid/vivid-radio-rx.c renamed from drivers/media/platform/vivid/vivid-radio-rx.c +0 -0
drivers/media/test_drivers/vivid/vivid-radio-rx.h renamed from drivers/media/platform/vivid/vivid-radio-rx.h +0 -0
drivers/media/test_drivers/vivid/vivid-radio-tx.c renamed from drivers/media/platform/vivid/vivid-radio-tx.c +0 -0
drivers/media/test_drivers/vivid/vivid-radio-tx.h renamed from drivers/media/platform/vivid/vivid-radio-tx.h +0 -0
drivers/media/test_drivers/vivid/vivid-rds-gen.c renamed from drivers/media/platform/vivid/vivid-rds-gen.c +0 -0
drivers/media/test_drivers/vivid/vivid-rds-gen.h renamed from drivers/media/platform/vivid/vivid-rds-gen.h +0 -0
drivers/media/test_drivers/vivid/vivid-sdr-cap.c renamed from drivers/media/platform/vivid/vivid-sdr-cap.c +0 -0
drivers/media/test_drivers/vivid/vivid-sdr-cap.h renamed from drivers/media/platform/vivid/vivid-sdr-cap.h +0 -0
drivers/media/test_drivers/vivid/vivid-touch-cap.c renamed from drivers/media/platform/vivid/vivid-touch-cap.c +0 -0
drivers/media/test_drivers/vivid/vivid-touch-cap.h renamed from drivers/media/platform/vivid/vivid-touch-cap.h +0 -0
drivers/media/test_drivers/vivid/vivid-vbi-cap.c renamed from drivers/media/platform/vivid/vivid-vbi-cap.c +0 -0
drivers/media/test_drivers/vivid/vivid-vbi-cap.h renamed from drivers/media/platform/vivid/vivid-vbi-cap.h +0 -0
drivers/media/test_drivers/vivid/vivid-vbi-gen.c renamed from drivers/media/platform/vivid/vivid-vbi-gen.c +0 -0
drivers/media/test_drivers/vivid/vivid-vbi-gen.h renamed from drivers/media/platform/vivid/vivid-vbi-gen.h +0 -0
drivers/media/test_drivers/vivid/vivid-vbi-out.c renamed from drivers/media/platform/vivid/vivid-vbi-out.c +0 -0
drivers/media/test_drivers/vivid/vivid-vbi-out.h renamed from drivers/media/platform/vivid/vivid-vbi-out.h +0 -0
drivers/media/test_drivers/vivid/vivid-vid-cap.c renamed from drivers/media/platform/vivid/vivid-vid-cap.c +0 -0
drivers/media/test_drivers/vivid/vivid-vid-cap.h renamed from drivers/media/platform/vivid/vivid-vid-cap.h +0 -0
drivers/media/test_drivers/vivid/vivid-vid-common.c renamed from drivers/media/platform/vivid/vivid-vid-common.c +0 -0
drivers/media/test_drivers/vivid/vivid-vid-common.h renamed from drivers/media/platform/vivid/vivid-vid-common.h +0 -0
drivers/media/test_drivers/vivid/vivid-vid-out.c renamed from drivers/media/platform/vivid/vivid-vid-out.c +0 -0
drivers/media/test_drivers/vivid/vivid-vid-out.h renamed from drivers/media/platform/vivid/vivid-vid-out.h +0 -0
Signature · 1 line
2.25.1
PATCH v3 5/22 media: reorganize the drivers menu options
In reply to Mauro Carvalho ChehabThe comments before some of the drivers support look weird, because their Kconfig have their own "comment" directive inside it. So, rearrange them to make it look a little nicer for the ones with are not too familiar with the media system.
--- drivers/media/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/media/Kconfig +3 -3
@@ -176,6 +176,9 @@ source "drivers/media/usb/Kconfig" source "drivers/media/pci/Kconfig" source "drivers/media/radio/Kconfig" +# Common driver options +source "drivers/media/common/Kconfig" + if MEDIA_PLATFORM_SUPPORT source "drivers/media/platform/Kconfig" source "drivers/media/mmc/Kconfig"
@@ -185,9 +188,6 @@ comment "Supported FireWire (IEEE 1394) Adapters" depends on DVB_CORE && FIREWIRE source "drivers/media/firewire/Kconfig" -# Common driver options -source "drivers/media/common/Kconfig" - comment "Media ancillary drivers (tuners, sensors, i2c, spi, frontends)" #
Signature · 1 line
2.25.1
PATCH v3 18/22 media: Kconfig: place all options under a sub-menu
In reply to Mauro Carvalho ChehabThat should make easier for people setting the media subsystem config options, as they'll be split by the type of functionality that will be enabled.
--- drivers/media/Kconfig | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-)
drivers/media/Kconfig +24 -19
@@ -128,48 +128,49 @@ config MEDIA_TEST_SUPPORT Say Y when you have a software defined radio device. endmenu # media device types -comment "Media core options" - -# -# Video4Linux support -# Only enables if one of the V4L2 types (ATV, webcam, radio) is selected -# +menu "Media core support" + visible if !MEDIA_SUPPORT_FILTER config VIDEO_DEV - tristate + tristate "Video4Linux core" depends on MEDIA_SUPPORT default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT + help + Enables the V4L2 API, used by cameras, analog TV, video grabbers, + radio devices and by some input devices. config MEDIA_CONTROLLER bool "Media Controller API" - depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT + default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT || MEDIA_EMBEDDED_SUPPORT help Enable the media controller API used to query media devices internal topology and configure it dynamically. This API is mostly used by camera interfaces in embedded platforms. -# -# DVB Core -# Only enables if one of DTV is selected -# - config DVB_CORE - tristate + tristate "Digital TV core" depends on MEDIA_SUPPORT - depends on MEDIA_DIGITAL_TV_SUPPORT + default MEDIA_DIGITAL_TV_SUPPORT depends on (I2C || I2C=n) - default y select CRC32 - help + Enables the DVB API, used by Digital TV devices. Supports several + standards, including DVB, ATSC, ISDB and CMDB. +endmenu # Media core support + +# +# Extra per-media API core functionality + +menu "Media core additional options" source "drivers/media/v4l2-core/Kconfig" source "drivers/media/mc/Kconfig" source "drivers/media/dvb-core/Kconfig" source "drivers/media/cec/Kconfig" +endmenu -comment "Media drivers" +menu "Media drivers" source "drivers/media/usb/Kconfig" source "drivers/media/pci/Kconfig"
@@ -187,7 +188,9 @@ endif source "drivers/media/firewire/Kconfig" -comment "Media ancillary drivers (tuners, sensors, i2c, spi, frontends)" +endmenu + +menu "Media ancillary drivers (tuners, sensors, i2c, spi, frontends)" # # Ancillary drivers (tuners, i2c, spi, frontends)
@@ -232,4 +235,6 @@ source "drivers/media/spi/Kconfig" source "drivers/media/tuners/Kconfig" source "drivers/media/dvb-frontends/Kconfig" +endmenu + endif # MEDIA_SUPPORT
Signature · 1 line
2.25.1
PATCH v3 19/22 media: Kconfig: move the position of sub-driver autoselection
In reply to Mauro Carvalho ChehabLet's place the sub-driver-autoselection option just below the device filtering one, as it also controls a filter menu, with is not even visible if !EXPERT && !EMBEDDED.
--- drivers/media/Kconfig | 50 +++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 25 deletions(-)
drivers/media/Kconfig +25 -25
@@ -33,6 +33,28 @@ config MEDIA_SUPPORT_FILTER needed to support media drivers will be enabled. Also, all media device drivers should be shown. +config MEDIA_SUBDRV_AUTOSELECT + bool "Autoselect ancillary drivers (tuners, sensors, i2c, spi, frontends)" + depends on HAS_IOMEM + select I2C + select I2C_MUX + default y if MEDIA_SUPPORT_FILTER + help + By default, a media driver auto-selects all possible ancillary + devices such as tuners, sensors, video encoders/decoders and + frontends, that are used by any of the supported devices. + + This is generally the right thing to do, except when there + are strict constraints with regards to the kernel size, + like on embedded systems. + + Use this option with care, as deselecting ancillary drivers which + are, in fact, necessary will result in the lack of the needed + functionality for your device (it may not tune or may not have + the needed demodulators). + + If unsure say Y. + menu "Media device types" visible if MEDIA_SUPPORT_FILTER
@@ -190,40 +212,18 @@ source "drivers/media/firewire/Kconfig" endmenu -menu "Media ancillary drivers (tuners, sensors, i2c, spi, frontends)" - # # Ancillary drivers (tuners, i2c, spi, frontends) # -config MEDIA_SUBDRV_AUTOSELECT - bool "Autoselect ancillary drivers (tuners, sensors, i2c, spi, frontends)" - depends on MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT || MEDIA_CAMERA_SUPPORT || MEDIA_SDR_SUPPORT - depends on HAS_IOMEM - select I2C - select I2C_MUX - default y if !EMBEDDED - help - By default, a media driver auto-selects all possible ancillary - devices such as tuners, sensors, video encoders/decoders and - frontends, that are used by any of the supported devices. - - This is generally the right thing to do, except when there - are strict constraints with regards to the kernel size, - like on embedded systems. - - Use this option with care, as deselecting ancillary drivers which - are, in fact, necessary will result in the lack of the needed - functionality for your device (it may not tune or may not have - the needed demodulators). - - If unsure say Y. - config MEDIA_HIDE_ANCILLARY_SUBDRV bool depends on MEDIA_SUBDRV_AUTOSELECT && !COMPILE_TEST && !EXPERT default y +menu "Media ancillary drivers" + visible if !MEDIA_HIDE_ANCILLARY_SUBDRV + config MEDIA_ATTACH bool depends on MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT || MEDIA_RADIO_SUPPORT
Signature · 1 line
2.25.1
PATCH v3 21/22 media: Kconfig: simplify some dependencies
In reply to Mauro Carvalho Chehabboth DVB_CORE and VIDEO_DEV already depends on MEDIA_SUPPORT, as they're below an if block.
So, remove this double dependency.
--- drivers/media/Kconfig | 2 -- 1 file changed, 2 deletions(-)
drivers/media/Kconfig +0 -2
@@ -156,7 +156,6 @@ menu "Media core support" config VIDEO_DEV tristate "Video4Linux core" - depends on MEDIA_SUPPORT default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT help Enables the V4L2 API, used by cameras, analog TV, video grabbers,
@@ -173,7 +172,6 @@ config MEDIA_CONTROLLER config DVB_CORE tristate "Digital TV core" - depends on MEDIA_SUPPORT default MEDIA_DIGITAL_TV_SUPPORT depends on (I2C || I2C=n) select CRC32
Signature · 1 line
2.25.1
PATCH v3 20/22 media: Kconfig: on !EMBEDDED && !EXPERT, enable driver filtering
In reply to Mauro Carvalho ChehabAdvanced and embedded users know what to do, so, by default, they will likely want to be able to open the entire set of Kconfig media options.
Normal "poor" users usually needs more help when setting stuff, so let's open an more simplified version to them by default.
--- drivers/media/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/media/Kconfig +1 -0
@@ -21,6 +21,7 @@ if MEDIA_SUPPORT config MEDIA_SUPPORT_FILTER bool "Filter devices by their types" depends on MEDIA_SUPPORT + default y if !EMBEDDED && !EXPERT help Configuring the media subsystem can be complex, as there are hundreds of drivers and other config options.
Signature · 1 line
2.25.1
PATCH v3 14/22 media: Kconfig: move drivers-specific TTPCI_EEPROM Kconfig var
In reply to Mauro Carvalho ChehabThis option is used only by av7110 and by an USB driver. As the av7110 is the first DVB hardware, hardly found those days, let's opt to place it at usb/Kconfig, as the driver with needs it might have a longer lifetime.
--- drivers/media/Kconfig | 8 -------- drivers/media/usb/Kconfig | 6 ++++++ 2 files changed, 6 insertions(+), 8 deletions(-)
drivers/media/Kconfig +0 -8
@@ -161,14 +161,6 @@ config DVB_CORE help - - - -# This Kconfig option is used by both PCI and USB drivers -config TTPCI_EEPROM - tristate - depends on I2C - source "drivers/media/dvb-core/Kconfig" comment "Media drivers"
drivers/media/usb/Kconfig +6 -0
@@ -1,4 +1,10 @@ # SPDX-License-Identifier: GPL-2.0-only + +# This Kconfig option is also used by the legacy av7110 driver +config TTPCI_EEPROM + tristate + depends on I2C + if USB && MEDIA_SUPPORT menuconfig MEDIA_USB_SUPPORT
Signature · 1 line
2.25.1
PATCH v3 6/22 media: Kconfig: update the MEDIA_SUPPORT help message
In reply to Mauro Carvalho ChehabThere are more things than just cameras and TV devices on media. Update the help message accordingly.
--- drivers/media/Kconfig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/media/Kconfig +4 -2
@@ -18,8 +18,10 @@ menuconfig MEDIA_SUPPORT tristate "Multimedia support" depends on HAS_IOMEM help - If you want to use Webcams, Video grabber devices and/or TV devices - enable this option and other options below. + If you want to use media devices, including Webcams, Video grabber + devices and/or TV devices, V4L2 codecs, etc, enable this option + and other options below. + Additional info and docs are available on the web at <https://linuxtv.org>
Signature · 1 line
2.25.1
PATCH v3 13/22 media: Kconfig: move V4L2 subdev API to v4l2-core/Kconfig
In reply to Mauro Carvalho ChehabThis option is part of V4L2 API extra functionality set. Move it to be at the v4l2-core/Kconfig, where it belongs, cleaning the main Kconfig file.
--- drivers/media/Kconfig | 9 --------- drivers/media/v4l2-core/Kconfig | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-)
drivers/media/Kconfig +0 -9
@@ -144,15 +144,6 @@ config VIDEO_DEV depends on MEDIA_SUPPORT default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT -config VIDEO_V4L2_SUBDEV_API - bool "V4L2 sub-device userspace API" - depends on VIDEO_DEV && MEDIA_CONTROLLER - help - Enables the V4L2 sub-device pad-level userspace API used to configure - video format, size and frame rate between hardware blocks. - - This API is mostly used by camera interfaces in embedded platforms. - source "drivers/media/v4l2-core/Kconfig" #
drivers/media/v4l2-core/Kconfig +9 -0
@@ -16,6 +16,15 @@ config VIDEO_V4L2_I2C depends on I2C && VIDEO_V4L2 default y +config VIDEO_V4L2_SUBDEV_API + bool "V4L2 sub-device userspace API" + depends on VIDEO_DEV && MEDIA_CONTROLLER + help + Enables the V4L2 sub-device pad-level userspace API used to configure + video format, size and frame rate between hardware blocks. + + This API is mostly used by camera interfaces in embedded platforms. + config VIDEO_ADV_DEBUG bool "Enable advanced debug functionality on V4L2 drivers" help
Signature · 1 line
2.25.1
PATCH v3 15/22 media: Kconfig: move media controller core select to main Kconfig
In reply to Mauro Carvalho ChehabLet's place the main API selections at the media/Kconfig file, as this way we can better organize things.
--- drivers/media/Kconfig | 9 +++++++++ drivers/media/mc/Kconfig | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-)
drivers/media/Kconfig +9 -0
@@ -144,6 +144,15 @@ config VIDEO_DEV depends on MEDIA_SUPPORT default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT +config MEDIA_CONTROLLER + bool "Media Controller API" + depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT + help + Enable the media controller API used to query media devices internal + topology and configure it dynamically. + + This API is mostly used by camera interfaces in embedded platforms. + source "drivers/media/v4l2-core/Kconfig" #
drivers/media/mc/Kconfig +0 -9
@@ -3,15 +3,6 @@ # Selectable only for webcam/grabbers, as other drivers don't use it # -config MEDIA_CONTROLLER - bool "Media Controller API" - depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT - help - Enable the media controller API used to query media devices internal - topology and configure it dynamically. - - This API is mostly used by camera interfaces in embedded platforms. - config MEDIA_CONTROLLER_DVB bool "Enable Media controller for DVB (EXPERIMENTAL)" depends on MEDIA_CONTROLLER && DVB_CORE
Signature · 1 line
2.25.1
PATCH v3 9/22 media: Kconfig: make filtering devices optional
In reply to Mauro Carvalho ChehabThe per-device option selection is a feature that some developers love, while others hate...
So, let's make both happy by making it optional.
--- drivers/media/Kconfig | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-)
drivers/media/Kconfig +28 -4
@@ -25,14 +25,32 @@ menuconfig MEDIA_SUPPORT Additional info and docs are available on the web at <https://linuxtv.org> -menu "Types of devices to be supported" +if MEDIA_SUPPORT + +config MEDIA_SUPPORT_FILTER + bool "Filter devices by their types" depends on MEDIA_SUPPORT + help + Configuring the media subsystem can be complex, as there are + hundreds of drivers and other config options. + + This menu offers option that will help the Kernel's config + system to hide drivers that are out of the scope of the + user needs, and disabling core support for unused APIs. + + If not selected, all non-optional media core functionality + needed to support media drivers will be enabled. Also, all + media device drivers should be shown. + +menu "Media device types" + visible if MEDIA_SUPPORT_FILTER # # Multimedia support - automatically enable V4L2 and DVB core # config MEDIA_CAMERA_SUPPORT bool "Cameras and video grabbers" + default y if !MEDIA_SUPPORT_FILTER help Enable support for webcams and video grabbers.
@@ -40,6 +58,7 @@ config MEDIA_CAMERA_SUPPORT config MEDIA_ANALOG_TV_SUPPORT bool "Analog TV" + default y if !MEDIA_SUPPORT_FILTER help Enable analog TV support.
@@ -52,6 +71,7 @@ config MEDIA_ANALOG_TV_SUPPORT config MEDIA_DIGITAL_TV_SUPPORT bool "Digital TV" + default y if !MEDIA_SUPPORT_FILTER help Enable digital TV support.
@@ -60,6 +80,7 @@ config MEDIA_DIGITAL_TV_SUPPORT config MEDIA_RADIO_SUPPORT bool "AM/FM radio receivers/transmitters" + default y if !MEDIA_SUPPORT_FILTER help Enable AM/FM radio support.
@@ -74,6 +95,7 @@ config MEDIA_RADIO_SUPPORT config MEDIA_SDR_SUPPORT bool "Software defined radio" + default y if !MEDIA_SUPPORT_FILTER help Enable software defined radio support.
@@ -81,6 +103,7 @@ config MEDIA_SDR_SUPPORT config MEDIA_CEC_SUPPORT bool "HDMI CEC support" + default y if !MEDIA_SUPPORT_FILTER help Enable support for HDMI CEC (Consumer Electronics Control), which is an optional HDMI feature.
@@ -90,6 +113,7 @@ config MEDIA_CEC_SUPPORT config MEDIA_PLATFORM_SUPPORT bool "Platform-specific devices" + default y if !MEDIA_SUPPORT_FILTER help Enable support for complex cameras, codecs, and other hardware that are integrated at the CPU, GPU or on Image Signalling Processor
@@ -102,6 +126,7 @@ config MEDIA_PLATFORM_SUPPORT config MEDIA_TEST_SUPPORT bool "Test drivers" + default y if !MEDIA_SUPPORT_FILTER help Those drivers should not be used on production Kernels, but can be useful on debug ones. It enables several dummy drivers
@@ -110,10 +135,9 @@ config MEDIA_TEST_SUPPORT have regressions. Say Y when you have a software defined radio device. +endmenu # media device types -endmenu # media support types - -if MEDIA_SUPPORT +comment "Media core options" source "drivers/media/cec/Kconfig"
Signature · 1 line
2.25.1
PATCH v3 16/22 media: Kconfig: better organize menu items
In reply to Mauro Carvalho ChehabPlace all API specific bits together
--- drivers/media/Kconfig | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
drivers/media/Kconfig +3 -6
@@ -130,10 +130,6 @@ endmenu # media device types comment "Media core options" -source "drivers/media/cec/Kconfig" - -source "drivers/media/mc/Kconfig" - # # Video4Linux support # Only enables if one of the V4L2 types (ATV, webcam, radio) is selected
@@ -153,8 +149,6 @@ config MEDIA_CONTROLLER This API is mostly used by camera interfaces in embedded platforms. -source "drivers/media/v4l2-core/Kconfig" - # # DVB Core # Only enables if one of DTV is selected
@@ -170,7 +164,10 @@ config DVB_CORE help +source "drivers/media/v4l2-core/Kconfig" +source "drivers/media/mc/Kconfig" source "drivers/media/dvb-core/Kconfig" +source "drivers/media/cec/Kconfig" comment "Media drivers"
Signature · 1 line
2.25.1
PATCH v3 10/22 media: Kconfig: move CEC-specific options to cec/Kconfig
In reply to Mauro Carvalho ChehabThere's no need to have the CEC definitions inside the media Kconfig, as the Kconfig parser doesn't require symbols to be declared before their usages.
With that, the main Kconfig menu becomes cleaner.
--- drivers/media/Kconfig | 9 --------- drivers/media/cec/Kconfig | 10 ++++++++++ 2 files changed, 10 insertions(+), 9 deletions(-)
drivers/media/Kconfig +0 -9
@@ -3,15 +3,6 @@ # Multimedia device configuration # -config CEC_CORE - tristate - -config CEC_NOTIFIER - bool - -config CEC_PIN - bool - source "drivers/media/rc/Kconfig" menuconfig MEDIA_SUPPORT
drivers/media/cec/Kconfig +10 -0
@@ -1,4 +1,14 @@ # SPDX-License-Identifier: GPL-2.0-only + +config CEC_CORE + tristate + +config CEC_NOTIFIER + bool + +config CEC_PIN + bool + config MEDIA_CEC_RC bool "HDMI CEC RC integration" depends on CEC_CORE && RC_CORE
Signature · 1 line
2.25.1
PATCH v3 1/22 media: dvb-usb: auto-select CYPRESS_FIRMWARE
In reply to Mauro Carvalho ChehabAt least some of the supported boards by dvb-usb driver need to load the cypress firmware, so select it, as otherwise missing dependencies may popup.
Also, as the cypress firmware load routines are needed only by the dvb-usb, dvb-usb-v2 and go7007 drivers, and those all (now) select it, there's no need to ask the user for manually select it.
--- drivers/media/common/Kconfig | 2 +- drivers/media/usb/dvb-usb/Kconfig | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/media/common/Kconfig +1 -1
@@ -14,7 +14,7 @@ config VIDEO_TVEEPROM depends on I2C config CYPRESS_FIRMWARE - tristate "Cypress firmware helper routines" + tristate depends on USB source "drivers/media/common/videobuf2/Kconfig"
drivers/media/usb/dvb-usb/Kconfig +1 -0
@@ -2,6 +2,7 @@ config DVB_USB tristate "Support for various USB DVB devices" depends on DVB_CORE && USB && I2C && RC_CORE + select CYPRESS_FIRMWARE help By enabling this you will be able to choose the various supported USB1.1 and USB2.0 DVB devices.
Signature · 1 line
2.25.1
PATCH v3 4/22 media: pci: move VIDEO_PCI_SKELETON to a different Kconfig
In reply to Mauro Carvalho ChehabThe V4L2 PCI skeleton is not part of the V4L2 core. Move it to appear together with the other PCI drivers, at the end, as this is something that normal users don't even need to bother.
--- drivers/media/pci/Kconfig | 10 ++++++++++ drivers/media/v4l2-core/Kconfig | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-)
drivers/media/pci/Kconfig +10 -0
@@ -56,5 +56,15 @@ endif source "drivers/media/pci/intel/ipu3/Kconfig" +config VIDEO_PCI_SKELETON + tristate "Skeleton PCI V4L2 driver" + depends on PCI + depends on SAMPLES + depends on VIDEO_V4L2 && VIDEOBUF2_CORE + depends on VIDEOBUF2_MEMOPS && VIDEOBUF2_DMA_CONTIG + help + Enable build of the skeleton PCI driver, used as a reference + when developing new drivers. + endif #MEDIA_PCI_SUPPORT endif #PCI
drivers/media/v4l2-core/Kconfig +0 -10
@@ -31,16 +31,6 @@ config VIDEO_FIXED_MINOR_RANGES When in doubt, say N. -config VIDEO_PCI_SKELETON - tristate "Skeleton PCI V4L2 driver" - depends on PCI - depends on SAMPLES - depends on VIDEO_V4L2 && VIDEOBUF2_CORE - depends on VIDEOBUF2_MEMOPS && VIDEOBUF2_DMA_CONTIG - help - Enable build of the skeleton PCI driver, used as a reference - when developing new drivers. - # Used by drivers that need tuner.ko config VIDEO_TUNER tristate
Signature · 1 line
2.25.1
PATCH v3 11/22 media: Kconfig: move comment to siano include
In reply to Mauro Carvalho ChehabShowing this comment without showing the Siano mmc option is very weird! Place the option together, and make it visible only when showing Siano configuration.
--- drivers/media/mmc/Kconfig | 1 - drivers/media/mmc/siano/Kconfig | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/media/mmc/Kconfig +0 -1
@@ -1,3 +1,2 @@ # SPDX-License-Identifier: GPL-2.0-only -comment "MMC/SDIO adapters" source "drivers/media/mmc/siano/Kconfig"
drivers/media/mmc/siano/Kconfig +2 -0
@@ -2,6 +2,8 @@ # # Siano Mobile Silicon Digital TV device configuration # +comment "MMC/SDIO DVB adapters" + depends on DVB_CORE && HAS_DMA && MMC config SMS_SDIO_DRV tristate "Siano SMS1xxx based MDTV via SDIO interface"
Signature · 1 line
2.25.1
Sakari Ailus
maintainerRe: [PATCH v3 15/22] media: Kconfig: move media controller core select to main Kconfig
In reply to Mauro Carvalho ChehabHi Mauro,
Quoted 39 lines · Mauro Carvalho Chehab
Let's place the main API selections at the media/Kconfig file, as this way we can better organize things.
Signed-off-by Mauro Carvalho Chehab <[email protected]>--- drivers/media/Kconfig | 9 +++++++++ drivers/media/mc/Kconfig | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-)drivers/media/Kconfig +9
-0@@ -144,6 +144,15 @@ config VIDEO_DEV depends on MEDIA_SUPPORT default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT +config MEDIA_CONTROLLER + bool "Media Controller API" + depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT + help + Enable the media controller API used to query media devices internal + topology and configure it dynamically. + + This API is mostly used by camera interfaces in embedded platforms. + source "drivers/media/v4l2-core/Kconfig" #drivers/media/mc/Kconfig +0
-2@@ -3,15 +3,6 @@ # Selectable only for webcam/grabbers, as other drivers don't use it # -config MEDIA_CONTROLLER - bool "Media Controller API"
drivers/media/mc/Kconfig line 8
Quoted 10 lines
drivers/media/mc/Kconfig +0
-7- depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT - help - Enable the media controller API used to query media devices internal - topology and configure it dynamically. - - This API is mostly used by camera interfaces in embedded platforms. - config MEDIA_CONTROLLER_DVB bool "Enable Media controller for DVB (EXPERIMENTAL)" depends on MEDIA_CONTROLLER && DVB_CORE
This moves the main MC configuration out of the directory but leaves the rest of the MC configuration under the mc directory. All MC related configuration is currently in a single place, which makes sense.
I guess you can always have arguments for and against, but my preference is keeping it as-is.
Signature · 3 lines
Kind regards, Sakari Ailus
Re: [PATCH v3 22/22] media: Kconfig: better support hybrid TV devices
In reply to Mauro Carvalho ChehabEm Wed, 25 Mar 2020 10:49:36 +0100
Mauro Carvalho Chehab <[email protected]> escreveu:
Quoted 14 lines
Right now, if one has an hybrid TV card, it has to select both analog and digital TV support, as otherwise the needed core support won't be selected.
Change the logic to auto-select the core support for those drivers, as this is a way more intuitive.
It should be noticed that, as now both
DVB_COREandVIDEO_DEVdefaults depends on selecting a hybrid cards, we had to remove the explicit dependencies there, in order to avoid circular dependencies. In order to get it right, we used a little trick, to ensure that the core will be built as "y" if any driver was built with "y".
Quoted 3 lines
Note: while here, moved two pure V4L2 PCI drivers out of the "hybrid" part of config and consider pvrusb2 as an hybrid device.
Found some issues on this patch. Please ignore it.
I'm trying to see if are there any other way of doing that without incurring into circular dependencies nor allowing errors at build time or warnings at make menuconfig time.
I remember I tried to do something like that in the past, but the dependency chain is too complex.
Suggestions are welcomed.
Regards,
Mauro
Re: [PATCH v3 15/22] media: Kconfig: move media controller core select to main Kconfig
In reply to Sakari AilusEm Wed, 25 Mar 2020 12:00:59 +0200
Sakari Ailus <[email protected]> escreveu:
Quoted 57 lines
Hi Mauro,
Quoted 39 lines · Mauro Carvalho Chehab
Let's place the main API selections at the media/Kconfig file, as this way we can better organize things.
Signed-off-by Mauro Carvalho Chehab <[email protected]>--- drivers/media/Kconfig | 9 +++++++++ drivers/media/mc/Kconfig | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-)drivers/media/Kconfig +9
-0@@ -144,6 +144,15 @@ config VIDEO_DEV depends on MEDIA_SUPPORT default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT +config MEDIA_CONTROLLER + bool "Media Controller API" + depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT + help + Enable the media controller API used to query media devices internal + topology and configure it dynamically. + + This API is mostly used by camera interfaces in embedded platforms. + source "drivers/media/v4l2-core/Kconfig" #drivers/media/mc/Kconfig +0
-2@@ -3,15 +3,6 @@ # Selectable only for webcam/grabbers, as other drivers don't use it # -config MEDIA_CONTROLLER - bool "Media Controller API"drivers/media/mc/Kconfig line 8
Quoted 10 lines
drivers/media/mc/Kconfig +0
-7- depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT - help - Enable the media controller API used to query media devices internal - topology and configure it dynamically. - - This API is mostly used by camera interfaces in embedded platforms. - config MEDIA_CONTROLLER_DVB bool "Enable Media controller for DVB (EXPERIMENTAL)" depends on MEDIA_CONTROLLER && DVB_COREThis moves the main MC configuration out of the directory but leaves the rest of the MC configuration under the mc directory. All MC related configuration is currently in a single place, which makes sense.
Quoted 2 lines
I guess you can always have arguments for and against, but my preference is keeping it as-is.
Well, the advantage (after applying the entire series), is that it can now present two separate menus:
the first one with the core stuff (MC, V4L and DVB), and a second one with the extra features for those three.
Btw, it just occurred to me that perhaps we could map it on a different way, using a menu for MC, another one for V4L and a third one for DVB.
In any case, in order to do that, we need to have the "extra" features on a separate file than the main ones.
Thanks,
Mauro
Re: [PATCH v3 15/22] media: Kconfig: move media controller core select to main Kconfig
Em Wed, 25 Mar 2020 11:08:34 +0100
Mauro Carvalho Chehab <[email protected]> escreveu:
Quoted 63 lines
Em Wed, 25 Mar 2020 12:00:59 +0200
Sakari Ailus <[email protected]> escreveu:Quoted 57 lines
Hi Mauro,
Quoted 39 lines · Mauro Carvalho Chehab
Let's place the main API selections at the media/Kconfig file, as this way we can better organize things.
Signed-off-by Mauro Carvalho Chehab <[email protected]>--- drivers/media/Kconfig | 9 +++++++++ drivers/media/mc/Kconfig | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-)drivers/media/Kconfig +9
-0@@ -144,6 +144,15 @@ config VIDEO_DEV depends on MEDIA_SUPPORT default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT +config MEDIA_CONTROLLER + bool "Media Controller API" + depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT + help + Enable the media controller API used to query media devices internal + topology and configure it dynamically. + + This API is mostly used by camera interfaces in embedded platforms. + source "drivers/media/v4l2-core/Kconfig" #drivers/media/mc/Kconfig +0
-2@@ -3,15 +3,6 @@ # Selectable only for webcam/grabbers, as other drivers don't use it # -config MEDIA_CONTROLLER - bool "Media Controller API"drivers/media/mc/Kconfig line 8
Quoted 10 lines
drivers/media/mc/Kconfig +0
-7- depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT - help - Enable the media controller API used to query media devices internal - topology and configure it dynamically. - - This API is mostly used by camera interfaces in embedded platforms. - config MEDIA_CONTROLLER_DVB bool "Enable Media controller for DVB (EXPERIMENTAL)" depends on MEDIA_CONTROLLER && DVB_COREThis moves the main MC configuration out of the directory but leaves the rest of the MC configuration under the mc directory. All MC related configuration is currently in a single place, which makes sense.
Quoted 2 lines
I guess you can always have arguments for and against, but my preference is keeping it as-is.
Quoted 8 lines
Well, the advantage (after applying the entire series), is that it can now present two separate menus:
the first one with the core stuff (MC, V4L and DVB), and a second one with the extra features for those three.
Btw, it just occurred to me that perhaps we could map it on a different way, using a menu for MC, another one for V4L and a third one for DVB.
What occurred to me is shown at the patch below (applied after this patch series).
IMHO, it is a way better to present things like that.
Thanks,
Mauro
[PATCH] media: Kconfig: Better organize the per-API options
After this change, the menu is displayed like above.
1) When filtering is not active:
--- Multimedia support
[ ] Filter devices by their types
[*] Autoselect ancillary drivers (tuners, sensors, i2c, spi, frontends)
Media core support --->
Video4Linux options --->
Media controller options --->
Digital TV options --->
HDMI CEC options --->
Media drivers --->2) When filtering is active:
--- Multimedia support
[*] Filter devices by their types
[*] Autoselect ancillary drivers (tuners, sensors, i2c, spi, frontends)
Media device types --->
Video4Linux options --->
Media controller options --->
Digital TV options --->
HDMI CEC options --->
Media drivers --->drivers/media/Kconfig +10 -1
@@ -184,10 +184,19 @@ endmenu # Media core support # # Extra per-media API core functionality -menu "Media core additional options" +menu "Video4Linux options" source "drivers/media/v4l2-core/Kconfig" +endmenu + +menu "Media controller options" source "drivers/media/mc/Kconfig" +endmenu + +menu "Digital TV options" source "drivers/media/dvb-core/Kconfig" +endmenu + +menu "HDMI CEC options" source "drivers/media/cec/Kconfig" endmenu
PATCH v3 22/22 media: Kconfig: better support hybrid TV devices
In reply to Mauro Carvalho ChehabRight now, if one has an hybrid TV card, it has to select both analog and digital TV support, as otherwise the needed core support won't be selected.
Change the logic to auto-select the core support for those drivers, as this is a way more intuitive.
It should be noticed that, as now both DVB_CORE and VIDEO_DEV defaults depends on selecting a hybrid cards, we had to remove the explicit dependencies there, in order to avoid circular dependencies.
That requires some tricks:
1) the prompt should not be not visible when an hybrid card is selected, as the user shold not change it.
2) When a media hybrid device is selected, the modular option for DVB_CORE and VIDEO_DEV will follow the MEDIA_SUPPORT dependency, as we can't have a core built with "y" with a driver built as module.
Note: while here, moved two pure V4L2 PCI drivers out of the "hybrid" part of config and consider pvrusb2 as an hybrid device.
---
The original version of this patch had an issue: hybrid support would do the wrong thing when filter option is turned off, as it would be possible for an user to first select an hybrid card and then disable either V4L2 or DVB support.
So, this version makes the prompt invisible, replacing it by a comment, when an hybrid TV card is selected.
drivers/media/Kconfig | 30 ++++++++++++++---------------- drivers/media/pci/Kconfig | 11 +++++++++-- drivers/media/pci/bt8xx/Kconfig | 5 ++--- drivers/media/pci/cx18/Kconfig | 2 +- drivers/media/pci/cx23885/Kconfig | 4 ++-- drivers/media/pci/cx88/Kconfig | 4 ++-- drivers/media/pci/saa7134/Kconfig | 4 ++-- drivers/media/pci/saa7164/Kconfig | 2 +- drivers/media/usb/Kconfig | 8 +++++++- drivers/media/usb/au0828/Kconfig | 6 ++---- drivers/media/usb/cx231xx/Kconfig | 4 ++-- drivers/media/usb/pvrusb2/Kconfig | 4 ++-- drivers/media/usb/tm6000/Kconfig | 4 ++-- 13 files changed, 48 insertions(+), 40 deletions(-)
drivers/media/Kconfig +14 -16
@@ -76,12 +76,7 @@ config MEDIA_ANALOG_TV_SUPPORT help Enable analog TV support. - Say Y when you have a TV board with analog support or with a - hybrid analog/digital TV chipset. - - Note: There are several DVB cards that are based on chips that - support both analog and digital TV. Disabling this option - will disable support for them. + Say Y when you have a board with analog TV support. config MEDIA_DIGITAL_TV_SUPPORT bool "Digital TV"
@@ -89,8 +84,7 @@ config MEDIA_DIGITAL_TV_SUPPORT help Enable digital TV support. - Say Y when you have a board with digital support or a board with - hybrid digital TV and analog TV. + Say Y when you have a board with digital TV support. config MEDIA_RADIO_SUPPORT bool "AM/FM radio receivers/transmitters"
@@ -103,10 +97,6 @@ config MEDIA_RADIO_SUPPORT Say Y when you have a board with radio support. - Note: There are several TV cards that are based on chips that - support radio reception. Disabling this option will - disable support for them. - config MEDIA_SDR_SUPPORT bool "Software defined radio" default y if !MEDIA_SUPPORT_FILTER
@@ -154,9 +144,13 @@ endmenu # media device types menu "Media core support" visible if !MEDIA_SUPPORT_FILTER +comment "Video4Linux core enabled to support hybrid TV devices" + depends on MEDIA_HYBRID_USB || MEDIA_HYBRID_PCI + config VIDEO_DEV - tristate "Video4Linux core" - default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT + tristate + prompt "Video4Linux core" if !(MEDIA_HYBRID_USB || MEDIA_HYBRID_PCI) + default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT || MEDIA_HYBRID_USB || MEDIA_HYBRID_PCI help Enables the V4L2 API, used by cameras, analog TV, video grabbers, radio devices and by some input devices.
@@ -170,9 +164,13 @@ config MEDIA_CONTROLLER This API is mostly used by camera interfaces in embedded platforms. +comment "Digital TV core enabled to support hybrid TV devices" + depends on MEDIA_HYBRID_USB || MEDIA_HYBRID_PCI + config DVB_CORE - tristate "Digital TV core" - default MEDIA_DIGITAL_TV_SUPPORT + tristate + prompt "Digital TV core" if !(MEDIA_HYBRID_USB || MEDIA_HYBRID_PCI) + default MEDIA_DIGITAL_TV_SUPPORT || MEDIA_HYBRID_USB || MEDIA_HYBRID_PCI depends on (I2C || I2C=n) select CRC32 help
drivers/media/pci/Kconfig +9 -2
@@ -1,4 +1,11 @@ # SPDX-License-Identifier: GPL-2.0-only + +# Should match the hybrid card list below +config MEDIA_HYBRID_PCI + bool + depends on VIDEO_CX18 || VIDEO_CX23885 || VIDEO_CX88 || VIDEO_BT848 || VIDEO_SAA7134 || VIDEO_SAA7164 + default y + if PCI && MEDIA_SUPPORT menuconfig MEDIA_PCI_SUPPORT
@@ -24,18 +31,18 @@ if MEDIA_ANALOG_TV_SUPPORT source "drivers/media/pci/ivtv/Kconfig" source "drivers/media/pci/saa7146/Kconfig" source "drivers/media/pci/dt3155/Kconfig" +source "drivers/media/pci/cx25821/Kconfig" +source "drivers/media/pci/cobalt/Kconfig" endif if MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT comment "Media capture/analog/hybrid TV support" source "drivers/media/pci/cx18/Kconfig" source "drivers/media/pci/cx23885/Kconfig" -source "drivers/media/pci/cx25821/Kconfig" source "drivers/media/pci/cx88/Kconfig" source "drivers/media/pci/bt8xx/Kconfig" source "drivers/media/pci/saa7134/Kconfig" source "drivers/media/pci/saa7164/Kconfig" -source "drivers/media/pci/cobalt/Kconfig" endif
drivers/media/pci/bt8xx/Kconfig +2 -3
@@ -1,11 +1,10 @@ # SPDX-License-Identifier: GPL-2.0-only config VIDEO_BT848 tristate "BT848 Video For Linux" - depends on VIDEO_DEV && PCI && I2C && VIDEO_V4L2 + depends on PCI && I2C select I2C_ALGOBIT select VIDEOBUF_DMA_SG depends on RC_CORE - depends on MEDIA_RADIO_SUPPORT select VIDEO_TUNER select VIDEO_TVEEPROM select VIDEO_MSP3400 if MEDIA_SUBDRV_AUTOSELECT
@@ -24,7 +23,7 @@ config VIDEO_BT848 config DVB_BT8XX tristate "DVB/ATSC Support for bt878 based TV cards" - depends on DVB_CORE && PCI && I2C && VIDEO_BT848 + depends on PCI && I2C && VIDEO_BT848 select DVB_MT352 if MEDIA_SUBDRV_AUTOSELECT select DVB_SP887X if MEDIA_SUBDRV_AUTOSELECT select DVB_NXT6000 if MEDIA_SUBDRV_AUTOSELECT
drivers/media/pci/cx18/Kconfig +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config VIDEO_CX18 tristate "Conexant cx23418 MPEG encoder support" - depends on VIDEO_V4L2 && DVB_CORE && PCI && I2C + depends on PCI && I2C select I2C_ALGOBIT select VIDEOBUF_VMALLOC depends on RC_CORE
drivers/media/pci/cx23885/Kconfig +2 -2
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config VIDEO_CX23885 tristate "Conexant cx23885 (2388x successor) support" - depends on DVB_CORE && VIDEO_DEV && PCI && I2C && INPUT && SND + depends on PCI && I2C && INPUT && SND select SND_PCM select I2C_ALGOBIT select VIDEO_TUNER
@@ -53,7 +53,7 @@ config VIDEO_CX23885 config MEDIA_ALTERA_CI tristate "Altera FPGA based CI module" - depends on VIDEO_CX23885 && DVB_CORE + depends on VIDEO_CX23885 select ALTERA_STAPL help An Altera FPGA CI module for NetUP Dual DVB-T/C RF CI card.
drivers/media/pci/cx88/Kconfig +2 -2
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config VIDEO_CX88 tristate "Conexant 2388x (bt878 successor) support" - depends on VIDEO_DEV && PCI && I2C && RC_CORE + depends on PCI && I2C && RC_CORE select I2C_ALGOBIT select VIDEOBUF2_DMA_SG select VIDEO_TUNER
@@ -44,7 +44,7 @@ config VIDEO_CX88_BLACKBIRD config VIDEO_CX88_DVB tristate "DVB/ATSC Support for cx2388x based TV cards" - depends on VIDEO_CX88 && DVB_CORE + depends on VIDEO_CX88 select VIDEOBUF2_DVB select DVB_PLL if MEDIA_SUBDRV_AUTOSELECT select DVB_MT352 if MEDIA_SUBDRV_AUTOSELECT
drivers/media/pci/saa7134/Kconfig +2 -2
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config VIDEO_SAA7134 tristate "Philips SAA7134 support" - depends on VIDEO_DEV && PCI && I2C + depends on PCI && I2C select VIDEOBUF2_DMA_SG select VIDEO_TUNER select VIDEO_TVEEPROM
@@ -37,7 +37,7 @@ config VIDEO_SAA7134_RC config VIDEO_SAA7134_DVB tristate "DVB/ATSC Support for saa7134 based TV cards" - depends on VIDEO_SAA7134 && DVB_CORE + depends on VIDEO_SAA7134 select VIDEOBUF2_DVB select DVB_PLL if MEDIA_SUBDRV_AUTOSELECT select DVB_MT352 if MEDIA_SUBDRV_AUTOSELECT
drivers/media/pci/saa7164/Kconfig +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config VIDEO_SAA7164 tristate "NXP SAA7164 support" - depends on DVB_CORE && VIDEO_DEV && PCI && I2C + depends on PCI && I2C select I2C_ALGOBIT select FW_LOADER select VIDEO_TUNER
drivers/media/usb/Kconfig +7 -1
@@ -5,6 +5,12 @@ config TTPCI_EEPROM tristate depends on I2C +# Should match the hybrid card list below +config MEDIA_HYBRID_USB + bool + depends on VIDEO_AU0828 || VIDEO_CX231XX || VIDEO_TM6000 || VIDEO_PVRUSB2 + default y + if USB && MEDIA_SUPPORT menuconfig MEDIA_USB_SUPPORT
@@ -29,7 +35,6 @@ endif if MEDIA_ANALOG_TV_SUPPORT comment "Analog TV USB devices" -source "drivers/media/usb/pvrusb2/Kconfig" source "drivers/media/usb/hdpvr/Kconfig" source "drivers/media/usb/stk1160/Kconfig" source "drivers/media/usb/go7007/Kconfig"
@@ -39,6 +44,7 @@ if (MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT) comment "Analog/digital TV USB devices" source "drivers/media/usb/au0828/Kconfig" source "drivers/media/usb/cx231xx/Kconfig" +source "drivers/media/usb/pvrusb2/Kconfig" source "drivers/media/usb/tm6000/Kconfig" endif
drivers/media/usb/au0828/Kconfig +2 -4
@@ -2,12 +2,12 @@ config VIDEO_AU0828 tristate "Auvitek AU0828 support" - depends on I2C && INPUT && DVB_CORE && USB && VIDEO_V4L2 + depends on I2C && INPUT && USB select MEDIA_CONTROLLER select MEDIA_CONTROLLER_DVB select I2C_ALGOBIT select VIDEO_TVEEPROM - select VIDEOBUF2_VMALLOC if VIDEO_V4L2 + select VIDEOBUF2_VMALLOC select DVB_AU8522_DTV if MEDIA_SUBDRV_AUTOSELECT select MEDIA_TUNER_XC5000 if MEDIA_SUBDRV_AUTOSELECT select MEDIA_TUNER_MXL5007T if MEDIA_SUBDRV_AUTOSELECT
@@ -22,8 +22,6 @@ config VIDEO_AU0828 config VIDEO_AU0828_V4L2 bool "Auvitek AU0828 v4l2 analog video support" depends on VIDEO_AU0828 - depends on VIDEO_V4L2=y || VIDEO_V4L2=VIDEO_AU0828 - select DVB_AU8522_V4L if MEDIA_SUBDRV_AUTOSELECT select VIDEO_TUNER default y help
drivers/media/usb/cx231xx/Kconfig +2 -2
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config VIDEO_CX231XX tristate "Conexant cx231xx USB video capture support" - depends on VIDEO_DEV && I2C && I2C_MUX + depends on I2C && I2C_MUX select VIDEO_TUNER select VIDEO_TVEEPROM select VIDEOBUF2_VMALLOC
@@ -40,7 +40,7 @@ config VIDEO_CX231XX_ALSA config VIDEO_CX231XX_DVB tristate "DVB/ATSC Support for Cx231xx based TV cards" - depends on VIDEO_CX231XX && DVB_CORE + depends on VIDEO_CX231XX select MEDIA_TUNER_XC5000 if MEDIA_SUBDRV_AUTOSELECT select MEDIA_TUNER_TDA18271 if MEDIA_SUBDRV_AUTOSELECT select DVB_MB86A20S if MEDIA_SUBDRV_AUTOSELECT
drivers/media/usb/pvrusb2/Kconfig +2 -2
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config VIDEO_PVRUSB2 tristate "Hauppauge WinTV-PVR USB2 support" - depends on VIDEO_V4L2 && I2C + depends on I2C select VIDEO_TUNER select VIDEO_TVEEPROM select VIDEO_CX2341X
@@ -36,7 +36,7 @@ config VIDEO_PVRUSB2_SYSFS config VIDEO_PVRUSB2_DVB bool "pvrusb2 ATSC/DVB support" default y - depends on VIDEO_PVRUSB2 && DVB_CORE + depends on VIDEO_PVRUSB2 select DVB_LGDT330X if MEDIA_SUBDRV_AUTOSELECT select DVB_S5H1409 if MEDIA_SUBDRV_AUTOSELECT select DVB_S5H1411 if MEDIA_SUBDRV_AUTOSELECT
drivers/media/usb/tm6000/Kconfig +2 -2
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config VIDEO_TM6000 tristate "TV Master TM5600/6000/6010 driver" - depends on VIDEO_DEV && I2C && INPUT && RC_CORE && USB + depends on I2C && INPUT && RC_CORE && USB select VIDEO_TUNER select MEDIA_TUNER_XC2028 select MEDIA_TUNER_XC5000
@@ -28,7 +28,7 @@ config VIDEO_TM6000_ALSA config VIDEO_TM6000_DVB tristate "DVB Support for tm6000 based TV cards" - depends on VIDEO_TM6000 && DVB_CORE && USB + depends on VIDEO_TM6000 && USB select DVB_ZL10353 help This adds support for DVB cards based on the tm5600/tm6000 chip.
Signature · 1 line
2.25.1
Re: [PATCH v3 17/22] media: Kconfig: mode firewire comment to firewire/Kconfig
In reply to Mauro Carvalho ChehabQuoted 4 lines · On Mar 25 Mauro Carvalho Chehab wrote:
This comment should only be visible if the
DVB_FIREDTVconfig will show.Signed-off-by Mauro Carvalho Chehab <[email protected]>
Quoted 38 lines
--- drivers/media/Kconfig | 2 -- drivers/media/firewire/Kconfig | 5 ++++- 2 files changed, 4 insertions(+), 3 deletions(-)drivers/media/Kconfig +0
-2@@ -185,8 +185,6 @@ source "drivers/media/mmc/Kconfig" endif -comment "FireWire (IEEE 1394) Adapters" - depends on DVB_CORE && FIREWIRE source "drivers/media/firewire/Kconfig" comment "Media ancillary drivers (tuners, sensors, i2c, spi, frontends)"drivers/media/firewire/Kconfig +4
-1@@ -1,7 +1,9 @@ # SPDX-License-Identifier: GPL-2.0-only +if DVB_CORE && FIREWIRE +comment "FireWire (IEEE 1394) Adapters" + config DVB_FIREDTV tristate "FireDTV and FloppyDTV" - depends on DVB_CORE && FIREWIRE help Support for DVB receivers from Digital Everywhere which are connected via IEEE 1394 (FireWire).@@ -18,3 +20,4 @@ config DVB_FIREDTV_INPUT def_bool INPUT = y || (INPUT = m && DVB_FIREDTV = m) endif # DVB_FIREDTV +endif # DVB_CORE && FIREWIRE
Signature · 3 lines
Stefan Richter -======--=-- --== ==-=- http://arcgraph.de/sr/
Sakari Ailus
maintainerRe: [PATCH v3 15/22] media: Kconfig: move media controller core select to main Kconfig
In reply to Mauro Carvalho ChehabQuoted 72 lines · Mauro Carvalho Chehab
Em Wed, 25 Mar 2020 11:08:34 +0100
Mauro Carvalho Chehab <[email protected]> escreveu:Quoted 69 lines
Em Wed, 25 Mar 2020 12:00:59 +0200
Sakari Ailus <[email protected]> escreveu:Quoted 57 lines
Hi Mauro,
Quoted 39 lines · Mauro Carvalho Chehab
Let's place the main API selections at the media/Kconfig file, as this way we can better organize things.
Signed-off-by Mauro Carvalho Chehab <[email protected]>--- drivers/media/Kconfig | 9 +++++++++ drivers/media/mc/Kconfig | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-)drivers/media/Kconfig +9
-0@@ -144,6 +144,15 @@ config VIDEO_DEV depends on MEDIA_SUPPORT default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT +config MEDIA_CONTROLLER + bool "Media Controller API" + depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT + help + Enable the media controller API used to query media devices internal + topology and configure it dynamically. + + This API is mostly used by camera interfaces in embedded platforms. + source "drivers/media/v4l2-core/Kconfig" #drivers/media/mc/Kconfig +0
-2@@ -3,15 +3,6 @@ # Selectable only for webcam/grabbers, as other drivers don't use it # -config MEDIA_CONTROLLER - bool "Media Controller API"drivers/media/mc/Kconfig line 8
Quoted 10 lines
drivers/media/mc/Kconfig +0
-7- depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT - help - Enable the media controller API used to query media devices internal - topology and configure it dynamically. - - This API is mostly used by camera interfaces in embedded platforms. - config MEDIA_CONTROLLER_DVB bool "Enable Media controller for DVB (EXPERIMENTAL)" depends on MEDIA_CONTROLLER && DVB_COREThis moves the main MC configuration out of the directory but leaves the rest of the MC configuration under the mc directory. All MC related configuration is currently in a single place, which makes sense.
Quoted 2 lines
I guess you can always have arguments for and against, but my preference is keeping it as-is.
Well, the advantage (after applying the entire series), is that it can now present two separate menus:
the first one with the core stuff (MC, V4L and DVB), and a second one with the extra features for those three.
Quoted 7 lines
Quoted 2 lines
Btw, it just occurred to me that perhaps we could map it on a different way, using a menu for MC, another one for V4L and a third one for DVB.
What occurred to me is shown at the patch below (applied after this patch series).
IMHO, it is a way better to present things like that.
Ok; makes sense. I only thought of this Kconfig organisation point of view, in terms of files.
It seems there's a more active discussion going on elsewhere, and perhaps it's better to continue there.
Signature · 3 lines
Kind regards, Sakari Ailus