[vlc-devel] [PATCH v2] dtv multisat: Extend support for up to 16 uncommitted ports.
Zoran Turalija
zoran.turalija at gmail.com
Wed Nov 23 10:41:50 CET 2016
On Wed, Nov 23, 2016 at 10:38:51AM +0100, Zoran Turalija wrote:
> This will allow support for up to 64 satellites.
>
> There are some 8/10 port DiSEqC switches, that act
> as an uncommitted switch or a combination of committed
> and uncommitted switches. Later is already supported,
> and with this change we support former.
>
> If used switch acts as eg. 10-port uncommitted switch,
> one can now tune to a satellite on port 6 using vlc
> switch:
>
> :dvb-uncommitted=6
>
> Of course, using more conventional equipment or a switch
> that combines committed and uncommitted switches within
> itself, a setup would consist of 4 committed ports located
> under first two uncommitted ports, and 2 more committed
> ports under third uncommitted port.
>
> This kind of setup is already supported, and tuning to
> satellite on "port 6" was/is possible using vlc switches:
>
> :dvb-uncommitted=2 :dvb-satno=2
>
> Also, both occurrences of term "LNB" associated with uncommitted
> switches have been renamed to a more appropriate term "port",
> since in most cases output ports of uncommitted switch lead to
> an input port of committed switches, not to LNBs.
> ---
> modules/access/dtv/access.c | 6 +++---
> modules/access/dtv/linux.c | 6 ++----
> 2 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/modules/access/dtv/access.c b/modules/access/dtv/access.c
> index 4623ad3..67bf7c7 100644
> --- a/modules/access/dtv/access.c
> +++ b/modules/access/dtv/access.c
> @@ -208,12 +208,12 @@ static const char *const satno_user[] = { N_("Unspecified"),
> "A/1", "B/2", "C/3", "D/4" };
> #endif
>
> -#define UNCOMMITTED_TEXT N_("Uncommitted DiSEqC LNB number")
> +#define UNCOMMITTED_TEXT N_("Uncommitted DiSEqC port number")
> #define UNCOMMITTED_LONGTEXT N_( \
> "If the satellite receiver is connected to multiple " \
> "low noise block-downconverters (LNB) through a cascade formed from " \
> "DiSEqC 1.1 uncommitted switch and DiSEqC 1.0 committed switch, " \
> - "the correct uncommitted LNB can be selected (1 to 4). " \
> + "the correct uncommitted port can be selected " \
> "If there is no uncommitted switch, this parameter should be 0.")
>
> /* BDA module additional DVB-S Parameters */
> @@ -403,7 +403,7 @@ vlc_module_begin ()
> change_integer_list (satno_vlc, satno_user)
> change_safe ()
> add_integer ("dvb-uncommitted", 0, UNCOMMITTED_TEXT, UNCOMMITTED_LONGTEXT, true)
> - change_integer_list (satno_vlc, satno_user)
> + change_integer_range (0, 16)
> change_safe ()
> add_integer ("dvb-tone", -1, TONE_TEXT, TONE_LONGTEXT, true)
> change_integer_list (auto_off_on_vlc, auto_off_on_user)
> diff --git a/modules/access/dtv/linux.c b/modules/access/dtv/linux.c
> index 6e21e72..41ddcb9 100644
> --- a/modules/access/dtv/linux.c
> +++ b/modules/access/dtv/linux.c
> @@ -848,14 +848,12 @@ known:
> unsigned uncommitted = var_InheritInteger (d->obj, "dvb-uncommitted");
> if (uncommitted > 0)
> {
> - uncommitted = (uncommitted - 1) & 3;
> + uncommitted = (uncommitted - 1) & 15;
> uncmd.msg[0] = 0xE0; /* framing: master, no reply, 1st TX */
> uncmd.msg[1] = 0x10; /* address: all LNB/switch */
> uncmd.msg[2] = 0x39; /* command: Write Port Group 1 (uncommitted) */
> uncmd.msg[3] = 0xF0 /* data[0]: clear all bits */
> - | (uncommitted << 2) /* LNB (A, B, C or D) */
> - | ((voltage == SEC_VOLTAGE_18) << 1) /* polarization */
> - | (tone == SEC_TONE_ON); /* option */
> + | uncommitted; /* port (1..16) */
> uncmd.msg[4] = uncmd.msg[5] = 0; /* unused */
> uncmd.msg_len = 4; /* length */
> if (ioctl (d->frontend, FE_DISEQC_SEND_MASTER_CMD, &uncmd) < 0)
Please, ignore this incomplete patch.
--
Kind regards,
Zoran Turalija
More information about the vlc-devel
mailing list