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