From 3f84307a10b4d9039c5c8f718bcdd0928c9994c1 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Wed, 12 Dec 2007 16:44:54 -0300 Subject: [PATCH 1/5] V4L/DVB (6803): buf-core.c locking fixes After commit 19fb1457990b6b7e15586ec7331541a184233acc the callers in videobuf-core.c that already hold the lock must call __videobuf_read_start() instead of videobuf_read_start(). Signed-off-by: Adrian Bunk Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/videobuf-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/video/videobuf-core.c b/drivers/media/video/videobuf-core.c index 81f77d2b4bd3..c8a5cb57963b 100644 --- a/drivers/media/video/videobuf-core.c +++ b/drivers/media/video/videobuf-core.c @@ -909,7 +909,7 @@ ssize_t videobuf_read_stream(struct videobuf_queue *q, if (q->streaming) goto done; if (!q->reading) { - retval = videobuf_read_start(q); + retval = __videobuf_read_start(q); if (retval < 0) goto done; } @@ -982,7 +982,7 @@ unsigned int videobuf_poll_stream(struct file *file, struct videobuf_buffer, stream); } else { if (!q->reading) - videobuf_read_start(q); + __videobuf_read_start(q); if (!q->reading) { rc = POLLERR; } else if (NULL == q->read_buf) { From b3aa2269bd06681fbd0c47d2007381c35258ce0c Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Sun, 9 Dec 2007 21:13:38 -0300 Subject: [PATCH 2/5] V4L/DVB (6798): saa7134: enable LNA in analog mode for Hauppauge WinTV HVR-1110 Thanks to Hermann Pitton for noticing that this was missing. Signed-off-by: Michael Krufky Cc: Hermann Pitton Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/saa7134/saa7134-cards.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c index c6eb1e37a46e..98c1b084a716 100644 --- a/drivers/media/video/saa7134/saa7134-cards.c +++ b/drivers/media/video/saa7134/saa7134-cards.c @@ -3221,6 +3221,7 @@ struct saa7134_board saa7134_boards[] = { .radio_type = UNSET, .tuner_addr = ADDR_UNSET, .radio_addr = ADDR_UNSET, + .tuner_config = 1, .mpeg = SAA7134_MPEG_DVB, .inputs = {{ .name = name_tv, From 1c1a8b9cbec2b6a75b8fa0abf6ccfd948229998a Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Wed, 12 Dec 2007 15:40:32 -0300 Subject: [PATCH 3/5] V4L/DVB (6814): Makefile: always enter video/ Since not all code under drivers/media/video/ depends on CONFIG_VIDEO_DEV we cannot only enter it depending on CONFIG_VIDEO_DEV. Signed-off-by: Adrian Bunk Signed-off-by: Mauro Carvalho Chehab --- drivers/media/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/Makefile b/drivers/media/Makefile index 8fa19939c2b6..8cf91353b56a 100644 --- a/drivers/media/Makefile +++ b/drivers/media/Makefile @@ -3,6 +3,6 @@ # obj-y := common/ -obj-$(CONFIG_VIDEO_DEV) += video/ +obj-y += video/ obj-$(CONFIG_VIDEO_DEV) += radio/ obj-$(CONFIG_DVB_CORE) += dvb/ From 4b5ae10c815941fab8e0e3b3801b4cb60ee2383a Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Thu, 13 Dec 2007 02:30:26 -0300 Subject: [PATCH 4/5] V4L/DVB (6819): i2c: fix drivers/media/video/bt866.c usage_count got removed. Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/bt866.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/video/bt866.c b/drivers/media/video/bt866.c index b767b098d14b..96b415576f0d 100644 --- a/drivers/media/video/bt866.c +++ b/drivers/media/video/bt866.c @@ -300,7 +300,6 @@ static struct i2c_client bt866_client_tmpl = .addr = 0, .adapter = NULL, .driver = &i2c_driver_bt866, - .usage_count = 0 }; static int bt866_found_proc(struct i2c_adapter *adapter, From 2300317f30770abd625fb051b0e5d373ce55a6ad Mon Sep 17 00:00:00 2001 From: Steven Toth Date: Wed, 12 Dec 2007 22:14:00 -0300 Subject: [PATCH 5/5] V4L/DVB (6820): s5h1409: QAM SNR related fixes QAM SNR values were incorrect when the cable was disconnected. This patch extends the lookup tables to ensure correct values are being returned. Signed-off-by: Steven Toth Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/frontends/s5h1409.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/media/dvb/frontends/s5h1409.c b/drivers/media/dvb/frontends/s5h1409.c index 8dee7ec9456a..562d9208857a 100644 --- a/drivers/media/dvb/frontends/s5h1409.c +++ b/drivers/media/dvb/frontends/s5h1409.c @@ -107,7 +107,7 @@ static struct vsb_snr_tab { u16 val; u16 data; } vsb_snr_tab[] = { - { 1023, 770, }, + { 924, 300, }, { 923, 300, }, { 918, 295, }, { 915, 290, }, @@ -154,6 +154,7 @@ static struct qam64_snr_tab { u16 val; u16 data; } qam64_snr_tab[] = { + { 1, 0, }, { 12, 300, }, { 15, 290, }, { 18, 280, }, @@ -217,6 +218,7 @@ static struct qam64_snr_tab { { 95, 202, }, { 96, 201, }, { 104, 200, }, + { 255, 0, }, }; /* QAM256 SNR lookup table */ @@ -224,6 +226,7 @@ static struct qam256_snr_tab { u16 val; u16 data; } qam256_snr_tab[] = { + { 1, 0, }, { 12, 400, }, { 13, 390, }, { 15, 380, }, @@ -292,6 +295,7 @@ static struct qam256_snr_tab { { 105, 262, }, { 106, 261, }, { 110, 260, }, + { 255, 0, }, }; /* 8 bit registers, 16 bit values */ @@ -670,14 +674,15 @@ static int s5h1409_read_snr(struct dvb_frontend* fe, u16* snr) u16 reg; dprintk("%s()\n", __FUNCTION__); - reg = s5h1409_readreg(state, 0xf1) & 0x1ff; - switch(state->current_modulation) { case QAM_64: + reg = s5h1409_readreg(state, 0xf0) & 0xff; return s5h1409_qam64_lookup_snr(fe, snr, reg); case QAM_256: + reg = s5h1409_readreg(state, 0xf0) & 0xff; return s5h1409_qam256_lookup_snr(fe, snr, reg); case VSB_8: + reg = s5h1409_readreg(state, 0xf1) & 0x3ff; return s5h1409_vsb_lookup_snr(fe, snr, reg); default: break;