Commit b0c4878e authored by Devin Heitmueller's avatar Devin Heitmueller Committed by Mauro Carvalho Chehab

[media] au8522: Fix off-by-one in SNR table for QAM256

The table of valid SNR values for QAM 256 is off by one, and as a result
if the SNR is oscillating between 40.0 and 39.9 dB, tools like azap show
it going back and forth between 40.0 and 0 (misleading some people,
including myself, to think signal lock is being lost or there is a
problem with register reads).

Fix the table so that 40.0 dB is properly represented.

Cc: Steven Toth <stoth@kernellabs.com>
Signed-off-by: default avatarDevin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent a307cfa5
...@@ -157,54 +157,54 @@ static struct mse2snr_tab qam64_mse2snr_tab[] = { ...@@ -157,54 +157,54 @@ static struct mse2snr_tab qam64_mse2snr_tab[] = {
/* QAM256 SNR lookup table */ /* QAM256 SNR lookup table */
static struct mse2snr_tab qam256_mse2snr_tab[] = { static struct mse2snr_tab qam256_mse2snr_tab[] = {
{ 16, 0 }, { 15, 0 },
{ 17, 400 }, { 16, 400 },
{ 18, 398 }, { 17, 398 },
{ 19, 396 }, { 18, 396 },
{ 20, 394 }, { 19, 394 },
{ 21, 392 }, { 20, 392 },
{ 22, 390 }, { 21, 390 },
{ 23, 388 }, { 22, 388 },
{ 24, 386 }, { 23, 386 },
{ 25, 384 }, { 24, 384 },
{ 26, 382 }, { 25, 382 },
{ 27, 380 }, { 26, 380 },
{ 28, 379 }, { 27, 379 },
{ 29, 378 }, { 28, 378 },
{ 30, 377 }, { 29, 377 },
{ 31, 376 }, { 30, 376 },
{ 32, 375 }, { 31, 375 },
{ 33, 374 }, { 32, 374 },
{ 34, 373 }, { 33, 373 },
{ 35, 372 }, { 34, 372 },
{ 36, 371 }, { 35, 371 },
{ 37, 370 }, { 36, 370 },
{ 38, 362 }, { 37, 362 },
{ 39, 354 }, { 38, 354 },
{ 40, 346 }, { 39, 346 },
{ 41, 338 }, { 40, 338 },
{ 42, 330 }, { 41, 330 },
{ 43, 328 }, { 42, 328 },
{ 44, 326 }, { 43, 326 },
{ 45, 324 }, { 44, 324 },
{ 46, 322 }, { 45, 322 },
{ 47, 320 }, { 46, 320 },
{ 48, 319 }, { 47, 319 },
{ 49, 318 }, { 48, 318 },
{ 50, 317 }, { 49, 317 },
{ 51, 316 }, { 50, 316 },
{ 52, 315 }, { 51, 315 },
{ 53, 314 }, { 52, 314 },
{ 54, 313 }, { 53, 313 },
{ 55, 312 }, { 54, 312 },
{ 56, 311 }, { 55, 311 },
{ 57, 310 }, { 56, 310 },
{ 58, 308 }, { 57, 308 },
{ 59, 306 }, { 58, 306 },
{ 60, 304 }, { 59, 304 },
{ 61, 302 }, { 60, 302 },
{ 62, 300 }, { 61, 300 },
{ 63, 298 }, { 62, 298 },
{ 65, 295 }, { 65, 295 },
{ 68, 294 }, { 68, 294 },
{ 70, 293 }, { 70, 293 },
......
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