hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/media/Kconfig
....@@ -1,217 +1,49 @@
1
+# SPDX-License-Identifier: GPL-2.0-only
12 #
23 # Multimedia device configuration
34 #
45
5
-config CEC_CORE
6
- tristate
7
-
8
-config CEC_NOTIFIER
9
- bool
10
-
11
-config CEC_PIN
12
- bool
13
-
6
+#
7
+# NOTE: CEC and Remote Controller support should not depend on MEDIA_SUPPORT
8
+#
149 source "drivers/media/rc/Kconfig"
10
+source "drivers/media/cec/Kconfig"
1511
1612 menuconfig MEDIA_SUPPORT
1713 tristate "Multimedia support"
1814 depends on HAS_IOMEM
1915 help
20
- If you want to use Webcams, Video grabber devices and/or TV devices
21
- enable this option and other options below.
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
+
2220 Additional info and docs are available on the web at
2321 <https://linuxtv.org>
2422
2523 if MEDIA_SUPPORT
2624
27
-comment "Multimedia core support"
28
-
29
-#
30
-# Multimedia support - automatically enable V4L2 and DVB core
31
-#
32
-config MEDIA_CAMERA_SUPPORT
33
- bool "Cameras/video grabbers support"
34
- ---help---
35
- Enable support for webcams and video grabbers.
36
-
37
- Say Y when you have a webcam or a video capture grabber board.
38
-
39
-config MEDIA_ANALOG_TV_SUPPORT
40
- bool "Analog TV support"
41
- ---help---
42
- Enable analog TV support.
43
-
44
- Say Y when you have a TV board with analog support or with a
45
- hybrid analog/digital TV chipset.
46
-
47
- Note: There are several DVB cards that are based on chips that
48
- support both analog and digital TV. Disabling this option
49
- will disable support for them.
50
-
51
-config MEDIA_DIGITAL_TV_SUPPORT
52
- bool "Digital TV support"
53
- ---help---
54
- Enable digital TV support.
55
-
56
- Say Y when you have a board with digital support or a board with
57
- hybrid digital TV and analog TV.
58
-
59
-config MEDIA_RADIO_SUPPORT
60
- bool "AM/FM radio receivers/transmitters support"
61
- ---help---
62
- Enable AM/FM radio support.
63
-
64
- Additional info and docs are available on the web at
65
- <https://linuxtv.org>
66
-
67
- Say Y when you have a board with radio support.
68
-
69
- Note: There are several TV cards that are based on chips that
70
- support radio reception. Disabling this option will
71
- disable support for them.
72
-
73
-config MEDIA_SDR_SUPPORT
74
- bool "Software defined radio support"
75
- ---help---
76
- Enable software defined radio support.
77
-
78
- Say Y when you have a software defined radio device.
79
-
80
-config MEDIA_CEC_SUPPORT
81
- bool "HDMI CEC support"
82
- ---help---
83
- Enable support for HDMI CEC (Consumer Electronics Control),
84
- which is an optional HDMI feature.
85
-
86
- Say Y when you have an HDMI receiver, transmitter or a USB CEC
87
- adapter that supports HDMI CEC.
88
-
89
-source "drivers/media/cec/Kconfig"
90
-
91
-#
92
-# Media controller
93
-# Selectable only for webcam/grabbers, as other drivers don't use it
94
-#
95
-
96
-config MEDIA_CONTROLLER
97
- bool "Media Controller API"
98
- depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT
99
- ---help---
100
- Enable the media controller API used to query media devices internal
101
- topology and configure it dynamically.
102
-
103
- This API is mostly used by camera interfaces in embedded platforms.
104
-
105
-config MEDIA_CONTROLLER_DVB
106
- bool "Enable Media controller for DVB (EXPERIMENTAL)"
107
- depends on MEDIA_CONTROLLER && DVB_CORE
108
- ---help---
109
- Enable the media controller API support for DVB.
110
-
111
- This is currently experimental.
112
-
113
-#
114
-# Video4Linux support
115
-# Only enables if one of the V4L2 types (ATV, webcam, radio) is selected
116
-#
117
-
118
-config VIDEO_DEV
119
- tristate
25
+config MEDIA_SUPPORT_FILTER
26
+ bool "Filter media drivers"
12027 depends on MEDIA_SUPPORT
121
- depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT
122
- default y
123
-
124
-config VIDEO_V4L2_SUBDEV_API
125
- bool "V4L2 sub-device userspace API"
126
- depends on VIDEO_DEV && MEDIA_CONTROLLER
127
- ---help---
128
- Enables the V4L2 sub-device pad-level userspace API used to configure
129
- video format, size and frame rate between hardware blocks.
130
-
131
- This API is mostly used by camera interfaces in embedded platforms.
132
-
133
-source "drivers/media/v4l2-core/Kconfig"
134
-
135
-#
136
-# DVB Core
137
-# Only enables if one of DTV is selected
138
-#
139
-
140
-config DVB_CORE
141
- tristate
142
- depends on MEDIA_SUPPORT
143
- depends on MEDIA_DIGITAL_TV_SUPPORT
144
- depends on (I2C || I2C=n)
145
- default y
146
- select CRC32
147
-
148
-config DVB_MMAP
149
- bool "Enable DVB memory-mapped API (EXPERIMENTAL)"
150
- depends on DVB_CORE
151
- depends on VIDEO_V4L2=y || VIDEO_V4L2=DVB_CORE
152
- select VIDEOBUF2_VMALLOC
153
- default n
28
+ default y if !EMBEDDED && !EXPERT
15429 help
155
- This option enables DVB experimental memory-mapped API, which
156
- reduces the number of context switches to read DVB buffers, as
157
- the buffers can use mmap() syscalls.
30
+ Configuring the media subsystem can be complex, as there are
31
+ hundreds of drivers and other config options.
15832
159
- Support for it is experimental. Use with care. If unsure,
160
- say N.
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.
16136
162
-config DVB_NET
163
- bool "DVB Network Support"
164
- default (NET && INET)
165
- depends on NET && INET && DVB_CORE
166
- help
167
- This option enables DVB Network Support which is a part of the DVB
168
- standard. It is used, for example, by automatic firmware updates used
169
- on Set-Top-Boxes. It can also be used to access the Internet via the
170
- DVB card, if the network provider supports it.
171
-
172
- You may want to disable the network support on embedded devices. If
173
- unsure say Y.
174
-
175
-# This Kconfig option is used by both PCI and USB drivers
176
-config TTPCI_EEPROM
177
- tristate
178
- depends on I2C
179
- default n
180
-
181
-source "drivers/media/dvb-core/Kconfig"
182
-
183
-comment "Media drivers"
184
-
185
-#
186
-# V4L platform/mem2mem drivers
187
-#
188
-
189
-source "drivers/media/usb/Kconfig"
190
-source "drivers/media/pci/Kconfig"
191
-source "drivers/media/platform/Kconfig"
192
-source "drivers/media/mmc/Kconfig"
193
-source "drivers/media/radio/Kconfig"
194
-
195
-comment "Supported FireWire (IEEE 1394) Adapters"
196
- depends on DVB_CORE && FIREWIRE
197
-source "drivers/media/firewire/Kconfig"
198
-
199
-# Common driver options
200
-source "drivers/media/common/Kconfig"
201
-
202
-comment "Media ancillary drivers (tuners, sensors, i2c, spi, frontends)"
203
-
204
-#
205
-# Ancillary drivers (tuners, i2c, spi, frontends)
206
-#
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.
20740
20841 config MEDIA_SUBDRV_AUTOSELECT
20942 bool "Autoselect ancillary drivers (tuners, sensors, i2c, spi, frontends)"
210
- depends on MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT || MEDIA_CAMERA_SUPPORT || MEDIA_SDR_SUPPORT
21143 depends on HAS_IOMEM
21244 select I2C
21345 select I2C_MUX
214
- default y
46
+ default y if MEDIA_SUPPORT_FILTER
21547 help
21648 By default, a media driver auto-selects all possible ancillary
21749 devices such as tuners, sensors, video encoders/decoders and
....@@ -228,6 +60,187 @@
22860
22961 If unsure say Y.
23062
63
+menu "Media device types"
64
+
65
+#
66
+# Multimedia support - automatically enable V4L2 and DVB core
67
+#
68
+config MEDIA_CAMERA_SUPPORT
69
+ bool "Cameras and video grabbers"
70
+ default y if !MEDIA_SUPPORT_FILTER
71
+ help
72
+ Enable support for webcams and video grabbers.
73
+
74
+ Say Y when you have a webcam or a video capture grabber board.
75
+
76
+config MEDIA_ANALOG_TV_SUPPORT
77
+ bool "Analog TV"
78
+ default y if !MEDIA_SUPPORT_FILTER
79
+ help
80
+ Enable analog TV support.
81
+
82
+ Say Y when you have a TV board with analog support or with a
83
+ hybrid analog/digital TV chipset.
84
+
85
+ Note: There are several DVB cards that are based on chips that
86
+ support both analog and digital TV. Disabling this option
87
+ will disable support for them.
88
+
89
+config MEDIA_DIGITAL_TV_SUPPORT
90
+ tristate "Digital TV"
91
+ default y if !MEDIA_SUPPORT_FILTER
92
+ help
93
+ Enable digital TV support.
94
+
95
+ Say Y when you have a board with digital support or a board with
96
+ hybrid digital TV and analog TV.
97
+
98
+config MEDIA_RADIO_SUPPORT
99
+ bool "AM/FM radio receivers/transmitters"
100
+ default y if !MEDIA_SUPPORT_FILTER
101
+ help
102
+ Enable AM/FM radio support.
103
+
104
+ Additional info and docs are available on the web at
105
+ <https://linuxtv.org>
106
+
107
+ Say Y when you have a board with radio support.
108
+
109
+ Note: There are several TV cards that are based on chips that
110
+ support radio reception. Disabling this option will
111
+ disable support for them.
112
+
113
+config MEDIA_SDR_SUPPORT
114
+ bool "Software defined radio"
115
+ default y if !MEDIA_SUPPORT_FILTER
116
+ help
117
+ Enable software defined radio support.
118
+
119
+ Say Y when you have a software defined radio device.
120
+
121
+config MEDIA_PLATFORM_SUPPORT
122
+ bool "Platform-specific devices"
123
+ default y if !MEDIA_SUPPORT_FILTER
124
+ help
125
+ Enable support for complex cameras, codecs, and other hardware
126
+ that are integrated at the CPU, GPU or on Image Signalling Processor
127
+ and don't use PCI, USB or Firewire buses.
128
+
129
+ This is found on Embedded hardware (SoC), on V4L2 codecs and
130
+ on some GPU and newer CPU chipsets.
131
+
132
+ Say Y when you want to be able so see such devices.
133
+
134
+config MEDIA_TEST_SUPPORT
135
+ bool "Test drivers"
136
+ default y if !MEDIA_SUPPORT_FILTER
137
+ help
138
+ These drivers should not be used on production kernels, but
139
+ can be useful on debug ones. This option enables several dummy drivers
140
+ that simulate real hardware. Very useful to test userspace
141
+ applications and to validate if the subsystem core doesn't
142
+ have regressions.
143
+
144
+ Say Y if you want to use some virtual test driver.
145
+
146
+ In case of doubts, say N.
147
+ Say Y when you have a software defined radio device.
148
+endmenu # media device types
149
+
150
+
151
+menu "Media core support"
152
+ visible if !MEDIA_SUPPORT_FILTER
153
+
154
+config VIDEO_DEV
155
+ tristate "Video4Linux core"
156
+ default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT || MEDIA_PLATFORM_SUPPORT || MEDIA_TEST_SUPPORT
157
+ help
158
+ Enables the V4L2 API, used by cameras, analog TV, video grabbers,
159
+ radio devices and by some input devices.
160
+
161
+config MEDIA_CONTROLLER
162
+ bool "Media Controller API"
163
+ default MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT || MEDIA_PLATFORM_SUPPORT
164
+ help
165
+ Enable the media controller API used to query media devices internal
166
+ topology and configure it dynamically.
167
+
168
+ This API is mostly used by camera interfaces in embedded platforms.
169
+
170
+#
171
+# DVB Core
172
+# Only enables if one of DTV is selected
173
+#
174
+
175
+config DVB_CORE
176
+ tristate
177
+ depends on MEDIA_DIGITAL_TV_SUPPORT
178
+ depends on (I2C || I2C=n)
179
+ default MEDIA_DIGITAL_TV_SUPPORT
180
+ select CRC32
181
+ help
182
+ Enables the DVB API, used by Digital TV devices. Supports several
183
+ standards, including DVB, ATSC, ISDB and CMDB.
184
+
185
+endmenu # Media core support
186
+
187
+#
188
+# Extra per-media API core functionality
189
+
190
+menu "Video4Linux options"
191
+ visible if VIDEO_DEV
192
+
193
+source "drivers/media/v4l2-core/Kconfig"
194
+endmenu
195
+
196
+menu "Media controller options"
197
+ visible if MEDIA_CONTROLLER
198
+
199
+source "drivers/media/mc/Kconfig"
200
+endmenu
201
+
202
+menu "Digital TV options"
203
+ visible if DVB_CORE
204
+
205
+source "drivers/media/dvb-core/Kconfig"
206
+endmenu
207
+
208
+menu "Media drivers"
209
+
210
+comment "Drivers filtered as selected at 'Filter media drivers'"
211
+ depends on MEDIA_SUPPORT_FILTER
212
+
213
+source "drivers/media/usb/Kconfig"
214
+source "drivers/media/pci/Kconfig"
215
+source "drivers/media/radio/Kconfig"
216
+
217
+# Common driver options
218
+source "drivers/media/common/Kconfig"
219
+
220
+if MEDIA_PLATFORM_SUPPORT
221
+source "drivers/media/platform/Kconfig"
222
+source "drivers/media/mmc/Kconfig"
223
+endif
224
+
225
+if MEDIA_TEST_SUPPORT
226
+source "drivers/media/test-drivers/Kconfig"
227
+endif
228
+
229
+source "drivers/media/firewire/Kconfig"
230
+
231
+endmenu
232
+
233
+#
234
+# Ancillary drivers (tuners, i2c, spi, frontends)
235
+#
236
+
237
+config MEDIA_HIDE_ANCILLARY_SUBDRV
238
+ bool
239
+ depends on MEDIA_SUBDRV_AUTOSELECT && !COMPILE_TEST && !EXPERT
240
+ default y
241
+
242
+menu "Media ancillary drivers"
243
+
231244 config MEDIA_ATTACH
232245 bool
233246 depends on MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT || MEDIA_RADIO_SUPPORT
....@@ -239,4 +252,6 @@
239252 source "drivers/media/tuners/Kconfig"
240253 source "drivers/media/dvb-frontends/Kconfig"
241254
255
+endmenu
256
+
242257 endif # MEDIA_SUPPORT