xref: /openbmc/linux/drivers/media/Kconfig (revision 002dff36)
1# SPDX-License-Identifier: GPL-2.0-only
2#
3# Multimedia device configuration
4#
5
6#
7# NOTE: CEC and Remote Controller support should not depend on MEDIA_SUPPORT
8#
9source "drivers/media/rc/Kconfig"
10source "drivers/media/cec/Kconfig"
11
12menuconfig MEDIA_SUPPORT
13	tristate "Multimedia support"
14	depends on HAS_IOMEM
15	help
16	  If you want to use media devices, including Webcams, Video grabber
17	  devices and/or TV devices, V4L2 codecs, etc, enable this option
18	  and other options below.
19
20	  Additional info and docs are available on the web at
21	  <https://linuxtv.org>
22
23if MEDIA_SUPPORT
24
25config MEDIA_SUPPORT_FILTER
26	bool "Filter media drivers"
27	depends on MEDIA_SUPPORT
28	default y if !EMBEDDED && !EXPERT
29	help
30	   Configuring the media subsystem can be complex, as there are
31	   hundreds of drivers and other config options.
32
33	   This menu offers option that will help the Kernel's config
34	   system to hide drivers that are out of the scope of the
35	   user needs, and disabling core support for unused APIs.
36
37	   If not selected, all non-optional media core functionality
38	   needed to support media drivers will be enabled. Also, all
39	   media device drivers should be shown.
40
41config MEDIA_SUBDRV_AUTOSELECT
42	bool "Autoselect ancillary drivers (tuners, sensors, i2c, spi, frontends)"
43	depends on HAS_IOMEM
44	select I2C
45	select I2C_MUX
46	default y if MEDIA_SUPPORT_FILTER
47	help
48	  By default, a media driver auto-selects all possible ancillary
49	  devices such as tuners, sensors, video encoders/decoders and
50	  frontends, that are used by any of the supported devices.
51
52	  This is generally the right thing to do, except when there
53	  are strict constraints with regards to the kernel size,
54	  like on embedded systems.
55
56	  Use this option with care, as deselecting ancillary drivers which
57	  are, in fact, necessary will result in the lack of the needed
58	  functionality for your device (it may not tune or may not have
59	  the needed demodulators).
60
61	  If unsure say Y.
62
63menu "Media device types"
64
65#
66# Multimedia support - automatically enable V4L2 and DVB core
67#
68config MEDIA_CAMERA_SUPPORT
69	bool
70	prompt "Cameras and video grabbers" if MEDIA_SUPPORT_FILTER
71	default y if !MEDIA_SUPPORT_FILTER
72	help
73	  Enable support for webcams and video grabbers.
74
75	  Say Y when you have a webcam or a video capture grabber board.
76
77config MEDIA_ANALOG_TV_SUPPORT
78	bool
79	prompt "Analog TV" if MEDIA_SUPPORT_FILTER
80	default y if !MEDIA_SUPPORT_FILTER
81	help
82	  Enable analog TV support.
83
84	  Say Y when you have a TV board with analog support or with a
85	  hybrid analog/digital TV chipset.
86
87	  Note: There are several DVB cards that are based on chips that
88		support both analog and digital TV. Disabling this option
89		will disable support for them.
90
91config MEDIA_DIGITAL_TV_SUPPORT
92	bool
93	prompt "Digital TV" if MEDIA_SUPPORT_FILTER
94	default y if !MEDIA_SUPPORT_FILTER
95	help
96	  Enable digital TV support.
97
98	  Say Y when you have a board with digital support or a board with
99	  hybrid digital TV and analog TV.
100
101config MEDIA_RADIO_SUPPORT
102	bool
103	prompt "AM/FM radio receivers/transmitters" if MEDIA_SUPPORT_FILTER
104	default y if !MEDIA_SUPPORT_FILTER
105	help
106	  Enable AM/FM radio support.
107
108	  Additional info and docs are available on the web at
109	  <https://linuxtv.org>
110
111	  Say Y when you have a board with radio support.
112
113	  Note: There are several TV cards that are based on chips that
114		support radio reception. Disabling this option will
115		disable support for them.
116
117config MEDIA_SDR_SUPPORT
118	bool
119	prompt "Software defined radio" if MEDIA_SUPPORT_FILTER
120	default y if !MEDIA_SUPPORT_FILTER
121	help
122	  Enable software defined radio support.
123
124	  Say Y when you have a software defined radio device.
125
126config MEDIA_PLATFORM_SUPPORT
127	bool
128	prompt "Platform-specific devices" if MEDIA_SUPPORT_FILTER
129	default y if !MEDIA_SUPPORT_FILTER
130	help
131	  Enable support for complex cameras, codecs, and other hardware
132	  that are integrated at the CPU, GPU or on Image Signalling Processor
133	  and don't use PCI, USB or Firewire buses.
134
135	  This is found on Embedded hardware (SoC), on V4L2 codecs and
136	  on some GPU and newer CPU chipsets.
137
138	  Say Y when you want to be able so see such devices.
139
140config MEDIA_TEST_SUPPORT
141	bool
142	prompt "Test drivers" if MEDIA_SUPPORT_FILTER
143	default y if !MEDIA_SUPPORT_FILTER
144	help
145	  Those drivers should not be used on production Kernels, but
146	  can be useful on debug ones. It enables several dummy drivers
147	  that simulate a real hardware. Very useful to test userspace
148	  applications and to validate if the subsystem core is doesn't
149	  have regressions.
150
151	  Say Y if you want to use some virtual test driver.
152
153	  In case of doubts, say N.
154	  Say Y when you have a software defined radio device.
155endmenu # media device types
156
157
158menu "Media core support"
159	visible if !MEDIA_SUPPORT_FILTER
160
161config VIDEO_DEV
162	tristate "Video4Linux core"
163	default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT || MEDIA_TEST_SUPPORT
164	help
165	  Enables the V4L2 API, used by cameras, analog TV, video grabbers,
166	  radio devices and by some input devices.
167
168config MEDIA_CONTROLLER
169	bool "Media Controller API"
170	default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT || MEDIA_PLATFORM_SUPPORT
171	help
172	  Enable the media controller API used to query media devices internal
173	  topology and configure it dynamically.
174
175	  This API is mostly used by camera interfaces in embedded platforms.
176
177#
178# DVB Core
179#	Only enables if one of DTV is selected
180#
181
182config DVB_CORE
183	tristate
184	depends on MEDIA_DIGITAL_TV_SUPPORT
185	depends on (I2C || I2C=n)
186	default MEDIA_DIGITAL_TV_SUPPORT
187	select CRC32
188	help
189	  Enables the DVB API, used by Digital TV devices. Supports several
190	  standards, including DVB, ATSC, ISDB and CMDB.
191
192endmenu # Media core support
193
194#
195# Extra per-media API core functionality
196
197menu "Video4Linux options"
198	visible if VIDEO_DEV
199
200source "drivers/media/v4l2-core/Kconfig"
201endmenu
202
203menu "Media controller options"
204	visible if MEDIA_CONTROLLER
205
206source "drivers/media/mc/Kconfig"
207endmenu
208
209menu "Digital TV options"
210	visible if DVB_CORE
211
212source "drivers/media/dvb-core/Kconfig"
213endmenu
214
215menu "Media drivers"
216
217comment "Drivers filtered as selected at 'Filter media drivers'"
218	depends on MEDIA_SUPPORT_FILTER
219
220source "drivers/media/usb/Kconfig"
221source "drivers/media/pci/Kconfig"
222source "drivers/media/radio/Kconfig"
223
224# Common driver options
225source "drivers/media/common/Kconfig"
226
227if MEDIA_PLATFORM_SUPPORT
228source "drivers/media/platform/Kconfig"
229source "drivers/media/mmc/Kconfig"
230endif
231
232if MEDIA_TEST_SUPPORT
233source "drivers/media/test-drivers/Kconfig"
234endif
235
236source "drivers/media/firewire/Kconfig"
237
238endmenu
239
240#
241# Ancillary drivers (tuners, i2c, spi, frontends)
242#
243
244config MEDIA_HIDE_ANCILLARY_SUBDRV
245	bool
246	depends on MEDIA_SUBDRV_AUTOSELECT && !COMPILE_TEST && !EXPERT
247	default y
248
249menu "Media ancillary drivers"
250
251config MEDIA_ATTACH
252	bool
253	depends on MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT || MEDIA_RADIO_SUPPORT
254	depends on MODULES
255	default MODULES
256
257source "drivers/media/i2c/Kconfig"
258source "drivers/media/spi/Kconfig"
259source "drivers/media/tuners/Kconfig"
260source "drivers/media/dvb-frontends/Kconfig"
261
262endmenu
263
264endif # MEDIA_SUPPORT
265