V4L/DVB (7755): ivtv: add support for card comments and detected but unsupported cards

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ecfcc8...
Commit:     ecfcc83b8d6ff8ac65b072b309a1774ca52d955e
Parent:     d86e2ee98eeef61bdab8ca1bf4837c5709173790
Author:     Hans Verkuil <hverkuil@xs4all.nl>
AuthorDate: Sat Apr 26 08:48:26 2008 -0300
Committer:  Mauro Carvalho Chehab <mchehab@infradead.org>
CommitDate: Tue Apr 29 18:41:34 2008 -0300

    V4L/DVB (7755): ivtv: add support for card comments and detected but unsupported cards
    
    Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---
 drivers/media/video/ivtv/ivtv-cards.c  |    2 ++
 drivers/media/video/ivtv/ivtv-cards.h  |    1 +
 drivers/media/video/ivtv/ivtv-driver.c |    7 +++++++
 3 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/ivtv/ivtv-cards.c b/drivers/media/video/ivtv/ivtv-cards.c
index e908649..bf9b32a 100644
--- a/drivers/media/video/ivtv/ivtv-cards.c
+++ b/drivers/media/video/ivtv/ivtv-cards.c
@@ -875,6 +875,7 @@ static const struct ivtv_card_pci_info ivtv_pci_pg600v2[] = {
 static const struct ivtv_card ivtv_card_pg600v2 = {
 	.type = IVTV_CARD_PG600V2,
 	.name = "Yuan PG600-2, GotView PCI DVD Lite",
+	.comment = "only Composite and S-Video inputs are supported, not the tuner\n",
 	.v4l2_capabilities = IVTV_CAP_ENCODER,
 	.hw_video = IVTV_HW_CX25840,
 	.hw_audio = IVTV_HW_CX25840,
@@ -940,6 +941,7 @@ static const struct ivtv_card_pci_info ivtv_pci_avertv_mce116[] = {
 static const struct ivtv_card ivtv_card_avertv_mce116 = {
 	.type = IVTV_CARD_AVERTV_MCE116,
 	.name = "AVerTV MCE 116 Plus",
+	.comment = "only Composite and S-Video inputs are supported, not the tuner\n",
 	.v4l2_capabilities = IVTV_CAP_ENCODER,
 	.hw_video = IVTV_HW_CX25840,
 	.hw_audio = IVTV_HW_CX25840,
diff --git a/drivers/media/video/ivtv/ivtv-cards.h b/drivers/media/video/ivtv/ivtv-cards.h
index 9186fa2..bfb385c 100644
--- a/drivers/media/video/ivtv/ivtv-cards.h
+++ b/drivers/media/video/ivtv/ivtv-cards.h
@@ -244,6 +244,7 @@ struct ivtv_card_tuner_i2c {
 struct ivtv_card {
 	int type;
 	char *name;
+	char *comment;
 	u32 v4l2_capabilities;
 	u32 hw_video;		/* hardware used to process video */
 	u32 hw_audio;		/* hardware used to process audio */
diff --git a/drivers/media/video/ivtv/ivtv-driver.c b/drivers/media/video/ivtv/ivtv-driver.c
index 06a1f3c..e6f319f 100644
--- a/drivers/media/video/ivtv/ivtv-driver.c
+++ b/drivers/media/video/ivtv/ivtv-driver.c
@@ -1097,6 +1097,13 @@ static int __devinit ivtv_probe(struct pci_dev *dev,
 		   The PCI IDs are not always reliable. */
 		ivtv_process_eeprom(itv);
 	}
+	if (itv->card->comment)
+		IVTV_INFO("%s", itv->card->comment);
+	if (itv->card->v4l2_capabilities == 0) {
+		/* card was detected but is not supported */
+		retval = -ENODEV;
+		goto free_i2c;
+	}
 
 	if (itv->std == 0) {
 		itv->std = V4L2_STD_NTSC_M;
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
V4L/DVB (7755): ivtv: add support for card comments and dete..., Linux Kernel Mailing List..., (Tue Apr 29, 6:59 pm)
m68knommu: kill warnings in FEC driver, Linux Kernel Mailing List..., (Thu May 1, 3:03 pm)