Skip to content

Commit

Permalink
[media] mxl111sf: disable snr / ber calculations for DVB-T
Browse files Browse the repository at this point in the history
Leaving this code enabled breaks the build on some architectures,
and we shouldn't have any floating point math in the kernel, anyway.

These macros need to be re-written, but it's harmless to simply
return zero for now.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Nov 3, 2011
1 parent 4f98480 commit 7e8d8f6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/media/dvb/dvb-usb/mxl111sf-demod.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,10 +370,20 @@ static int mxl111sf_demod_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks)
return ret;
}

#ifdef MXL111SF_DEMOD_ENABLE_CALCULATIONS
/* FIXME: leaving this enabled breaks the build on some architectures,
* and we shouldn't have any floating point math in the kernel, anyway.
*
* These macros need to be re-written, but it's harmless to simply
* return zero for now. */
#define CALCULATE_BER(avg_errors, count) \
((u32)(avg_errors * 4)/(count*64*188*8))
#define CALCULATE_SNR(data) \
((u32)((10 * (u32)data / 64) - 2.5))
#else
#define CALCULATE_BER(avg_errors, count) 0
#define CALCULATE_SNR(data) 0
#endif

static int mxl111sf_demod_read_ber(struct dvb_frontend *fe, u32 *ber)
{
Expand Down

0 comments on commit 7e8d8f6

Please sign in to comment.