All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/16] tm6000: add radio capabilities
@ 2011-05-09 19:53 stefan.ringel
  2011-05-09 19:53 ` [PATCH 02/16] tm6000: add tm6010 audio mode setup stefan.ringel
                   ` (14 more replies)
  0 siblings, 15 replies; 17+ messages in thread
From: stefan.ringel @ 2011-05-09 19:53 UTC (permalink / raw)
  To: linux-media; +Cc: mchehab, d.belimov, Stefan Ringel

From: Stefan Ringel <stefan.ringel@arcor.de>

add radio capabilities


Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
---
 drivers/staging/tm6000/tm6000-cards.c |    4 +++
 drivers/staging/tm6000/tm6000-video.c |   34 +++++++++++++++++---------------
 drivers/staging/tm6000/tm6000.h       |    1 +
 3 files changed, 23 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/tm6000/tm6000-cards.c b/drivers/staging/tm6000/tm6000-cards.c
index 6e51486..31ccd2f 100644
--- a/drivers/staging/tm6000/tm6000-cards.c
+++ b/drivers/staging/tm6000/tm6000-cards.c
@@ -254,6 +254,7 @@ struct tm6000_board tm6000_boards[] = {
 			.has_zl10353    = 1,
 			.has_eeprom     = 1,
 			.has_remote     = 1,
+			.has_radio	= 1.
 			.has_input_comp = 1,
 			.has_input_svid = 1,
 		},
@@ -276,6 +277,7 @@ struct tm6000_board tm6000_boards[] = {
 			.has_zl10353    = 0,
 			.has_eeprom     = 1,
 			.has_remote     = 1,
+			.has_radio	= 1,
 			.has_input_comp = 1,
 			.has_input_svid = 1,
 		},
@@ -350,6 +352,7 @@ struct tm6000_board tm6000_boards[] = {
 			.has_zl10353    = 1,
 			.has_eeprom     = 1,
 			.has_remote     = 0,
+			.has_radio	= 1,
 			.has_input_comp = 0,
 			.has_input_svid = 0,
 		},
@@ -372,6 +375,7 @@ struct tm6000_board tm6000_boards[] = {
 			.has_zl10353    = 0,
 			.has_eeprom     = 1,
 			.has_remote     = 0,
+			.has_radio	= 1,
 			.has_input_comp = 0,
 			.has_input_svid = 0,
 		},
diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c
index f82edfa..a434a32 100644
--- a/drivers/staging/tm6000/tm6000-video.c
+++ b/drivers/staging/tm6000/tm6000-video.c
@@ -1730,24 +1730,26 @@ int tm6000_v4l2_register(struct tm6000_core *dev)
 	printk(KERN_INFO "%s: registered device %s\n",
 	       dev->name, video_device_node_name(dev->vfd));
 
-	dev->radio_dev = vdev_init(dev, &tm6000_radio_template,
-						   "radio");
-	if (!dev->radio_dev) {
-		printk(KERN_INFO "%s: can't register radio device\n",
-		       dev->name);
-		return ret; /* FIXME release resource */
-	}
+	if (dev->caps.has_radio) {
+		dev->radio_dev = vdev_init(dev, &tm6000_radio_template,
+							   "radio");
+		if (!dev->radio_dev) {
+			printk(KERN_INFO "%s: can't register radio device\n",
+			       dev->name);
+			return ret; /* FIXME release resource */
+		}
 
-	ret = video_register_device(dev->radio_dev, VFL_TYPE_RADIO,
-				    radio_nr);
-	if (ret < 0) {
-		printk(KERN_INFO "%s: can't register radio device\n",
-		       dev->name);
-		return ret; /* FIXME release resource */
-	}
+		ret = video_register_device(dev->radio_dev, VFL_TYPE_RADIO,
+					    radio_nr);
+		if (ret < 0) {
+			printk(KERN_INFO "%s: can't register radio device\n",
+			       dev->name);
+			return ret; /* FIXME release resource */
+		}
 
-	printk(KERN_INFO "%s: registered device %s\n",
-	       dev->name, video_device_node_name(dev->radio_dev));
+		printk(KERN_INFO "%s: registered device %s\n",
+		       dev->name, video_device_node_name(dev->radio_dev));
+	}
 
 	printk(KERN_INFO "Trident TVMaster TM5600/TM6000/TM6010 USB2 board (Load status: %d)\n", ret);
 	return ret;
diff --git a/drivers/staging/tm6000/tm6000.h b/drivers/staging/tm6000/tm6000.h
index fdd6d30..8cdc992 100644
--- a/drivers/staging/tm6000/tm6000.h
+++ b/drivers/staging/tm6000/tm6000.h
@@ -129,6 +129,7 @@ struct tm6000_capabilities {
 	unsigned int    has_zl10353:1;
 	unsigned int    has_eeprom:1;
 	unsigned int    has_remote:1;
+	unsigned int    has_radio:1;
 	unsigned int    has_input_comp:1;
 	unsigned int    has_input_svid:1;
 };
-- 
1.7.4.2


^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2011-05-20 23:16 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-09 19:53 [PATCH 01/16] tm6000: add radio capabilities stefan.ringel
2011-05-09 19:53 ` [PATCH 02/16] tm6000: add tm6010 audio mode setup stefan.ringel
2011-05-09 19:53 ` [PATCH 03/16] tm6000: change to virtual inputs stefan.ringel
2011-05-09 19:53 ` [PATCH 04/16] tm6000: vitual input enums stefan.ringel
2011-05-09 19:53 ` [PATCH 05/16] tm6000: change input control stefan.ringel
2011-05-09 19:53 ` [PATCH 06/16] tm6000: add eeprom stefan.ringel
2011-05-09 19:53 ` [PATCH 07/16] tm6000: remove unused capabilities stefan.ringel
2011-05-09 19:53 ` [PATCH 08/16] tm6000: remove old tuner params stefan.ringel
2011-05-09 19:53 ` [PATCH 09/16] tm6000: remove dopple init stefan.ringel
2011-05-09 19:53 ` [PATCH 10/16] tm6000: move from tm6000_set_reg to tm6000_set_reg_mask stefan.ringel
2011-05-09 19:53 ` [PATCH 11/16] tm6000: remove input select stefan.ringel
2011-05-09 19:54 ` [PATCH 12/16] tm6000: all audio packets must swab stefan.ringel
2011-05-09 19:54 ` [PATCH 13/16] tm6000: change from ioctl to unlocked_ioctl stefan.ringel
2011-05-09 19:54 ` [PATCH 14/16] tm6000: add pts logging stefan.ringel
2011-05-20 23:15   ` Mauro Carvalho Chehab
2011-05-09 19:54 ` [PATCH 15/16] tm6000: remove unsued exports stefan.ringel
2011-05-09 19:54 ` [PATCH 16/16] tm6000: remove tm6010 sif audio start and stop stefan.ringel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.