All of lore.kernel.org
 help / color / mirror / Atom feed
* Structure of DiSEqC Command
@ 2011-08-08 17:06 Nima Mohammadi
  2011-08-10 21:51 ` DUBOST Brice
  0 siblings, 1 reply; 3+ messages in thread
From: Nima Mohammadi @ 2011-08-08 17:06 UTC (permalink / raw)
  To: linux-media

Hi folks,
I was reading the source code of various dvb related utilities and I
was wondering about forming up the message which instructs the DiSEqC
switch. But I found out that different programs produce the command
differently.
The confusing thing is that according to the DiSEqC specification
documents that I've read, the least significant bit (lsb) must
indicate the band (low/high), not the polarity (ver/hor), but as you
see it only applies to some of these programs:

getstrean abd dvbstream:
int i = 4 * switch_pos + 2 * hiband + (voltage_18 ? 1 : 0);

szap and mplayer:
(((sat_no * 4) & 0x0f) | (hi_lo ? 1 : 0) | (polv ? 0 : 2));

scan:
4 * switch_pos + 2 * hiband + (voltage_18 ? 1 : 0)

gstdvbsrc:
(((sat_no * 4) & 0x0f) | (tone == SEC_TONE_ON ? 1 : 0) | (voltage ==
SEC_VOLTAGE_13 ? 0 : 2));


-- Nima Mohammadi

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Structure of DiSEqC Command
  2011-08-08 17:06 Structure of DiSEqC Command Nima Mohammadi
@ 2011-08-10 21:51 ` DUBOST Brice
  2011-08-15 10:53   ` Nima Mohammadi
  0 siblings, 1 reply; 3+ messages in thread
From: DUBOST Brice @ 2011-08-10 21:51 UTC (permalink / raw)
  To: Nima Mohammadi, linux-media

On 08/08/2011 19:06, Nima Mohammadi wrote:
> Hi folks,
> I was reading the source code of various dvb related utilities and I
> was wondering about forming up the message which instructs the DiSEqC
> switch. But I found out that different programs produce the command
> differently.
> The confusing thing is that according to the DiSEqC specification
> documents that I've read, the least significant bit (lsb) must
> indicate the band (low/high), not the polarity (ver/hor), but as you
> see it only applies to some of these programs:
> 
> getstrean abd dvbstream:
> int i = 4 * switch_pos + 2 * hiband + (voltage_18 ? 1 : 0);
> 
> szap and mplayer:
> (((sat_no * 4) & 0x0f) | (hi_lo ? 1 : 0) | (polv ? 0 : 2));
> 
> scan:
> 4 * switch_pos + 2 * hiband + (voltage_18 ? 1 : 0)
> 
> gstdvbsrc:
> (((sat_no * 4) & 0x0f) | (tone == SEC_TONE_ON ? 1 : 0) | (voltage ==
> SEC_VOLTAGE_13 ? 0 : 2));
> 
> 


Hello

I'm the upstream author of MuMuDVB (http://mumudvb.braice.net)

The diseqc related code is here
http://gitweb.braice.net/gitweb?p=mumudvb;a=blob;f=src/tune.c

On the document

http://www.eutelsat.com/satellites/pdf/Diseqc/associated%20docs/applic_info_LNB_switchers.pdf

Page 7 (page 10 of the PDF) the band is the LSB and the table
is organized in increasing binary data

But in
http://www.eutelsat.com/satellites/pdf/Diseqc/associated%20docs/update_recomm_for_implim.pdf

page 33 (35 in the PDF)

The LSB SEEMS to be the polarization, but it's still the band, the table
is just organized in a strange way

If you look deeply into the code of scan
 http://www.linuxtv.org/hg/dvb-apps/file/36a084aace47/util/scan/diseqc.c

You'll see that the table is organized as in the second document and the
code addresses the table for making the message but there is no mistake
in the real data since it's f0,f2,f1 etc ...

So the difference is if the diseqc data is wrote directly (as in
MuMuDVB) or taken from a table organised as in the specification (as in
scan)

Hope it's clear and it helps

Regards

-- 
Brice

A: Yes.
>Q: Are you sure?
>>A: Because it reverses the logical flow of conversation.
>>>Q: Why is top posting annoying in email?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Structure of DiSEqC Command
  2011-08-10 21:51 ` DUBOST Brice
@ 2011-08-15 10:53   ` Nima Mohammadi
  0 siblings, 0 replies; 3+ messages in thread
From: Nima Mohammadi @ 2011-08-15 10:53 UTC (permalink / raw)
  To: DUBOST Brice, linux-media

On Thu, Aug 11, 2011 at 2:21 AM, DUBOST Brice
<dubost@crans.ens-cachan.fr> wrote:
> Hello
>
> I'm the upstream author of MuMuDVB (http://mumudvb.braice.net)
>
> The diseqc related code is here
> http://gitweb.braice.net/gitweb?p=mumudvb;a=blob;f=src/tune.c
>
> On the document
>
> http://www.eutelsat.com/satellites/pdf/Diseqc/associated%20docs/applic_info_LNB_switchers.pdf
>
> Page 7 (page 10 of the PDF) the band is the LSB and the table
> is organized in increasing binary data
>
> But in
> http://www.eutelsat.com/satellites/pdf/Diseqc/associated%20docs/update_recomm_for_implim.pdf
>
> page 33 (35 in the PDF)
>
> The LSB SEEMS to be the polarization, but it's still the band, the table
> is just organized in a strange way
>
> If you look deeply into the code of scan
>  http://www.linuxtv.org/hg/dvb-apps/file/36a084aace47/util/scan/diseqc.c
>
> You'll see that the table is organized as in the second document and the
> code addresses the table for making the message but there is no mistake
> in the real data since it's f0,f2,f1 etc ...
>
> So the difference is if the diseqc data is wrote directly (as in
> MuMuDVB) or taken from a table organised as in the specification (as in
> scan)
>
> Hope it's clear and it helps
>
> Regards
>
> --
> Brice
>

Thanks for the response. It really helped :)

-- Nima Mohammadi

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-08-15 10:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-08 17:06 Structure of DiSEqC Command Nima Mohammadi
2011-08-10 21:51 ` DUBOST Brice
2011-08-15 10:53   ` Nima Mohammadi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.