Skip to content

Commit

Permalink
Kernel module packages: Add DVB support
Browse files Browse the repository at this point in the history
Adds DVB drivers intended to be used with tvheadend package and easily available Astrometa USB DVB+analog tuners. More adapters can be added in the future.
This allows users to record and stream TV programs from DVB networks to tvheadend clients.

Changes:
- Add packages for these kernel modules:
  - Multimedia support (installs mc.ko)
  - DVB core (installs dvb-core.ko)
  - DVB USB v2 (installs dvb-usb-v2.ko)
  - Drivers for chips used in Astrometa DVB:
    - Rafael Micro R820T
    - Realtek RTL28xxU, RTL2830, RTL2832
    - Panasonic MN88472 (no firmware)
    - Panasonic MN88473 (no firmware)
    - Sony CXD2841ER
- Added new kernel config lines for v5.15, v6.1, v6.6
- USB audio needed a dependecy on kmod-multimedia, when kmod-multimedia is also selected.

Signed-off-by: Marius Dinu <[email protected]>
  • Loading branch information
M95D committed Mar 17, 2024
1 parent 437ba73 commit 6c39c53
Show file tree
Hide file tree
Showing 5 changed files with 179 additions and 0 deletions.
136 changes: 136 additions & 0 deletions package/kernel/linux/modules/multimedia.mk
Original file line number Diff line number Diff line change
Expand Up @@ -649,3 +649,139 @@ define KernelPackage/video-gspca-konica/description
endef

$(eval $(call KernelPackage,video-gspca-konica))

#
# Tuners, radio, DVB
#

define KernelPackage/multimedia
SUBMENU:=$(MMEDIA_MENU)
TITLE:=Multimedia
KCONFIG:= \
CONFIG_MEDIA_SUPPORT \
CONFIG_MEDIA_SUPPORT_FILTER=y \
CONFIG_MEDIA_USB_SUPPORT=y
FILES:=$(LINUX_DIR)/drivers/media/mc/mc.ko
AUTOLOAD:=$(call AutoLoad,80,mc)
endef
define KernelPackage/multimedia/description
Kernel module for Multimedia support (cameras, TV tuners, DVB)
endef
$(eval $(call KernelPackage,multimedia))

define KernelPackage/dvb-core
SUBMENU:=$(MMEDIA_MENU)
TITLE:=DVB core
KCONFIG:= \
CONFIG_MEDIA_ANALOG_TV_SUPPORT=y \
CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y \
CONFIG_DVB_CORE \
CONFIG_DVB_NET=n \
CONFIG_DVB_MAX_ADAPTERS=8 \
CONFIG_DVB_DYNAMIC_MINORS=n \
CONFIG_DVB_PLATFORM_DRIVERS=n
DEPENDS:=kmod-multimedia
FILES:=$(LINUX_DIR)/drivers/media/dvb-core/dvb-core.ko
AUTOLOAD:=$(call AutoLoad,81,dvb-core)
endef
define KernelPackage/dvb-core/description
Kernel module for generic DVB support.
endef
$(eval $(call KernelPackage,dvb-core))

#### TODO: INSERT HERE DVB-USB (v1)

define KernelPackage/dvb-usb-v2
SUBMENU:=$(MMEDIA_MENU)
TITLE:=DVB USB v2 support
KCONFIG:=CONFIG_DVB_USB_V2
DEPENDS:=kmod-dvb-core @USB_SUPPORT +kmod-usb-core +kmod-i2c-core
FILES:=$(LINUX_DIR)/drivers/media/usb/dvb-usb-v2/dvb_usb_v2.ko
AUTOLOAD:=$(call AutoLoad,82,dvb_usb_v2)
endef
define KernelPackage/dvb-usb-v2/description
Kernel module for DVB USB v2 support
endef
$(eval $(call KernelPackage,dvb-usb-v2))

define KernelPackage/dvb-tuner-r820t
SUBMENU:=$(MMEDIA_MENU)
TITLE:=DVB Tuner Rafael Micro R820T
KCONFIG:=CONFIG_MEDIA_TUNER_R820T
DEPENDS:=kmod-dvb-usb-v2
FILES:=$(LINUX_DIR)/drivers/media/tuners/r820t.ko
AUTOLOAD:=$(call AutoLoad,83,r820t)
endef
define KernelPackage/dvb-tuner-r820t/description
Kernel module for Rafael Micro R820T tuner
endef
$(eval $(call KernelPackage,dvb-tuner-r820t))

define KernelPackage/dvb-frontend-mn88472
SUBMENU:=$(MMEDIA_MENU)
TITLE:=DVB-T Panasonic MN88472 (no firmware)
KCONFIG:=CONFIG_DVB_MN88472
DEPENDS:=kmod-dvb-usb-v2 +kmod-regmap-i2c
FILES:=$(LINUX_DIR)/drivers/media/dvb-frontends/mn88472.ko
AUTOLOAD:=$(call AutoLoad,84,mn88472)
endef
define KernelPackage/dvb-frontend-mn88472/description
Kernel module for Panasonic MN88472 DVB-T/T2/C frontend

This chip requires firmware! It is not included due to missing licence.
Firmware file: dvb-demod-mn88472-02.fw
Install in: /lib/firmware
endef
$(eval $(call KernelPackage,dvb-frontend-mn88472))

define KernelPackage/dvb-frontend-mn88473
SUBMENU:=$(MMEDIA_MENU)
TITLE:=DVB-T Panasonic MN88473 (no firmware)
KCONFIG:=CONFIG_DVB_MN88473
DEPENDS:=kmod-dvb-usb-v2 +kmod-regmap-i2c
FILES:=$(LINUX_DIR)/drivers/media/dvb-frontends/mn88473.ko
AUTOLOAD:=$(call AutoLoad,84,mn88473)
endef
define KernelPackage/dvb-frontend-mn88473/description
Kernel module for Panasonic MN88473 DVB-T/T2/C frontend

This chip requires firmware! It is not included due to missing licence.
Firmware file: dvb-demod-mn88473-01.fw
Install in: /lib/firmware
endef
$(eval $(call KernelPackage,dvb-frontend-mn88473))

define KernelPackage/dvb-frontend-cxd2841er
SUBMENU:=$(MMEDIA_MENU)
TITLE:=DVB-C Sony CXD2841ER
KCONFIG:=CONFIG_DVB_CXD2841ER
DEPENDS:=kmod-dvb-usb-v2
FILES:=$(LINUX_DIR)/drivers/media/dvb-frontends/cxd2841er.ko
AUTOLOAD:=$(call AutoLoad,84,cxd2841er)
endef
define KernelPackage/dvb-frontend-cxd2841er/description
Kernel module for Sony CXD2841ER DVB-C frontend
endef
$(eval $(call KernelPackage,dvb-frontend-cxd2841er))

define KernelPackage/dvb-usb-rtl28xx
SUBMENU:=$(MMEDIA_MENU)
TITLE:=DVB USB Realtek RTL28xx
KCONFIG:= \
CONFIG_DVB_USB_RTL28XXU \
CONFIG_DVB_RTL2830 \
CONFIG_DVB_RTL2832
DEPENDS:=kmod-dvb-usb-v2 +kmod-i2c-mux +kmod-regmap-i2c
FILES:= \
$(LINUX_DIR)/drivers/media/usb/dvb-usb-v2/dvb-usb-rtl28xxu.ko \
$(LINUX_DIR)/drivers/media/dvb-frontends/rtl2830.ko \
$(LINUX_DIR)/drivers/media/dvb-frontends/rtl2832.ko
AUTOLOAD:=$(call AutoLoad,84,rtl2830)
AUTOLOAD:=$(call AutoLoad,84,rtl2832)
AUTOLOAD:=$(call AutoLoad,89,dvb-usb-rtl28xxu)
# rtl28xxu must load after these frontends: MN88472, MN88473, CXD2841ER, RTL2830, RTL2832, R820T, and others not yet added in OpenWrt (see kernel menuconfig help for this module)
endef
define KernelPackage/dvb-usb-rtl28xx/description
Kernel modules for RTL28xxU USB DVB demod and RTL2830 & RTL2832 DVB-T frontends
endef
$(eval $(call KernelPackage,dvb-usb-rtl28xx))
1 change: 1 addition & 0 deletions package/kernel/linux/modules/usb.mk
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,7 @@ define KernelPackage/usb-audio
KCONFIG:= \
CONFIG_SND_USB=y \
CONFIG_SND_USB_AUDIO
DEPENDS:=+PACKAGE_kmod-multimedia:kmod-multimedia
$(call AddDepends/usb)
$(call AddDepends/sound)
FILES:= \
Expand Down
14 changes: 14 additions & 0 deletions target/linux/generic/config-5.15
Original file line number Diff line number Diff line change
Expand Up @@ -1812,6 +1812,19 @@ CONFIG_DVB_MAX_ADAPTERS=16
# CONFIG_DVB_ULE_DEBUG is not set
# CONFIG_DVB_USB is not set
# CONFIG_DVB_USB_V2 is not set
# CONFIG_DVB_USB_AF9015 is not set
# CONFIG_DVB_USB_AF9035 is not set
# CONFIG_DVB_USB_ANYSEE is not set
# CONFIG_DVB_USB_AU6610 is not set
# CONFIG_DVB_USB_AZ6007 is not set
# CONFIG_DVB_USB_CE6230 is not set
# CONFIG_DVB_USB_DVBSKY is not set
# CONFIG_DVB_USB_EC168 is not set
# CONFIG_DVB_USB_GL861 is not set
# CONFIG_DVB_USB_LME2510 is not set
# CONFIG_DVB_USB_MXL111SF is not set
# CONFIG_DVB_USB_RTL28XXU is not set
# CONFIG_DVB_USB_ZD1301 is not set
# CONFIG_DVB_VES1820 is not set
# CONFIG_DVB_VES1X93 is not set
# CONFIG_DVB_ZD1301_DEMOD is not set
Expand Down Expand Up @@ -7399,6 +7412,7 @@ CONFIG_VHOST_MENU=y
# CONFIG_VIDEO_USBTV is not set
# CONFIG_VIDEO_USBVISION is not set
# CONFIG_VIDEO_V4L2 is not set
# CONFIG_VIDEO_V4L2_SUBDEV_API is not set
# CONFIG_VIDEO_VP27SMPX is not set
# CONFIG_VIDEO_VPX3220 is not set
# CONFIG_VIDEO_VS6624 is not set
Expand Down
14 changes: 14 additions & 0 deletions target/linux/generic/config-6.1
Original file line number Diff line number Diff line change
Expand Up @@ -1907,7 +1907,20 @@ CONFIG_DVB_MAX_ADAPTERS=16
# CONFIG_DVB_TUNER_ITD1000 is not set
# CONFIG_DVB_ULE_DEBUG is not set
# CONFIG_DVB_USB is not set
# CONFIG_DVB_USB_AF9015 is not set
# CONFIG_DVB_USB_AF9035 is not set
# CONFIG_DVB_USB_ANYSEE is not set
# CONFIG_DVB_USB_AU6610 is not set
# CONFIG_DVB_USB_AZ6007 is not set
# CONFIG_DVB_USB_CE6230 is not set
# CONFIG_DVB_USB_DVBSKY is not set
# CONFIG_DVB_USB_EC168 is not set
# CONFIG_DVB_USB_GL861 is not set
# CONFIG_DVB_USB_LME2510 is not set
# CONFIG_DVB_USB_MXL111SF is not set
# CONFIG_DVB_USB_RTL28XXU is not set
# CONFIG_DVB_USB_V2 is not set
# CONFIG_DVB_USB_ZD1301 is not set
# CONFIG_DVB_VES1820 is not set
# CONFIG_DVB_VES1X93 is not set
# CONFIG_DVB_ZD1301_DEMOD is not set
Expand Down Expand Up @@ -7721,6 +7734,7 @@ CONFIG_VHOST_MENU=y
# CONFIG_VIDEO_USBTV is not set
# CONFIG_VIDEO_USBVISION is not set
# CONFIG_VIDEO_V4L2 is not set
# CONFIG_VIDEO_V4L2_SUBDEV_API is not set
# CONFIG_VIDEO_VP27SMPX is not set
# CONFIG_VIDEO_VPX3220 is not set
# CONFIG_VIDEO_VS6624 is not set
Expand Down
14 changes: 14 additions & 0 deletions target/linux/generic/config-6.6
Original file line number Diff line number Diff line change
Expand Up @@ -1947,7 +1947,20 @@ CONFIG_DVB_MAX_ADAPTERS=16
# CONFIG_DVB_TUNER_ITD1000 is not set
# CONFIG_DVB_ULE_DEBUG is not set
# CONFIG_DVB_USB is not set
# CONFIG_DVB_USB_AF9015 is not set
# CONFIG_DVB_USB_AF9035 is not set
# CONFIG_DVB_USB_ANYSEE is not set
# CONFIG_DVB_USB_AU6610 is not set
# CONFIG_DVB_USB_AZ6007 is not set
# CONFIG_DVB_USB_CE6230 is not set
# CONFIG_DVB_USB_DVBSKY is not set
# CONFIG_DVB_USB_EC168 is not set
# CONFIG_DVB_USB_GL861 is not set
# CONFIG_DVB_USB_LME2510 is not set
# CONFIG_DVB_USB_MXL111SF is not set
# CONFIG_DVB_USB_RTL28XXU is not set
# CONFIG_DVB_USB_V2 is not set
# CONFIG_DVB_USB_ZD1301 is not set
# CONFIG_DVB_VES1820 is not set
# CONFIG_DVB_VES1X93 is not set
# CONFIG_DVB_ZD1301_DEMOD is not set
Expand Down Expand Up @@ -7903,6 +7916,7 @@ CONFIG_VHOST_MENU=y
# CONFIG_VIDEO_USBTV is not set
# CONFIG_VIDEO_USBVISION is not set
# CONFIG_VIDEO_V4L2 is not set
# CONFIG_VIDEO_V4L2_SUBDEV_API is not set
# CONFIG_VIDEO_VP27SMPX is not set
# CONFIG_VIDEO_VPX3220 is not set
# CONFIG_VIDEO_VS6624 is not set
Expand Down

0 comments on commit 6c39c53

Please sign in to comment.