CVOC-E121

From LinuxTVWiki
Revision as of 15:24, 30 March 2011 by Hmartins (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
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

This is a patch for kernel version 2.6.35.10.

diff -urpN siano.orig/smscoreapi.c siano/smscoreapi.c
--- siano.orig/smscoreapi.c	2011-01-19 11:26:37.000000000 +0900
+++ siano/smscoreapi.c	2011-01-19 12:08:01.000000000 +0900
@@ -96,7 +96,7 @@ static struct mutex g_smscore_devicesloc
 static struct list_head g_smscore_registry;
 static struct mutex g_smscore_registrylock;
 
-static int default_mode = 4;
+static int default_mode = 6;
 
 module_param(default_mode, int, 0644);
 MODULE_PARM_DESC(default_mode, "default firmware id (device mode)");
@@ -531,6 +531,7 @@ static int smscore_load_firmware_family2
 		if (rc < 0)
 			return rc;
 	}
+	size-=12;
 
 	/* PAGE_SIZE buffer shall be enough and dma aligned */
 	msg = kmalloc(PAGE_SIZE, GFP_KERNEL | GFP_DMA);
@@ -577,6 +578,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;
 
@@ -587,7 +607,7 @@ 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] = 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-19 11:26:37.000000000 +0900
+++ siano/smscoreapi.h	2011-01-19 11:37:12.000000000 +0900
@@ -216,10 +216,12 @@ struct smscore_device_t {
 #define MSG_SMS_GET_STATISTICS_REQ			615
 #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 +460,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-19 11:26:37.000000000 +0900
+++ siano/smsdvb.c	2011-01-19 11:48:51.000000000 +0900
@@ -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 };
@@ -711,9 +712,44 @@ 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;
+	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(100);
+
+	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(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 +814,26 @@ 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);
+	msleep(100);
+
+
+
 	return 0;
 }
   


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