1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Added support for "Satellite Channel Routing" (SCR) according to EN50607, also known as "JESS"

This commit is contained in:
Klaus Schmidinger 2015-01-26 12:02:14 +01:00
parent 4fcd3ba56e
commit 4aa496b079
6 changed files with 86 additions and 27 deletions

View File

@ -2984,6 +2984,7 @@ Frank Neumann <fnu@yavdr.org>
for suggesting to reduce the thread and I/O priority cCuttingThread::Action() for suggesting to reduce the thread and I/O priority cCuttingThread::Action()
for reporting a problem with tuning timeouts when using SCR with multiple tuners for reporting a problem with tuning timeouts when using SCR with multiple tuners
for fixing the German translation of "VDR will shut down in %s minutes" for fixing the German translation of "VDR will shut down in %s minutes"
for adding support for "Satellite Channel Routing" (SCR) according to EN50607 ("JESS")
Gerald Dachs <vdr@dachsweb.de> Gerald Dachs <vdr@dachsweb.de>
for reporting a problem with checking for minimum line length of 21 characters in for reporting a problem with checking for minimum line length of 21 characters in
@ -3247,6 +3248,7 @@ Seppo Ingalsuo <seppo.ingalsuo@iki.fi>
Manfred Völkel <mvoelkel@digitaldevices.de> Manfred Völkel <mvoelkel@digitaldevices.de>
for suggesting to make all bonded devices (except for the master) turn off their LNB for suggesting to make all bonded devices (except for the master) turn off their LNB
power completely to avoid problems when receiving vertically polarized transponders power completely to avoid problems when receiving vertically polarized transponders
for adding support for "Satellite Channel Routing" (SCR) according to EN50607 ("JESS")
Thomas Maass <mase@setho.org> Thomas Maass <mase@setho.org>
for reporting a difference in the internal sequence of actions when pressing the Blue for reporting a difference in the internal sequence of actions when pressing the Blue

View File

@ -8434,3 +8434,5 @@ Video Disk Recorder Revision History
+ The '8' key for testing an edited sequence now always jumps to the next *end* + The '8' key for testing an edited sequence now always jumps to the next *end*
mark. This allows for testing edits in recordings that have actually been cut, as mark. This allows for testing edits in recordings that have actually been cut, as
well as recordings that have not been cut, in case "Skip edited parts" is enabled. well as recordings that have not been cut, in case "Skip edited parts" is enabled.
- Added support for "Satellite Channel Routing" (SCR) according to EN50607, also
known as "JESS" (thanks to Manfred Völkel and Frank Neumann).

View File

@ -391,8 +391,9 @@ access your DiSEqC equipment (see man vdr(5) for details).
A special form of DiSEqC is used to connect several receivers to one signal A special form of DiSEqC is used to connect several receivers to one signal
source using only a single cable. This method, known as "Satellite Channel Routing" source using only a single cable. This method, known as "Satellite Channel Routing"
according to EN50494 (aka "Unicable(TM)", "OLT(TM)", "SatCR", "Single Cable according to EN50494 (aka "Unicable(TM)", "OLT(TM)", "SatCR", "Single Cable
Distribution", "Channel Stacking System" or "Single Cable Interface") uses Distribution", "Channel Stacking System" or "Single Cable Interface") or
the file "scr.conf" to specify which SCR channels use which user band frequency. EN50607 (aka "JESS") uses the file "scr.conf" to specify which SCR channels
use which user band frequency.
If DVB-S devices need to be connected to the same satellite cable, but no If DVB-S devices need to be connected to the same satellite cable, but no
"Satellite Channel Routing" is available, they can be set to be "bonded" in "Satellite Channel Routing" is available, they can be set to be "bonded" in

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: diseqc.c 3.3 2013/12/28 11:33:08 kls Exp $ * $Id: diseqc.c 3.4 2015/01/26 12:02:14 kls Exp $
*/ */
#include "diseqc.h" #include "diseqc.h"
@ -164,7 +164,7 @@ bool cScr::Parse(const char *s)
bool result = false; bool result = false;
int fields = sscanf(s, "%d %u %d", &channel, &userBand, &pin); int fields = sscanf(s, "%d %u %d", &channel, &userBand, &pin);
if (fields == 2 || fields == 3) { if (fields == 2 || fields == 3) {
if (channel >= 0 && channel < 8) { if (channel >= 0 && channel < 32) {
result = true; result = true;
if (fields == 3 && (pin < 0 || pin > 255)) { if (fields == 3 && (pin < 0 || pin > 255)) {
esyslog("Error: invalid SCR pin '%d'", pin); esyslog("Error: invalid SCR pin '%d'", pin);
@ -255,26 +255,52 @@ bool cDiseqc::Parse(const char *s)
uint cDiseqc::SetScrFrequency(uint SatFrequency, const cScr *Scr, uint8_t *Codes) const uint cDiseqc::SetScrFrequency(uint SatFrequency, const cScr *Scr, uint8_t *Codes) const
{ {
uint t = SatFrequency == 0 ? 0 : (SatFrequency + Scr->UserBand() + 2) / 4 - 350; // '+ 2' together with '/ 4' results in rounding! if ((Codes[0] & 0xF0) == 0x70 ) { // EN50607 aka JESS
if (t < 1024 && Scr->Channel() >= 0 && Scr->Channel() < 8) { uint t = SatFrequency == 0 ? 0 : (SatFrequency - 100);
Codes[3] = t >> 8 | (t == 0 ? 0 : scrBank << 2) | Scr->Channel() << 5; if (t < 2048 && Scr->Channel() >= 0 && Scr->Channel() < 32) {
Codes[4] = t; Codes[1] = t >> 8 | Scr->Channel() << 3;
if (t) Codes[2] = t;
return (t + 350) * 4 - SatFrequency; Codes[3] = (t == 0 ? 0 : scrBank);
if (t)
return Scr->UserBand();
}
} }
else { // EN50494 aka Unicable
uint t = SatFrequency == 0 ? 0 : (SatFrequency + Scr->UserBand() + 2) / 4 - 350; // '+ 2' together with '/ 4' results in rounding!
if (t < 1024 && Scr->Channel() >= 0 && Scr->Channel() < 8) {
Codes[3] = t >> 8 | (t == 0 ? 0 : scrBank << 2) | Scr->Channel() << 5;
Codes[4] = t;
if (t)
return (t + 350) * 4 - SatFrequency;
}
}
esyslog("ERROR: invalid SCR channel number %d or frequency %d", Scr->Channel(),SatFrequency);
return 0; return 0;
} }
int cDiseqc::SetScrPin(const cScr *Scr, uint8_t *Codes) const int cDiseqc::SetScrPin(const cScr *Scr, uint8_t *Codes) const
{ {
if (Scr->Pin() >= 0 && Scr->Pin() <= 255) { if ((Codes[0] & 0xF0) == 0x70 ) { // EN50607 aka JESS
Codes[2] = 0x5C; if (Scr->Pin() >= 0 && Scr->Pin() <= 255) {
Codes[5] = Scr->Pin(); Codes[0] = 0x71;
return 6; Codes[4] = Scr->Pin();
return 5;
}
else {
Codes[0] = 0x70;
return 4;
}
} }
else { else { // EN50494 aka Unicable
Codes[2] = 0x5A; if (Scr->Pin() >= 0 && Scr->Pin() <= 255) {
return 5; Codes[2] = 0x5C;
Codes[5] = Scr->Pin();
return 6;
}
else {
Codes[2] = 0x5A;
return 5;
}
} }
} }
@ -319,7 +345,7 @@ const char *cDiseqc::GetScrBank(const char *s) const
char *p = NULL; char *p = NULL;
errno = 0; errno = 0;
int n = strtol(s, &p, 10); int n = strtol(s, &p, 10);
if (!errno && p != s && n >= 0 && n < 8) { if (!errno && p != s && n >= 0 && n < 256) {
if (parsing) { if (parsing) {
if (scrBank < 0) if (scrBank < 0)
scrBank = n; scrBank = n;

View File

@ -82,7 +82,7 @@ S13.0E 99999 H 10600 t V W15 [E0 10 38 F7] W15 B W15 T
# S19.2E 12110 V 11080 t v # S19.2E 12110 V 11080 t v
# S19.2E 99999 V 10720 t v # S19.2E 99999 V 10720 t v
# #
# SCR (Satellite Channel Routing): # SCR (Satellite Channel Routing) EN50494:
# #
# S19.2E 11700 V 9750 t V W10 S0 [E0 10 5A 00 00] W10 v # S19.2E 11700 V 9750 t V W10 S0 [E0 10 5A 00 00] W10 v
# S19.2E 99999 V 10600 t V W10 S1 [E0 10 5A 00 00] W10 v # S19.2E 99999 V 10600 t V W10 S1 [E0 10 5A 00 00] W10 v
@ -94,6 +94,28 @@ S13.0E 99999 H 10600 t V W15 [E0 10 38 F7] W15 B W15 T
# S13.0E 11700 H 9750 t V W10 S6 [E0 10 5A 00 00] W10 v # S13.0E 11700 H 9750 t V W10 S6 [E0 10 5A 00 00] W10 v
# S13.0E 99999 H 10600 t V W10 S7 [E0 10 5A 00 00] W10 v # S13.0E 99999 H 10600 t V W10 S7 [E0 10 5A 00 00] W10 v
# #
# SCR (Satellite Channel Routing) EN50607 "JESS":
#
# S19.2E 11700 V 9750 t V W10 S0 [70 00 00 00] W10 v
# S19.2E 99999 V 10600 t V W10 S1 [70 00 00 00] W10 v
# S19.2E 11700 H 9750 t V W10 S2 [70 00 00 00] W10 v
# S19.2E 99999 H 10600 t V W10 S3 [70 00 00 00] W10 v
#
# S13.0E 11700 V 9750 t V W10 S4 [70 00 00 00] W10 v
# S13.0E 99999 V 10600 t V W10 S5 [70 00 00 00] W10 v
# S13.0E 11700 H 9750 t V W10 S6 [70 00 00 00] W10 v
# S13.0E 99999 H 10600 t V W10 S7 [70 00 00 00] W10 v
#
# S23.0E 11700 V 9750 t V W10 S8 [70 00 00 00] W10 v
# S23.0E 99999 V 10600 t V W10 S9 [70 00 00 00] W10 v
# S23.0E 11700 H 9750 t V W10 S10 [70 00 00 00] W10 v
# S23.0E 99999 H 10600 t V W10 S11 [70 00 00 00] W10 v
#
# S28.2E 11700 V 9750 t V W10 S12 [70 00 00 00] W10 v
# S28.2E 99999 V 10600 t V W10 S13 [70 00 00 00] W10 v
# S28.2E 11700 H 9750 t V W10 S14 [70 00 00 00] W10 v
# S28.2E 99999 H 10600 t V W10 S15 [70 00 00 00] W10 v
#
# Positioner for steerable dish: # Positioner for steerable dish:
# #
# S360E 11700 V 9750 t V W20 P W20 t v # S360E 11700 V 9750 t V W20 P W20 t v

View File

@ -14,11 +14,17 @@
# #
# Examples: # Examples:
# 0 1284 # EN50494 & EN50607 ("JESS")
# 1 1400 # 0 974
# 2 1516 # 1 1076
# 3 1632 # 2 1178
# 4 1748 # 3 1280
# 5 1864 # 4 1382
# 6 1980 # 5 1484
# 7 2096 # 6 1586
# 7 1688
# EN50607 ("JESS") only
# 8 1790
# 9 1892
# 10 1994
# 11 2096