From: Tobias Lorenz Date: Sat, 31 May 2008 18:09:07 +0000 (-0300) Subject: V4L/DVB (7996): si470x: afc indication X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ace7d4bbe6170ef9b72bfa82c3e5769d250fffae;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git V4L/DVB (7996): si470x: afc indication This patch brings the following changes: - afc indication: device has no indication whether freq is too low or too high therefore afc always return 1, when freq is wrong Signed-off-by: Tobias Lorenz Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/radio/radio-si470x.c b/drivers/media/radio/radio-si470x.c index 954ba997895d..db9d64a228bb 100644 --- a/drivers/media/radio/radio-si470x.c +++ b/drivers/media/radio/radio-si470x.c @@ -101,6 +101,7 @@ * - unplugging fixed * 2008-05-07 Tobias Lorenz * Version 1.0.8 + * - afc indication * - more safety checks, let si470x_get_freq return errno * * ToDo: @@ -1390,7 +1391,8 @@ static int si470x_vidioc_g_tuner(struct file *file, void *priv, * 0x0101; /* automatic frequency control: -1: freq to low, 1 freq to high */ - tuner->afc = 0; + /* AFCRL does only indicate that freq. differs, not if too low/high */ + tuner->afc = (radio->registers[STATUSRSSI] & STATUSRSSI_AFCRL) ? 1 : 0; done: if (retval < 0)