Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 174044
b: refs/heads/master
c: ad12f07
h: refs/heads/master
v: v3
  • Loading branch information
Akihiro Tsukada authored and Mauro Carvalho Chehab committed Dec 5, 2009
1 parent 9974dfa commit f9e8376
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6f901a991991fd3c9ac51bc7234a6706ef17ddfe
refs/heads/master: ad12f07bf21e8d98e6042c8ed795d2d041e26934
27 changes: 27 additions & 0 deletions trunk/drivers/media/dvb/dvb-usb/friio-fe.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,27 @@ static int jdvbt90502_get_tune_settings(struct dvb_frontend *fe,
return 0;
}

/* filter out un-supported properties to notify users */
static int jdvbt90502_set_property(struct dvb_frontend *fe,
struct dtv_property *tvp)
{
int r = 0;

switch (tvp->cmd) {
case DTV_DELIVERY_SYSTEM:
if (tvp->u.data != SYS_ISDBT)
r = -EINVAL;
break;
case DTV_CLEAR:
case DTV_TUNE:
case DTV_FREQUENCY:
break;
default:
r = -EINVAL;
}
return r;
}

static int jdvbt90502_get_frontend(struct dvb_frontend *fe,
struct dvb_frontend_parameters *p)
{
Expand Down Expand Up @@ -314,6 +335,9 @@ static int jdvbt90502_set_frontend(struct dvb_frontend *fe,

deb_fe("%s: Freq:%d\n", __func__, p->frequency);

/* for recovery from DTV_CLEAN */
fe->dtv_property_cache.delivery_system = SYS_ISDBT;

ret = jdvbt90502_pll_set_freq(state, p->frequency);
if (ret) {
deb_fe("%s:ret == %d\n", __func__, ret);
Expand Down Expand Up @@ -394,6 +418,7 @@ static int jdvbt90502_init(struct dvb_frontend *fe)
if (ret != 1)
goto error;
}
fe->dtv_property_cache.delivery_system = SYS_ISDBT;
msleep(100);

return 0;
Expand Down Expand Up @@ -471,6 +496,8 @@ static struct dvb_frontend_ops jdvbt90502_ops = {
.sleep = jdvbt90502_sleep,
.write = _jdvbt90502_write,

.set_property = jdvbt90502_set_property,

.set_frontend = jdvbt90502_set_frontend,
.get_frontend = jdvbt90502_get_frontend,
.get_tune_settings = jdvbt90502_get_tune_settings,
Expand Down

0 comments on commit f9e8376

Please sign in to comment.