summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Toth <stoth@linuxtv.org>2008-10-07 04:55:46 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-13 18:27:55 +0400
commita4de91be46b73ec6743b9d76155550e49507723c (patch)
treec4ca583f7b6f107ade9459cc265c1a3e973df187
parentcc7d705e7a2c28ae1bd8b2fd29524277262967ab (diff)
downloadlinux-a4de91be46b73ec6743b9d76155550e49507723c.tar.xz
V4L/DVB (9180): S2API: Added support for DTV_CODE_RATE_HP/LP
Reports from users that using the new API for tuning DTV was failing, and the cache was missing some essential items. Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/dvb/dvb-core/dvb_frontend.c32
-rw-r--r--include/linux/dvb/frontend.h5
2 files changed, 36 insertions, 1 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c
index 7b4b1a5ac427..104f40b7171d 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -830,6 +830,16 @@ struct dtv_cmds_h dtv_cmds[] = {
.cmd = DTV_DELIVERY_SYSTEM,
.set = 1,
},
+ [DTV_CODE_RATE_HP] = {
+ .name = "DTV_CODE_RATE_HP",
+ .cmd = DTV_CODE_RATE_HP,
+ .set = 1,
+ },
+ [DTV_CODE_RATE_LP] = {
+ .name = "DTV_CODE_RATE_LP",
+ .cmd = DTV_CODE_RATE_LP,
+ .set = 1,
+ },
/* Get */
[DTV_DISEQC_SLAVE_REPLY] = {
.name = "DTV_DISEQC_SLAVE_REPLY",
@@ -842,6 +852,16 @@ struct dtv_cmds_h dtv_cmds[] = {
.cmd = DTV_API_VERSION,
.set = 0,
},
+ [DTV_CODE_RATE_HP] = {
+ .name = "DTV_CODE_RATE_HP",
+ .cmd = DTV_CODE_RATE_HP,
+ .set = 0,
+ },
+ [DTV_CODE_RATE_LP] = {
+ .name = "DTV_CODE_RATE_LP",
+ .cmd = DTV_CODE_RATE_LP,
+ .set = 0,
+ },
};
void dtv_property_dump(struct dtv_property *tvp)
@@ -1121,6 +1141,12 @@ int dtv_property_process_get(struct dvb_frontend *fe, struct dtv_property *tvp,
case DTV_API_VERSION:
tvp->u.data = (DVB_API_VERSION << 8) | DVB_API_VERSION_MINOR;
break;
+ case DTV_CODE_RATE_HP:
+ tvp->u.data = fe->dtv_property_cache.code_rate_HP;
+ break;
+ case DTV_CODE_RATE_LP:
+ tvp->u.data = fe->dtv_property_cache.code_rate_LP;
+ break;
default:
r = -1;
}
@@ -1202,6 +1228,12 @@ int dtv_property_process_set(struct dvb_frontend *fe, struct dtv_property *tvp,
r = dvb_frontend_ioctl_legacy(inode, file, FE_SET_TONE,
(void *)fe->dtv_property_cache.sectone);
break;
+ case DTV_CODE_RATE_HP:
+ fe->dtv_property_cache.code_rate_HP = tvp->u.data;
+ break;
+ case DTV_CODE_RATE_LP:
+ fe->dtv_property_cache.code_rate_LP = tvp->u.data;
+ break;
default:
r = -1;
}
diff --git a/include/linux/dvb/frontend.h b/include/linux/dvb/frontend.h
index 3d4fab495fb2..6675edfab3fc 100644
--- a/include/linux/dvb/frontend.h
+++ b/include/linux/dvb/frontend.h
@@ -268,8 +268,11 @@ struct dvb_frontend_event {
#define DTV_DELIVERY_SYSTEM 17
#define DTV_API_VERSION 35
+#define DTV_API_VERSION 35
+#define DTV_CODE_RATE_HP 36
+#define DTV_CODE_RATE_LP 37
-#define DTV_MAX_COMMAND DTV_API_VERSION
+#define DTV_MAX_COMMAND DTV_CODE_RATE_LP
typedef enum fe_pilot {
PILOT_ON,