diff options
author | Steven Toth <stoth@linuxtv.org> | 2008-10-06 20:56:59 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-13 10:28:05 -0400 |
commit | b87625f0ccbbc67efba356e73502fa9bbb784b1c (patch) | |
tree | f438bae01178fc2696a767adf5df18830377266e | |
parent | a4de91be46b73ec6743b9d76155550e49507723c (diff) |
V4L/DVB (9181): S2API: Add support fot DTV_GUARD_INTERVAL and DTV_TRANSMISSION_MODE
Tuning DVB-T via the S2API was failing, 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.c | 32 | ||||
-rw-r--r-- | include/linux/dvb/frontend.h | 4 |
2 files changed, 35 insertions, 1 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index 104f40b7171d..0ddc2f4ecd4a 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c | |||
@@ -840,6 +840,16 @@ struct dtv_cmds_h dtv_cmds[] = { | |||
840 | .cmd = DTV_CODE_RATE_LP, | 840 | .cmd = DTV_CODE_RATE_LP, |
841 | .set = 1, | 841 | .set = 1, |
842 | }, | 842 | }, |
843 | [DTV_GUARD_INTERVAL] = { | ||
844 | .name = "DTV_GUARD_INTERVAL", | ||
845 | .cmd = DTV_GUARD_INTERVAL, | ||
846 | .set = 1, | ||
847 | }, | ||
848 | [DTV_TRANSMISSION_MODE] = { | ||
849 | .name = "DTV_TRANSMISSION_MODE", | ||
850 | .cmd = DTV_TRANSMISSION_MODE, | ||
851 | .set = 1, | ||
852 | }, | ||
843 | /* Get */ | 853 | /* Get */ |
844 | [DTV_DISEQC_SLAVE_REPLY] = { | 854 | [DTV_DISEQC_SLAVE_REPLY] = { |
845 | .name = "DTV_DISEQC_SLAVE_REPLY", | 855 | .name = "DTV_DISEQC_SLAVE_REPLY", |
@@ -862,6 +872,16 @@ struct dtv_cmds_h dtv_cmds[] = { | |||
862 | .cmd = DTV_CODE_RATE_LP, | 872 | .cmd = DTV_CODE_RATE_LP, |
863 | .set = 0, | 873 | .set = 0, |
864 | }, | 874 | }, |
875 | [DTV_GUARD_INTERVAL] = { | ||
876 | .name = "DTV_GUARD_INTERVAL", | ||
877 | .cmd = DTV_GUARD_INTERVAL, | ||
878 | .set = 0, | ||
879 | }, | ||
880 | [DTV_TRANSMISSION_MODE] = { | ||
881 | .name = "DTV_TRANSMISSION_MODE", | ||
882 | .cmd = DTV_TRANSMISSION_MODE, | ||
883 | .set = 0, | ||
884 | }, | ||
865 | }; | 885 | }; |
866 | 886 | ||
867 | void dtv_property_dump(struct dtv_property *tvp) | 887 | void dtv_property_dump(struct dtv_property *tvp) |
@@ -1147,6 +1167,12 @@ int dtv_property_process_get(struct dvb_frontend *fe, struct dtv_property *tvp, | |||
1147 | case DTV_CODE_RATE_LP: | 1167 | case DTV_CODE_RATE_LP: |
1148 | tvp->u.data = fe->dtv_property_cache.code_rate_LP; | 1168 | tvp->u.data = fe->dtv_property_cache.code_rate_LP; |
1149 | break; | 1169 | break; |
1170 | case DTV_GUARD_INTERVAL: | ||
1171 | tvp->u.data = fe->dtv_property_cache.guard_interval; | ||
1172 | break; | ||
1173 | case DTV_TRANSMISSION_MODE: | ||
1174 | tvp->u.data = fe->dtv_property_cache.transmission_mode; | ||
1175 | break; | ||
1150 | default: | 1176 | default: |
1151 | r = -1; | 1177 | r = -1; |
1152 | } | 1178 | } |
@@ -1234,6 +1260,12 @@ int dtv_property_process_set(struct dvb_frontend *fe, struct dtv_property *tvp, | |||
1234 | case DTV_CODE_RATE_LP: | 1260 | case DTV_CODE_RATE_LP: |
1235 | fe->dtv_property_cache.code_rate_LP = tvp->u.data; | 1261 | fe->dtv_property_cache.code_rate_LP = tvp->u.data; |
1236 | break; | 1262 | break; |
1263 | case DTV_GUARD_INTERVAL: | ||
1264 | fe->dtv_property_cache.guard_interval = tvp->u.data; | ||
1265 | break; | ||
1266 | case DTV_TRANSMISSION_MODE: | ||
1267 | fe->dtv_property_cache.transmission_mode = tvp->u.data; | ||
1268 | break; | ||
1237 | default: | 1269 | default: |
1238 | r = -1; | 1270 | r = -1; |
1239 | } | 1271 | } |
diff --git a/include/linux/dvb/frontend.h b/include/linux/dvb/frontend.h index 6675edfab3fc..5578fba208f4 100644 --- a/include/linux/dvb/frontend.h +++ b/include/linux/dvb/frontend.h | |||
@@ -271,8 +271,10 @@ struct dvb_frontend_event { | |||
271 | #define DTV_API_VERSION 35 | 271 | #define DTV_API_VERSION 35 |
272 | #define DTV_CODE_RATE_HP 36 | 272 | #define DTV_CODE_RATE_HP 36 |
273 | #define DTV_CODE_RATE_LP 37 | 273 | #define DTV_CODE_RATE_LP 37 |
274 | #define DTV_GUARD_INTERVAL 38 | ||
275 | #define DTV_TRANSMISSION_MODE 39 | ||
274 | 276 | ||
275 | #define DTV_MAX_COMMAND DTV_CODE_RATE_LP | 277 | #define DTV_MAX_COMMAND DTV_TRANSMISSION_MODE |
276 | 278 | ||
277 | typedef enum fe_pilot { | 279 | typedef enum fe_pilot { |
278 | PILOT_ON, | 280 | PILOT_ON, |