Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 638348
Collapse All | Expand All

(-)diseqc.c (-4 / +4 lines)
Lines 253-262 Link Here
253
  return result;
253
  return result;
254
}
254
}
255
255
256
uint cDiseqc::SetScrFrequency(uint SatFrequency, const cScr *Scr, uint8_t *Codes) const
256
int cDiseqc::SetScrFrequency(int SatFrequency, const cScr *Scr, uint8_t *Codes) const
257
{
257
{
258
  if ((Codes[0] & 0xF0) == 0x70 ) { // EN50607 aka JESS
258
  if ((Codes[0] & 0xF0) == 0x70 ) { // EN50607 aka JESS
259
     uint t = SatFrequency == 0 ? 0 : (SatFrequency - 100);
259
     int t = SatFrequency == 0 ? 0 : (SatFrequency - 100);
260
     if (t < 2048 && Scr->Channel() >= 0 && Scr->Channel() < 32) {
260
     if (t < 2048 && Scr->Channel() >= 0 && Scr->Channel() < 32) {
261
        Codes[1] = t >> 8 | Scr->Channel() << 3;
261
        Codes[1] = t >> 8 | Scr->Channel() << 3;
262
        Codes[2] = t;
262
        Codes[2] = t;
Lines 266-272 Link Here
266
        }
266
        }
267
     }
267
     }
268
  else { // EN50494 aka Unicable
268
  else { // EN50494 aka Unicable
269
     uint t = SatFrequency == 0 ? 0 : (SatFrequency + Scr->UserBand() + 2) / 4 - 350; // '+ 2' together with '/ 4' results in rounding!
269
     int t = SatFrequency == 0 ? 0 : (SatFrequency + Scr->UserBand() + 2) / 4 - 350; // '+ 2' together with '/ 4' results in rounding!
270
     if (t < 1024 && Scr->Channel() >= 0 && Scr->Channel() < 8) {
270
     if (t < 1024 && Scr->Channel() >= 0 && Scr->Channel() < 8) {
271
        Codes[3] = t >> 8 | (t == 0 ? 0 : scrBank << 2) | Scr->Channel() << 5;
271
        Codes[3] = t >> 8 | (t == 0 ? 0 : scrBank << 2) | Scr->Channel() << 5;
272
        Codes[4] = t;
272
        Codes[4] = t;
Lines 399-405 Link Here
399
  return NULL;
399
  return NULL;
400
}
400
}
401
401
402
cDiseqc::eDiseqcActions cDiseqc::Execute(const char **CurrentAction, uchar *Codes, uint8_t *MaxCodes, const cScr *Scr, uint *Frequency) const
402
cDiseqc::eDiseqcActions cDiseqc::Execute(const char **CurrentAction, uchar *Codes, uint8_t *MaxCodes, const cScr *Scr, int *Frequency) const
403
{
403
{
404
  if (!*CurrentAction)
404
  if (!*CurrentAction)
405
     *CurrentAction = commands;
405
     *CurrentAction = commands;
(-)diseqc.h (-2 / +2 lines)
Lines 86-92 Link Here
86
  mutable int scrBank;
86
  mutable int scrBank;
87
  char *commands;
87
  char *commands;
88
  bool parsing;
88
  bool parsing;
89
  uint SetScrFrequency(uint SatFrequency, const cScr *Scr, uint8_t *Codes) const;
89
  int SetScrFrequency(int SatFrequency, const cScr *Scr, uint8_t *Codes) const;
90
  int SetScrPin(const cScr *Scr, uint8_t *Codes) const;
90
  int SetScrPin(const cScr *Scr, uint8_t *Codes) const;
91
  const char *Wait(const char *s) const;
91
  const char *Wait(const char *s) const;
92
  const char *GetPosition(const char *s) const;
92
  const char *GetPosition(const char *s) const;
Lines 96-102 Link Here
96
  cDiseqc(void);
96
  cDiseqc(void);
97
  ~cDiseqc();
97
  ~cDiseqc();
98
  bool Parse(const char *s);
98
  bool Parse(const char *s);
99
  eDiseqcActions Execute(const char **CurrentAction, uchar *Codes, uint8_t *MaxCodes, const cScr *Scr, uint *Frequency) const;
99
  eDiseqcActions Execute(const char **CurrentAction, uchar *Codes, uint8_t *MaxCodes, const cScr *Scr, int *Frequency) const;
100
      ///< Parses the DiSEqC commands and returns the appropriate action code
100
      ///< Parses the DiSEqC commands and returns the appropriate action code
101
      ///< with every call. CurrentAction must be the address of a character pointer,
101
      ///< with every call. CurrentAction must be the address of a character pointer,
102
      ///< which is initialized to NULL. This pointer is used internally while parsing
102
      ///< which is initialized to NULL. This pointer is used internally while parsing
(-)dvbdevice.c (-4 / +4 lines)
Lines 329-335 Link Here
329
  void ClearEventQueue(void) const;
329
  void ClearEventQueue(void) const;
330
  bool GetFrontendStatus(fe_status_t &Status) const;
330
  bool GetFrontendStatus(fe_status_t &Status) const;
331
  cPositioner *GetPositioner(void);
331
  cPositioner *GetPositioner(void);
332
  void ExecuteDiseqc(const cDiseqc *Diseqc, unsigned int *Frequency);
332
  void ExecuteDiseqc(const cDiseqc *Diseqc, int *Frequency);
333
  void ResetToneAndVoltage(void);
333
  void ResetToneAndVoltage(void);
334
  bool SetFrontend(void);
334
  bool SetFrontend(void);
335
  virtual void Action(void);
335
  virtual void Action(void);
Lines 696-702 Link Here
696
  return positioner;
696
  return positioner;
697
}
697
}
698
698
699
void cDvbTuner::ExecuteDiseqc(const cDiseqc *Diseqc, unsigned int *Frequency)
699
void cDvbTuner::ExecuteDiseqc(const cDiseqc *Diseqc, int *Frequency)
700
{
700
{
701
  if (!lnbPowerTurnedOn) {
701
  if (!lnbPowerTurnedOn) {
702
     CHECK(ioctl(fd_frontend, FE_SET_VOLTAGE, SEC_VOLTAGE_13)); // must explicitly turn on LNB power
702
     CHECK(ioctl(fd_frontend, FE_SET_VOLTAGE, SEC_VOLTAGE_13)); // must explicitly turn on LNB power
Lines 806-812 Link Here
806
806
807
  SETCMD(DTV_DELIVERY_SYSTEM, frontendType);
807
  SETCMD(DTV_DELIVERY_SYSTEM, frontendType);
808
  if (frontendType == SYS_DVBS || frontendType == SYS_DVBS2) {
808
  if (frontendType == SYS_DVBS || frontendType == SYS_DVBS2) {
809
     unsigned int frequency = channel.Frequency();
809
     int frequency = channel.Frequency();
810
     if (Setup.DiSEqC) {
810
     if (Setup.DiSEqC) {
811
        if (const cDiseqc *diseqc = Diseqcs.Get(device->CardIndex() + 1, channel.Source(), frequency, dtp.Polarization(), &scr)) {
811
        if (const cDiseqc *diseqc = Diseqcs.Get(device->CardIndex() + 1, channel.Source(), frequency, dtp.Polarization(), &scr)) {
812
           frequency -= diseqc->Lof();
812
           frequency -= diseqc->Lof();
Lines 829-835 Link Here
829
        }
829
        }
830
     else {
830
     else {
831
        int tone = SEC_TONE_OFF;
831
        int tone = SEC_TONE_OFF;
832
        if (frequency < (unsigned int)Setup.LnbSLOF) {
832
        if (frequency < Setup.LnbSLOF) {
833
           frequency -= Setup.LnbFrequLo;
833
           frequency -= Setup.LnbFrequLo;
834
           tone = SEC_TONE_OFF;
834
           tone = SEC_TONE_OFF;
835
           }
835
           }
(-)remux.c (-1 / +1 lines)
Lines 1629-1635 Link Here
1629
                          Div += parser->IFrameTemporalReferenceOffset();
1629
                          Div += parser->IFrameTemporalReferenceOffset();
1630
                       if (Div <= 0)
1630
                       if (Div <= 0)
1631
                          Div = 1;
1631
                          Div = 1;
1632
                       uint32_t Delta = ptsValues[0] / Div;
1632
                       int Delta = ptsValues[0] / Div;
1633
                       // determine frame info:
1633
                       // determine frame info:
1634
                       if (isVideo) {
1634
                       if (isVideo) {
1635
                          if (Delta == 3753)
1635
                          if (Delta == 3753)

Return to bug 638348