Commit 6bfc3667 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] s5h1432: 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: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 80b5b745
...@@ -178,9 +178,9 @@ static int s5h1432_set_IF(struct dvb_frontend *fe, u32 ifFreqHz) ...@@ -178,9 +178,9 @@ static int s5h1432_set_IF(struct dvb_frontend *fe, u32 ifFreqHz)
} }
/* Talk to the demod, set the FEC, GUARD, QAM settings etc */ /* Talk to the demod, set the FEC, GUARD, QAM settings etc */
static int s5h1432_set_frontend(struct dvb_frontend *fe, static int s5h1432_set_frontend(struct dvb_frontend *fe)
struct dvb_frontend_parameters *p)
{ {
struct dtv_frontend_properties *p = &fe->dtv_property_cache;
u32 dvb_bandwidth = 8; u32 dvb_bandwidth = 8;
struct s5h1432_state *state = fe->demodulator_priv; struct s5h1432_state *state = fe->demodulator_priv;
...@@ -191,16 +191,16 @@ static int s5h1432_set_frontend(struct dvb_frontend *fe, ...@@ -191,16 +191,16 @@ static int s5h1432_set_frontend(struct dvb_frontend *fe,
fe->ops.tuner_ops.set_params(fe); fe->ops.tuner_ops.set_params(fe);
msleep(300); msleep(300);
s5h1432_set_channel_bandwidth(fe, dvb_bandwidth); s5h1432_set_channel_bandwidth(fe, dvb_bandwidth);
switch (p->u.ofdm.bandwidth) { switch (p->bandwidth_hz) {
case BANDWIDTH_6_MHZ: case 6000000:
dvb_bandwidth = 6; dvb_bandwidth = 6;
s5h1432_set_IF(fe, IF_FREQ_4_MHZ); s5h1432_set_IF(fe, IF_FREQ_4_MHZ);
break; break;
case BANDWIDTH_7_MHZ: case 7000000:
dvb_bandwidth = 7; dvb_bandwidth = 7;
s5h1432_set_IF(fe, IF_FREQ_4_MHZ); s5h1432_set_IF(fe, IF_FREQ_4_MHZ);
break; break;
case BANDWIDTH_8_MHZ: case 8000000:
dvb_bandwidth = 8; dvb_bandwidth = 8;
s5h1432_set_IF(fe, IF_FREQ_4_MHZ); s5h1432_set_IF(fe, IF_FREQ_4_MHZ);
break; break;
...@@ -215,16 +215,16 @@ static int s5h1432_set_frontend(struct dvb_frontend *fe, ...@@ -215,16 +215,16 @@ static int s5h1432_set_frontend(struct dvb_frontend *fe,
s5h1432_writereg(state, S5H1432_I2C_TOP_ADDR, 0x09, 0x1b); s5h1432_writereg(state, S5H1432_I2C_TOP_ADDR, 0x09, 0x1b);
s5h1432_set_channel_bandwidth(fe, dvb_bandwidth); s5h1432_set_channel_bandwidth(fe, dvb_bandwidth);
switch (p->u.ofdm.bandwidth) { switch (p->bandwidth_hz) {
case BANDWIDTH_6_MHZ: case 6000000:
dvb_bandwidth = 6; dvb_bandwidth = 6;
s5h1432_set_IF(fe, IF_FREQ_4_MHZ); s5h1432_set_IF(fe, IF_FREQ_4_MHZ);
break; break;
case BANDWIDTH_7_MHZ: case 7000000:
dvb_bandwidth = 7; dvb_bandwidth = 7;
s5h1432_set_IF(fe, IF_FREQ_4_MHZ); s5h1432_set_IF(fe, IF_FREQ_4_MHZ);
break; break;
case BANDWIDTH_8_MHZ: case 8000000:
dvb_bandwidth = 8; dvb_bandwidth = 8;
s5h1432_set_IF(fe, IF_FREQ_4_MHZ); s5h1432_set_IF(fe, IF_FREQ_4_MHZ);
break; break;
...@@ -329,12 +329,6 @@ static int s5h1432_read_ber(struct dvb_frontend *fe, u32 *ber) ...@@ -329,12 +329,6 @@ static int s5h1432_read_ber(struct dvb_frontend *fe, u32 *ber)
return 0; return 0;
} }
static int s5h1432_get_frontend(struct dvb_frontend *fe,
struct dvb_frontend_parameters *p)
{
return 0;
}
static int s5h1432_get_tune_settings(struct dvb_frontend *fe, static int s5h1432_get_tune_settings(struct dvb_frontend *fe,
struct dvb_frontend_tune_settings *tune) struct dvb_frontend_tune_settings *tune)
{ {
...@@ -396,8 +390,7 @@ static struct dvb_frontend_ops s5h1432_ops = { ...@@ -396,8 +390,7 @@ static struct dvb_frontend_ops s5h1432_ops = {
.init = s5h1432_init, .init = s5h1432_init,
.sleep = s5h1432_sleep, .sleep = s5h1432_sleep,
.set_frontend_legacy = s5h1432_set_frontend, .set_frontend = s5h1432_set_frontend,
.get_frontend_legacy = s5h1432_get_frontend,
.get_tune_settings = s5h1432_get_tune_settings, .get_tune_settings = s5h1432_get_tune_settings,
.read_status = s5h1432_read_status, .read_status = s5h1432_read_status,
.read_ber = s5h1432_read_ber, .read_ber = s5h1432_read_ber,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment