aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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[] = {
830 .cmd = DTV_DELIVERY_SYSTEM, 830 .cmd = DTV_DELIVERY_SYSTEM,
831 .set = 1, 831 .set = 1,
832 }, 832 },
833 [DTV_CODE_RATE_HP] = {
834 .name = "DTV_CODE_RATE_HP",
835 .cmd = DTV_CODE_RATE_HP,
836 .set = 1,
837 },
838 [DTV_CODE_RATE_LP] = {
839 .name = "DTV_CODE_RATE_LP",
840 .cmd = DTV_CODE_RATE_LP,
841 .set = 1,
842 },
833 /* Get */ 843 /* Get */
834 [DTV_DISEQC_SLAVE_REPLY] = { 844 [DTV_DISEQC_SLAVE_REPLY] = {
835 .name = "DTV_DISEQC_SLAVE_REPLY", 845 .name = "DTV_DISEQC_SLAVE_REPLY",
@@ -842,6 +852,16 @@ struct dtv_cmds_h dtv_cmds[] = {
842 .cmd = DTV_API_VERSION, 852 .cmd = DTV_API_VERSION,
843 .set = 0, 853 .set = 0,
844 }, 854 },
855 [DTV_CODE_RATE_HP] = {
856 .name = "DTV_CODE_RATE_HP",
857 .cmd = DTV_CODE_RATE_HP,
858 .set = 0,
859 },
860 [DTV_CODE_RATE_LP] = {
861 .name = "DTV_CODE_RATE_LP",
862 .cmd = DTV_CODE_RATE_LP,
863 .set = 0,
864 },
845}; 865};
846 866
847void dtv_property_dump(struct dtv_property *tvp) 867void dtv_property_dump(struct dtv_property *tvp)
@@ -1121,6 +1141,12 @@ int dtv_property_process_get(struct dvb_frontend *fe, struct dtv_property *tvp,
1121 case DTV_API_VERSION: 1141 case DTV_API_VERSION:
1122 tvp->u.data = (DVB_API_VERSION << 8) | DVB_API_VERSION_MINOR; 1142 tvp->u.data = (DVB_API_VERSION << 8) | DVB_API_VERSION_MINOR;
1123 break; 1143 break;
1144 case DTV_CODE_RATE_HP:
1145 tvp->u.data = fe->dtv_property_cache.code_rate_HP;
1146 break;
1147 case DTV_CODE_RATE_LP:
1148 tvp->u.data = fe->dtv_property_cache.code_rate_LP;
1149 break;
1124 default: 1150 default:
1125 r = -1; 1151 r = -1;
1126 } 1152 }
@@ -1202,6 +1228,12 @@ int dtv_property_process_set(struct dvb_frontend *fe, struct dtv_property *tvp,
1202 r = dvb_frontend_ioctl_legacy(inode, file, FE_SET_TONE, 1228 r = dvb_frontend_ioctl_legacy(inode, file, FE_SET_TONE,
1203 (void *)fe->dtv_property_cache.sectone); 1229 (void *)fe->dtv_property_cache.sectone);
1204 break; 1230 break;
1231 case DTV_CODE_RATE_HP:
1232 fe->dtv_property_cache.code_rate_HP = tvp->u.data;
1233 break;
1234 case DTV_CODE_RATE_LP:
1235 fe->dtv_property_cache.code_rate_LP = tvp->u.data;
1236 break;
1205 default: 1237 default:
1206 r = -1; 1238 r = -1;
1207 } 1239 }
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 {
268#define DTV_DELIVERY_SYSTEM 17 268#define DTV_DELIVERY_SYSTEM 17
269 269
270#define DTV_API_VERSION 35 270#define DTV_API_VERSION 35
271#define DTV_API_VERSION 35
272#define DTV_CODE_RATE_HP 36
273#define DTV_CODE_RATE_LP 37
271 274
272#define DTV_MAX_COMMAND DTV_API_VERSION 275#define DTV_MAX_COMMAND DTV_CODE_RATE_LP
273 276
274typedef enum fe_pilot { 277typedef enum fe_pilot {
275 PILOT_ON, 278 PILOT_ON,