Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Question about 0.9.4 api




Hi,
I'm trying to clean a bit my code in mplayer's dvb-input module.
Reading the old api pdf it's not clear if the following function is enough to set
tone, voltage and diseqc all in one.
Can anyone comment, please?

Thanks very much,
Nico

static int old_diseqc(int secfd, int sat_no, int pol, int hi_lo)
{
// sat_no from 0 to 3
// pol==1 ? V : H
// hi_lo = freq > SLOF ? 1 : 0
struct secCommand scmd;
struct secCmdSequence scmds;

scmds.continuousTone = (hi_lo: SET_TONE_ON : SET_TONE_OFF);
scmds.voltage = ((ipol == 1) : SEC_VOLTAGE_13 : SEC_VOLTAGE_18);
scmds.miniCommand = SEC_MINI_NONE;

scmd.type = 0;
scmds.numCommands = 1;
scmds.commands = &scmd;

scmd.u.diseqc.addr = 0x10;
scmd.u.diseqc.cmd = 0x38;
scmd.u.diseqc.numParams = 1;
scmd.u.diseqc.params[0] = 0xf0 |
(((sat_no) << 2) & 0x0c) |
(((ipol == 1) ? 0 : 2)) |
(hi_lo ? 0x01 : 0);

if (ioctl(fd_sec,SEC_SEND_SEQUENCE,&scmds) < 0)
{
mp_msg(MSGT_DEMUX, MSGL_ERR, "Error sending DisEqC");
return 0;
}
}



--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index