[vlc-devel] [PATCH] dtv: Use recommended sequence when using uncommitted switch w/ repeating.
Zoran Turalija
zoran.turalija at gmail.com
Wed May 1 21:16:10 CEST 2013
Replace current not correct code, with code that tries to implement
recommended way of using uncommitted switch w/ repeated messages. In short,
if required first send uncommitted message, then send committed message,
then send repeated sequence. This commit introduces correct wait period
between DiSEqC messages (25ms), while taking into account minimum total
wait time between repeated sequences (100ms).
Digital Satellite Equipment Control (DiSEqC)
Update and Recommendations for Implementation Version 2.1 (*)
February 25, 1998
4.2.1 Recommended sequence of commands for enchanced one-way DiSEqC 1.1
(modified to support external uncommitted devices, unlike as
document suggest when uncommitted switch is integrated: "...it is
most likely to be inside the same device (typically a large SMATV
node with up to 32 inputs) and there is no need allow a 100ms gap
between these messages (or to repeat the uncommitted message)."
We cannot assume such case.)
(A) End of Continuous Tone (if present)
(B) 1st Uncommitted Switch message (write port command 39)
(C) 1st Committed Switch message (write port command 38)
(D) 2nd Uncommitted Switch message (write port command 39)
(E) 2nd Committed Switch message - 1st REPEAT (write port command 38)
(F) SA/SB Tone Burst
(G) Start of Continuous Tone (if required)
Example w/ uncommitted switch (w/ repeat):
-------------------------------------------
Change of Voltage Signaling (if required)
/
[AAA] /
\
-----[BBB]-----[CCC]-----[DDD]-----[EEE]-----[FFF]-----[GGG]
>15ms >25ms >25ms >25ms >15ms >15ms
<---><---><---><---><---><---><---><---><---><---><--->
>54ms >54ms >54ms >54ms >12.5ms
<------------->
\ <------------->
\ /
>100ms is required between repeated commands
4.1.1 Recommended sequence of commands for enchanced one-way DiSEqC 1.0
Example w/o uncommitted switch (no repeat):
-------------------------------------------
Change of Voltage Signaling (if required)
/
[AAA] /
\
-----[CCC]-----[FFF]-----[GGG]
>15ms >15ms >15ms
<---><---><---><---><--->
>54ms >12.5ms
(*) http://www.eutelsat.com/files/live/sites/eutelsatv2/files/contributed/satellites/pdf/Diseqc/associated%20docs/update_recomm_for_implim.pdf
---
modules/access/dtv/linux.c | 25 +++++++++++++++++++------
1 file changed, 19 insertions(+), 6 deletions(-)
diff --git a/modules/access/dtv/linux.c b/modules/access/dtv/linux.c
index cb3315f..b4ac71f 100644
--- a/modules/access/dtv/linux.c
+++ b/modules/access/dtv/linux.c
@@ -813,20 +813,33 @@ known:
msg_Err (d->obj, "cannot send uncommitted DiSEqC command: %m");
return -1;
}
+ msleep(25000); /* wait 25 ms between DiSEqC commands */
+ }
+ if (ioctl (d->frontend, FE_DISEQC_SEND_MASTER_CMD, &cmd) < 0)
+ {
+ msg_Err (d->obj, "cannot send committed DiSEqC command: %m");
+ return -1;
+ }
+ if (uncommitted > 0)
+ {
/* Repeat uncommitted command */
uncmd.msg[0] = 0xE1; /* framing: master, no reply, repeated TX */
+ msleep(25000); /* wait 25 ms before repeating DiSEqC command */
if (ioctl (d->frontend, FE_DISEQC_SEND_MASTER_CMD, &uncmd) < 0)
{
msg_Err (d->obj,
"cannot send repeated uncommitted DiSEqC command: %m");
return -1;
}
- msleep(125000); /* wait 125 ms before committed DiSEqC command */
- }
- if (ioctl (d->frontend, FE_DISEQC_SEND_MASTER_CMD, &cmd) < 0)
- {
- msg_Err (d->obj, "cannot send committed DiSEqC command: %m");
- return -1;
+ msleep(25000); /* wait 25 ms before repeating DiSEqC command */
+ /* Repeat committed command */
+ cmd.msg[0] = 0xE1; /* framing: master, no reply, repeated TX */
+ if (ioctl (d->frontend, FE_DISEQC_SEND_MASTER_CMD, &cmd) < 0)
+ {
+ msg_Err (d->obj,
+ "cannot send repeated committed DiSEqC command: %m");
+ return -1;
+ }
}
msleep (54000 + 15000);
--
1.8.1.2
--
Kind regards,
Zoran Turalija
More information about the vlc-devel
mailing list