diff options
author | Akihiro Tsukada <tskd2@yahoo.co.jp> | 2009-11-04 13:39:31 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-12-05 15:41:14 -0500 |
commit | ad12f07bf21e8d98e6042c8ed795d2d041e26934 (patch) | |
tree | d5a7593aa9d3bad7c782e11df2f2428b40450fad /drivers/media/dvb | |
parent | 6f901a991991fd3c9ac51bc7234a6706ef17ddfe (diff) |
V4L/DVB (13293): dvb-usb-friio: return the correct DTV_DELIVERY_SYSTEM
This patch makes the driver return the correct DTV_DELIVERY_SYSTEM.
The driver previously returned SYS_UNDEFINED for DTV_DELIVERY_SYSTEM property,
as it lacked any driver specific S2API support.
Signed-off-by: Akihiro Tsukada <tskd2@yahoo.co.jp>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r-- | drivers/media/dvb/dvb-usb/friio-fe.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/drivers/media/dvb/dvb-usb/friio-fe.c b/drivers/media/dvb/dvb-usb/friio-fe.c index c4dfe25cf60d..8b489d11eb37 100644 --- a/drivers/media/dvb/dvb-usb/friio-fe.c +++ b/drivers/media/dvb/dvb-usb/friio-fe.c | |||
@@ -286,6 +286,27 @@ static int jdvbt90502_get_tune_settings(struct dvb_frontend *fe, | |||
286 | return 0; | 286 | return 0; |
287 | } | 287 | } |
288 | 288 | ||
289 | /* filter out un-supported properties to notify users */ | ||
290 | static int jdvbt90502_set_property(struct dvb_frontend *fe, | ||
291 | struct dtv_property *tvp) | ||
292 | { | ||
293 | int r = 0; | ||
294 | |||
295 | switch (tvp->cmd) { | ||
296 | case DTV_DELIVERY_SYSTEM: | ||
297 | if (tvp->u.data != SYS_ISDBT) | ||
298 | r = -EINVAL; | ||
299 | break; | ||
300 | case DTV_CLEAR: | ||
301 | case DTV_TUNE: | ||
302 | case DTV_FREQUENCY: | ||
303 | break; | ||
304 | default: | ||
305 | r = -EINVAL; | ||
306 | } | ||
307 | return r; | ||
308 | } | ||
309 | |||
289 | static int jdvbt90502_get_frontend(struct dvb_frontend *fe, | 310 | static int jdvbt90502_get_frontend(struct dvb_frontend *fe, |
290 | struct dvb_frontend_parameters *p) | 311 | struct dvb_frontend_parameters *p) |
291 | { | 312 | { |
@@ -314,6 +335,9 @@ static int jdvbt90502_set_frontend(struct dvb_frontend *fe, | |||
314 | 335 | ||
315 | deb_fe("%s: Freq:%d\n", __func__, p->frequency); | 336 | deb_fe("%s: Freq:%d\n", __func__, p->frequency); |
316 | 337 | ||
338 | /* for recovery from DTV_CLEAN */ | ||
339 | fe->dtv_property_cache.delivery_system = SYS_ISDBT; | ||
340 | |||
317 | ret = jdvbt90502_pll_set_freq(state, p->frequency); | 341 | ret = jdvbt90502_pll_set_freq(state, p->frequency); |
318 | if (ret) { | 342 | if (ret) { |
319 | deb_fe("%s:ret == %d\n", __func__, ret); | 343 | deb_fe("%s:ret == %d\n", __func__, ret); |
@@ -394,6 +418,7 @@ static int jdvbt90502_init(struct dvb_frontend *fe) | |||
394 | if (ret != 1) | 418 | if (ret != 1) |
395 | goto error; | 419 | goto error; |
396 | } | 420 | } |
421 | fe->dtv_property_cache.delivery_system = SYS_ISDBT; | ||
397 | msleep(100); | 422 | msleep(100); |
398 | 423 | ||
399 | return 0; | 424 | return 0; |
@@ -471,6 +496,8 @@ static struct dvb_frontend_ops jdvbt90502_ops = { | |||
471 | .sleep = jdvbt90502_sleep, | 496 | .sleep = jdvbt90502_sleep, |
472 | .write = _jdvbt90502_write, | 497 | .write = _jdvbt90502_write, |
473 | 498 | ||
499 | .set_property = jdvbt90502_set_property, | ||
500 | |||
474 | .set_frontend = jdvbt90502_set_frontend, | 501 | .set_frontend = jdvbt90502_set_frontend, |
475 | .get_frontend = jdvbt90502_get_frontend, | 502 | .get_frontend = jdvbt90502_get_frontend, |
476 | .get_tune_settings = jdvbt90502_get_tune_settings, | 503 | .get_tune_settings = jdvbt90502_get_tune_settings, |