Commit af9370e9 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

DTV: add Linux-specific high LNB voltage support

parent 798372cd
...@@ -149,6 +149,12 @@ static const char *const polarization_user[] = { N_("Unspecified (0V)"), ...@@ -149,6 +149,12 @@ static const char *const polarization_user[] = { N_("Unspecified (0V)"),
N_("Vertical (13V)"), N_("Horizontal (18V)"), N_("Vertical (13V)"), N_("Horizontal (18V)"),
N_("Circular Right Hand (13V)"), N_("Circular Left Hand (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 int Open (vlc_object_t *);
static void Close (vlc_object_t *); static void Close (vlc_object_t *);
...@@ -240,14 +246,14 @@ vlc_module_begin () ...@@ -240,14 +246,14 @@ vlc_module_begin ()
change_integer_range (0, 18) change_integer_range (0, 18)
change_private () change_private ()
change_safe () change_safe ()
#if 0 //def __linux__ #ifdef __linux__
add_bool ("dvb-high-voltage", false, add_bool ("dvb-high-voltage", false,
HIGH_VOLTAGE_TEXT, HIGH_VOLTAGE_LONGTEXT, false) HIGH_VOLTAGE_TEXT, HIGH_VOLTAGE_LONGTEXT, false)
#endif
#if 0
add_integer ("dvb-tone", -1, TONE_TEXT, TONE_LONGTEXT, true) add_integer ("dvb-tone", -1, TONE_TEXT, TONE_LONGTEXT, true)
change_integer_list (tone_vlc, auto_off_on) change_integer_list (tone_vlc, auto_off_on)
change_safe () change_safe ()
#endif
#if 0
add_integer ("dvb-lnb-lof1", 0, LNB_LOF1_TEXT, LNB_LOF1_LONGTEXT, true) add_integer ("dvb-lnb-lof1", 0, LNB_LOF1_TEXT, LNB_LOF1_LONGTEXT, true)
change_integer_range (0, 0x7fffffff) change_integer_range (0, 0x7fffffff)
change_safe () change_safe ()
......
...@@ -550,6 +550,11 @@ static unsigned dvb_parse_polarization (char pol) ...@@ -550,6 +550,11 @@ static unsigned dvb_parse_polarization (char pol)
int dvb_set_sec (dvb_device_t *d, 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); unsigned voltage = dvb_parse_polarization (pol);
return dvb_set_prop (d, DTV_VOLTAGE, voltage); return dvb_set_prop (d, DTV_VOLTAGE, voltage);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment