Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] au8522: set signal field to 100% when signal present

The signal state field in G_TUNER is typically scaled from 0-100%. Since we
don't know the signal level, we really would prefer the field to contain 100%
than 1/256, which in many utilities (such as v4l2-ctl) rounds to 0% even when
a signal is actually present.

This patch makes the behavior consistent with other drivers.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Devin Heitmueller and committed by
Mauro Carvalho Chehab
d749fb66 de99d532

+1 -1
+1 -1
drivers/media/dvb/frontends/au8522_decoder.c
··· 692 692 /* Interrogate the decoder to see if we are getting a real signal */ 693 693 lock_status = au8522_readreg(state, 0x00); 694 694 if (lock_status == 0xa2) 695 - vt->signal = 0x01; 695 + vt->signal = 0xffff; 696 696 else 697 697 vt->signal = 0x00; 698 698