1
0
mirror of https://github.com/DigitalDevices/dddvb.git synced 2023-10-10 13:37:43 +02:00

add isdbs

This commit is contained in:
rjkm 2020-12-01 15:53:31 +01:00
parent 3b1fcec9e1
commit 9b50e3bdc7

View File

@ -509,6 +509,32 @@ static int tune_isdbt(struct dddvb_fe *fe)
return 0; return 0;
} }
static int tune_isdbs(struct dddvb_fe *fe)
{
struct dtv_property p[] = {
{ .cmd = DTV_CLEAR },
{ .cmd = DTV_FREQUENCY, .u.data = fe->param.param[PARAM_FREQ]},
//{ .cmd = DTV_SYMBOL_RATE, .u.data = fe->param.param[PARAM_SR] },
//{ .cmd = DTV_TUNE },
};
struct dtv_properties c;
int ret;
set_property(fe->fd, DTV_DELIVERY_SYSTEM, SYS_ISDBS);
c.num = ARRAY_SIZE(p);
c.props = p;
ret = ioctl(fe->fd, FE_SET_PROPERTY, &c);
if (ret < 0) {
fprintf(stderr, "FE_SET_PROPERTY returned %d\n", ret);
return -1;
}
if (fe->param.param[PARAM_ISI] != DDDVB_UNDEF)
set_property(fe->fd, DTV_STREAM_ID, fe->param.param[PARAM_ISI]);
set_property(fe->fd, DTV_TUNE, 0);
return 0;
}
static int tune(struct dddvb_fe *fe) static int tune(struct dddvb_fe *fe)
{ {
int ret; int ret;
@ -537,6 +563,9 @@ static int tune(struct dddvb_fe *fe)
case SYS_ISDBT: case SYS_ISDBT:
ret = tune_isdbt(fe); ret = tune_isdbt(fe);
break; break;
case SYS_ISDBS:
ret = tune_isdbs(fe);
break;
default: default:
break; break;
} }