[PATCH 03/18] V4L/DVB (4727): Support status readout for saa713x based FM radio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Hartmut Hackmann <[email protected]>

This patch adds readout for stereo and signal level for
saa713x cards which use the saa713x as FM demodulator.
These are many cards based on saa7133, tda8290 and tda8275a.
FM channel search should work now.

Signed-off-by: Hartmut Hackmann <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
---

 drivers/media/video/saa7134/saa7134-video.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c
index 203302f..830617e 100644
--- a/drivers/media/video/saa7134/saa7134-video.c
+++ b/drivers/media/video/saa7134/saa7134-video.c
@@ -2248,7 +2248,11 @@ static int radio_do_ioctl(struct inode *
 		t->type = V4L2_TUNER_RADIO;
 
 		saa7134_i2c_call_clients(dev, VIDIOC_G_TUNER, t);
-
+		if (dev->input->amux == TV) {
+			t->signal = 0xf800 - ((saa_readb(0x581) & 0x1f) << 11);
+			t->rxsubchans = (saa_readb(0x529) & 0x08) ?
+					V4L2_TUNER_SUB_STEREO : V4L2_TUNER_SUB_MONO;
+		}
 		return 0;
 	}
 	case VIDIOC_S_TUNER:

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux