CVOC-E121

From LinuxTVWiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
CVOC-E121

An ISDB-T 1Seg USB Dongle with Siano Chipset. Works nicely with 1Seg by Brazilian TV stations.

The CVOC-E121 works with Linux kernel 2.6.35.10 with a kernel patch.

Overview/Features

  • USB interface
  • Inputs: Antenna, Remote

Components Used

  • Siano Nova B Digital Receiver

Other Images


Identification

# lsusb -v
Bus 001 Device 002: ID 187f:0201 Siano Mobile Silicon Nova B
Device Descriptor:
 bLength                18
 bDescriptorType         1
 bcdUSB               2.00
 bDeviceClass            0 (Defined at Interface level)
 bDeviceSubClass         0 
 bDeviceProtocol         0 
 bMaxPacketSize0        64
 idVendor           0x187f Siano Mobile Silicon
 idProduct          0x0201 Nova B
 bcdDevice            0.04
 iManufacturer           1 
 iProduct                2 
 iSerial                 0 
 bNumConfigurations      1
 Configuration Descriptor:
   bLength                 9
   bDescriptorType         2
   wTotalLength           32
   bNumInterfaces          1
   bConfigurationValue     1
   iConfiguration          0 
   bmAttributes         0x80
     (Bus Powered)
   MaxPower              100mA
   Interface Descriptor:
     bLength                 9
     bDescriptorType         4
     bInterfaceNumber        0
     bAlternateSetting       0
     bNumEndpoints           2
     bInterfaceClass       255 Vendor Specific Class
     bInterfaceSubClass    255 Vendor Specific Subclass
     bInterfaceProtocol    255 Vendor Specific Protocol
     iInterface              0 
     Endpoint Descriptor:
       bLength                 7
       bDescriptorType         5
       bEndpointAddress     0x81  EP 1 IN
       bmAttributes            2
         Transfer Type            Bulk
         Synch Type               None
         Usage Type               Data
       wMaxPacketSize     0x0200  1x 512 bytes
       bInterval               0
     Endpoint Descriptor:
       bLength                 7
       bDescriptorType         5
       bEndpointAddress     0x02  EP 2 OUT
       bmAttributes            2
         Transfer Type            Bulk
         Synch Type               None
         Usage Type               Data
       wMaxPacketSize     0x0200  1x 512 bytes
       bInterval               0

Making it Work

Firmware

You can use the driver for windows as well as for linux. When you install this device on your windows computer, installer in the CD-ROM will install 'isdbt_nova_12mhz_b0.inp' into the c:¥windows¥system32. You can copy and use this file to your linux firmware folder (ex. /lib/firmware).

Drivers

The driver comes with linux kernel drivers/media/dvb/siano/. However this driver needs a patch. You need to set SMS_SIANO_MDTV in the .config file during the kernel rebuild process.

Patch for Kernel Source

diff -urpN siano.orig/smscoreapi.c siano/smscoreapi.c
--- siano.orig/smscoreapi.c	2011-01-12 13:11:19.000000000 +0900
+++ siano/smscoreapi.c	2011-01-12 20:00:16.000000000 +0900
@@ -39,7 +39,7 @@
 #include "smsir.h"
 #include "smsendian.h"
 
-static int sms_dbg;
+static int sms_dbg=3;
 module_param_named(debug, sms_dbg, int, 0644);
 MODULE_PARM_DESC(debug, "set debug level (info=1, adv=2 (or-able))");
 
@@ -522,13 +522,14 @@ static int smscore_load_firmware_family2
 
 	mem_address = firmware->StartAddress;
 
-	sms_info("loading FW to addr 0x%x size %d",
+	sms_info("loading FW to addr 0x%x Length %d",
 		 mem_address, firmware->Length);
 	if (coredev->preload_handler) {
 		rc = coredev->preload_handler(coredev->context);
 		if (rc < 0)
 			return rc;
 	}
+	size-=12;
 
 	/* PAGE_SIZE buffer shall be enough and dma aligned */
 	msg = kmalloc(PAGE_SIZE, GFP_KERNEL | GFP_DMA);
@@ -575,6 +576,25 @@ static int smscore_load_firmware_family2
 
 	if (rc >= 0) {
 		if (coredev->mode == DEVICE_MODE_NONE) {
+			sms_debug("sending unknown command.");
+			struct SmsMsgData_ST *UnknownMsg =
+				(struct SmsMsgData_ST *) msg;
+			SMS_INIT_MSG(msg, MSG_SMS_UNKNOWNMESSAGE,
+			     sizeof(struct SmsMsgHdr_ST) +
+			     sizeof(u32)*3);
+			UnknownMsg->msgData[0]=0x00040260;
+			UnknownMsg->msgData[1]=0x0001691c;
+			UnknownMsg->msgData[2]=0x00000000;
+
+			rc = coredev->sendrequest_handler(
+				coredev->context, UnknownMsg
+			  	,UnknownMsg->xMsgHeader.msgLength);
+			msleep(100);
+		}
+	}
+
+	if (rc >= 0) {
+		if (coredev->mode == DEVICE_MODE_NONE) {
 			struct SmsMsgData_ST *TriggerMsg =
 				(struct SmsMsgData_ST *) msg;
 
@@ -585,7 +605,8 @@ static int smscore_load_firmware_family2
 			TriggerMsg->msgData[0] = firmware->StartAddress;
 						/* Entry point */
 			TriggerMsg->msgData[1] = 5; /* Priority */
-			TriggerMsg->msgData[2] = 0x200; /* Stack size */
+//			TriggerMsg->msgData[2] = 0x200; /* Stack size */
+			TriggerMsg->msgData[2] = 0x400; /* Stack size */
 			TriggerMsg->msgData[3] = 0; /* Parameter */
 			TriggerMsg->msgData[4] = 4; /* Task ID */
 
diff -urpN siano.orig/smscoreapi.h siano/smscoreapi.h
--- siano.orig/smscoreapi.h	2011-01-12 13:11:19.000000000 +0900
+++ siano/smscoreapi.h	2011-01-12 19:03:07.000000000 +0900
@@ -217,9 +217,12 @@ struct smscore_device_t {
 #define MSG_SMS_HO_PER_SLICES_IND			630
 #define MSG_SMS_SET_ANTENNA_CONFIG_REQ			651
 #define MSG_SMS_SET_ANTENNA_CONFIG_RES			652
+#define MSG_SMS_GET_ISDBT_STATISTICS_REQ		653
+#define MSG_SMS_GET_ISDBT_STATISTICS_RES		654
 #define MSG_SMS_SLEEP_RESUME_COMP_IND			655
 #define MSG_SMS_DATA_DOWNLOAD_REQ			660
 #define MSG_SMS_DATA_DOWNLOAD_RES			661
+#define MSG_SMS_UNKNOWNMESSAGE			662
 #define MSG_SMS_SWDOWNLOAD_TRIGGER_REQ		664
 #define MSG_SMS_SWDOWNLOAD_TRIGGER_RES		665
 #define MSG_SMS_SWDOWNLOAD_BACKDOOR_REQ		666
@@ -458,6 +461,8 @@ struct SMSHOSTLIB_ISDBT_LAYER_STAT_ST {
 };
 
 struct SMSHOSTLIB_STATISTICS_ISDBT_ST {
+	u32 UnknownParam;
+	
 	u32 StatisticsType; /* Enumerator identifying the type of the
 				* structure.  Values are the same as
 				* SMSHOSTLIB_DEVICE_MODES_E
diff -urpN siano.orig/smsdvb.c siano/smsdvb.c
--- siano.orig/smsdvb.c	2011-01-12 13:11:19.000000000 +0900
+++ siano/smsdvb.c	2011-01-14 19:40:24.000000000 +0900
@@ -60,7 +60,7 @@ struct smsdvb_client_t {
 static struct list_head g_smsdvb_clients;
 static struct mutex g_smsdvb_clientslock;
 
-static int sms_dbg;
+static int sms_dbg=3;
 module_param_named(debug, sms_dbg, int, 0644);
 MODULE_PARM_DESC(debug, "set debug level (info=1, adv=2 (or-able))");
 
@@ -331,6 +331,7 @@ static int smsdvb_onresponse(void *conte
 		is_status_update = true;
 		break;
 	}
+	case MSG_SMS_GET_ISDBT_STATISTICS_RES: 
 	case MSG_SMS_GET_STATISTICS_RES: {
 		union {
 			struct SMSHOSTLIB_STATISTICS_ISDBT_ST  isdbt;
@@ -476,7 +477,7 @@ static int smsdvb_sendrequest_and_wait(s
 static int smsdvb_send_statistics_request(struct smsdvb_client_t *client)
 {
 	int rc;
-	struct SmsMsgHdr_ST Msg = { MSG_SMS_GET_STATISTICS_REQ,
+	struct SmsMsgHdr_ST Msg = { MSG_SMS_GET_ISDBT_STATISTICS_REQ,
 				    DVBT_BDA_CONTROL_MSG_ID,
 				    HIF_TASK,
 				    sizeof(struct SmsMsgHdr_ST), 0 };
@@ -597,7 +598,7 @@ static int smsdvb_dvbt_set_frontend(stru
 	struct dtv_frontend_properties *c = &fe->dtv_property_cache;
 	struct smsdvb_client_t *client =
 		container_of(fe, struct smsdvb_client_t, frontend);
-
+	
 	struct {
 		struct SmsMsgHdr_ST	Msg;
 		u32		Data[3];
@@ -671,7 +672,7 @@ static int smsdvb_isdbt_set_frontend(str
 	} Msg;
 
 	fe->dtv_property_cache.delivery_system = SYS_ISDBT;
-
+	
 	Msg.Msg.msgSrcId  = DVBT_BDA_CONTROL_MSG_ID;
 	Msg.Msg.msgDstId  = HIF_TASK;
 	Msg.Msg.msgFlags  = 0;
@@ -711,9 +712,41 @@ static int smsdvb_isdbt_set_frontend(str
 		return -EINVAL;
 	}
 
+	Msg.Data[0] = 50500000;
+	Msg.Data[1] = BW_ISDBT_3SEG;
+	Msg.Data[2] = 12000000;
+	Msg.Data[3] = 1;
+	sms_info("%s: freq %d segwidth %d segindex %d\n", __func__,
+		 c->frequency, c->isdbt_sb_segment_count,
+		 c->isdbt_sb_segment_idx);
+	smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg),
+					   &client->tune_done);
+	msleep(200);
+
+	Msg.Data[0] = 0;
+	Msg.Data[1] = BW_ISDBT_1SEG;
+	sms_info("%s: freq %d segwidth %d segindex %d\n", __func__,
+		 c->frequency, c->isdbt_sb_segment_count,
+		 c->isdbt_sb_segment_idx);
+	smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg),
+					   &client->tune_done);
+	msleep(100);
+
+
+	Msg.Data[0] = 50500000;
+	Msg.Data[1] = BW_ISDBT_3SEG;
+	sms_info("%s: freq %d segwidth %d segindex %d\n", __func__,
+		 c->frequency, c->isdbt_sb_segment_count,
+		 c->isdbt_sb_segment_idx);
+	smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg),
+					   &client->tune_done);
+	msleep(100);
+
+
 	Msg.Data[0] = c->frequency;
+	Msg.Data[1] = BW_ISDBT_1SEG;
 	Msg.Data[2] = 12000000;
-	Msg.Data[3] = c->isdbt_sb_segment_idx;
+	Msg.Data[3] = 1;
 
 	sms_info("%s: freq %d segwidth %d segindex %d\n", __func__,
 		 c->frequency, c->isdbt_sb_segment_count,
@@ -778,6 +811,22 @@ static int smsdvb_sleep(struct dvb_front
 
 	sms_board_dvb3_event(client, DVB3_EVENT_SLEEP);
 
+	struct {
+		struct SmsMsgHdr_ST	Msg;
+		u32		Data[4];
+	} Msg;
+
+	Msg.Msg.msgSrcId  = DVBT_BDA_CONTROL_MSG_ID;
+	Msg.Msg.msgDstId  = HIF_TASK;
+	Msg.Msg.msgFlags  = 0;
+	Msg.Msg.msgType   = MSG_SMS_ISDBT_TUNE_REQ;
+	Msg.Msg.msgLength = sizeof(Msg);
+	Msg.Data[0] = 0;
+	Msg.Data[1] = BW_ISDBT_1SEG;
+	Msg.Data[2] = 12000000;
+	Msg.Data[3] = 1;
+	smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg),
+					   &client->tune_done);
 	return 0;
 }
 
diff -urpN siano.orig/smsdvb.mod.c siano/smsdvb.mod.c
--- siano.orig/smsdvb.mod.c	2011-01-12 13:11:19.000000000 +0900
+++ siano/smsdvb.mod.c	2011-01-12 20:10:51.000000000 +0900
@@ -42,6 +42,7 @@ __attribute__((section("__versions"))) =
 	{ 0x507e90c, "kmem_cache_alloc_notrace" },
 	{ 0x3cdbba9a, "malloc_sizes" },
 	{ 0xb6dfba8d, "sms_board_event" },
+	{ 0xf9a482f9, "msleep" },
 	{ 0x50f0327f, "sms_board_lna_control" },
 	{ 0xedbfea0f, "smscore_get_device_mode" },
 	{ 0xc9225f0, "sms_board_led_feedback" },


Sample Kernel Output

usb 1-2: new high speed USB device using ehci_hcd and address 2
smscore_set_device_mode: firmware download success: isdbt_nova_12mhz_b0.inp
usbcore: registered new interface driver smsusb
DVB: registering new adapter (Siano Nova B Digital Receiver)
DVB: registering adapter 0 frontend 0 (Siano Mobile Digital MDTV Receiver)...

Remote Control Support

The package comes with IR remote, but not functional with this patch.

External Links