162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only
262306a36Sopenharmony_ci#
362306a36Sopenharmony_ci# Multimedia device configuration
462306a36Sopenharmony_ci#
562306a36Sopenharmony_ci
662306a36Sopenharmony_ci#
762306a36Sopenharmony_ci# NOTE: CEC and Remote Controller support should not depend on MEDIA_SUPPORT
862306a36Sopenharmony_ci#
962306a36Sopenharmony_cisource "drivers/media/rc/Kconfig"
1062306a36Sopenharmony_cisource "drivers/media/cec/Kconfig"
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_cimenuconfig MEDIA_SUPPORT
1362306a36Sopenharmony_ci	tristate "Multimedia support"
1462306a36Sopenharmony_ci	depends on HAS_IOMEM
1562306a36Sopenharmony_ci	help
1662306a36Sopenharmony_ci	  If you want to use media devices, including Webcams, Video grabber
1762306a36Sopenharmony_ci	  devices and/or TV devices, V4L2 codecs, etc, enable this option
1862306a36Sopenharmony_ci	  and other options below.
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ci	  Additional info and docs are available on the web at
2162306a36Sopenharmony_ci	  <https://linuxtv.org>
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_ciif MEDIA_SUPPORT
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ciconfig MEDIA_SUPPORT_FILTER
2662306a36Sopenharmony_ci	bool "Filter media drivers"
2762306a36Sopenharmony_ci	default y if !EXPERT
2862306a36Sopenharmony_ci	help
2962306a36Sopenharmony_ci	   Configuring the media subsystem can be complex, as there are
3062306a36Sopenharmony_ci	   hundreds of drivers and other config options.
3162306a36Sopenharmony_ci
3262306a36Sopenharmony_ci	   This menu offers option that will help the Kernel's config
3362306a36Sopenharmony_ci	   system to hide drivers that are out of the scope of the
3462306a36Sopenharmony_ci	   user needs, and disabling core support for unused APIs.
3562306a36Sopenharmony_ci
3662306a36Sopenharmony_ci	   If not selected, all non-optional media core functionality
3762306a36Sopenharmony_ci	   needed to support media drivers will be enabled. Also, all
3862306a36Sopenharmony_ci	   media device drivers should be shown.
3962306a36Sopenharmony_ci
4062306a36Sopenharmony_ciconfig MEDIA_SUBDRV_AUTOSELECT
4162306a36Sopenharmony_ci	bool "Autoselect ancillary drivers (tuners, sensors, i2c, spi, frontends)"
4262306a36Sopenharmony_ci	depends on HAS_IOMEM
4362306a36Sopenharmony_ci	select I2C
4462306a36Sopenharmony_ci	select I2C_MUX
4562306a36Sopenharmony_ci	default y if MEDIA_SUPPORT_FILTER
4662306a36Sopenharmony_ci	help
4762306a36Sopenharmony_ci	  By default, a media driver auto-selects all possible ancillary
4862306a36Sopenharmony_ci	  devices such as tuners, sensors, video encoders/decoders and
4962306a36Sopenharmony_ci	  frontends, that are used by any of the supported devices.
5062306a36Sopenharmony_ci
5162306a36Sopenharmony_ci	  This is generally the right thing to do, except when there
5262306a36Sopenharmony_ci	  are strict constraints with regards to the kernel size,
5362306a36Sopenharmony_ci	  like on embedded systems.
5462306a36Sopenharmony_ci
5562306a36Sopenharmony_ci	  Use this option with care, as deselecting ancillary drivers which
5662306a36Sopenharmony_ci	  are, in fact, necessary will result in the lack of the needed
5762306a36Sopenharmony_ci	  functionality for your device (it may not tune or may not have
5862306a36Sopenharmony_ci	  the needed demodulators).
5962306a36Sopenharmony_ci
6062306a36Sopenharmony_ci	  If unsure say Y.
6162306a36Sopenharmony_ci
6262306a36Sopenharmony_cimenu "Media device types"
6362306a36Sopenharmony_ci
6462306a36Sopenharmony_ci#
6562306a36Sopenharmony_ci# Multimedia support - automatically enable V4L2 and DVB core
6662306a36Sopenharmony_ci#
6762306a36Sopenharmony_ciconfig MEDIA_CAMERA_SUPPORT
6862306a36Sopenharmony_ci	bool
6962306a36Sopenharmony_ci	prompt "Cameras and video grabbers" if MEDIA_SUPPORT_FILTER
7062306a36Sopenharmony_ci	default y if !MEDIA_SUPPORT_FILTER
7162306a36Sopenharmony_ci	help
7262306a36Sopenharmony_ci	  Enable support for webcams and video grabbers.
7362306a36Sopenharmony_ci
7462306a36Sopenharmony_ci	  Say Y when you have a webcam or a video capture grabber board.
7562306a36Sopenharmony_ci
7662306a36Sopenharmony_ciconfig MEDIA_ANALOG_TV_SUPPORT
7762306a36Sopenharmony_ci	bool
7862306a36Sopenharmony_ci	prompt "Analog TV" if MEDIA_SUPPORT_FILTER
7962306a36Sopenharmony_ci	default y if !MEDIA_SUPPORT_FILTER
8062306a36Sopenharmony_ci	help
8162306a36Sopenharmony_ci	  Enable analog TV support.
8262306a36Sopenharmony_ci
8362306a36Sopenharmony_ci	  Say Y when you have a TV board with analog support or with a
8462306a36Sopenharmony_ci	  hybrid analog/digital TV chipset.
8562306a36Sopenharmony_ci
8662306a36Sopenharmony_ci	  Note: There are several DVB cards that are based on chips that
8762306a36Sopenharmony_ci		support both analog and digital TV. Disabling this option
8862306a36Sopenharmony_ci		will disable support for them.
8962306a36Sopenharmony_ci
9062306a36Sopenharmony_ciconfig MEDIA_DIGITAL_TV_SUPPORT
9162306a36Sopenharmony_ci	bool
9262306a36Sopenharmony_ci	prompt "Digital TV" if MEDIA_SUPPORT_FILTER
9362306a36Sopenharmony_ci	default y if !MEDIA_SUPPORT_FILTER
9462306a36Sopenharmony_ci	help
9562306a36Sopenharmony_ci	  Enable digital TV support.
9662306a36Sopenharmony_ci
9762306a36Sopenharmony_ci	  Say Y when you have a board with digital support or a board with
9862306a36Sopenharmony_ci	  hybrid digital TV and analog TV.
9962306a36Sopenharmony_ci
10062306a36Sopenharmony_ciconfig MEDIA_RADIO_SUPPORT
10162306a36Sopenharmony_ci	bool
10262306a36Sopenharmony_ci	prompt "AM/FM radio receivers/transmitters" if MEDIA_SUPPORT_FILTER
10362306a36Sopenharmony_ci	default y if !MEDIA_SUPPORT_FILTER
10462306a36Sopenharmony_ci	help
10562306a36Sopenharmony_ci	  Enable AM/FM radio support.
10662306a36Sopenharmony_ci
10762306a36Sopenharmony_ci	  Additional info and docs are available on the web at
10862306a36Sopenharmony_ci	  <https://linuxtv.org>
10962306a36Sopenharmony_ci
11062306a36Sopenharmony_ci	  Say Y when you have a board with radio support.
11162306a36Sopenharmony_ci
11262306a36Sopenharmony_ci	  Note: There are several TV cards that are based on chips that
11362306a36Sopenharmony_ci		support radio reception. Disabling this option will
11462306a36Sopenharmony_ci		disable support for them.
11562306a36Sopenharmony_ci
11662306a36Sopenharmony_ciconfig MEDIA_SDR_SUPPORT
11762306a36Sopenharmony_ci	bool
11862306a36Sopenharmony_ci	prompt "Software defined radio" if MEDIA_SUPPORT_FILTER
11962306a36Sopenharmony_ci	default y if !MEDIA_SUPPORT_FILTER
12062306a36Sopenharmony_ci	help
12162306a36Sopenharmony_ci	  Enable software defined radio support.
12262306a36Sopenharmony_ci
12362306a36Sopenharmony_ci	  Say Y when you have a software defined radio device.
12462306a36Sopenharmony_ci
12562306a36Sopenharmony_ciconfig MEDIA_PLATFORM_SUPPORT
12662306a36Sopenharmony_ci	bool
12762306a36Sopenharmony_ci	prompt "Platform-specific devices" if MEDIA_SUPPORT_FILTER
12862306a36Sopenharmony_ci	default y if !MEDIA_SUPPORT_FILTER
12962306a36Sopenharmony_ci	help
13062306a36Sopenharmony_ci	  Enable support for complex cameras, codecs, and other hardware
13162306a36Sopenharmony_ci	  that are integrated at the CPU, GPU or on Image Signalling Processor
13262306a36Sopenharmony_ci	  and don't use PCI, USB or Firewire buses.
13362306a36Sopenharmony_ci
13462306a36Sopenharmony_ci	  This is found on Embedded hardware (SoC), on V4L2 codecs and
13562306a36Sopenharmony_ci	  on some GPU and newer CPU chipsets.
13662306a36Sopenharmony_ci
13762306a36Sopenharmony_ci	  Say Y when you want to be able to see such devices.
13862306a36Sopenharmony_ci
13962306a36Sopenharmony_ciconfig MEDIA_TEST_SUPPORT
14062306a36Sopenharmony_ci	bool
14162306a36Sopenharmony_ci	prompt "Test drivers" if MEDIA_SUPPORT_FILTER
14262306a36Sopenharmony_ci	default y if !MEDIA_SUPPORT_FILTER
14362306a36Sopenharmony_ci	help
14462306a36Sopenharmony_ci	  These drivers should not be used on production kernels, but
14562306a36Sopenharmony_ci	  can be useful on debug ones. This option enables several dummy drivers
14662306a36Sopenharmony_ci	  that simulate real hardware. Very useful to test userspace
14762306a36Sopenharmony_ci	  applications and to validate if the subsystem core doesn't
14862306a36Sopenharmony_ci	  have regressions.
14962306a36Sopenharmony_ci
15062306a36Sopenharmony_ci	  Say Y if you want to use some virtual test driver.
15162306a36Sopenharmony_ci
15262306a36Sopenharmony_ci	  In case of doubts, say N.
15362306a36Sopenharmony_ci	  Say Y when you have a software defined radio device.
15462306a36Sopenharmony_ciendmenu # media device types
15562306a36Sopenharmony_ci
15662306a36Sopenharmony_ci
15762306a36Sopenharmony_cimenu "Media core support"
15862306a36Sopenharmony_ci	visible if !MEDIA_SUPPORT_FILTER
15962306a36Sopenharmony_ci
16062306a36Sopenharmony_ciconfig VIDEO_DEV
16162306a36Sopenharmony_ci	tristate "Video4Linux core"
16262306a36Sopenharmony_ci	default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT || MEDIA_TEST_SUPPORT
16362306a36Sopenharmony_ci	depends on (I2C || I2C=n)
16462306a36Sopenharmony_ci	select RATIONAL
16562306a36Sopenharmony_ci	select VIDEOBUF2_V4L2 if VIDEOBUF2_CORE
16662306a36Sopenharmony_ci	help
16762306a36Sopenharmony_ci	  Enables the V4L2 API, used by cameras, analog TV, video grabbers,
16862306a36Sopenharmony_ci	  radio devices and by some input devices.
16962306a36Sopenharmony_ci
17062306a36Sopenharmony_ciconfig MEDIA_CONTROLLER
17162306a36Sopenharmony_ci	bool "Media Controller API"
17262306a36Sopenharmony_ci	default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT || MEDIA_PLATFORM_SUPPORT
17362306a36Sopenharmony_ci	help
17462306a36Sopenharmony_ci	  Enable the media controller API used to query media devices internal
17562306a36Sopenharmony_ci	  topology and configure it dynamically.
17662306a36Sopenharmony_ci
17762306a36Sopenharmony_ci	  This API is mostly used by camera interfaces in embedded platforms.
17862306a36Sopenharmony_ci
17962306a36Sopenharmony_ci#
18062306a36Sopenharmony_ci# DVB Core
18162306a36Sopenharmony_ci#	Only enables if one of DTV is selected
18262306a36Sopenharmony_ci#
18362306a36Sopenharmony_ci
18462306a36Sopenharmony_ciconfig DVB_CORE
18562306a36Sopenharmony_ci	tristate "DVB Core"
18662306a36Sopenharmony_ci	depends on MEDIA_DIGITAL_TV_SUPPORT
18762306a36Sopenharmony_ci	depends on (I2C || I2C=n)
18862306a36Sopenharmony_ci	default MEDIA_DIGITAL_TV_SUPPORT
18962306a36Sopenharmony_ci	select CRC32
19062306a36Sopenharmony_ci	help
19162306a36Sopenharmony_ci	  Enables the DVB API, used by Digital TV devices. Supports several
19262306a36Sopenharmony_ci	  standards, including DVB, ATSC, ISDB and CMDB.
19362306a36Sopenharmony_ci
19462306a36Sopenharmony_ciendmenu # Media core support
19562306a36Sopenharmony_ci
19662306a36Sopenharmony_ci#
19762306a36Sopenharmony_ci# Extra per-media API core functionality
19862306a36Sopenharmony_ci
19962306a36Sopenharmony_cimenu "Video4Linux options"
20062306a36Sopenharmony_ci	visible if VIDEO_DEV
20162306a36Sopenharmony_ci
20262306a36Sopenharmony_cisource "drivers/media/v4l2-core/Kconfig"
20362306a36Sopenharmony_ciendmenu
20462306a36Sopenharmony_ci
20562306a36Sopenharmony_cimenu "Media controller options"
20662306a36Sopenharmony_ci	visible if MEDIA_CONTROLLER
20762306a36Sopenharmony_ci
20862306a36Sopenharmony_cisource "drivers/media/mc/Kconfig"
20962306a36Sopenharmony_ciendmenu
21062306a36Sopenharmony_ci
21162306a36Sopenharmony_cimenu "Digital TV options"
21262306a36Sopenharmony_ci	visible if DVB_CORE
21362306a36Sopenharmony_ci
21462306a36Sopenharmony_cisource "drivers/media/dvb-core/Kconfig"
21562306a36Sopenharmony_ciendmenu
21662306a36Sopenharmony_ci
21762306a36Sopenharmony_cimenu "Media drivers"
21862306a36Sopenharmony_ci
21962306a36Sopenharmony_cicomment "Drivers filtered as selected at 'Filter media drivers'"
22062306a36Sopenharmony_ci	depends on MEDIA_SUPPORT_FILTER
22162306a36Sopenharmony_ci
22262306a36Sopenharmony_cicomment "Media drivers"
22362306a36Sopenharmony_ci
22462306a36Sopenharmony_cisource "drivers/media/usb/Kconfig"
22562306a36Sopenharmony_cisource "drivers/media/pci/Kconfig"
22662306a36Sopenharmony_cisource "drivers/media/radio/Kconfig"
22762306a36Sopenharmony_ci
22862306a36Sopenharmony_ciif MEDIA_PLATFORM_SUPPORT
22962306a36Sopenharmony_cisource "drivers/media/platform/Kconfig"
23062306a36Sopenharmony_cisource "drivers/media/mmc/Kconfig"
23162306a36Sopenharmony_ciendif
23262306a36Sopenharmony_ci
23362306a36Sopenharmony_ciif MEDIA_TEST_SUPPORT
23462306a36Sopenharmony_cisource "drivers/media/test-drivers/Kconfig"
23562306a36Sopenharmony_ciendif
23662306a36Sopenharmony_ci
23762306a36Sopenharmony_cisource "drivers/media/firewire/Kconfig"
23862306a36Sopenharmony_ci
23962306a36Sopenharmony_ci# Common driver options
24062306a36Sopenharmony_cisource "drivers/media/common/Kconfig"
24162306a36Sopenharmony_ci
24262306a36Sopenharmony_ciendmenu
24362306a36Sopenharmony_ci
24462306a36Sopenharmony_ci#
24562306a36Sopenharmony_ci# Ancillary drivers (tuners, i2c, spi, frontends)
24662306a36Sopenharmony_ci#
24762306a36Sopenharmony_ci
24862306a36Sopenharmony_ciconfig MEDIA_HIDE_ANCILLARY_SUBDRV
24962306a36Sopenharmony_ci	bool
25062306a36Sopenharmony_ci	depends on MEDIA_SUBDRV_AUTOSELECT && !COMPILE_TEST && !EXPERT
25162306a36Sopenharmony_ci	default y
25262306a36Sopenharmony_ci
25362306a36Sopenharmony_cimenu "Media ancillary drivers"
25462306a36Sopenharmony_ci
25562306a36Sopenharmony_ciconfig MEDIA_ATTACH
25662306a36Sopenharmony_ci	bool
25762306a36Sopenharmony_ci	depends on MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT || MEDIA_RADIO_SUPPORT
25862306a36Sopenharmony_ci	depends on MODULES
25962306a36Sopenharmony_ci	default MODULES
26062306a36Sopenharmony_ci
26162306a36Sopenharmony_cisource "drivers/media/i2c/Kconfig"
26262306a36Sopenharmony_cisource "drivers/media/spi/Kconfig"
26362306a36Sopenharmony_cisource "drivers/media/tuners/Kconfig"
26462306a36Sopenharmony_cisource "drivers/media/dvb-frontends/Kconfig"
26562306a36Sopenharmony_ci
26662306a36Sopenharmony_ciendmenu
26762306a36Sopenharmony_ci
26862306a36Sopenharmony_ciendif # MEDIA_SUPPORT
269