Skip to content

Commit

Permalink
[media] drxk: fix CNR calculus
Browse files Browse the repository at this point in the history
Changeset 8f3741e accidentally broke the CNR estimation. It should
be calculated as "a + b - c". However, previously, the subtraction
by c only occurred if SNR would be positive, due to a bad binding
to DVBv3 API.

This also fixes the following warning:
	drivers/media/dvb-frontends/drxk_hard.c:2556:6: warning: variable 'c' set but not used [-Wunused-but-set-variable]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed Mar 22, 2013
1 parent f35d09d commit 48f72a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/dvb-frontends/drxk_hard.c
Original file line number Diff line number Diff line change
Expand Up @@ -2628,7 +2628,7 @@ static int GetDVBTSignalToNoise(struct drxk_state *state,
/* log(x) x = (16bits + 16bits) << 15 ->32 bits */
c = Log10Times100(SqrErrIQ);

iMER = a + b;
iMER = a + b - c;
}
*pSignalToNoise = iMER;

Expand Down

0 comments on commit 48f72a1

Please sign in to comment.