[vlc-commits] DTV: add Linux-specific high LNB voltage support
Rémi Denis-Courmont
git at videolan.org
Wed Mar 23 18:51:48 CET 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Mar 23 19:34:33 2011 +0200| [af9370e95a4fdee627fd4feac642c91b5ad9c69a] | committer: Rémi Denis-Courmont
DTV: add Linux-specific high LNB voltage support
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=af9370e95a4fdee627fd4feac642c91b5ad9c69a
---
modules/access/dtv/access.c | 12 +++++++++---
modules/access/dtv/linux.c | 5 +++++
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/modules/access/dtv/access.c b/modules/access/dtv/access.c
index 0f68c92..c7b825e 100644
--- a/modules/access/dtv/access.c
+++ b/modules/access/dtv/access.c
@@ -149,6 +149,12 @@ static const char *const polarization_user[] = { N_("Unspecified (0V)"),
N_("Vertical (13V)"), N_("Horizontal (18V)"),
N_("Circular Right Hand (13V)"), N_("Circular Left Hand (18V)") };
+#define HIGH_VOLTAGE_TEXT N_("High LNB voltage")
+#define HIGH_VOLTAGE_LONGTEXT N_( \
+ "If the cables between the satellilte low noise block-downconverter and " \
+ "the receiver are long, higher voltage may be required.\n" \
+ "Not all receivers support this.")
+
static int Open (vlc_object_t *);
static void Close (vlc_object_t *);
@@ -240,14 +246,14 @@ vlc_module_begin ()
change_integer_range (0, 18)
change_private ()
change_safe ()
-#if 0 //def __linux__
+#ifdef __linux__
add_bool ("dvb-high-voltage", false,
HIGH_VOLTAGE_TEXT, HIGH_VOLTAGE_LONGTEXT, false)
+#endif
+#if 0
add_integer ("dvb-tone", -1, TONE_TEXT, TONE_LONGTEXT, true)
change_integer_list (tone_vlc, auto_off_on)
change_safe ()
-#endif
-#if 0
add_integer ("dvb-lnb-lof1", 0, LNB_LOF1_TEXT, LNB_LOF1_LONGTEXT, true)
change_integer_range (0, 0x7fffffff)
change_safe ()
diff --git a/modules/access/dtv/linux.c b/modules/access/dtv/linux.c
index cadf494..04a5108 100644
--- a/modules/access/dtv/linux.c
+++ b/modules/access/dtv/linux.c
@@ -550,6 +550,11 @@ static unsigned dvb_parse_polarization (char pol)
int dvb_set_sec (dvb_device_t *d, char pol)
{
+ /* Always try to configure high voltage, but only warn on enable failure */
+ int val = var_InheritBool (d->obj, "dvb-high-voltage");
+ if (ioctl (d->frontend, FE_ENABLE_HIGH_LNB_VOLTAGE, &val) < 0 && val)
+ msg_Err (d->obj, "cannot enable high LNB voltage: %m");
+
unsigned voltage = dvb_parse_polarization (pol);
return dvb_set_prop (d, DTV_VOLTAGE, voltage);
More information about the vlc-commits
mailing list