Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ab3eee07 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

[media] itd1000: use DVBv5 parameters on set_params()



Instead of using DVBv3 parameters, rely on DVBv5 parameters to
set the tuner

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 5918288a
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -252,11 +252,12 @@ static void itd1000_set_lo(struct itd1000_state *state, u32 freq_khz)


static int itd1000_set_parameters(struct dvb_frontend *fe, struct dvb_frontend_parameters *p)
static int itd1000_set_parameters(struct dvb_frontend *fe, struct dvb_frontend_parameters *p)
{
{
	struct dtv_frontend_properties *c = &fe->dtv_property_cache;
	struct itd1000_state *state = fe->tuner_priv;
	struct itd1000_state *state = fe->tuner_priv;
	u8 pllcon1;
	u8 pllcon1;


	itd1000_set_lo(state, p->frequency);
	itd1000_set_lo(state, c->frequency);
	itd1000_set_lpf_bw(state, p->u.qpsk.symbol_rate);
	itd1000_set_lpf_bw(state, c->symbol_rate);


	pllcon1 = itd1000_read_reg(state, PLLCON1) & 0x7f;
	pllcon1 = itd1000_read_reg(state, PLLCON1) & 0x7f;
	itd1000_write_reg(state, PLLCON1, pllcon1 | (1 << 7));
	itd1000_write_reg(state, PLLCON1, pllcon1 | (1 << 7));