1
0
mirror of https://github.com/DigitalDevices/octonet.git synced 2023-10-10 13:36:52 +02:00

support ISDB-T tuning

This commit is contained in:
Ralph Metzler 2016-12-07 16:00:53 +01:00
parent dfda1b722b
commit 6d6e0a3726
2 changed files with 27 additions and 1 deletions

View File

@ -528,6 +528,29 @@ static int tune_terr2(struct dvbfe *fe)
return 0;
}
static int tune_isdbt(struct dvbfe *fe)
{
struct dtv_property p[] = {
{ .cmd = DTV_CLEAR },
{ .cmd = DTV_FREQUENCY, .u.data = fe->param[PARAM_FREQ] * 1000 },
{ .cmd = DTV_BANDWIDTH_HZ, .u.data = fe->param[PARAM_BW_HZ] },
{ .cmd = DTV_TUNE },
};
struct dtv_properties c;
int ret;
set_property(fe->fd, DTV_DELIVERY_SYSTEM, SYS_ISDBT);
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;
}
return 0;
}
static int tune(struct dvbfe *fe)
{
int ret;
@ -551,6 +574,9 @@ static int tune(struct dvbfe *fe)
case SYS_DVBC2:
ret = tune_c2(fe);
break;
case SYS_ISDBT:
ret = tune_isdbt(fe);
break;
default:
break;
}

View File

@ -19,5 +19,5 @@
#ifndef _OCTOSERVE_VERSION_
#define _OCTOSERVE_VERSION_
#define OCTOSERVE_VERSION "1.0.78"
#define OCTOSERVE_VERSION "1.0.79"
#endif