Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] DVB-S2X tunning support #189

Open
lars18th opened this issue Feb 22, 2023 · 9 comments
Open

[Feature Request] DVB-S2X tunning support #189

lars18th opened this issue Feb 22, 2023 · 9 comments
Labels

Comments

@lars18th
Copy link
Contributor

Please, could you try to add support for msys=dvbs2x ?

@Barracuda09 Barracuda09 added enhancement good first issue Please feel free to ask me for pointers labels Feb 25, 2023
@Barracuda09
Copy link
Owner

What should be supported for these DVB-S2X tuners?

Barracuda09 added a commit that referenced this issue Feb 28, 2023
@Barracuda09
Copy link
Owner

I have added msys=dvbs2x and that will use the SYS_DVBS2

@Barracuda09 Barracuda09 added Fixed and removed good first issue Please feel free to ask me for pointers labels Mar 1, 2023
@sundtek
Copy link

sundtek commented Dec 30, 2023

you mean SYS_DVBS2X?

@Barracuda09
Copy link
Owner

@sundtek

Yes that should probably use SYS_DVBS2X.

But probably there should be more added to make this work? I have not tried this myself, is there any test channels?

@Barracuda09 Barracuda09 removed the Fixed label Jan 8, 2024
@Barracuda09
Copy link
Owner

@sundtek

How is this done in SundTek tuner driver for SYS_DVBS2X?

@sundtek
Copy link

sundtek commented Jan 8, 2024

We only need SYS_DVBS2X and the symbolrate to be set, the other parameters are automatically detected.

@Barracuda09
Copy link
Owner

Is this similar to #160?

But SYS_DVBS2X is still not standard in Linux v6.0

@sundtek
Copy link

sundtek commented Jan 8, 2024

They just didn't care about it or implemented other quirks for it.
SYS_DVBS2X was officially not supported before, you're pretty safe to say if it's not supported by the drivers it won't support it (with older linux versions). I would just not bother about it if a linux version doesn't support it if I were you and just use SYS_DVBS2X (if not defined, define it yourself)

Another advantage of our userspace DVB stack we automatically support that down to linux 2.6.14 (Linux kernel releaed ~ 2006)

@Barracuda09
Copy link
Owner

Barracuda09 commented Jan 8, 2024

Here is from Vu+ an linux kernel patch patch that defines it as 21

From e79f10463a103a1e9e27e74d084082053d140fb3 Mon Sep 17 00:00:00 2001
From: hschang <chang@dev3>
Date: Wed, 28 Feb 2018 16:04:44 +0900
Subject: Support DVB-S2X for uno4k, ultimo4k, uno4kse.

---
 .../files/linux_3_1x_dvbs2x.patch                  | 81 ++++++++++++++++++++++
 .../linux-libc-headers/linux-libc-headers_3.19.bb  |  6 +-
 .../recipes-kernel/linux/linux-vuplus-3.14.28.inc  |  1 +
 .../linux-vuplus-3.14.28/linux_3_1x_dvbs2x.patch   | 81 ++++++++++++++++++++++
 .../linux/linux-vuplus-vuultimo4k_3.14.28.bb       |  2 +-
 meta-bsp/recipes-vuplus/enigma2/enigma2.bbappend   |  2 -
 meta-openvuplus/recipes-vuplus/enigma2/enigma2.bb  |  2 +-
 7 files changed, 170 insertions(+), 5 deletions(-)
 create mode 100644 meta-bsp/recipes-kernel/linux-libc-headers/files/linux_3_1x_dvbs2x.patch
 create mode 100644 meta-bsp/recipes-kernel/linux/linux-vuplus-3.14.28/linux_3_1x_dvbs2x.patch

diff --git a/meta-bsp/recipes-kernel/linux-libc-headers/files/linux_3_1x_dvbs2x.patch b/meta-bsp/recipes-kernel/linux-libc-headers/files/linux_3_1x_dvbs2x.patch
new file mode 100644
index 0000000..0933dc6
--- /dev/null
+++ b/meta-bsp/recipes-kernel/linux-libc-headers/files/linux_3_1x_dvbs2x.patch
@@ -0,0 +1,81 @@
+diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c
+index 1f925e8..57ed889 100644
+--- a/drivers/media/dvb-core/dvb_frontend.c
++++ b/drivers/media/dvb-core/dvb_frontend.c
+@@ -170,6 +170,7 @@ static enum dvbv3_emulation_type dvbv3_type(u32 delivery_system)
+ 		return DVBV3_QAM;
+ 	case SYS_DVBS:
+ 	case SYS_DVBS2:
++	case SYS_DVBS2X:
+ 	case SYS_TURBO:
+ 	case SYS_ISDBS:
+ 	case SYS_DSS:
+@@ -893,6 +894,7 @@ static int dvb_frontend_check_parameters(struct dvb_frontend *fe)
+ 	switch (c->delivery_system) {
+ 	case SYS_DVBS:
+ 	case SYS_DVBS2:
++	case SYS_DVBS2X:
+ 	case SYS_TURBO:
+ 	case SYS_DVBC_ANNEX_A:
+ 	case SYS_DVBC_ANNEX_C:
+@@ -959,6 +961,7 @@ static int dvb_frontend_clear_cache(struct dvb_frontend *fe)
+ 	switch (c->delivery_system) {
+ 	case SYS_DVBS:
+ 	case SYS_DVBS2:
++	case SYS_DVBS2X:
+ 	case SYS_TURBO:
+ 		c->modulation = QPSK;   /* implied for DVB-S in legacy API */
+ 		c->rolloff = ROLLOFF_35;/* implied for DVB-S */
+@@ -2102,6 +2105,7 @@ static int dtv_set_frontend(struct dvb_frontend *fe)
+ 		switch (c->delivery_system) {
+ 		case SYS_DVBS:
+ 		case SYS_DVBS2:
++		case SYS_DVBS2X:
+ 		case SYS_ISDBS:
+ 		case SYS_TURBO:
+ 		case SYS_DVBC_ANNEX_A:
+diff --git a/include/uapi/linux/dvb/frontend.h b/include/uapi/linux/dvb/frontend.h
+index c56d77c..5aebaa9 100644
+--- a/include/uapi/linux/dvb/frontend.h
++++ b/include/uapi/linux/dvb/frontend.h
+@@ -165,6 +165,24 @@ typedef enum fe_code_rate {
+ 	FEC_3_5,
+ 	FEC_9_10,
+ 	FEC_2_5,
++	FEC_13_45=13,
++	FEC_9_20=14,
++	FEC_11_20=15,
++	FEC_23_36=16,
++	FEC_25_36=17,
++	FEC_13_18=18,
++	FEC_26_45=19,
++	FEC_28_45=20,
++	FEC_7_9=21,
++	FEC_77_90=22,
++	FEC_32_45=23,
++	FEC_11_15=24,
++	FEC_1_2_L=25,
++	FEC_8_15_L=26,
++	FEC_3_5_L=27,
++	FEC_2_3_L=28,
++	FEC_5_9_L=29,
++	FEC_26_45_L=30
+ } fe_code_rate_t;
+ 
+ 
+@@ -183,6 +201,7 @@ typedef enum fe_modulation {
+ 	APSK_32,
+ 	DQPSK,
+ 	QAM_4_NR,
++	APSK_8,
+ } fe_modulation_t;
+ 
+ typedef enum fe_transmit_mode {
+@@ -410,6 +429,7 @@ typedef enum fe_delivery_system {
+ 	SYS_DVBT2,
+ 	SYS_TURBO,
+ 	SYS_DVBC_ANNEX_C,
++	SYS_DVBS2X = 21,
+ } fe_delivery_system_t;
+ 
+ /* backward compatibility */
diff --git a/meta-bsp/recipes-kernel/linux-libc-headers/linux-libc-headers_3.19.bb b/meta-bsp/recipes-kernel/linux-libc-headers/linux-libc-headers_3.19.bb
index 62755c8..813bf8b 100644
--- a/meta-bsp/recipes-kernel/linux-libc-headers/linux-libc-headers_3.19.bb
+++ b/meta-bsp/recipes-kernel/linux-libc-headers/linux-libc-headers_3.19.bb
@@ -1,9 +1,13 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
 
-PR .= "-bsp2"
+PR .= "-bsp3"
 
 require linux-libc-headers.inc
 
+SRC_URI += " \
+	file://linux_3_1x_dvbs2x.patch \
+"
+
 SRC_URI_append_vuultimo4k = " \
 	file://linux_3.19_dmx_source_dvr.patch \
 "
diff --git a/meta-bsp/recipes-kernel/linux/linux-vuplus-3.14.28.inc b/meta-bsp/recipes-kernel/linux/linux-vuplus-3.14.28.inc
index 147559e..cd15209 100644
--- a/meta-bsp/recipes-kernel/linux/linux-vuplus-3.14.28.inc
+++ b/meta-bsp/recipes-kernel/linux/linux-vuplus-3.14.28.inc
@@ -20,6 +20,7 @@ SRC_URI += "http://archive.vuplus.com/download/kernel/stblinux-3.14-1.8.tar.bz2
 	file://linux_rpmb_not_alloc.patch \
 	file://rt2800usb_fix_warn_tx_status_timeout_to_dbg.patch \
 	file://usb_core_hub_msleep.patch \
+	file://linux_3_1x_dvbs2x.patch \
 	"
 
 SRC_URI += "${@base_contains("VUPLUS_FEATURES", "dvbproxy", "file://linux_dvb_adapter.patch;patch=1;pnum=1", "", d)}"
diff --git a/meta-bsp/recipes-kernel/linux/linux-vuplus-3.14.28/linux_3_1x_dvbs2x.patch b/meta-bsp/recipes-kernel/linux/linux-vuplus-3.14.28/linux_3_1x_dvbs2x.patch
new file mode 100644
index 0000000..0933dc6
--- /dev/null
+++ b/meta-bsp/recipes-kernel/linux/linux-vuplus-3.14.28/linux_3_1x_dvbs2x.patch
@@ -0,0 +1,81 @@
+diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c
+index 1f925e8..57ed889 100644
+--- a/drivers/media/dvb-core/dvb_frontend.c
++++ b/drivers/media/dvb-core/dvb_frontend.c
+@@ -170,6 +170,7 @@ static enum dvbv3_emulation_type dvbv3_type(u32 delivery_system)
+ 		return DVBV3_QAM;
+ 	case SYS_DVBS:
+ 	case SYS_DVBS2:
++	case SYS_DVBS2X:
+ 	case SYS_TURBO:
+ 	case SYS_ISDBS:
+ 	case SYS_DSS:
+@@ -893,6 +894,7 @@ static int dvb_frontend_check_parameters(struct dvb_frontend *fe)
+ 	switch (c->delivery_system) {
+ 	case SYS_DVBS:
+ 	case SYS_DVBS2:
++	case SYS_DVBS2X:
+ 	case SYS_TURBO:
+ 	case SYS_DVBC_ANNEX_A:
+ 	case SYS_DVBC_ANNEX_C:
+@@ -959,6 +961,7 @@ static int dvb_frontend_clear_cache(struct dvb_frontend *fe)
+ 	switch (c->delivery_system) {
+ 	case SYS_DVBS:
+ 	case SYS_DVBS2:
++	case SYS_DVBS2X:
+ 	case SYS_TURBO:
+ 		c->modulation = QPSK;   /* implied for DVB-S in legacy API */
+ 		c->rolloff = ROLLOFF_35;/* implied for DVB-S */
+@@ -2102,6 +2105,7 @@ static int dtv_set_frontend(struct dvb_frontend *fe)
+ 		switch (c->delivery_system) {
+ 		case SYS_DVBS:
+ 		case SYS_DVBS2:
++		case SYS_DVBS2X:
+ 		case SYS_ISDBS:
+ 		case SYS_TURBO:
+ 		case SYS_DVBC_ANNEX_A:
+diff --git a/include/uapi/linux/dvb/frontend.h b/include/uapi/linux/dvb/frontend.h
+index c56d77c..5aebaa9 100644
+--- a/include/uapi/linux/dvb/frontend.h
++++ b/include/uapi/linux/dvb/frontend.h
+@@ -165,6 +165,24 @@ typedef enum fe_code_rate {
+ 	FEC_3_5,
+ 	FEC_9_10,
+ 	FEC_2_5,
++	FEC_13_45=13,
++	FEC_9_20=14,
++	FEC_11_20=15,
++	FEC_23_36=16,
++	FEC_25_36=17,
++	FEC_13_18=18,
++	FEC_26_45=19,
++	FEC_28_45=20,
++	FEC_7_9=21,
++	FEC_77_90=22,
++	FEC_32_45=23,
++	FEC_11_15=24,
++	FEC_1_2_L=25,
++	FEC_8_15_L=26,
++	FEC_3_5_L=27,
++	FEC_2_3_L=28,
++	FEC_5_9_L=29,
++	FEC_26_45_L=30
+ } fe_code_rate_t;
+ 
+ 
+@@ -183,6 +201,7 @@ typedef enum fe_modulation {
+ 	APSK_32,
+ 	DQPSK,
+ 	QAM_4_NR,
++	APSK_8,
+ } fe_modulation_t;
+ 
+ typedef enum fe_transmit_mode {
+@@ -410,6 +429,7 @@ typedef enum fe_delivery_system {
+ 	SYS_DVBT2,
+ 	SYS_TURBO,
+ 	SYS_DVBC_ANNEX_C,
++	SYS_DVBS2X = 21,
+ } fe_delivery_system_t;
+ 
+ /* backward compatibility */
diff --git a/meta-bsp/recipes-kernel/linux/linux-vuplus-vuultimo4k_3.14.28.bb b/meta-bsp/recipes-kernel/linux/linux-vuplus-vuultimo4k_3.14.28.bb
index c67c3c0..f03970f 100644
--- a/meta-bsp/recipes-kernel/linux/linux-vuplus-vuultimo4k_3.14.28.bb
+++ b/meta-bsp/recipes-kernel/linux/linux-vuplus-vuultimo4k_3.14.28.bb
@@ -2,7 +2,7 @@ require linux-vuplus-3.14.28.inc
 
 COMPATIBLE_MACHINE = "^(vuultimo4k)$"
 
-PR = "${INC_PR}.10"
+PR = "${INC_PR}.11"
 
 SRC_URI = "http://archive.vuplus.com/download/kernel/stblinux-3.14-1.12.tar.bz2 \
     file://${KERNEL_CONFIG} \
diff --git a/meta-bsp/recipes-vuplus/enigma2/enigma2.bbappend b/meta-bsp/recipes-vuplus/enigma2/enigma2.bbappend
index da39894..393826a 100644
--- a/meta-bsp/recipes-vuplus/enigma2/enigma2.bbappend
+++ b/meta-bsp/recipes-vuplus/enigma2/enigma2.bbappend
@@ -54,8 +54,6 @@ SRC_URI_append_vuuno4kse = " \
 SRC_URI_append_vuzero4k = " \
 	file://vu_hd_1080p_default.patch \
 	file://enigma2_vuplus_uianimation_speed.patch \
-	file://enigma2_vuplus_dvbs2x.patch \
-	file://enigma2_vuplus_mis_pls.patch \
 	file://enigma2_vuplus_zero4k_blindscan.patch \
 "
 
diff --git a/meta-openvuplus/recipes-vuplus/enigma2/enigma2.bb b/meta-openvuplus/recipes-vuplus/enigma2/enigma2.bb
index 4df7f86..f7b15d2 100644
--- a/meta-openvuplus/recipes-vuplus/enigma2/enigma2.bb
+++ b/meta-openvuplus/recipes-vuplus/enigma2/enigma2.bb
@@ -233,7 +233,7 @@ DEPENDS += "${@base_contains("VUPLUS_FEATURES", "uianimation", "libgles libvugle
 RDEPENDS_${PN}_append_vuplus += "${@base_contains("VUPLUS_FEATURES", "uianimation", "libvugles2" , "", d)}"
 
 PN = "enigma2"
-PR = "r175"
+PR = "r176"
 
 inherit gitpkgv pythonnative
 
-- 
cgit 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants