aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2011-12-26 14:33:34 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-12-31 06:57:52 -0500
commitf159451c12f47acec84d13028781e9a296dbdd7b (patch)
tree26a2ce0398515b55dc558eb20916cd7a1a0bbcfa
parent15115c17cb1a264a265d6d4769ae0397ed61e630 (diff)
[media] ttusb-dec: convert set_fontend to use DVBv5 parameters
Instead of using dvb_frontend_parameters struct, that were designed for a subset of the supported standards, use the DVBv5 cache information. Also, fill the supported delivery systems at dvb_frontend_ops struct. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/dvb/ttusb-dec/ttusbdecfe.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/media/dvb/ttusb-dec/ttusbdecfe.c b/drivers/media/dvb/ttusb-dec/ttusbdecfe.c
index 20a141017cd3..a498f5a70bd0 100644
--- a/drivers/media/dvb/ttusb-dec/ttusbdecfe.c
+++ b/drivers/media/dvb/ttusb-dec/ttusbdecfe.c
@@ -87,8 +87,9 @@ static int ttusbdecfe_dvbt_read_status(struct dvb_frontend *fe,
87 return 0; 87 return 0;
88} 88}
89 89
90static int ttusbdecfe_dvbt_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p) 90static int ttusbdecfe_dvbt_set_frontend(struct dvb_frontend *fe)
91{ 91{
92 struct dtv_frontend_properties *p = &fe->dtv_property_cache;
92 struct ttusbdecfe_state* state = (struct ttusbdecfe_state*) fe->demodulator_priv; 93 struct ttusbdecfe_state* state = (struct ttusbdecfe_state*) fe->demodulator_priv;
93 u8 b[] = { 0x00, 0x00, 0x00, 0x03, 94 u8 b[] = { 0x00, 0x00, 0x00, 0x03,
94 0x00, 0x00, 0x00, 0x00, 95 0x00, 0x00, 0x00, 0x00,
@@ -113,8 +114,9 @@ static int ttusbdecfe_dvbt_get_tune_settings(struct dvb_frontend* fe,
113 return 0; 114 return 0;
114} 115}
115 116
116static int ttusbdecfe_dvbs_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p) 117static int ttusbdecfe_dvbs_set_frontend(struct dvb_frontend *fe)
117{ 118{
119 struct dtv_frontend_properties *p = &fe->dtv_property_cache;
118 struct ttusbdecfe_state* state = (struct ttusbdecfe_state*) fe->demodulator_priv; 120 struct ttusbdecfe_state* state = (struct ttusbdecfe_state*) fe->demodulator_priv;
119 121
120 u8 b[] = { 0x00, 0x00, 0x00, 0x01, 122 u8 b[] = { 0x00, 0x00, 0x00, 0x01,
@@ -135,7 +137,7 @@ static int ttusbdecfe_dvbs_set_frontend(struct dvb_frontend* fe, struct dvb_fron
135 freq = htonl(p->frequency + 137 freq = htonl(p->frequency +
136 (state->hi_band ? LOF_HI : LOF_LO)); 138 (state->hi_band ? LOF_HI : LOF_LO));
137 memcpy(&b[4], &freq, sizeof(u32)); 139 memcpy(&b[4], &freq, sizeof(u32));
138 sym_rate = htonl(p->u.qam.symbol_rate); 140 sym_rate = htonl(p->symbol_rate);
139 memcpy(&b[12], &sym_rate, sizeof(u32)); 141 memcpy(&b[12], &sym_rate, sizeof(u32));
140 band = htonl(state->hi_band ? LOF_HI : LOF_LO); 142 band = htonl(state->hi_band ? LOF_HI : LOF_LO);
141 memcpy(&b[24], &band, sizeof(u32)); 143 memcpy(&b[24], &band, sizeof(u32));
@@ -241,7 +243,7 @@ struct dvb_frontend* ttusbdecfe_dvbs_attach(const struct ttusbdecfe_config* conf
241} 243}
242 244
243static struct dvb_frontend_ops ttusbdecfe_dvbt_ops = { 245static struct dvb_frontend_ops ttusbdecfe_dvbt_ops = {
244 246 .delsys = { SYS_DVBT },
245 .info = { 247 .info = {
246 .name = "TechnoTrend/Hauppauge DEC2000-t Frontend", 248 .name = "TechnoTrend/Hauppauge DEC2000-t Frontend",
247 .type = FE_OFDM, 249 .type = FE_OFDM,
@@ -257,7 +259,7 @@ static struct dvb_frontend_ops ttusbdecfe_dvbt_ops = {
257 259
258 .release = ttusbdecfe_release, 260 .release = ttusbdecfe_release,
259 261
260 .set_frontend_legacy = ttusbdecfe_dvbt_set_frontend, 262 .set_frontend = ttusbdecfe_dvbt_set_frontend,
261 263
262 .get_tune_settings = ttusbdecfe_dvbt_get_tune_settings, 264 .get_tune_settings = ttusbdecfe_dvbt_get_tune_settings,
263 265
@@ -265,7 +267,7 @@ static struct dvb_frontend_ops ttusbdecfe_dvbt_ops = {
265}; 267};
266 268
267static struct dvb_frontend_ops ttusbdecfe_dvbs_ops = { 269static struct dvb_frontend_ops ttusbdecfe_dvbs_ops = {
268 270 .delsys = { SYS_DVBS },
269 .info = { 271 .info = {
270 .name = "TechnoTrend/Hauppauge DEC3000-s Frontend", 272 .name = "TechnoTrend/Hauppauge DEC3000-s Frontend",
271 .type = FE_QPSK, 273 .type = FE_QPSK,
@@ -281,7 +283,7 @@ static struct dvb_frontend_ops ttusbdecfe_dvbs_ops = {
281 283
282 .release = ttusbdecfe_release, 284 .release = ttusbdecfe_release,
283 285
284 .set_frontend_legacy = ttusbdecfe_dvbs_set_frontend, 286 .set_frontend = ttusbdecfe_dvbs_set_frontend,
285 287
286 .read_status = ttusbdecfe_dvbs_read_status, 288 .read_status = ttusbdecfe_dvbs_read_status,
287 289