|
From: <jt...@us...> - 2003-08-14 05:09:51
|
Update of /cvsroot/dvbtools/dvbtune
In directory sc8-pr-cvs1:/tmp/cvs-serv14110
Modified Files:
tune.c
Log Message:
add diseqc capabilities for NEWSTRUCT
Index: tune.c
===================================================================
RCS file: /cvsroot/dvbtools/dvbtune/tune.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** tune.c 16 Jan 2003 07:49:44 -0000 1.15
--- tune.c 14 Aug 2003 04:15:44 -0000 1.16
***************
*** 485,489 ****
#ifdef NEWSTRUCT
! #warning DISEQC is unimplemented for NEWSTRUCT
#else
if (diseqc > 0) {
--- 485,508 ----
#ifdef NEWSTRUCT
! if (diseqc > 0) {
! struct dvb_diseqc_master_cmd cmd = { {0xE0, 0x10, 0x38, 0xF0, 0x00, 0x00}, 4};
! cmd.msg[3] = 0xF0 | ((((diseqc - 1) * 4) & 0x0F) | (tone == SEC_TONE_ON ? 1 : 0) | (voltage == SEC_VOLTAGE_18 ? 2 : 0));
!
! if (ioctl(fd_frontend, FE_SET_TONE, SEC_TONE_OFF) < 0) {
! perror ("FE_SET_TONE\n");
! }
! if (ioctl(fd_frontend, FE_SET_VOLTAGE, voltage) < 0) {
! perror ("FE_SET_VOLTAGE\n");
! }
! usleep(15 * 1000);
! if (ioctl(fd_frontend, FE_DISEQC_SEND_MASTER_CMD, &cmd) < 0) {
! perror ("unable to send diseqc cmd\n");
! }
! usleep(15 * 1000);
! if (ioctl(fd_frontend, FE_DISEQC_SEND_BURST, (diseqc / 4) % 2 ? SEC_MINI_B : SEC_MINI_A) < 0) {
! perror ("unable to send tone\n");
! }
! usleep(15 * 1000);
! }
#else
if (diseqc > 0) {
|