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

Commit cea6d239 authored by Daniel Scheller's avatar Daniel Scheller Committed by Mauro Carvalho Chehab
Browse files

media: dvb-frontends/stv0910: fix CNR reporting in read_snr()



The CNR value determined in read_snr() is reported via the wrong variable.
It uses FE_SCALE_DECIBEL, which implies the value to be reported in svalue
instead of uvalue. Fix this accordingly.

Picked up from the upstream dddvb-0.9.33 release.

Signed-off-by: default avatarDaniel Scheller <d.scheller@gmx.net>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent e2c53c8d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1326,7 +1326,7 @@ static int read_snr(struct dvb_frontend *fe)

	if (!get_signal_to_noise(state, &snrval)) {
		p->cnr.stat[0].scale = FE_SCALE_DECIBEL;
		p->cnr.stat[0].uvalue = 100 * snrval; /* fix scale */
		p->cnr.stat[0].svalue = 100 * snrval; /* fix scale */
	} else {
		p->cnr.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
	}