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