sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget./translations/zh_CN/admin-guide/media/buildingmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/zh_TW/admin-guide/media/buildingmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/it_IT/admin-guide/media/buildingmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/ja_JP/admin-guide/media/buildingmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/ko_KR/admin-guide/media/buildingmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/sp_SP/admin-guide/media/buildingmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhH/var/lib/git/docbuild/linux/Documentation/admin-guide/media/building.rsthKubhsection)}(hhh](htitle)}(h#Building support for a media deviceh]h#Building support for a media device}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hThe first step is to download the Kernel's source code, either via a distribution-specific source file or via the Kernel's main git tree\ [1]_.h](hThe first step is to download the Kernel’s source code, either via a distribution-specific source file or via the Kernel’s main git tree }(hhhhhNhNubhfootnote_reference)}(h[1]_h]h1}(hhhhhNhNubah}(h]id1ah ]h"]h$]h&]refidid2docnameadmin-guide/media/buildinguh1hhhˌresolvedKubh.}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(h!Please notice, however, that, if:h]h!Please notice, however, that, if:}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh bullet_list)}(hhh](h list_item)}(h:you're a braveheart and want to experiment with new stuff;h]h)}(hj h]h`_:h](h:In this case, you may find some useful information at the }(hjhhhNhNubj)}(h0`LinuxTv wiki pages `_h]hLinuxTv wiki pages}(hjhhhNhNubah}(h]h ]h"]h$]h&]nameLinuxTv wiki pagesrefurihttps://linuxtv.org/wikiuh1jhjubhtarget)}(h h]h}(h]linuxtv-wiki-pagesah ]h"]linuxtv wiki pagesah$]h&]refurijuh1j referencedKhjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubjy)}(h[https://linuxtv.org/wiki/index.php/How_to_Obtain,_Build_and_Install_V4L-DVB_Device_Drivers h]h)}(hZhttps://linuxtv.org/wiki/index.php/How_to_Obtain,_Build_and_Install_V4L-DVB_Device_Driversh]j)}(hjh]hZhttps://linuxtv.org/wiki/index.php/How_to_Obtain,_Build_and_Install_V4L-DVB_Device_Drivers}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jxhhhKhhhhubhfootnote)}(hThe upstream Linux Kernel development tree is located at https://git.kernel.org/pub/scm/li nux/kernel/git/torvalds/linux.git/ h](hlabel)}(h1h]h1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h8The upstream Linux Kernel development tree is located ath]h8The upstream Linux Kernel development tree is located at}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hEhttps://git.kernel.org/pub/scm/li nux/kernel/git/torvalds/linux.git/h](j)}(h!https://git.kernel.org/pub/scm/lih]h!https://git.kernel.org/pub/scm/li}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubh$ nux/kernel/git/torvalds/linux.git/}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]hah ]h"]1ah$]h&]hahhuh1jhhhKhhhhhKubh)}(hhh](h)}(hConfiguring the Linux Kernelh]hConfiguring the Linux Kernel}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj<hhhhhKubh)}(h7You can access a menu of Kernel building options with::h]h6You can access a menu of Kernel building options with:}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hj<hhubh literal_block)}(h$ make menuconfigh]h$ make menuconfig}hj]sbah}(h]h ]h"]h$]h&]hhuh1j[hhhK"hj<hhubh)}(hGThen, select all desired options and exit it, saving the configuration.h]hGThen, select all desired options and exit it, saving the configuration.}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK$hj<hhubh)}(hOThe changed configuration will be at the ``.config`` file. It would look like::h](h)The changed configuration will be at the }(hjyhhhNhNubj_)}(h ``.config``h]h.config}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j^hjyubh file. It would look like:}(hjyhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK&hj<hhubj\)}(hu... # CONFIG_RC_CORE is not set # CONFIG_CEC_CORE is not set CONFIG_MEDIA_SUPPORT=m CONFIG_MEDIA_SUPPORT_FILTER=y ...h]hu... # CONFIG_RC_CORE is not set # CONFIG_CEC_CORE is not set CONFIG_MEDIA_SUPPORT=m CONFIG_MEDIA_SUPPORT_FILTER=y ...}hjsbah}(h]h ]h"]h$]h&]hhuh1j[hhhK)hj<hhubh)}(hGThe media subsystem is controlled by those menu configuration options::h]hFThe media subsystem is controlled by those menu configuration options:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK0hj<hhubj\)}(hDevice Drivers ---> Remote Controller support ---> [ ] HDMI CEC RC integration [ ] Enable CEC error injection support [*] HDMI CEC drivers ---> <*> Multimedia support --->h]hDevice Drivers ---> Remote Controller support ---> [ ] HDMI CEC RC integration [ ] Enable CEC error injection support [*] HDMI CEC drivers ---> <*> Multimedia support --->}hjsbah}(h]h ]h"]h$]h&]hhuh1j[hhhK2hj<hhubh)}(h_The ``Remote Controller support`` option enables the core support for remote controllers\ [2]_.h](hThe }(hjhhhNhNubj_)}(h``Remote Controller support``h]hRemote Controller support}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j^hjubh9 option enables the core support for remote controllers }(hjhhhNhNubh)}(h[2]_h]h2}(hjhhhNhNubah}(h]id3ah ]h"]h$]h&]hid5hhuh1hhjhKubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK9hj<hhubh)}(hThe ``HDMI CEC RC integration`` option enables integration of HDMI CEC with Linux, allowing to receive data via HDMI CEC as if it were produced by a remote controller directly connected to the machine.h](hThe }(hjhhhNhNubj_)}(h``HDMI CEC RC integration``h]hHDMI CEC RC integration}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j^hjubh option enables integration of HDMI CEC with Linux, allowing to receive data via HDMI CEC as if it were produced by a remote controller directly connected to the machine.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK Compile Remote Controller keymap modules [*] LIRC user interface [*] Support for eBPF programs attached to lirc devices [*] Remote controller decoders ---> [*] Remote Controller devices --->h]h--- Remote Controller support Compile Remote Controller keymap modules [*] LIRC user interface [*] Support for eBPF programs attached to lirc devices [*] Remote controller decoders ---> [*] Remote Controller devices --->}hjsbah}(h]h ]h"]h$]h&]hhuh1j[hhhK}hjhhubh)}(hpThe ``Compile Remote Controller keymap modules`` option creates key maps for several popular remote controllers.h](hThe }(hjhhhNhNubj_)}(h,``Compile Remote Controller keymap modules``h]h(Compile Remote Controller keymap modules}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j^hjubh@ option creates key maps for several popular remote controllers.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hThe ``LIRC user interface`` option adds enhanced functionality when using the ``lirc`` program, by enabling an API that allows userspace to receive raw data from remote controllers.h](hThe }(hjhhhNhNubj_)}(h``LIRC user interface``h]hLIRC user interface}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j^hjubh3 option adds enhanced functionality when using the }(hjhhhNhNubj_)}(h``lirc``h]hlirc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j^hjubh_ program, by enabling an API that allows userspace to receive raw data from remote controllers.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hThe ``Support for eBPF programs attached to lirc devices`` option allows the usage of special programs (called eBPF) that would allow applications to add extra remote controller decoding functionality to the Linux Kernel.h](hThe }(hj)hhhNhNubj_)}(h6``Support for eBPF programs attached to lirc devices``h]h2Support for eBPF programs attached to lirc devices}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1j^hj)ubh option allows the usage of special programs (called eBPF) that would allow applications to add extra remote controller decoding functionality to the Linux Kernel.}(hj)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hThe ``Remote controller decoders`` option allows selecting the protocols that will be recognized by the Linux Kernel. Except if you want to disable some specific decoder, it is suggested to keep all sub-options enabled.h](hThe }(hjIhhhNhNubj_)}(h``Remote controller decoders``h]hRemote controller decoders}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1j^hjIubh option allows selecting the protocols that will be recognized by the Linux Kernel. Except if you want to disable some specific decoder, it is suggested to keep all sub-options enabled.}(hjIhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hoThe ``Remote Controller devices`` allows you to select the drivers that would be needed to support your device.h](hThe }(hjihhhNhNubj_)}(h``Remote Controller devices``h]hRemote Controller devices}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1j^hjiubhN allows you to select the drivers that would be needed to support your device.}(hjihhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hThe same configuration can also be set via the ``script/config`` script. So, for instance, in order to support the ITE remote controller driver (found on Intel NUCs and on some ASUS x86 desktops), you could do::h](h/The same configuration can also be set via the }(hjhhhNhNubj_)}(h``script/config``h]h script/config}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j^hjubh script. So, for instance, in order to support the ITE remote controller driver (found on Intel NUCs and on some ASUS x86 desktops), you could do:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj\)}(h$ scripts/config -e INPUT $ scripts/config -e ACPI $ scripts/config -e MODULES $ scripts/config -m RC_CORE $ scripts/config -e RC_DEVICES $ scripts/config -e RC_DECODERS $ scripts/config -m IR_RC5_DECODER $ scripts/config -m IR_ITE_CIRh]h$ scripts/config -e INPUT $ scripts/config -e ACPI $ scripts/config -e MODULES $ scripts/config -m RC_CORE $ scripts/config -e RC_DEVICES $ scripts/config -e RC_DECODERS $ scripts/config -m IR_RC5_DECODER $ scripts/config -m IR_ITE_CIR}hjsbah}(h]h ]h"]h$]h&]hhuh1j[hhhKhjhhubeh}(h]"enabling-remote-controller-supportah ]h"]"enabling remote controller supportah$]h&]uh1hhj<hhhhhKxubh)}(hhh](h)}(hEnabling HDMI CEC Supporth]hEnabling HDMI CEC Support}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hThe HDMI CEC support is set automatically when a driver requires it. So, all you need to do is to enable support either for a graphics card that needs it or by one of the existing HDMI drivers.h]hThe HDMI CEC support is set automatically when a driver requires it. So, all you need to do is to enable support either for a graphics card that needs it or by one of the existing HDMI drivers.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hPThe HDMI-specific drivers are available at the ``HDMI CEC drivers`` menu\ [4]_::h](h/The HDMI-specific drivers are available at the }(hjhhhNhNubj_)}(h``HDMI CEC drivers``h]hHDMI CEC drivers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j^hjubh menu }(hjhhhNhNubh)}(h[4]_h]h4}(hjhhhNhNubah}(h]id7ah ]h"]h$]h&]hid8hhuh1hhjhKubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj\)}(hX--- HDMI CEC drivers < > ChromeOS EC CEC driver < > Amlogic Meson AO CEC driver < > Amlogic Meson G12A AO CEC driver < > Generic GPIO-based CEC driver < > Samsung S5P CEC driver < > STMicroelectronics STiH4xx HDMI CEC driver < > STMicroelectronics STM32 HDMI CEC driver < > Tegra HDMI CEC driver < > SECO Boards HDMI CEC driver [ ] SECO Boards IR RC5 support < > Pulse Eight HDMI CEC < > RainShadow Tech HDMI CECh]hX--- HDMI CEC drivers < > ChromeOS EC CEC driver < > Amlogic Meson AO CEC driver < > Amlogic Meson G12A AO CEC driver < > Generic GPIO-based CEC driver < > Samsung S5P CEC driver < > STMicroelectronics STiH4xx HDMI CEC driver < > STMicroelectronics STM32 HDMI CEC driver < > Tegra HDMI CEC driver < > SECO Boards HDMI CEC driver [ ] SECO Boards IR RC5 support < > Pulse Eight HDMI CEC < > RainShadow Tech HDMI CEC}hjsbah}(h]h ]h"]h$]h&]hhuh1j[hhhKhjhhubj)}(hThe above contents is just an example. The actual options for HDMI devices depends on the system's architecture and may vary on new Kernels. h](j)}(h4h]h4}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh)}(hThe above contents is just an example. The actual options for HDMI devices depends on the system's architecture and may vary on new Kernels.h]hThe above contents is just an example. The actual options for HDMI devices depends on the system’s architecture and may vary on new Kernels.}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubeh}(h]jah ]h"]4ah$]h&]jahhuh1jhhhKhjhhhKubeh}(h]enabling-hdmi-cec-supportah ]h"]enabling hdmi cec supportah$]h&]uh1hhj<hhhhhKubh)}(hhh](h)}(hEnabling Media Supporth]hEnabling Media Support}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOhhhhhKubh)}(h|The Media menu has a lot more options than the remote controller menu. Once selected, you should see the following options::h]h{The Media menu has a lot more options than the remote controller menu. Once selected, you should see the following options:}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjOhhubj\)}(hX0--- Media support [ ] Filter media drivers [*] Autoselect ancillary drivers Media device types ---> Media core support ---> Video4Linux options ---> Media controller options ---> Digital TV options ---> HDMI CEC options ---> Media drivers ---> Media ancillary drivers --->h]hX0--- Media support [ ] Filter media drivers [*] Autoselect ancillary drivers Media device types ---> Media core support ---> Video4Linux options ---> Media controller options ---> Digital TV options ---> HDMI CEC options ---> Media drivers ---> Media ancillary drivers --->}hjnsbah}(h]h ]h"]h$]h&]hhuh1j[hhhKhjOhhubh)}(hExcept if you know exactly what you're doing, or if you want to build a driver for a SoC platform, it is strongly recommended to keep the ``Autoselect ancillary drivers`` option turned on, as it will auto-select the needed I²C ancillary drivers.h](hExcept if you know exactly what you’re doing, or if you want to build a driver for a SoC platform, it is strongly recommended to keep the }(hj|hhhNhNubj_)}(h ``Autoselect ancillary drivers``h]hAutoselect ancillary drivers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j^hj|ubhL option turned on, as it will auto-select the needed I²C ancillary drivers.}(hj|hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjOhhubh)}(hJThere are now two ways to select media device drivers, as described below.h]hJThere are now two ways to select media device drivers, as described below.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjOhhubh)}(hhh](h)}(h``Filter media drivers`` menuh](j_)}(h``Filter media drivers``h]hFilter media drivers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j^hjubh menu}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hThis menu is meant to easy setup for PC and Laptop hardware. It works by letting the user to specify what kind of media drivers are desired, with those options::h]hThis menu is meant to easy setup for PC and Laptop hardware. It works by letting the user to specify what kind of media drivers are desired, with those options:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj\)}(h[ ] Cameras and video grabbers [ ] Analog TV [ ] Digital TV [ ] AM/FM radio receivers/transmitters [ ] Software defined radio [ ] Platform-specific devices [ ] Test driversh]h[ ] Cameras and video grabbers [ ] Analog TV [ ] Digital TV [ ] AM/FM radio receivers/transmitters [ ] Software defined radio [ ] Platform-specific devices [ ] Test drivers}hjsbah}(h]h ]h"]h$]h&]hhuh1j[hhhKhjhhubh)}(h}So, if you want to add support to a camera or video grabber only, select just the first option. Multiple options are allowed.h]h}So, if you want to add support to a camera or video grabber only, select just the first option. Multiple options are allowed.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hOnce the options on this menu are selected, the building system will auto-select the needed core drivers in order to support the selected functionality.h]hOnce the options on this menu are selected, the building system will auto-select the needed core drivers in order to support the selected functionality.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubjz)}(hMost TV cards are hybrid: they support both Analog TV and Digital TV. If you have an hybrid card, you may need to enable both ``Analog TV`` and ``Digital TV`` at the menu.h](h)}(hEMost TV cards are hybrid: they support both Analog TV and Digital TV.h]hEMost TV cards are hybrid: they support both Analog TV and Digital TV.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(heIf you have an hybrid card, you may need to enable both ``Analog TV`` and ``Digital TV`` at the menu.h](h8If you have an hybrid card, you may need to enable both }(hjhhhNhNubj_)}(h ``Analog TV``h]h Analog TV}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j^hjubh and }(hjhhhNhNubj_)}(h``Digital TV``h]h Digital TV}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1j^hjubh at the menu.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1jyhjhhhhhNubh)}(hX0When using this option, the defaults for the media support core functionality are usually good enough to provide the basic functionality for the driver. Yet, you could manually enable some desired extra (optional) functionality using the settings under each of the following ``Media support`` sub-menus::h](hXWhen using this option, the defaults for the media support core functionality are usually good enough to provide the basic functionality for the driver. Yet, you could manually enable some desired extra (optional) functionality using the settings under each of the following }(hjKhhhNhNubj_)}(h``Media support``h]h Media support}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1j^hjKubh sub-menus:}(hjKhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj\)}(h|Media core support ---> Video4Linux options ---> Media controller options ---> Digital TV options ---> HDMI CEC options --->h]h|Media core support ---> Video4Linux options ---> Media controller options ---> Digital TV options ---> HDMI CEC options --->}hjksbah}(h]h ]h"]h$]h&]hhuh1j[hhhKhjhhubh)}(hOnce you select the desired filters, the drivers that matches the filtering criteria will be available at the ``Media support->Media drivers`` sub-menu.h](hnOnce you select the desired filters, the drivers that matches the filtering criteria will be available at the }(hjyhhhNhNubj_)}(h ``Media support->Media drivers``h]hMedia support->Media drivers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j^hjyubh sub-menu.}(hjyhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]filter-media-drivers-menuah ]h"]filter media drivers menuah$]h&]uh1hhjOhhhhhKubh)}(hhh](h)}(h-``Media Core Support`` menu without filteringh](j_)}(h``Media Core Support``h]hMedia Core Support}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j^hjubh menu without filtering}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hIf you disable the ``Filter media drivers`` menu, all drivers available for your system whose dependencies are met should be shown at the ``Media drivers`` menu.h](hIf you disable the }(hjhhhNhNubj_)}(h``Filter media drivers``h]hFilter media drivers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j^hjubh_ menu, all drivers available for your system whose dependencies are met should be shown at the }(hjhhhNhNubj_)}(h``Media drivers``h]h Media drivers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j^hjubh menu.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM hjhhubh)}(hPlease notice, however, that you should first ensure that the ``Media Core Support`` menu has all the core functionality your drivers would need, as otherwise the corresponding device drivers won't be shown.h](h>Please notice, however, that you should first ensure that the }(hjhhhNhNubj_)}(h``Media Core Support``h]hMedia Core Support}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j^hjubh} menu has all the core functionality your drivers would need, as otherwise the corresponding device drivers won’t be shown.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM hjhhubeh}(h])media-core-support-menu-without-filteringah ]h"])media core support menu without filteringah$]h&]uh1hhjOhhhhhMubeh}(h]enabling-media-supportah ]h"]enabling media supportah$]h&]uh1hhj<hhhhhKubh)}(hhh](h)}(hExampleh]hExample}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"hhhhhMubh)}(hIn order to enable modular support for one of the boards listed on :doc:`this table `, with modular media core modules, the ``.config`` file should contain those lines::h](hCIn order to enable modular support for one of the boards listed on }(hj3hhhNhNubh)}(h$:doc:`this table `h]hinline)}(hj=h]h this table}(hjAhhhNhNubah}(h]h ](xrefstdstd-doceh"]h$]h&]uh1j?hj;ubah}(h]h ]h"]h$]h&]refdoch refdomainjLreftypedoc refexplicitrefwarn reftargetcx231xx-cardlistuh1hhhhMhj3ubh', with modular media core modules, the }(hj3hhhNhNubj_)}(h ``.config``h]h.config}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1j^hj3ubh! file should contain those lines:}(hj3hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj"hhubj\)}(hXCONFIG_MODULES=y CONFIG_USB=y CONFIG_I2C=y CONFIG_INPUT=y CONFIG_RC_CORE=m CONFIG_MEDIA_SUPPORT=m CONFIG_MEDIA_SUPPORT_FILTER=y CONFIG_MEDIA_ANALOG_TV_SUPPORT=y CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y CONFIG_MEDIA_USB_SUPPORT=y CONFIG_VIDEO_CX231XX=y CONFIG_VIDEO_CX231XX_DVB=yh]hXCONFIG_MODULES=y CONFIG_USB=y CONFIG_I2C=y CONFIG_INPUT=y CONFIG_RC_CORE=m CONFIG_MEDIA_SUPPORT=m CONFIG_MEDIA_SUPPORT_FILTER=y CONFIG_MEDIA_ANALOG_TV_SUPPORT=y CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y CONFIG_MEDIA_USB_SUPPORT=y CONFIG_VIDEO_CX231XX=y CONFIG_VIDEO_CX231XX_DVB=y}hj{sbah}(h]h ]h"]h$]h&]hhuh1j[hhhMhj"hhubeh}(h]exampleah ]h"]exampleah$]h&]uh1hhj<hhhhhMubeh}(h]configuring-the-linux-kernelah ]h"]configuring the linux kernelah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h$Building and installing a new Kernelh]h$Building and installing a new Kernel}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM&ubh)}(hgOnce the ``.config`` file has everything needed, all it takes to build is to run the ``make`` command::h](h Once the }(hjhhhNhNubj_)}(h ``.config``h]h.config}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j^hjubhA file has everything needed, all it takes to build is to run the }(hjhhhNhNubj_)}(h``make``h]hmake}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j^hjubh command:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM(hjhhubj\)}(h$ makeh]h$ make}hjsbah}(h]h ]h"]h$]h&]hhuh1j[hhhM+hjhhubh)}(h1And then install the new Kernel and its modules::h]h0And then install the new Kernel and its modules:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM-hjhhubj\)}(h/$ sudo make modules_install $ sudo make installh]h/$ sudo make modules_install $ sudo make install}hjsbah}(h]h ]h"]h$]h&]hhuh1j[hhhM/hjhhubeh}(h]$building-and-installing-a-new-kernelah ]h"]$building and installing a new kernelah$]h&]uh1hhhhhhhhM&ubh)}(hhh](h)}(h,Building just the new media drivers and coreh]h,Building just the new media drivers and core}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhM3ubh)}(hRunning a new development Kernel from the development tree is usually risky, because it may have experimental changes that may have bugs. So, there are some ways to build just the new drivers, using alternative trees.h]hRunning a new development Kernel from the development tree is usually risky, because it may have experimental changes that may have bugs. So, there are some ways to build just the new drivers, using alternative trees.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM5hj hhubh)}(hThere is the `Linux Kernel backports project `_, with contains newer drivers meant to be compiled against stable Kernels.h](h There is the }(hj- hhhNhNubj)}(hY`Linux Kernel backports project `_h]hLinux Kernel backports project}(hj5 hhhNhNubah}(h]h ]h"]h$]h&]nameLinux Kernel backports projectj5https://backports.wiki.kernel.org/index.php/Main_Pageuh1jhj- ubj)}(h8 h]h}(h]linux-kernel-backports-projectah ]h"]linux kernel backports projectah$]h&]refurijE uh1jjKhj- ubhJ, with contains newer drivers meant to be compiled against stable Kernels.}(hj- hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM9hj hhubh)}(hThe LinuxTV developers, with are responsible for maintaining the media subsystem also maintains a backport tree, with just the media drivers daily updated from the newest kernel. Such tree is available at:h]hThe LinuxTV developers, with are responsible for maintaining the media subsystem also maintains a backport tree, with just the media drivers daily updated from the newest kernel. Such tree is available at:}(hj] hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hj hhubh)}(h(https://git.linuxtv.org/media_build.git/h]j)}(hjm h]h(https://git.linuxtv.org/media_build.git/}(hjo hhhNhNubah}(h]h ]h"]h$]h&]refurijm uh1jhjk ubah}(h]h ]h"]h$]h&]uh1hhhhMAhj hhubh)}(hX%It should be noticed that, while it should be relatively safe to use the ``media_build`` tree for testing purposes, there are not warranties that it would work (or even build) on a random Kernel. This tree is maintained using a "best-efforts" principle, as time permits us to fix issues there.h](hIIt should be noticed that, while it should be relatively safe to use the }(hj hhhNhNubj_)}(h``media_build``h]h media_build}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j^hj ubh tree for testing purposes, there are not warranties that it would work (or even build) on a random Kernel. This tree is maintained using a “best-efforts” principle, as time permits us to fix issues there.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMChj hhubh)}(hIf you notice anything wrong on it, feel free to submit patches at the Linux media subsystem's mailing list: media@vger.kernel.org. Please add ``[PATCH media-build]`` at the e-mail's subject if you submit a new patch for the media-build.h](hoIf you notice anything wrong on it, feel free to submit patches at the Linux media subsystem’s mailing list: }(hj hhhNhNubj)}(hmedia@vger.kernel.orgh]hmedia@vger.kernel.org}(hj hhhNhNubah}(h]h ]h"]h$]h&]refurimailto:media@vger.kernel.orguh1jhj ubh . Please add }(hj hhhNhNubj_)}(h``[PATCH media-build]``h]h[PATCH media-build]}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j^hj ubhI at the e-mail’s subject if you submit a new patch for the media-build.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMHhj hhubh)}(h!Before using it, you should run::h]h Before using it, you should run:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMMhj hhubj\)}(h $ ./buildh]h $ ./build}hj sbah}(h]h ]h"]h$]h&]hhuh1j[hhhMOhj hhubjz)}(hXS1) you may need to run it twice if the ``media-build`` tree gets updated; 2) you may need to do a ``make distclean`` if you had built it in the past for a different Kernel version than the one you're currently using; 3) by default, it will use the same config options for media as the ones defined on the Kernel you're running.h]henumerated_list)}(hhh](j)}(hFyou may need to run it twice if the ``media-build`` tree gets updated;h]h)}(hFyou may need to run it twice if the ``media-build`` tree gets updated;h](h$you may need to run it twice if the }(hj hhhNhNubj_)}(h``media-build``h]h media-build}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j^hj ubh tree gets updated;}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMShj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hyou may need to do a ``make distclean`` if you had built it in the past for a different Kernel version than the one you're currently using;h]h)}(hyou may need to do a ``make distclean`` if you had built it in the past for a different Kernel version than the one you're currently using;h](hyou may need to do a }(hj* hhhNhNubj_)}(h``make distclean``h]hmake distclean}(hj2 hhhNhNubah}(h]h ]h"]h$]h&]uh1j^hj* ubhf if you had built it in the past for a different Kernel version than the one you’re currently using;}(hj* hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMUhj& ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hkby default, it will use the same config options for media as the ones defined on the Kernel you're running.h]h)}(hkby default, it will use the same config options for media as the ones defined on the Kernel you're running.h]hmby default, it will use the same config options for media as the ones defined on the Kernel you’re running.}(hjT hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMXhjP ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]enumtypearabicprefixhsuffix)uh1j hj ubah}(h]h ]h"]h$]h&]uh1jyhj hhhNhNubh)}(hGIn order to select different drivers or different config options, use::h]hFIn order to select different drivers or different config options, use:}(hjy hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM[hj hhubj\)}(h$ make menuconfigh]h$ make menuconfig}hj sbah}(h]h ]h"]h$]h&]hhuh1j[hhhM^hj hhubh)}(h1Then, you can build and install the new drivers::h]h0Then, you can build and install the new drivers:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM`hj hhubj\)}(h$ make && sudo make installh]h$ make && sudo make install}hj sbah}(h]h ]h"]h$]h&]hhuh1j[hhhMbhj hhubh)}(hJThis will override the previous media drivers that your Kernel were using.h]hJThis will override the previous media drivers that your Kernel were using.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMdhj hhubeh}(h],building-just-the-new-media-drivers-and-coreah ]h"],building just the new media drivers and coreah$]h&]uh1hhhhhhhhM3ubeh}(h]#building-support-for-a-media-deviceah ]h"]#building support for a media deviceah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}(1]ha2]ja3]j1a4]jaurefids}nameids}(j j jjj9hjjjjj:j@jjjjjLjIjDjjjjjjjjjj j j j jO jL u nametypes}(j jj9jjj:jjjLjDjjjjj j jO uh}(j hhhjjhjjj<jjj;j1jjj@jjj=jjjIjjjjj jjOjjjjjj"j jj j jL jF u footnote_refs}(j2 ]haj4 ]jaj6 ]j1aj8 ]jau citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes](jjjj e citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}j KsRparse_messages]transform_messages] transformerN include_log] decorationNhhub.