Re: [PATCH 1/1 re-submit 1] sdio: add low level i/o functions for workarounds
--- On Tue, 3/24/09, Pierre Ossman wrote: > From: Pierre Ossman > Subject: Re: [PATCH 1/1 re-submit 1] sdio: add low level i/o functions for > workarounds > To: "Uri Shkolnik" > Cc: "Mauro Carvalho Chehab" , "Linux Media Mailing > List" > Date: Tuesday, March 24, 2009, 10:04 PM > On Sun, 22 Mar 2009 16:48:39 +0200 > "Uri Shkolnik" > wrote: > > > Hi Pierre, > > > > The USB separation patches are ready, and will be > committed for review > > shortly (SDIO stack workaround + Siano SDIO driver > were the first to be > > re-re-re-committed, SPI will be next, and after them > the "core" which > > includes the 'separation' code). You can view one (of > many) older commit > > operations @ > > http://patchwork.kernel.org/project/linux-media/list/?submitter=Uri&stat > > e=* > > > > I see. Could you hold off on the SDIO patches and allow me > to do a > final cleanup once you have the separation patches done? > Then I can > send them directly to Mauro and we can have this merged > quickly. > > Rgds > -- > -- Pierre Ossman > > WARNING: This correspondence is being monitored by > the > Swedish government. Make sure your server uses > encryption > for SMTP traffic and consider using PGP for > end-to-end > encryption. > Hi Pierre, The SDIO patches are part of (at least) dozen patches needed to upgrade the Siano's offering for Linux kernel. The order is - 1) SDIO SMS interface driver and SDIO stack patch (add) 2) SPI interface driver (add) 3) USB interface driver (modify) 4) IR port (add) 5) USB v3 (modify) 6-15(?) ) "Core" and "Cards" modifications The order of the patches places the SDIO among the first to be submitted for review (interface drivers must be patched before the "core", in order to make the various commits pass bisect tests). I suggest that we'll continue the submission, and I'll cc you on ALL submissions. You will be able to review, and either ask for modification and/or suggest your on supplementary patches at any stage. Regards, Uri Shkolnik -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH - RECALL] siano: smsendian & smsdvb - binding the smsendian to smsdvb
--- On Fri, 4/3/09, Mauro Carvalho Chehab wrote: From: Mauro Carvalho Chehab Subject: Re: [PATCH - RECALL] siano: smsendian & smsdvb - binding the smsendian to smsdvb To: "Uri Shkolnik" Cc: linux-media@vger.kernel.org Date: Friday, April 3, 2009, 3:15 PM Uri, On Fri, 3 Apr 2009 03:20:38 -0700 (PDT) Uri Shkolnik wrote: > Hi, > > The last patch in the series ("siano: smsendian & smsdvb - binding the > smsendian to smsdvb") breaks the driver, please ignore it. > It will be very hard (again) to handle your patch series. Especially when sending a big series of patches like this, you should number the patches, for they to be applied at the proper order. Also, when a patch is broken, you should reply to that patch, without changing the subject. The original message ID will be properly handled by patchwork, and the reply message will be folded with the original patch. In this case, this is the message ID of your patch message: Message-ID: <622468.86074...@web110805.mail.gq1.yahoo.com> However, your "RECALL" email doesn't contain any reference tag to the original message (since you didn't reply to your message). So, emailers and patchwork won't associate the reply with the patch you want to discard. Cheers, Mauro Hi Mauro, 1) Backport patch ("siano: smsdvb - add support for old dvb-core version") - If this patch causes problem, discard it (trashing it does not affect the other patches), let me know, and I'll submit only the one-line endian change. (We'll support old embedded devices, etc. using specific vendor patch from our customer support team, and the kernel version will not have any backport code). 2) I'll add global serial indication to the patches from now on. Regarding the already submitted patches, is it OK if I'll email you a text list of patches with their order? 3) Recall message - I didn't know about the reply option and I'll do that from now on. (Any day you learn something new, and that fact distinguish you from the dead:-) ) 4) If it's OK with you, I'll hold further submission, until the already submitted patches will be reviewed and committed. 5) Some related question... I emailed all patches to you and CC the "linux-media@vger.kernel.org" ML. I can not see any post other than your replys on the ML and nothing on http://patchwork.kernel.org/project/linux-media/list/ . Any idea why? Have a great weekend, Regards, Uri -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH - RECALL] siano: smsendian & smsdvb - binding the smsendian to smsdvb
--- On Sat, 4/4/09, Mauro Carvalho Chehab wrote: > From: Mauro Carvalho Chehab > Subject: Re: [PATCH - RECALL] siano: smsendian & smsdvb - binding the > smsendian to smsdvb > To: "Uri Shkolnik" > Cc: linux-media@vger.kernel.org > Date: Saturday, April 4, 2009, 12:14 AM > On Fri, 3 Apr 2009 13:31:32 -0700 > (PDT) > Uri Shkolnik > wrote: > > > > > --- On Fri, 4/3/09, Mauro Carvalho Chehab > wrote: > > > > From: Mauro Carvalho Chehab > > Subject: Re: [PATCH - RECALL] siano: smsendian & > smsdvb - binding the smsendian to smsdvb > > To: "Uri Shkolnik" > > Cc: linux-media@vger.kernel.org > > Date: Friday, April 3, 2009, 3:15 PM > > > > Uri, > > > > On Fri, 3 Apr 2009 03:20:38 -0700 (PDT) > > Uri Shkolnik > wrote: > > > > > Hi, > > > > > > The last patch in the series ("siano: smsendian > & smsdvb - binding the smsendian to smsdvb") breaks the > driver, please ignore it. > > > > > > > > > It will be very hard (again) to handle your patch > series. Especially when > > sending a big series of patches like this, you should > number the patches, for > > they to be applied at the proper order. > > > > Also, when a patch is broken, you should reply to that > patch, without changing > > the subject. The original message ID will be properly > handled by patchwork, and > > the reply message will be folded with the original > patch. > > > > In this case, this is the message ID of your patch > message: > > Message-ID: <622468.86074...@web110805.mail.gq1.yahoo.com> > > > > However, your "RECALL" email doesn't contain any > reference tag to the original > > message (since you didn't reply to your message). So, > emailers and patchwork > > won't associate the reply with the patch you want to > discard. > > > > Cheers, > > Mauro > > > > Hi Mauro, > > > > > > > > > > 1) Backport patch ("siano: smsdvb - add support for > old dvb-core version") - If this patch causes problem, > discard it (trashing it does not affect the other patches), > let me know, and I'll submit only the one-line endian > change. (We'll support old embedded devices, etc. using > specific vendor patch from our customer support team, and > the kernel version will not have any backport code). > > > > 2) I'll add global serial indication to the patches > from now on. Regarding the already submmited patches, is it > OK if I'll email you a text list of patches with their > order? > > Yes, if you provide me the patch numbers at patchwork. I > just need a simple > list of patchwork sequence numbers, in the expected order. > > > 3) Recall message - I didn't know about the reply > option and I'll do that from now on. (Any day you learn > something new, and that fact distinguish you from the > dead:-) ) > > No problem. > > > > 4) If it's OK with you, I'll hold further submission, > until the already submited patches will be reviewed and > commited. > > Seems the better for me. > > > 5) Some related question... I emailed all patches to > you and CC the "linux-media@vger.kernel.org" > ML. I can not see any post other than your replys on the ML > and nothing on http://patchwork.kernel.org/project/linux-media/list/ > . Any idea why? > > If patchwork didn't got, then the patch is broken. You > don't need to CC me, but you need to be sure that patchwork > will catch they. For patchwork to do his job, you should be > sure that your emailer won't do line wrapping, and avoid use > attachments. Mime processing is tricky and some emailers set > the wrong mime type for attachments. > > > Have a great weekend, > > Same to you. > > > > Regards, > > > > Uri > > > > > > > > > Cheers, > Mauro > Hi Mauro, I'm watching closely http://patchwork.kernel.org/project/linux-media/list/ and this ML. Until now, none of my patches appears anywhere. It seems that either html tags or other formatting issue, prevent the robot from processing my patches (I can see submissions from today, while my two days old are absent). I'll wait till tomorrow (just in case) and if nothing will happen, I'll re-submit my patches (and make sure they are pure text...). If so, I'll also add patches numeration, and remove the backport one. Regards, Uri -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0904_1] Siano: core header - update license and include files
# HG changeset patch # User Uri Shkolnik # Date 1238689930 -10800 # Node ID c3f0f50d46058f07fb355d8e5531f35cfd0ca37e # Parent 7311d23c3355629b617013cd51223895a2423770 [PATCH] [0904_1] Siano: core header - update license and included files From: Uri Shkolnik This patch does not include any implementation changes. It update the smscoreapi.h license to be identical to other Siano's headers and the #include files list. Priority: normal Signed-off-by: Uri Shkolnik diff -r 7311d23c3355 -r c3f0f50d4605 linux/drivers/media/dvb/siano/smscoreapi.h --- a/linux/drivers/media/dvb/siano/smscoreapi.hSun Mar 15 12:05:57 2009 +0200 +++ b/linux/drivers/media/dvb/siano/smscoreapi.hThu Apr 02 19:32:10 2009 +0300 @@ -1,26 +1,26 @@ -/* - * Driver for the Siano SMS1xxx USB dongle - * - * author: Anatoly Greenblat - * - * Copyright (c), 2005-2008 Siano Mobile Silicon, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. - * - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ +/ -#ifndef __smscoreapi_h__ -#define __smscoreapi_h__ +Siano Mobile Silicon, Inc. +MDTV receiver kernel modules. +Copyright (C) 2006-2008, Uri Shkolnik, Anatoly Greenblat + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + + This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. + +/ + +#ifndef __SMS_CORE_API_H__ +#define __SMS_CORE_API_H__ #include #include @@ -28,15 +28,23 @@ #include #include #include +#include +#include +#include +#include + #include -#include -#include "compat.h" +/* #include "smsir.h" */ + +#define SMS_DVB3_SUBSYS +#ifdef SMS_DVB3_SUBSYS #include "dmxdev.h" #include "dvbdev.h" #include "dvb_demux.h" #include "dvb_frontend.h" +#endif #define kmutex_init(_p_) mutex_init(_p_) #define kmutex_lock(_p_) mutex_lock(_p_) @@ -598,4 +606,4 @@ int smscore_led_state(struct smscore_dev dprintk(KERN_DEBUG, DBG_ADV, fmt, ##arg) -#endif /* __smscoreapi_h__ */ +#endif /* __SMS_CORE_API_H__ */ -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0904_2] Siano: core header - add definitions and structures
# HG changeset patch # User Uri Shkolnik # Date 1238690859 -10800 # Node ID 05cf6606192642241ff25a152e249118cb8a129b # Parent c3f0f50d46058f07fb355d8e5531f35cfd0ca37e [PATCH] [0904_2] Siano: core header - add definitions and structures From: Uri Shkolnik Add new definitions (of Siano's protocol messages), and protocol structures (for future commits usage) Priority: normal Signed-off-by: Uri Shkolnik diff -r c3f0f50d4605 -r 05cf66061926 linux/drivers/media/dvb/siano/smscoreapi.h --- a/linux/drivers/media/dvb/siano/smscoreapi.hThu Apr 02 19:32:10 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.hThu Apr 02 19:47:39 2009 +0300 @@ -55,6 +55,7 @@ along with this program. If not, see msgType = type; (ptr)->msgSrcId = src; (ptr)->msgDstId = dst; \ @@ -206,6 +215,15 @@ struct smsclient_params_t { } while (0) #define SMS_INIT_MSG(ptr, type, len) \ SMS_INIT_MSG_EX(ptr, type, 0, HIF_TASK, len) +enum SMS_DVB3_EVENTS { + DVB3_EVENT_INIT = 0, + DVB3_EVENT_SLEEP, + DVB3_EVENT_HOTPLUG, + DVB3_EVENT_FE_LOCK, + DVB3_EVENT_FE_UNLOCK, + DVB3_EVENT_UNC_OK, + DVB3_EVENT_UNC_ERR +}; enum SMS_DEVICE_MODE { DEVICE_MODE_NONE = -1, @@ -230,8 +248,13 @@ struct SmsMsgHdr_ST { }; struct SmsMsgData_ST { - struct SmsMsgHdr_ST xMsgHeader; - u32 msgData[1]; + struct SmsMsgHdr_ST xMsgHeader; + u32 msgData[1]; +}; + +struct SmsMsgData_ST2 { + struct SmsMsgHdr_ST xMsgHeader; + u32 msgData[2]; }; struct SmsDataDownload_ST { -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0904_3] Siano: core - move and update the main core structure declaration
# HG changeset patch # User Uri Shkolnik # Date 1238691361 -10800 # Node ID 19925582e5dded86fccce7d8c9965285c1240836 # Parent 05cf6606192642241ff25a152e249118cb8a129b [PATCH] [0904_3] Siano: core - move and update the main core structure declaration From: Uri Shkolnik smscoreapi - move the main core structure declaration to the header, in order to enable other components (such as IR) to use it. Priority: normal Signed-off-by: Uri Shkolnik diff -r 05cf66061926 -r 19925582e5dd linux/drivers/media/dvb/siano/smscoreapi.c --- a/linux/drivers/media/dvb/siano/smscoreapi.cThu Apr 02 19:47:39 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.cThu Apr 02 19:56:01 2009 +0300 @@ -56,42 +56,6 @@ struct smscore_client_t { struct list_headidlist; onresponse_tonresponse_handler; onremove_t onremove_handler; -}; - -struct smscore_device_t { - struct list_head entry; - - struct list_head clients; - struct list_head subclients; - spinlock_t clientslock; - - struct list_head buffers; - spinlock_t bufferslock; - int num_buffers; - - void*common_buffer; - int common_buffer_size; - dma_addr_t common_buffer_phys; - - void*context; - struct device *device; - - chardevpath[32]; - unsigned long device_flags; - - setmode_t setmode_handler; - detectmode_tdetectmode_handler; - sendrequest_t sendrequest_handler; - preload_t preload_handler; - postload_t postload_handler; - - int mode, modes_supported; - - struct completion version_ex_done, data_download_done, trigger_done; - struct completion init_device_done, reload_start_done, resume_done; - - int board_id; - int led_state; }; void smscore_set_board_id(struct smscore_device_t *core, int id) diff -r 05cf66061926 -r 19925582e5dd linux/drivers/media/dvb/siano/smscoreapi.h --- a/linux/drivers/media/dvb/siano/smscoreapi.hThu Apr 02 19:47:39 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.hThu Apr 02 19:56:01 2009 +0300 @@ -128,6 +128,60 @@ struct smsclient_params_t { onremove_t onremove_handler; void*context; +}; + +struct smscore_device_t { + struct list_head entry; + + struct list_head clients; + struct list_head subclients; + spinlock_t clientslock; + + struct list_head buffers; + spinlock_t bufferslock; + int num_buffers; + + void *common_buffer; + int common_buffer_size; + dma_addr_t common_buffer_phys; + + void *context; + struct device *device; + + char devpath[32]; + unsigned long device_flags; + + setmode_t setmode_handler; + detectmode_t detectmode_handler; + sendrequest_t sendrequest_handler; + preload_t preload_handler; + postload_t postload_handler; + + int mode, modes_supported; + + /* host <--> device messages */ + struct completion version_ex_done, data_download_done, trigger_done; + struct completion init_device_done, reload_start_done, resume_done; + struct completion gpio_configuration_done, gpio_set_level_done; + struct completion gpio_get_level_done, ir_init_done; + + /* Buffer management */ + wait_queue_head_t buffer_mng_waitq; + + /* GPIO */ + int gpio_get_res; + + /* Target hardware board */ + int board_id; + + /* Firmware */ + u8 *fw_buf; + u32 fw_buf_size; + + /* Infrared (IR) */ + /* struct ir_t ir; */ + + int led_state; }; /* GPIO definitions for antenna frequency domain control (SMS8021) */ -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0904_5] Siano: core header - indentation
# HG changeset patch # User Uri Shkolnik # Date 1238692457 -10800 # Node ID eb9fed366b2bb2b8a99760f52b9c0e40d72a71e0 # Parent 83b19eba46dd4f8253d02c26db4f42728d60e28f [PATCH] [0904_5] Siano: core header - indentation From: Uri Shkolnik Some more indentation for the smscoreapi.h There are no implementation changes in this patch. Priority: normal Signed-off-by: Uri Shkolnik diff -r 83b19eba46dd -r eb9fed366b2b linux/drivers/media/dvb/siano/smscoreapi.h --- a/linux/drivers/media/dvb/siano/smscoreapi.hThu Apr 02 20:07:49 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.hThu Apr 02 20:14:17 2009 +0300 @@ -55,14 +55,14 @@ along with this program. If not, see msgType = type; (ptr)->msgSrcId = src; (ptr)->msgDstId = dst; \ (ptr)->msgLength = len; (ptr)->msgFlags = 0; \ } while (0) + #define SMS_INIT_MSG(ptr, type, len) \ SMS_INIT_MSG_EX(ptr, type, 0, HIF_TASK, len) + enum SMS_DVB3_EVENTS { DVB3_EVENT_INIT = 0, DVB3_EVENT_SLEEP, @@ -324,11 +324,12 @@ struct SmsVersionRes_ST { u8 Step; /* 0 - Step A */ u8 MetalFix; /* 0 - Metal 0 */ - u8 FirmwareId; /* 0xFF � ROM, otherwise the -* value indicated by -* SMSHOSTLIB_DEVICE_MODES_E */ - u8 SupportedProtocols; /* Bitwise OR combination of + /* FirmwareId 0xFF if ROM, otherwise the +* value indicated by SMSHOSTLIB_DEVICE_MODES_E */ + u8 FirmwareId; + /* SupportedProtocols Bitwise OR combination of * supported protocols */ + u8 SupportedProtocols; u8 VersionMajor; u8 VersionMinor; @@ -362,10 +363,12 @@ struct SMSHOSTLIB_STATISTICS_ST { s32 SNR; /* dB */ u32 BER; /* Post Viterbi BER [1E-5] */ u32 FIB_CRC; /* CRC errors percentage, valid only for DAB */ - u32 TS_PER; /* Transport stream PER, 0x indicate N/A, + /* Transport stream PER, 0x indicate N/A, * valid only for DVB-T/H */ - u32 MFER; /* DVB-H frame error rate in percentage, + u32 TS_PER; + /* DVB-H frame error rate in percentage, * 0x indicate N/A, valid only for DVB-H */ + u32 MFER; s32 RSSI; /* dBm */ s32 InBandPwr; /* In band power in dBM */ s32 CarrierOffset; /* Carrier Offset in bin/1024 */ @@ -373,8 +376,9 @@ struct SMSHOSTLIB_STATISTICS_ST { /* Transmission parameters, valid only for DVB-T/H */ u32 Frequency; /* Frequency in Hz */ u32 Bandwidth; /* Bandwidth in MHz */ - u32 TransmissionMode; /* Transmission Mode, for DAB modes 1-4, + /* Transmission Mode, for DAB modes 1-4, * for DVB-T/H FFT mode carriers in Kilos */ + u32 TransmissionMode; u32 ModemState; /* from SMS_DvbModemState_ET */ u32 GuardInterval; /* Guard Interval, 1 divided by value */ u32 CodeRate; /* Code Rate from SMS_DvbModemState_ET */ -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0904_6] Siano: smsdvb - new device status mechanism
# HG changeset patch # User Uri Shkolnik # Date 1238694624 -10800 # Node ID 4a0b207a424af7f05d8eb417a698a82a61dd086f # Parent eb9fed366b2bb2b8a99760f52b9c0e40d72a71e0 siano: smsdvb - new device status mechanism [PATCH] [0904_6] Siano: smsdvb - new device status mechanism From: Uri Shkolnik This is quite large patch, but it atomic. The patch introduces new , and much better way to be updated about SMS device status. Instead of pulling (by submitting statistics_request message), the driver use the information which is pushed by the device. Changes are: updated statistics structure (header file) and the implementation in the smsdvb which use this information. Priority: normal Signed-off-by: Uri Shkolnik diff -r eb9fed366b2b -r 4a0b207a424a linux/drivers/media/dvb/siano/smscoreapi.h --- a/linux/drivers/media/dvb/siano/smscoreapi.hThu Apr 02 20:14:17 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.hThu Apr 02 20:50:24 2009 +0300 @@ -351,240 +351,203 @@ struct SmsFirmware_ST { u8 Payload[1]; }; -struct SMSHOSTLIB_STATISTICS_ST { - u32 Reserved; /* Reserved */ +/* Statistics information returned as response for + * SmsHostApiGetStatistics_Req */ +struct SMSHOSTLIB_STATISTICS_S { + u32 Reserved; /* Reserved */ /* Common parameters */ - u32 IsRfLocked; /* 0 - not locked, 1 - locked */ - u32 IsDemodLocked; /* 0 - not locked, 1 - locked */ - u32 IsExternalLNAOn; /* 0 - external LNA off, 1 - external LNA on */ + u32 IsRfLocked; /* 0 - not locked, 1 - locked */ + u32 IsDemodLocked; /* 0 - not locked, 1 - locked */ + u32 IsExternalLNAOn;/* 0 - external LNA off, 1 - external LNA on */ /* Reception quality */ - s32 SNR; /* dB */ - u32 BER; /* Post Viterbi BER [1E-5] */ - u32 FIB_CRC; /* CRC errors percentage, valid only for DAB */ - /* Transport stream PER, 0x indicate N/A, -* valid only for DVB-T/H */ - u32 TS_PER; - /* DVB-H frame error rate in percentage, -* 0x indicate N/A, valid only for DVB-H */ - u32 MFER; - s32 RSSI; /* dBm */ - s32 InBandPwr; /* In band power in dBM */ - s32 CarrierOffset; /* Carrier Offset in bin/1024 */ + s32 SNR;/* dB */ + u32 BER;/* Post Viterbi BER [1E-5] */ + u32 FIB_CRC;/* CRC errors percentage, valid only for DAB */ + u32 TS_PER; /* Transport stream PER, + 0x indicate N/A, valid only for DVB-T/H */ + u32 MFER; /* DVB-H frame error rate in percentage, + 0x indicate N/A, valid only for DVB-H */ + s32 RSSI; /* dBm */ + s32 InBandPwr; /* In band power in dBM */ + s32 CarrierOffset; /* Carrier Offset in bin/1024 */ - /* Transmission parameters, valid only for DVB-T/H */ - u32 Frequency; /* Frequency in Hz */ - u32 Bandwidth; /* Bandwidth in MHz */ - /* Transmission Mode, for DAB modes 1-4, -* for DVB-T/H FFT mode carriers in Kilos */ - u32 TransmissionMode; - u32 ModemState; /* from SMS_DvbModemState_ET */ - u32 GuardInterval; /* Guard Interval, 1 divided by value */ - u32 CodeRate; /* Code Rate from SMS_DvbModemState_ET */ - u32 LPCodeRate; /* Low Priority Code Rate from SMS_DvbModemState_ET */ - u32 Hierarchy; /* Hierarchy from SMS_Hierarchy_ET */ - u32 Constellation; /* Constellation from SMS_Constellation_ET */ + /* Transmission parameters */ + u32 Frequency; /* Frequency in Hz */ + u32 Bandwidth; /* Bandwidth in MHz, valid only for DVB-T/H */ + u32 TransmissionMode; /* Transmission Mode, for DAB modes 1-4, + for DVB-T/H FFT mode carriers in Kilos */ + u32 ModemState; /* from SMSHOSTLIB_DVB_MODEM_STATE_ET, + valid only for DVB-T/H */ + u32 GuardInterval; /* Guard Interval from + SMSHOSTLIB_GUARD_INTERVALS_ET, valid only for DVB-T/H */ + u32 CodeRate; /* Code Rate from SMSHOSTLIB_CODE_RATE_ET, + valid only for DVB-T/H */ + u32 LPCodeRate; /* Low Priority Code Rate from + SMSHOSTLIB_CODE_RATE_ET, valid only for DVB-T/H */ + u32 Hierarchy; /* Hierarchy from SMSHOSTLIB_HIERARCHY_ET, + valid only for DVB-T/H */ + u32 Constellation; /* Constellation from + SMSHOSTLIB_CONSTELLATION_ET, valid only for DVB-T/H */ /* Burst parameters, valid only for DVB-H */ - u32 BurstSize; /* Current burst size in bytes */ - u32 BurstDuration; /* Current burst duration in mSec */ - u32 BurstCycleTime; /* Current burst cycle time in mSec */ - u32 CalculatedBurstCycleTime; /* Current burst cycle time in mSec, -* as calculated by demodulator */ - u32 NumOfRows; /* Number of rows in MPE table */ - u32 NumOfPaddCols
[PATCH] [0904_7] Siano: smsdvb - modify license header and included file list.
# HG changeset patch # User Uri Shkolnik # Date 1238695774 -10800 # Node ID 7b5d5a3a7b8e80359e770041ca4c8cf407d893d6 # Parent 4a0b207a424af7f05d8eb417a698a82a61dd086f [PATCH] [0904_7] Siano: smsdvb - modify license header and included file list. From: Uri Shkolnik smsdvb.c (client for DVB-API v3) - modify license header and included file list. Removing white spaces. There are no implementation changes. Priority: normal Signed-off-by: Uri Shkolnik diff -r 4a0b207a424a -r 7b5d5a3a7b8e linux/drivers/media/dvb/siano/smsdvb.c --- a/linux/drivers/media/dvb/siano/smsdvb.cThu Apr 02 20:50:24 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsdvb.cThu Apr 02 21:09:34 2009 +0300 @@ -1,29 +1,40 @@ -/* - * Driver for the Siano SMS1xxx USB dongle - * - * Author: Uri Shkolni - * - * Copyright (c), 2005-2008 Siano Mobile Silicon, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. - * - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ +/ + +Siano Mobile Silicon, Inc. +MDTV receiver kernel modules. +Copyright (C) 2006-2008, Uri Shkolnik + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + + This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. + +/ #include #include +#include #include "smscoreapi.h" +/*#include "smsendian.h"*/ #include "sms-cards.h" + +#ifndef DVB_DEFINE_MOD_OPT_ADAPTER_NR +#define DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr) \ + static short adapter_nr[] = \ + {[0 ... (8 - 1)] = -1 }; \ + module_param_array(adapter_nr, short, NULL, 0444); \ + MODULE_PARM_DESC(adapter_nr, "DVB adapter numbers") +#define SMS_DVB_OLD_DVB_REGISTER_ADAPTER +#endif DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); @@ -33,15 +44,15 @@ struct smsdvb_client_t { struct smscore_device_t *coredev; struct smscore_client_t *smsclient; - struct dvb_adapter adapter; - struct dvb_demuxdemux; - struct dmxdev dmxdev; - struct dvb_frontend frontend; + struct dvb_adapter adapter; + struct dvb_demux demux; + struct dmxdev dmxdev; + struct dvb_frontend frontend; - fe_status_t fe_status; - int fe_ber, fe_snr, fe_unc, fe_signal_strength; + fe_status_t fe_status; + int fe_ber, fe_snr, fe_unc, fe_signal_strength; - struct completion tune_done, stat_done; + struct completion tune_done, stat_done; /* todo: save freq/band instead whole struct */ struct dvb_frontend_parameters fe_params; @@ -61,7 +72,7 @@ static int smsdvb_onresponse(void *conte struct smsdvb_client_t *client = (struct smsdvb_client_t *) context; struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *) (((u8 *) cb->p) + cb->offset); - u32 *pMsgData = (u32 *)phdr+1; + u32 *pMsgData = (u32 *) phdr + 1; /*u32 MsgDataLen = phdr->msgLength - sizeof(struct SmsMsgHdr_ST);*/ /*smsendian_handle_rx_message((struct SmsMsgData_ST *) phdr);*/ @@ -163,22 +174,22 @@ static int smsdvb_onresponse(void *conte client->fe_status = 0; } -/* - if (client->fe_status & FE_HAS_LOCK) - sms_board_dvb3_event(client->coredev, DVB3_EVENT_FE_LOCK); - else - sms_board_dvb3_event(client->coredev, DVB3_EVENT_FE_UNLOCK); + /* +if (client->fe_status & FE_HAS_LOCK) +sms_board_dvb3_event(client->coredev, DVB3_EVENT_FE_LOCK); +else +sms_board_dvb3_event(client->coredev, DVB3_EVENT_FE_UNLOCK); - if (client->sms_stat_dvb.ReceptionData.ErrorTSPackets == 0) - sms_board_dvb3_event(client->coredev, DVB3_EVENT_UNC_OK); - els
[PATCH] [0904_8] Siano: add messages handling for big-endian target
# HG changeset patch # User Uri Shkolnik # Date 1238696826 -10800 # Node ID e8d224d81e2adde182162ab156aa98725e43f5c0 # Parent 7b5d5a3a7b8e80359e770041ca4c8cf407d893d6 [PATCH] [0904_8] Siano: add messages handling for big-endian target From: Uri Shkolnik Add code that modify the content of Siano's protocol messages when running with big-endian target. Priority: normal Signed-off-by: Uri Shkolnik diff -r 7b5d5a3a7b8e -r e8d224d81e2a linux/drivers/media/dvb/siano/smsendian.c --- /dev/null Thu Jan 01 00:00:00 1970 + +++ b/linux/drivers/media/dvb/siano/smsendian.c Thu Apr 02 21:27:06 2009 +0300 @@ -0,0 +1,100 @@ +/ + + Siano Mobile Silicon, Inc. + MDTV receiver kernel modules. + Copyright (C) 2006-2009, Uri Shkolnik + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + + / + +#include + +#include "smsendian.h" +#include "smscoreapi.h" + +void smsendian_handle_tx_message(void *buffer) +{ +#ifdef __BIG_ENDIAN + struct SmsMsgData_ST *msg = (struct SmsMsgData_ST *)buffer; + int i; + int msgWords; + + switch (msg->xMsgHeader.msgType) { + case MSG_SMS_DATA_DOWNLOAD_REQ: + { + msg->msgData[0] = le32_to_cpu(msg->msgData[0]); + break; + } + + default: + msgWords = (msg->xMsgHeader.msgLength - + sizeof(struct SmsMsgHdr_ST))/4; + + for (i = 0; i < msgWords; i++) + msg->msgData[i] = le32_to_cpu(msg->msgData[i]); + + break; + } +#endif /* __BIG_ENDIAN */ +} + +void smsendian_handle_rx_message(void *buffer) +{ +#ifdef __BIG_ENDIAN + struct SmsMsgData_ST *msg = (struct SmsMsgData_ST *)buffer; + int i; + int msgWords; + + switch (msg->xMsgHeader.msgType) { + case MSG_SMS_GET_VERSION_EX_RES: + { + struct SmsVersionRes_ST *ver = + (struct SmsVersionRes_ST *) msg; + ver->ChipModel = le16_to_cpu(ver->ChipModel); + break; + } + + case MSG_SMS_DVBT_BDA_DATA: + case MSG_SMS_DAB_CHANNEL: + case MSG_SMS_DATA_MSG: + { + break; + } + + default: + { + msgWords = (msg->xMsgHeader.msgLength - + sizeof(struct SmsMsgHdr_ST))/4; + + for (i = 0; i < msgWords; i++) + msg->msgData[i] = le32_to_cpu(msg->msgData[i]); + + break; + } + } +#endif /* __BIG_ENDIAN */ +} + +void smsendian_handle_message_header(void *msg) +{ +#ifdef __BIG_ENDIAN + struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *)msg; + + phdr->msgType = le16_to_cpu(phdr->msgType); + phdr->msgLength = le16_to_cpu(phdr->msgLength); + phdr->msgFlags = le16_to_cpu(phdr->msgFlags); +#endif /* __BIG_ENDIAN */ +} + diff -r 7b5d5a3a7b8e -r e8d224d81e2a linux/drivers/media/dvb/siano/smsendian.h --- /dev/null Thu Jan 01 00:00:00 1970 + +++ b/linux/drivers/media/dvb/siano/smsendian.h Thu Apr 02 21:27:06 2009 +0300 @@ -0,0 +1,32 @@ +/**** + +Siano Mobile Silicon, Inc. +MDTV receiver kernel modules. +Copyright (C) 2006-2009, Uri Shkolnik + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + + This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. + +/ + +#ifndef __SMS_ENDIAN_H__ +#define __SMS_ENDIAN_H__ + +#include + +void smsendian_handle_tx_message(void *buffer); +void smsendian_handle_rx_message(void *buffer); +void smsendian_handle_message_header(void *msg); + +#endif /* __SMS_ENDIAN_H_
[PATCH] [0904_9] Siano: add support for infra-red (IR) controllers
# HG changeset patch # User Uri Shkolnik # Date 1238697194 -10800 # Node ID 020ba7b31c963bd36d607848198e9e4258a6f80e # Parent e8d224d81e2adde182162ab156aa98725e43f5c0 [PATCH] [0904_9] Siano: add support for infra-red (IR) controllers From: Uri Shkolnik This patch add support for IR (infra-red) remote controllers. Further commits are needed in order to enable the activation of the IR components. Priority: normal Signed-off-by: Uri Shkolnik diff -r e8d224d81e2a -r 020ba7b31c96 linux/drivers/media/dvb/siano/smsir.c --- /dev/null Thu Jan 01 00:00:00 1970 + +++ b/linux/drivers/media/dvb/siano/smsir.c Thu Apr 02 21:33:14 2009 +0300 @@ -0,0 +1,301 @@ +/ + + Siano Mobile Silicon, Inc. + MDTV receiver kernel modules. + Copyright (C) 2006-2009, Uri Shkolnik + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + + / + + +#include +#include + +#include "smscoreapi.h" +#include "smsir.h" +#include "sms-cards.h" + +/* In order to add new IR remote control - + * 1) Add it to the @ smsir,h, + * 2) Add its map to keyboard_layout_maps below + * 3) Set your board (sms-cards sub-module) to use it + */ + +static struct keyboard_layout_map_t keyboard_layout_maps[] = { + [SMS_IR_KB_DEFAULT_TV] = { + .ir_protocol = IR_RC5, + .rc5_kbd_address = KEYBOARD_ADDRESS_TV1, + .keyboard_layout_map = { + KEY_0, KEY_1, KEY_2, + KEY_3, KEY_4, KEY_5, + KEY_6, KEY_7, KEY_8, + KEY_9, 0, 0, KEY_POWER, + KEY_MUTE, 0, 0, + KEY_VOLUMEUP, KEY_VOLUMEDOWN, + KEY_BRIGHTNESSUP, + KEY_BRIGHTNESSDOWN, KEY_CHANNELUP, + KEY_CHANNELDOWN, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + }, + [SMS_IR_KB_HCW_SILVER] = { + .ir_protocol = IR_RC5, + .rc5_kbd_address = KEYBOARD_ADDRESS_LIGHTING1, + .keyboard_layout_map = { + KEY_0, KEY_1, KEY_2, + KEY_3, KEY_4, KEY_5, + KEY_6, KEY_7, KEY_8, + KEY_9, KEY_TEXT, KEY_RED, + KEY_RADIO, KEY_MENU, + KEY_SUBTITLE, + KEY_MUTE, KEY_VOLUMEUP, + KEY_VOLUMEDOWN, KEY_PREVIOUS, 0, + KEY_UP, KEY_DOWN, KEY_LEFT, + KEY_RIGHT, KEY_VIDEO, KEY_AUDIO, + KEY_MHP, KEY_EPG, KEY_TV, + 0, KEY_NEXTSONG, KEY_EXIT, + KEY_CHANNELUP, KEY_CHANNELDOWN, + KEY_CHANNEL, 0, + KEY_PREVIOUSSONG, KEY_ENTER, + KEY_SLEEP, 0, 0, KEY_BLUE, + 0, 0, 0, 0, KEY_GREEN, 0, + KEY_PAUSE, 0, KEY_REWIND, + 0, KEY_FASTFORWARD, KEY_PLAY, + KEY_STOP, KEY_RECORD, + KEY_YELLOW, 0, 0, KEY_SELECT, + KEY_ZOOM, KEY_POWER, 0, 0 + } + }, + { } /* Terminating entry */ +}; + +u32 ir_pos; +u32ir_word; +u32 ir_toggle; + +#define RC5_PUSH_BIT(dst, bit, pos)\ + { dst <<= 1; dst |= bit; pos++; } + + +static void sms_ir_
[PATCH] [0904_10] Siano: smsdvb - add events mechanism
# HG changeset patch # User Uri Shkolnik # Date 1238742622 -10800 # Node ID ec7ee486fb86d51bdb48e6a637a6ddd52e9e08c2 # Parent 020ba7b31c963bd36d607848198e9e4258a6f80e [PATCH] [0904_10] Siano: smsdvb - add events mechanism From: Uri Shkolnik Add events mechanism that will notify the "cards" component (which represent the specific hardware target) for DVB related events. Priority: normal Signed-off-by: Uri Shkolnik diff -r 020ba7b31c96 -r ec7ee486fb86 linux/drivers/media/dvb/siano/smsdvb.c --- a/linux/drivers/media/dvb/siano/smsdvb.cThu Apr 02 21:33:14 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsdvb.cFri Apr 03 10:10:22 2009 +0300 @@ -66,6 +66,45 @@ static int sms_dbg; static int sms_dbg; module_param_named(debug, sms_dbg, int, 0644); MODULE_PARM_DESC(debug, "set debug level (info=1, adv=2 (or-able))"); + +/* Events that may come from DVB v3 adapter */ +static void sms_board_dvb3_event(struct smscore_device_t *coredev, + enum SMS_DVB3_EVENTS event) { + switch (event) { + case DVB3_EVENT_INIT: + sms_debug("DVB3_EVENT_INIT"); + /* sms_board_event(coredev, BOARD_EVENT_BIND); */ + break; + case DVB3_EVENT_SLEEP: + sms_debug("DVB3_EVENT_SLEEP"); + /* sms_board_event(coredev, BOARD_EVENT_POWER_SUSPEND); */ + break; + case DVB3_EVENT_HOTPLUG: + sms_debug("DVB3_EVENT_HOTPLUG"); + /* sms_board_event(coredev, BOARD_EVENT_POWER_INIT); */ + break; + case DVB3_EVENT_FE_LOCK: + sms_debug("DVB3_EVENT_FE_LOCK"); + /* sms_board_event(coredev, BOARD_EVENT_FE_LOCK); */ + break; + case DVB3_EVENT_FE_UNLOCK: + sms_debug("DVB3_EVENT_FE_UNLOCK"); + /* sms_board_event(coredev, BOARD_EVENT_FE_UNLOCK); */ + break; + case DVB3_EVENT_UNC_OK: + sms_debug("DVB3_EVENT_UNC_OK"); + /* sms_board_event(coredev, BOARD_EVENT_MULTIPLEX_OK); */ + break; + case DVB3_EVENT_UNC_ERR: + sms_debug("DVB3_EVENT_UNC_ERR"); + /* sms_board_event(coredev, BOARD_EVENT_MULTIPLEX_ERRORS); */ + break; + + default: + sms_err("Unknown dvb3 api event"); + break; + } +} static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb) { @@ -174,17 +213,15 @@ static int smsdvb_onresponse(void *conte client->fe_status = 0; } - /* -if (client->fe_status & FE_HAS_LOCK) -sms_board_dvb3_event(client->coredev, DVB3_EVENT_FE_LOCK); -else -sms_board_dvb3_event(client->coredev, DVB3_EVENT_FE_UNLOCK); + if (client->fe_status & FE_HAS_LOCK) + sms_board_dvb3_event(client->coredev, DVB3_EVENT_FE_LOCK); + else + sms_board_dvb3_event(client->coredev, DVB3_EVENT_FE_UNLOCK); -if (client->sms_stat_dvb.ReceptionData.ErrorTSPackets == 0) -sms_board_dvb3_event(client->coredev, DVB3_EVENT_UNC_OK); -else -sms_board_dvb3_event(client->coredev, DVB3_EVENT_UNC_ERR); -*/ + if (client->sms_stat_dvb.ReceptionData.ErrorTSPackets == 0) + sms_board_dvb3_event(client->coredev, DVB3_EVENT_UNC_OK); + else + sms_board_dvb3_event(client->coredev, DVB3_EVENT_UNC_ERR); if (client->fe_status & FE_HAS_LOCK) sms_board_led_feedback(client->coredev, @@ -346,13 +383,12 @@ static int smsdvb_set_frontend(struct dv struct dvb_frontend_parameters *fep) { struct smsdvb_client_t *client = - container_of(fe, struct smsdvb_client_t, frontend); + container_of(fe, struct smsdvb_client_t, frontend); struct { struct SmsMsgHdr_ST Msg; u32 Data[3]; } Msg; - int ret; Msg.Msg.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; Msg.Msg.msgDstId = HIF_TASK; @@ -387,7 +423,8 @@ static int smsdvb_set_frontend(struct dv } /* Disable LNA, if any. An error is returned if no LNA is present */ - ret = sms_board_lna_control(client->coredev, 0); + { + int ret = sms_board_lna_control(client->coredev, 0); if (ret == 0) { fe_status_t status; @@ -403,7 +440,7 @@ static int smsdvb_set_frontend(struct dv /* previous tune didnt lock - enable LNA and tune again */ sms_board_lna_control(client->coredev, 1); } - + } return smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg), &client->tune_done); } @@ -428,6 +465,7 @@ static int smsdvb_init(struct dvb_fr
[PATCH] [0904_11] Siano: smsendian & smsdvb - binding the smsendian to smsdvb
# HG changeset patch # User Uri Shkolnik # Date 1238743608 -10800 # Node ID 01979ae55ffec22d74b77681613f38bd606be227 # Parent ec7ee486fb86d51bdb48e6a637a6ddd52e9e08c2 [PATCH] [0904_11] Siano: smsendian & smsdvb - binding the smsendian to smsdvb From: Uri Shkolnik Bind the smsendian, which manipulates some Siano's messages content when using Siano chip-set with big-endian target, with the DVB-API v3 client adapter. Priority: normal Signed-off-by: Uri Shkolnik diff -r ec7ee486fb86 -r 01979ae55ffe linux/drivers/media/dvb/siano/Makefile --- a/linux/drivers/media/dvb/siano/MakefileFri Apr 03 10:10:22 2009 +0300 +++ b/linux/drivers/media/dvb/siano/MakefileFri Apr 03 10:26:48 2009 +0300 @@ -1,4 +1,4 @@ sms1xxx-objs := smscoreapi.o sms-cards.o -sms1xxx-objs := smscoreapi.o sms-cards.o +sms1xxx-objs := smscoreapi.o sms-cards.o smsendian.o obj-$(CONFIG_DVB_SIANO_SMS1XXX) += sms1xxx.o obj-$(CONFIG_DVB_SIANO_SMS1XXX) += smsusb.o diff -r ec7ee486fb86 -r 01979ae55ffe linux/drivers/media/dvb/siano/smsdvb.c --- a/linux/drivers/media/dvb/siano/smsdvb.cFri Apr 03 10:10:22 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsdvb.cFri Apr 03 10:26:48 2009 +0300 @@ -24,7 +24,7 @@ along with this program. If not, see #include "smscoreapi.h" -/*#include "smsendian.h"*/ +#include "smsendian.h" #include "sms-cards.h" #ifndef DVB_DEFINE_MOD_OPT_ADAPTER_NR @@ -52,7 +52,7 @@ struct smsdvb_client_t { fe_status_t fe_status; int fe_ber, fe_snr, fe_unc, fe_signal_strength; - struct completion tune_done, stat_done; + struct completion tune_done; /* todo: save freq/band instead whole struct */ struct dvb_frontend_parameters fe_params; @@ -114,7 +114,7 @@ static int smsdvb_onresponse(void *conte u32 *pMsgData = (u32 *) phdr + 1; /*u32 MsgDataLen = phdr->msgLength - sizeof(struct SmsMsgHdr_ST);*/ - /*smsendian_handle_rx_message((struct SmsMsgData_ST *) phdr);*/ + smsendian_handle_rx_message((struct SmsMsgData_ST *) phdr); switch (phdr->msgType) { case MSG_SMS_DVBT_BDA_DATA: @@ -271,7 +271,7 @@ static int smsdvb_start_feed(struct dvb_ PidMsg.xMsgHeader.msgLength = sizeof(PidMsg); PidMsg.msgData[0] = feed->pid; - /* smsendian_handle_tx_message((struct SmsMsgHdr_ST *)&PidMsg); */ + smsendian_handle_tx_message((struct SmsMsgHdr_ST *)&PidMsg); return smsclient_sendrequest(client->smsclient, &PidMsg, sizeof(PidMsg)); } @@ -291,7 +291,7 @@ static int smsdvb_stop_feed(struct dvb_d PidMsg.xMsgHeader.msgLength = sizeof(PidMsg); PidMsg.msgData[0] = feed->pid; - /* smsendian_handle_tx_message((struct SmsMsgHdr_ST *)&PidMsg); */ + smsendian_handle_tx_message((struct SmsMsgHdr_ST *)&PidMsg); return smsclient_sendrequest(client->smsclient, &PidMsg, sizeof(PidMsg)); } @@ -302,7 +302,7 @@ static int smsdvb_sendrequest_and_wait(s { int rc; - /* smsendian_handle_tx_message((struct SmsMsgHdr_ST *)buffer); */ + smsendian_handle_tx_message((struct SmsMsgHdr_ST *)buffer); rc = smsclient_sendrequest(client->smsclient, buffer, size); if (rc < 0) return rc; -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0904_12] Siano: unified the debug filter module parameter (dvb and core)
# HG changeset patch # User Uri Shkolnik # Date 1238744721 -10800 # Node ID 5b86da897fbaf03ea4f5bca50abeaad15634f1d9 # Parent 01979ae55ffec22d74b77681613f38bd606be227 [PATCH] [0904_12] Siano: unified the debug filter module parameter (dvb and core) From: Uri Shkolnik The sms_debug module parameter sets the debug filter for the smsmdtv module. It has been moved to the core component, and replace the smsdvb's. Priority: normal Signed-off-by: Uri Shkolnik diff -r 01979ae55ffe -r 5b86da897fba linux/drivers/media/dvb/siano/smscoreapi.c --- a/linux/drivers/media/dvb/siano/smscoreapi.cFri Apr 03 10:26:48 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.cFri Apr 03 10:45:21 2009 +0300 @@ -34,8 +34,8 @@ #include "smscoreapi.h" #include "sms-cards.h" -static int sms_dbg; -module_param_named(debug, sms_dbg, int, 0644); +int sms_debug; +module_param_named(debug, sms_debug, int, 0644); MODULE_PARM_DESC(debug, "set debug level (info=1, adv=2 (or-able))"); struct smscore_device_notifyee_t { diff -r 01979ae55ffe -r 5b86da897fba linux/drivers/media/dvb/siano/smscoreapi.h --- a/linux/drivers/media/dvb/siano/smscoreapi.hFri Apr 03 10:26:48 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.hFri Apr 03 10:45:21 2009 +0300 @@ -627,6 +627,7 @@ int smscore_led_state(struct smscore_dev int smscore_led_state(struct smscore_device_t *core, int led); /* */ +extern int sms_debug; #define DBG_INFO 1 #define DBG_ADV 2 @@ -635,7 +636,7 @@ int smscore_led_state(struct smscore_dev printk(kern "%s: " fmt "\n", __func__, ##arg) #define dprintk(kern, lvl, fmt, arg...) do {\ - if (sms_dbg & lvl) \ + if (sms_debug & lvl) \ sms_printk(kern, fmt, ##arg); } while (0) #define sms_log(fmt, arg...) sms_printk(KERN_INFO, fmt, ##arg) diff -r 01979ae55ffe -r 5b86da897fba linux/drivers/media/dvb/siano/smsdvb.c --- a/linux/drivers/media/dvb/siano/smsdvb.cFri Apr 03 10:26:48 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsdvb.cFri Apr 03 10:45:21 2009 +0300 @@ -63,9 +63,6 @@ static struct list_head g_smsdvb_clients static struct list_head g_smsdvb_clients; static struct mutex g_smsdvb_clientslock; -static int sms_dbg; -module_param_named(debug, sms_dbg, int, 0644); -MODULE_PARM_DESC(debug, "set debug level (info=1, adv=2 (or-able))"); /* Events that may come from DVB v3 adapter */ static void sms_board_dvb3_event(struct smscore_device_t *coredev, -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0904_13] Siano: move DVB_API and remove redundant code
# HG changeset patch # User Uri Shkolnik # Date 1238755204 -10800 # Node ID f65a29f0f9a66f82a91525ae0085a15f00ac91c2 # Parent 897669fdeb3be75a2bde978557b5398a4a7d8914 [PATCH] [0904_13] Siano: move DVB_API and remove redundant code From: Uri Shkolnik The DVB-API related information has been moved from the core header to the smsdvb, and the redundant code has been removed from the core header. This code has been moved since it is used only by the smsdvb client component. Priority: normal Signed-off-by: Uri Shkolnik diff -r 897669fdeb3b -r f65a29f0f9a6 linux/drivers/media/dvb/siano/smscoreapi.h --- a/linux/drivers/media/dvb/siano/smscoreapi.hFri Apr 03 13:31:13 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.hFri Apr 03 13:40:04 2009 +0300 @@ -36,15 +36,6 @@ along with this program. If not, see /* #include "smsir.h" */ - -#define SMS_DVB3_SUBSYS -#ifdef SMS_DVB3_SUBSYS -#include "dmxdev.h" -#include "dvbdev.h" -#include "dvb_demux.h" -#include "dvb_frontend.h" - -#endif #define kmutex_init(_p_) mutex_init(_p_) #define kmutex_lock(_p_) mutex_lock(_p_) diff -r 897669fdeb3b -r f65a29f0f9a6 linux/drivers/media/dvb/siano/smsdvb.c --- a/linux/drivers/media/dvb/siano/smsdvb.cFri Apr 03 13:31:13 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsdvb.cFri Apr 03 13:40:04 2009 +0300 @@ -22,6 +22,11 @@ along with this program. If not, see #include #include + +#include "dmxdev.h" +#include "dvbdev.h" +#include "dvb_demux.h" +#include "dvb_frontend.h" #include "smscoreapi.h" /*#include "smsendian.h"*/ @@ -52,7 +57,7 @@ struct smsdvb_client_t { fe_status_t fe_status; int fe_ber, fe_snr, fe_unc, fe_signal_strength; - struct completion tune_done, stat_done; + struct completion tune_done; /* todo: save freq/band instead whole struct */ struct dvb_frontend_parameters fe_params; -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0904_14] Siano: assemble all components to one kernel module
# HG changeset patch # User Uri Shkolnik # Date 1238756860 -10800 # Node ID 616e696ce6f0c0d76a1aaea8b36e0345112c5ab6 # Parent f65a29f0f9a66f82a91525ae0085a15f00ac91c2 [PATCH] [0904_14] Siano: assemble all components to one kernel module From: Uri Shkolnik Previously, the support for Siano-based devices has been combined from several kernel modules. This patch assembles all into single kernel module. Priority: normal Signed-off-by: Uri Shkolnik diff -r f65a29f0f9a6 -r 616e696ce6f0 linux/drivers/media/dvb/siano/Makefile --- a/linux/drivers/media/dvb/siano/MakefileFri Apr 03 13:40:04 2009 +0300 +++ b/linux/drivers/media/dvb/siano/MakefileFri Apr 03 14:07:40 2009 +0300 @@ -1,8 +1,6 @@ sms1xxx-objs := smscoreapi.o sms-cards.o -sms1xxx-objs := smscoreapi.o sms-cards.o +sms1xxx-objs := smscoreapi.o sms-cards.o smsusb.o smsdvb.o smsendian.o obj-$(CONFIG_DVB_SIANO_SMS1XXX) += sms1xxx.o -obj-$(CONFIG_DVB_SIANO_SMS1XXX) += smsusb.o -obj-$(CONFIG_DVB_SIANO_SMS1XXX) += smsdvb.o EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core diff -r f65a29f0f9a6 -r 616e696ce6f0 linux/drivers/media/dvb/siano/smscoreapi.c --- a/linux/drivers/media/dvb/siano/smscoreapi.cFri Apr 03 13:40:04 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.cFri Apr 03 14:07:40 2009 +0300 @@ -1321,8 +1321,8 @@ static int __init smscore_module_init(vo } #endif -#if 0 /* def SMS_DVB_CLIENT */ - /* DVB Register */ +#ifdef SMS_DVB3_SUBSYS + /* DVB v.3 Register */ rc = smsdvb_register(); if (rc) { sms_err("Error registering DVB client.\n"); @@ -1339,7 +1339,7 @@ static int __init smscore_module_init(vo } #endif -#if 0 /* def SMS_USB_BUS_DRV */ +#ifdef SMS_USB_DRV /* USB Register */ rc = smsusb_register(); if (rc) { @@ -1385,8 +1385,7 @@ static void __exit smscore_module_exit(v smschar_unregister(); #endif -#if 0 /* def SMS_DVB_CLIENT */ - /* DVB UnRegister */ +#ifdef SMS_DVB3_SUBSYS smsdvb_unregister(); #endif @@ -1395,8 +1394,9 @@ static void __exit smscore_module_exit(v smsnet_unregister(); #endif -#if 0 /* def SMS_USB_BUS_DRV */ - /* Unregister USB */ + /* Unegister interfaces objects */ +#ifdef SMS_USB_DRV + /* USB unregister */ smsusb_unregister(); #endif diff -r f65a29f0f9a6 -r 616e696ce6f0 linux/drivers/media/dvb/siano/smscoreapi.h --- a/linux/drivers/media/dvb/siano/smscoreapi.hFri Apr 03 13:40:04 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.hFri Apr 03 14:07:40 2009 +0300 @@ -617,6 +617,17 @@ int smscore_get_board_id(struct smscore_ int smscore_led_state(struct smscore_device_t *core, int led); + +#ifdef SMS_DVB3_SUBSYS +extern int smsdvb_register(void); +extern void smsdvb_unregister(void); +#endif + +#ifdef SMS_USB_DRV +extern int smsusb_register(void); +extern void smsusb_unregister(void); +#endif + /* */ #define DBG_INFO 1 diff -r f65a29f0f9a6 -r 616e696ce6f0 linux/drivers/media/dvb/siano/smsdvb.c --- a/linux/drivers/media/dvb/siano/smsdvb.cFri Apr 03 13:40:04 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsdvb.cFri Apr 03 14:07:40 2009 +0300 @@ -638,7 +638,7 @@ adapter_error: return rc; } -int smsdvb_module_init(void) +int smsdvb_register(void) { int rc; @@ -652,7 +652,7 @@ int smsdvb_module_init(void) return rc; } -void smsdvb_module_exit(void) +void smsdvb_unregister(void) { smscore_unregister_hotplug(smsdvb_hotplug); @@ -665,9 +665,6 @@ void smsdvb_module_exit(void) kmutex_unlock(&g_smsdvb_clientslock); } -module_init(smsdvb_module_init); -module_exit(smsdvb_module_exit); - MODULE_DESCRIPTION("SMS DVB subsystem adaptation module"); MODULE_AUTHOR("Siano Mobile Silicon, INC. (u...@siano-ms.com)"); MODULE_LICENSE("GPL"); diff -r f65a29f0f9a6 -r 616e696ce6f0 linux/drivers/media/dvb/siano/smsusb.c --- a/linux/drivers/media/dvb/siano/smsusb.cFri Apr 03 13:40:04 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsusb.cFri Apr 03 14:07:40 2009 +0300 @@ -539,7 +539,7 @@ static struct usb_driver smsusb_driver = .resume = smsusb_resume, }; -int smsusb_module_init(void) +int smsusb_register(void) { int rc = usb_register(&smsusb_driver); if (rc) @@ -550,16 +550,13 @@ int smsusb_module_init(void) return rc; } -void smsusb_module_exit(void) +void smsusb_unregister(void) { - sms_debug(""); /* Regular USB Cleanup */ usb_deregister(&smsusb_driver); + sms_info("end"); } -module_init(smsusb_module_init); -module_exit(smsusb_module_exit); - -MODULE_DESCRIPTION("Driver for the Siano SMS1XXX USB dongle"); +MODULE_DESCRIPTION("Driver for the Siano SMS1xxx USB dongle"); MODULE_AUTHOR("Siano Mobile S
[PATCH] [0904_15] Siano: core header - bind SMS messages endian handling
# HG changeset patch # User Uri Shkolnik # Date 1238758250 -10800 # Node ID 856813745905e07d9fc6be5e136fdf7060c6fc37 # Parent 0ddd2fd20badbf2bb33566a05ff2ea2a6dff8600 [PATCH] [0904_15] Siano: core header - bind SMS messages endian handling From: Uri Shkolnik This patch bind the smsedian (which manipulate the content of Siano's protocol messages) to the smsdvb component. Priority: normal Signed-off-by: Uri Shkolnik diff -r 0ddd2fd20bad -r 856813745905 linux/drivers/media/dvb/siano/smsdvb.c --- a/linux/drivers/media/dvb/siano/smsdvb.cFri Apr 03 14:18:10 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsdvb.cFri Apr 03 14:30:50 2009 +0300 @@ -29,7 +29,7 @@ along with this program. If not, see msgLength - sizeof(struct SmsMsgHdr_ST);*/ - /*smsendian_handle_rx_message((struct SmsMsgData_ST *) phdr);*/ + smsendian_handle_rx_message((struct SmsMsgData_ST *) phdr); switch (phdr->msgType) { case MSG_SMS_DVBT_BDA_DATA: @@ -293,7 +293,7 @@ static int smsdvb_stop_feed(struct dvb_d PidMsg.xMsgHeader.msgLength = sizeof(PidMsg); PidMsg.msgData[0] = feed->pid; - /* smsendian_handle_tx_message((struct SmsMsgHdr_ST *)&PidMsg); */ + smsendian_handle_tx_message((struct SmsMsgHdr_ST *)&PidMsg); return smsclient_sendrequest(client->smsclient, &PidMsg, sizeof(PidMsg)); } @@ -304,7 +304,7 @@ static int smsdvb_sendrequest_and_wait(s { int rc; - /* smsendian_handle_tx_message((struct SmsMsgHdr_ST *)buffer); */ + smsendian_handle_tx_message((struct SmsMsgHdr_ST *)buffer); rc = smsclient_sendrequest(client->smsclient, buffer, size); if (rc < 0) return rc; -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0904_16] Siano: smsdvb - additional case of endian handling.
# HG changeset patch # User Uri Shkolnik # Date 1238758726 -10800 # Node ID c582116cfbb96671629143fced33e3f88c28b3c7 # Parent 856813745905e07d9fc6be5e136fdf7060c6fc37 siano: smsdvb - add support for old dvb-core version [PATCH] [0904_16] Siano: smsdvb - additional case of endian handling. From: Uri Shkolnik Additional case of endian handling. Priority: normal Signed-off-by: Uri Shkolnik diff -r 856813745905 -r c582116cfbb9 linux/drivers/media/dvb/siano/smsdvb.c - a/linux/drivers/media/dvb/siano/smsdvb.c Fri Apr 03 14:30:50 2009 +0300 + b/linux/drivers/media/dvb/siano/smsdvb.c Fri Apr 03 14:38:46 2009 +0300 @@ -273,7 +273,7 @@ static int smsdvb_start_feed(struct dvb_ PidMsg.xMsgHeader.msgLength = sizeof(PidMsg); PidMsg.msgData[0] = feed->pid; - /* smsendian_handle_tx_message((struct SmsMsgHdr_ST *)&PidMsg); */ + smsendian_handle_tx_message((struct SmsMsgHdr_ST *)&PidMsg); return smsclient_sendrequest(client->smsclient, &PidMsg, sizeof(PidMsg)); } @@ -546,10 +546,15 @@ static int smsdvb_hotplug(struct smscore } -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0904_17] Siano: smsusb - update header and indentation
# HG changeset patch # User Uri Shkolnik # Date 1238759458 -10800 # Node ID 73c6299ef5f518beb07b6eb371402fe1be4e26ea # Parent c582116cfbb96671629143fced33e3f88c28b3c7 [PATCH] [0904_17] Siano: smsusb - update header and indentation From: Uri Shkolnik This patch does not introduce any implementation change. It include modified license and included files list and align indentation. Priority: normal Signed-off-by: Uri Shkolnik diff -r c582116cfbb9 -r 73c6299ef5f5 linux/drivers/media/dvb/siano/smsusb.c --- a/linux/drivers/media/dvb/siano/smsusb.cFri Apr 03 14:38:46 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsusb.cFri Apr 03 14:50:58 2009 +0300 @@ -1,35 +1,34 @@ -/* - * Driver for the Siano SMS1xxx USB dongle - * - * author: Anatoly Greenblat - * - * Copyright (c), 2005-2008 Siano Mobile Silicon, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. - * - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ +/ + +Siano Mobile Silicon, Inc. +MDTV receiver kernel modules. +Copyright (C) 2006-2008, Uri Shkolnik, Anatoly Greenblat + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + + This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. + +/ #include #include #include #include +#include #include "smscoreapi.h" #include "sms-cards.h" -static int sms_dbg; -module_param_named(debug, sms_dbg, int, 0644); -MODULE_PARM_DESC(debug, "set debug level (info=1, adv=2 (or-able))"); +#include "smsendian.h" #define USB1_BUFFER_SIZE 0x1000 #define USB2_BUFFER_SIZE 0x4000 @@ -41,7 +40,7 @@ struct smsusb_device_t; struct smsusb_urb_t { struct smscore_buffer_t *cb; - struct smsusb_device_t *dev; + struct smsusb_device_t *dev; struct urb urb; }; @@ -50,10 +49,10 @@ struct smsusb_device_t { struct usb_device *udev; struct smscore_device_t *coredev; - struct smsusb_urb_t surbs[MAX_URBS]; + struct smsusb_urb_t surbs[MAX_URBS]; - int response_alignment; - int buffer_size; + int response_alignment; + int buffer_size; }; static int smsusb_submit_urb(struct smsusb_device_t *dev, @@ -75,7 +74,7 @@ static void smsusb_onresponse(struct urb } if (urb->actual_length > 0) { - struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *) surb->cb->p; + struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *)surb->cb->p; if (urb->actual_length >= phdr->msgLength) { surb->cb->size = phdr->msgLength; @@ -84,11 +83,11 @@ static void smsusb_onresponse(struct urb (phdr->msgFlags & MSG_HDR_FLAG_SPLIT_MSG)) { surb->cb->offset = - dev->response_alignment + - ((phdr->msgFlags >> 8) & 3); + dev->response_alignment + + ((phdr->msgFlags >> 8) & 3); /* sanity check */ - if (((int) phdr->msgLength + + if (((int)phdr->msgLength + surb->cb->offset) > urb->actual_length) { sms_err("invalid response " "msglen %d offset %d " @@ -101,7 +100,7 @@ static void smsusb_onresponse(struct urb /* move buffer pointer and * copy header to its new location */ - memcpy((c
[PATCH] [0904_18] Siano: smsusb - byte ordering and big endian support
# HG changeset patch # User Uri Shkolnik # Date 1238760032 -10800 # Node ID ab731e3cec5cb076b8f87f827c3c97a4dd84e0ca # Parent 73c6299ef5f518beb07b6eb371402fe1be4e26ea [PATCH] [0904_18] Siano: smsusb - byte ordering and big endian support From: Uri Shkolnik This patch add support for Siano's messaging in big endian systems. Few indentations (without implementation impact) have been added. Priority: normal Signed-off-by: Uri Shkolnik diff -r 73c6299ef5f5 -r ab731e3cec5c linux/drivers/media/dvb/siano/smsusb.c --- a/linux/drivers/media/dvb/siano/smsusb.cFri Apr 03 14:50:58 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsusb.cFri Apr 03 15:00:32 2009 +0300 @@ -27,7 +27,6 @@ along with this program. If not, see context; + struct smsusb_urb_t *surb = (struct smsusb_urb_t *)urb->context; struct smsusb_device_t *dev = surb->dev; if (urb->status < 0) { @@ -76,6 +75,7 @@ static void smsusb_onresponse(struct urb if (urb->actual_length > 0) { struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *)surb->cb->p; + smsendian_handle_message_header(phdr); if (urb->actual_length >= phdr->msgLength) { surb->cb->size = phdr->msgLength; @@ -179,6 +179,7 @@ static int smsusb_sendrequest(void *cont struct smsusb_device_t *dev = (struct smsusb_device_t *)context; int dummy; + smsendian_handle_message_header((struct SmsMsgHdr_ST *)buffer); return usb_bulk_msg(dev->udev, usb_sndbulkpipe(dev->udev, 2), buffer, size, &dummy, 1000); } @@ -336,8 +337,8 @@ static int smsusb_init_device(struct usb case SMS_VEGA: dev->buffer_size = USB2_BUFFER_SIZE; dev->response_alignment = - dev->udev->ep_in[1]->desc.wMaxPacketSize - - sizeof(struct SmsMsgHdr_ST); + le16_to_cpu(dev->udev->ep_in[1]->desc.wMaxPacketSize) - + sizeof(struct SmsMsgHdr_ST); params.flags |= SMS_DEVICE_FAMILY2; break; @@ -532,13 +533,12 @@ MODULE_DEVICE_TABLE(usb, smsusb_id_table MODULE_DEVICE_TABLE(usb, smsusb_id_table); static struct usb_driver smsusb_driver = { - .name = "smsusb", - .probe = smsusb_probe, - .disconnect = smsusb_disconnect, - .id_table = smsusb_id_table, - - .suspend= smsusb_suspend, - .resume = smsusb_resume, + .name = "smsusb", + .probe = smsusb_probe, + .disconnect = smsusb_disconnect, + .suspend = smsusb_suspend, + .resume = smsusb_resume, + .id_table = smsusb_id_table, }; int smsusb_register(void) -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0904_19] Siano: sms-cards - update cards (targets) component header
# HG changeset patch # User Uri Shkolnik # Date 1238760946 -10800 # Node ID 8377a5e61286b90e293e287cefc9638d2ddd938e # Parent ab731e3cec5cb076b8f87f827c3c97a4dd84e0ca [PATCH] [0904_19] Siano: sms-cards - update cards (targets) component header From: Uri Shkolnik sms-cards component holds all target-specific information. The component' header has been added with: 1) Include the infra-red header 2) More target types (definitions) 3) Structure for various GPIO usage 4) Extend "sms_board" struct to include a) GPIO structure b) IR structure 5) Some 'extern' declartion (for future commits usage) 6) "Board Events" structure 7) "board event" function prototype. All modifications are in the declaration level only. Priority: normal Signed-off-by: Uri Shkolnik diff -r ab731e3cec5c -r 8377a5e61286 linux/drivers/media/dvb/siano/sms-cards.h --- a/linux/drivers/media/dvb/siano/sms-cards.h Fri Apr 03 15:00:32 2009 +0300 +++ b/linux/drivers/media/dvb/siano/sms-cards.h Fri Apr 03 15:15:46 2009 +0300 @@ -22,6 +22,7 @@ #include #include "smscoreapi.h" +#include "smsir.h" #define SMS_BOARD_UNKNOWN 0 #define SMS1XXX_BOARD_SIANO_STELLAR 1 @@ -34,6 +35,41 @@ #define SMS1XXX_BOARD_HAUPPAUGE_WINDHAM 8 #define SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD 9 #define SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2 10 +#define SMS1XXX_BOARD_SIANO_NICE 11 +#define SMS1XXX_BOARD_SIANO_VENICE 12 + +struct sms_board_gpio_cfg { + int lna_vhf_exist; + int lna_vhf_ctrl; + int lna_uhf_exist; + int lna_uhf_ctrl; + int lna_uhf_d_ctrl; + int lna_sband_exist; + int lna_sband_ctrl; + int lna_sband_d_ctrl; + int foreign_lna0_ctrl; + int foreign_lna1_ctrl; + int foreign_lna2_ctrl; + int rf_switch_vhf; + int rf_switch_uhf; + int rf_switch_sband; + int leds_power; + int led0; + int led1; + int led2; + int led3; + int led4; + int ir; + int eeprom_wp; + int mrc_sense; + int mrc_pdn_resetn; + int mrc_gp0; /* mrcs spi int */ + int mrc_gp1; + int mrc_gp2; + int mrc_gp3; + int mrc_gp4; + int host_spi_gsp_ts_int; +}; struct sms_board { enum sms_device_type_st type; @@ -41,9 +77,14 @@ struct sms_board { /* gpios */ int led_power, led_hi, led_lo, lna_ctrl, rf_switch; + struct sms_board_gpio_cfg board_cfg; + enum ir_kb_type ir_kb_type; }; struct sms_board *sms_get_board(int id); + +extern struct usb_device_id smsusb_id_table[]; +extern struct smscore_device_t *coredev; int sms_board_setup(struct smscore_device_t *coredev); @@ -56,4 +97,28 @@ int sms_board_lna_control(struct smscore extern int sms_board_load_modules(int id); +enum SMS_BOARD_EVENTS { + BOARD_EVENT_POWER_INIT, + BOARD_EVENT_POWER_SUSPEND, + BOARD_EVENT_POWER_RESUME, + BOARD_EVENT_BIND, + BOARD_EVENT_SCAN_PROG, + BOARD_EVENT_SCAN_COMP, + BOARD_EVENT_EMERGENCY_WARNING_SIGNAL, + BOARD_EVENT_FE_LOCK, + BOARD_EVENT_FE_UNLOCK, + BOARD_EVENT_DEMOD_LOCK, + BOARD_EVENT_DEMOD_UNLOCK, + BOARD_EVENT_RECEPTION_MAX_4, + BOARD_EVENT_RECEPTION_3, + BOARD_EVENT_RECEPTION_2, + BOARD_EVENT_RECEPTION_1, + BOARD_EVENT_RECEPTION_LOST_0, + BOARD_EVENT_MULTIPLEX_OK, + BOARD_EVENT_MULTIPLEX_ERRORS +}; + +int sms_board_event(struct smscore_device_t *coredev, + enum SMS_BOARD_EVENTS gevent); + #endif /* __SMS_CARDS_H__ */ -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0904_4] Siano: core header indentation
# HG changeset patch # User Uri Shkolnik # Date 1238692069 -10800 # Node ID 83b19eba46dd4f8253d02c26db4f42728d60e28f # Parent 19925582e5dded86fccce7d8c9965285c1240836 siano: core header identation [PATCH] [0904_4] Siano: core header indentation From: Uri Shkolnik smscoreapi.h - indentation and removing lots of white spaces There are no implementation changes in this patch. Priority: normal Signed-off-by: Uri Shkolnik diff -r 19925582e5dd -r 83b19eba46dd linux/drivers/media/dvb/siano/smscoreapi.h --- a/linux/drivers/media/dvb/siano/smscoreapi.hThu Apr 02 19:56:01 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.hThu Apr 02 20:07:49 2009 +0300 @@ -103,31 +103,31 @@ struct smscore_buffer_t { }; struct smsdevice_params_t { - struct device *device; + struct device *device; - int buffer_size; - int num_buffers; + int buffer_size; + int num_buffers; - chardevpath[32]; - unsigned long flags; + char devpath[32]; + unsigned long flags; - setmode_t setmode_handler; - detectmode_tdetectmode_handler; - sendrequest_t sendrequest_handler; - preload_t preload_handler; - postload_t postload_handler; + setmode_t setmode_handler; + detectmode_t detectmode_handler; + sendrequest_t sendrequest_handler; + preload_t preload_handler; + postload_t postload_handler; - void*context; + void *context; enum sms_device_type_st device_type; }; struct smsclient_params_t { - int initial_id; - int data_type; - onresponse_tonresponse_handler; - onremove_t onremove_handler; + int initial_id; + int data_type; + onresponse_t onresponse_handler; + onremove_t onremove_handler; - void*context; + void *context; }; struct smscore_device_t { @@ -185,26 +185,26 @@ struct smscore_device_t { }; /* GPIO definitions for antenna frequency domain control (SMS8021) */ -#define SMS_ANTENNA_GPIO_0 1 -#define SMS_ANTENNA_GPIO_1 0 +#define SMS_ANTENNA_GPIO_0 1 +#define SMS_ANTENNA_GPIO_1 0 -#define BW_8_MHZ 0 -#define BW_7_MHZ 1 -#define BW_6_MHZ 2 -#define BW_5_MHZ 3 -#define BW_ISDBT_1SEG 4 -#define BW_ISDBT_3SEG 5 +#define BW_8_MHZ 0 +#define BW_7_MHZ 1 +#define BW_6_MHZ 2 +#define BW_5_MHZ 3 +#define BW_ISDBT_1SEG 4 +#define BW_ISDBT_3SEG 5 #define MSG_HDR_FLAG_SPLIT_MSG 4 -#define MAX_GPIO_PIN_NUMBER31 +#define MAX_GPIO_PIN_NUMBER31 -#define HIF_TASK 11 -#define SMS_HOST_LIB 150 +#define HIF_TASK 11 +#define SMS_HOST_LIB 150 #define DVBT_BDA_CONTROL_MSG_ID201 #define SMS_MAX_PAYLOAD_SIZE 240 -#define SMS_TUNE_TIMEOUT 500 +#define SMS_TUNE_TIMEOUT 500 #define MSG_SMS_GPIO_CONFIG_REQ507 #define MSG_SMS_GPIO_CONFIG_RES508 @@ -212,45 +212,45 @@ struct smscore_device_t { #define MSG_SMS_GPIO_SET_LEVEL_RES 510 #define MSG_SMS_GPIO_GET_LEVEL_REQ 511 #define MSG_SMS_GPIO_GET_LEVEL_RES 512 -#define MSG_SMS_RF_TUNE_REQ561 -#define MSG_SMS_RF_TUNE_RES562 +#define MSG_SMS_RF_TUNE_REQ561 +#define MSG_SMS_RF_TUNE_RES562 #define MSG_SMS_INIT_DEVICE_REQ578 #define MSG_SMS_INIT_DEVICE_RES579 #define MSG_SMS_ADD_PID_FILTER_REQ 601 #define MSG_SMS_ADD_PID_FILTER_RES 602 -#define MSG_SMS_REMOVE_PID_FILTER_REQ 603 -#define MSG_SMS_REMOVE_PID_FILTER_RES 604 -#define MSG_SMS_DAB_CHANNEL
Siano's patches
Hi Mauro, Please note patches (1..19) series @ http://patchwork.kernel.org/project/linux-media/list/?submitter=uri I'll wait for reviews and commit for this series before submitting additional patches. Pierre - the SDIO binding (registering) is still to be submitted, it isn't included within patches 1..19. Regards, Uri -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0904_16] Siano: smsdvb - additional case of endian handling.
# HG changeset patch # User Uri Shkolnik # Date 1238758726 -10800 # Node ID c582116cfbb96671629143fced33e3f88c28b3c7 # Parent 856813745905e07d9fc6be5e136fdf7060c6fc37 [PATCH] [0904_16] Siano: smsdvb - additional case of endian handling. From: Uri Shkolnik Additional case of endian handling. Priority: normal Signed-off-by: Uri Shkolnik diff -r 856813745905 -r c582116cfbb9 linux/drivers/media/dvb/siano/smsdvb.c --- a/linux/drivers/media/dvb/siano/smsdvb.cFri Apr 03 14:30:50 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsdvb.cFri Apr 03 14:38:46 2009 +0300 @@ -273,7 +273,7 @@ static int smsdvb_start_feed(struct dvb_ PidMsg.xMsgHeader.msgLength = sizeof(PidMsg); PidMsg.msgData[0] = feed->pid; - /* smsendian_handle_tx_message((struct SmsMsgHdr_ST *)&PidMsg); */ + smsendian_handle_tx_message((struct SmsMsgHdr_ST *)&PidMsg); return smsclient_sendrequest(client->smsclient, &PidMsg, sizeof(PidMsg)); } @@ -546,10 +546,15 @@ static int smsdvb_hotplug(struct smscore } -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [0904_11] Siano: smsendian & smsdvb - binding the smsendian to smsdvb
--- On Sun, 4/5/09, Uri Shkolnik wrote: > From: Uri Shkolnik > Subject: [PATCH] [0904_11] Siano: smsendian & smsdvb - binding the smsendian > to smsdvb > To: "LinuxML" > Date: Sunday, April 5, 2009, 1:20 PM > > # HG changeset patch > # User Uri Shkolnik > # Date 1238743608 -10800 > # Node ID 01979ae55ffec22d74b77681613f38bd606be227 > # Parent ec7ee486fb86d51bdb48e6a637a6ddd52e9e08c2 > [PATCH] [0904_11] Siano: smsendian & smsdvb - binding > the smsendian to smsdvb > > From: Uri Shkolnik > > Bind the smsendian, which manipulates some Siano's messages > content > when using Siano chip-set with big-endian target, > with the DVB-API v3 client adapter. > > Priority: normal > > Signed-off-by: Uri Shkolnik > > diff -r ec7ee486fb86 -r 01979ae55ffe > linux/drivers/media/dvb/siano/Makefile > --- > a/linux/drivers/media/dvb/siano/Makefile > Fri Apr 03 10:10:22 2009 +0300 > +++ > b/linux/drivers/media/dvb/siano/Makefile > Fri Apr 03 10:26:48 2009 +0300 > @@ -1,4 +1,4 @@ sms1xxx-objs := smscoreapi.o sms-cards.o > -sms1xxx-objs := smscoreapi.o sms-cards.o > +sms1xxx-objs := smscoreapi.o sms-cards.o smsendian.o > > obj-$(CONFIG_DVB_SIANO_SMS1XXX) += sms1xxx.o > obj-$(CONFIG_DVB_SIANO_SMS1XXX) += smsusb.o > diff -r ec7ee486fb86 -r 01979ae55ffe > linux/drivers/media/dvb/siano/smsdvb.c > --- > a/linux/drivers/media/dvb/siano/smsdvb.c > Fri Apr 03 10:10:22 2009 +0300 > +++ > b/linux/drivers/media/dvb/siano/smsdvb.c > Fri Apr 03 10:26:48 2009 +0300 > @@ -24,7 +24,7 @@ along with this program. If not, > see #include > > #include "smscoreapi.h" > -/*#include "smsendian.h"*/ > +#include "smsendian.h" > #include "sms-cards.h" > > #ifndef DVB_DEFINE_MOD_OPT_ADAPTER_NR > @@ -52,7 +52,7 @@ struct smsdvb_client_t { > fe_status_t fe_status; > int fe_ber, fe_snr, fe_unc, > fe_signal_strength; > > - struct completion tune_done, > stat_done; > + struct completion tune_done; > > /* todo: save freq/band instead whole > struct */ > struct dvb_frontend_parameters > fe_params; > @@ -114,7 +114,7 @@ static int smsdvb_onresponse(void > *conte > u32 *pMsgData = (u32 *) phdr + 1; > /*u32 MsgDataLen = phdr->msgLength - > sizeof(struct SmsMsgHdr_ST);*/ > > - /*smsendian_handle_rx_message((struct > SmsMsgData_ST *) phdr);*/ > + smsendian_handle_rx_message((struct > SmsMsgData_ST *) phdr); > > switch (phdr->msgType) { > case MSG_SMS_DVBT_BDA_DATA: > @@ -271,7 +271,7 @@ static int smsdvb_start_feed(struct > dvb_ > PidMsg.xMsgHeader.msgLength = > sizeof(PidMsg); > PidMsg.msgData[0] = feed->pid; > > - /* smsendian_handle_tx_message((struct > SmsMsgHdr_ST *)&PidMsg); */ > + smsendian_handle_tx_message((struct > SmsMsgHdr_ST *)&PidMsg); > return > smsclient_sendrequest(client->smsclient, &PidMsg, > > sizeof(PidMsg)); > } > @@ -291,7 +291,7 @@ static int smsdvb_stop_feed(struct > dvb_d > PidMsg.xMsgHeader.msgLength = > sizeof(PidMsg); > PidMsg.msgData[0] = feed->pid; > > - /* smsendian_handle_tx_message((struct > SmsMsgHdr_ST *)&PidMsg); */ > + smsendian_handle_tx_message((struct > SmsMsgHdr_ST *)&PidMsg); > return > smsclient_sendrequest(client->smsclient, &PidMsg, > > sizeof(PidMsg)); > } > @@ -302,7 +302,7 @@ static int > smsdvb_sendrequest_and_wait(s > { > int rc; > > - /* smsendian_handle_tx_message((struct > SmsMsgHdr_ST *)buffer); */ > + smsendian_handle_tx_message((struct > SmsMsgHdr_ST *)buffer); > rc = > smsclient_sendrequest(client->smsclient, buffer, size); > if (rc < 0) > return rc; > > > > > -- > To unsubscribe from this list: send the line "unsubscribe > linux-media" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > This patch is voided and been replaced by another (newer) patch. -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/6] ir-kbd-i2c: Switch to the new-style device binding model
--- On Mon, 4/6/09, Mauro Carvalho Chehab wrote: > From: Mauro Carvalho Chehab > Subject: Re: [PATCH 3/6] ir-kbd-i2c: Switch to the new-style device binding > model > To: "Andy Walls" > Cc: "hermann pitton" , "Jean Delvare" > , "Janne Grunau" , "Hans Verkuil" > , "Mike Isely" , is...@isely.net, "LMML" > , "Jarod Wilson" > Date: Monday, April 6, 2009, 4:51 AM > On Sun, 05 Apr 2009 18:00:04 -0400 > Andy Walls > wrote: > > > On Sun, 2009-04-05 at 23:22 +0200, hermann pitton > wrote: > > > Am Sonntag, den 05.04.2009, 22:22 +0200 schrieb > Jean Delvare: > > > > On Sun, 05 Apr 2009 14:58:17 -0400, Andy > Walls wrote: > > > > > > > What can not be translated to the input system I > would like to know. > > > Andy seems to have closer looked into that. > > > > 1. IR blasting: sending IR codes to transmit out to a > cable convertor > > box, DTV to analog convertor box, or similar devices > to change channels > > before recording starts. An input interface > doesn't work well for > > output. > > On my understanding, IR output is a separate issue. AFAIK, > only a very few ivtv > devices support IR output. I'm not sure how this is > currently implemented. > > > > 2. Sending raw IR samples to user space: user space > applications can > > then decode or match an unknown or non-standard IR > remote protocol in > > user space software. Timing information to go > along with the sample > > data probably needs to be > preserved. I'm assuming the input > interface > > currently doesn't support that. > > If the driver processes correctly the IR samples, I don't > see why you would > need to pass the raw protocols to userspace. Maybe we need > to add some ioctls > at the API to allow certain controls, like, for example, > ask kernel to decode > IR using RC4 instead or RC5, on devices that supports more > than one IR protocol. > > > That's all the Gerd mentioned. > > > > > > One more nice feature to have, that I'm not sure how > easily the input > > system could support: > > > > 3. specifying remote control code to key/button > translations with a > > configuration file instead of recompiling a module. > > The input and the current drivers that use input already > supports this feature. > You just need to load a new code table to replace the > existing one. > > See v4l2-apps/util/keytable.c to see how easy is to change > a key code. It > contains a complete code to fully replace a key code table. > Also, the Makefile > there will extract the current keytables for the in-kernel > drivers. > > Btw, with only 12 lines, you can create a keycode replace > "hello world!": > > #include > /* due to O_RDONLY */ > #include > /* open() */ > #include /* input > ioctls and keycode macros */ > #include > /* ioctl() */ > void main(void) > { > int codes[2]; > int fd = open("/dev/video0", > O_RDONLY); /* Hmm.. in real apps, we > should check for errors */ > codes[0] = 10; > /* > Scan code */ > codes[1] = KEY_UP; > /* Key code */ > ioctl(fd, EVIOCSKEYCODE, > codes); /* hello world! */ > } > > Cheers, > Mauro > -- > To unsubscribe from this list: send the line "unsubscribe > linux-media" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Hi, ir-kbd-i2c is a confusing name and wrong architecture if all are truly combined together. Why to combine interface driver (I2C) with logical implementation (RC5 samples to input device codes)? There are many IR hardware devices which are not I2C based. Lately I added a patch (http://patchwork.kernel.org/patch/16406/) which uses such IR device. There should be a complete separation between I2C interface driver with RC5 (and/or RCMM) data output, to the ir-kbd (RC5/kbd, RCMM/kbd) module, which should only convert RC5 sample to system events (either input device/keyboard, or IOCTL events sent through the DVB characters devices to user space). If the code will stay combined (ir-kbd-i2c) than for other than I2C interface drivers, we'll have to add a duplicated (redundant) logical layer to handle the RC5 to system events layer (which already exist at the ir-kbd-i2c). Uri -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [0904_1] Siano: core header - update license and include files
--- On Mon, 4/20/09, Mauro Carvalho Chehab wrote: > From: Mauro Carvalho Chehab > Subject: Re: [PATCH] [0904_1] Siano: core header - update license and include > files > To: "Uri Shkolnik" > Cc: linux-media@vger.kernel.org > Date: Monday, April 20, 2009, 5:42 PM > On Sun, 5 Apr 2009 01:09:16 -0700 > (PDT) > Uri Shkolnik > wrote: > > > > > # HG changeset patch > > # User Uri Shkolnik > > # Date 1238689930 -10800 > > # Node ID c3f0f50d46058f07fb355d8e5531f35cfd0ca37e > > # Parent > 7311d23c3355629b617013cd51223895a2423770 > > [PATCH] [0904_1] Siano: core header - update license > and included files > > > > From: Uri Shkolnik > > > > This patch does not include any implementation > changes. > > It update the smscoreapi.h license to be identical to > > > other Siano's headers and the #include files list. > > s/update/updates/ > > > #include > > #include > > @@ -28,15 +28,23 @@ > > #include > > #include > > #include > > +#include > > +#include > > +#include > > +#include > > + > > #include > > -#include > > -#include "compat.h" > > Hmm... Why do you need the above changes? Also, #include > "compat.h" is > required, in order to compile inside the out-of-tree kernel > tree. > > Also, the header changes should be on a different > changeset, since they aren't > related to what's described, e. g. this has nothing to do > with licensing change. > > > Cheers, > Mauro > 1) "compat.h" became as result of old ML review ---> +#include 2) There were a mail exchanged, back in mid-summer 2008, regarding the license. One template has been approved both by Siano and the reviewers back then, and the patch comes the align this particular file with that old decision. Regarding the change-set - since there were no implementation changes (only license text modification and re-arranging the include files list (I hadn't counted "compat.h" --> as an implementation change) I decided to put them in one patch. If higher resolution is needed, I'll do so, Regards, Uri -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [0904_10] Siano: smsdvb - add events mechanism
--- On Mon, 4/20/09, Mauro Carvalho Chehab wrote: > From: Mauro Carvalho Chehab > Subject: Re: [PATCH] [0904_10] Siano: smsdvb - add events mechanism > To: "Uri Shkolnik" > Cc: "LinuxML" > Date: Monday, April 20, 2009, 7:21 PM > On Sun, 5 Apr 2009 03:18:01 -0700 > (PDT) > Uri Shkolnik > wrote: > > > > > # HG changeset patch > > # User Uri Shkolnik > > # Date 1238742622 -10800 > > # Node ID ec7ee486fb86d51bdb48e6a637a6ddd52e9e08c2 > > # Parent > 020ba7b31c963bd36d607848198e9e4258a6f80e > > [PATCH] [0904_10] Siano: smsdvb - add events > mechanism > > > > From: Uri Shkolnik > > > > Add events mechanism that will notify the "cards" > component > > (which represent the specific hardware target) for DVB > related > > events. > > > This patch contains unrelated coding style fixes. Some of > them seem to be > related to previous changesets not applied. > > It is better to split coding style and real changes into > separate patches. > > > +/* Events that may come from DVB v3 adapter */ > > +static void sms_board_dvb3_event(struct > smscore_device_t *coredev, > > + enum > SMS_DVB3_EVENTS event) { > > + switch (event) { > > + case DVB3_EVENT_INIT: > > + > sms_debug("DVB3_EVENT_INIT"); > > + /* > sms_board_event(coredev, BOARD_EVENT_BIND); */ > > + break; > > + case DVB3_EVENT_SLEEP: > > + > sms_debug("DVB3_EVENT_SLEEP"); > > + /* > sms_board_event(coredev, BOARD_EVENT_POWER_SUSPEND); */ > > + break; > > + case DVB3_EVENT_HOTPLUG: > > + > sms_debug("DVB3_EVENT_HOTPLUG"); > > + /* > sms_board_event(coredev, BOARD_EVENT_POWER_INIT); */ > > + break; > > + case DVB3_EVENT_FE_LOCK: > > + > sms_debug("DVB3_EVENT_FE_LOCK"); > > + /* > sms_board_event(coredev, BOARD_EVENT_FE_LOCK); */ > > + break; > > + case DVB3_EVENT_FE_UNLOCK: > > + > sms_debug("DVB3_EVENT_FE_UNLOCK"); > > + /* > sms_board_event(coredev, BOARD_EVENT_FE_UNLOCK); */ > > + break; > > + case DVB3_EVENT_UNC_OK: > > + > sms_debug("DVB3_EVENT_UNC_OK"); > > + /* > sms_board_event(coredev, BOARD_EVENT_MULTIPLEX_OK); */ > > + break; > > + case DVB3_EVENT_UNC_ERR: > > + > sms_debug("DVB3_EVENT_UNC_ERR"); > > + /* > sms_board_event(coredev, BOARD_EVENT_MULTIPLEX_ERRORS); */ > > + break; > > + > > + default: > > + > sms_err("Unknown dvb3 api event"); > > + break; > > + } > > +} > > This seems to be the core of this changeset. However, it > just prints debug > messages, since the real call to the event notification > mechanism is commented. > > > Cheers, > Mauro > The Siano driver is composed from several components. The sms_board_event() is called from one component (dvb3 in this case) to the "cards" component. The series of patches I submitted, came to bring the 'dvb3' component as close as possible to the current file used by Siano. Since the "cards" has not been patched (yet), those functions have been add, but commented out. I did the same with the endian and IR calls in other patches (add 'place holders' e.g. a comment, to be un-comment later when those component will be patches and avaliable). Regards, Uri -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [0904_1] Siano: core header - update license and include files
--- On Mon, 4/20/09, Mauro Carvalho Chehab wrote: > From: Mauro Carvalho Chehab > Subject: Re: [PATCH] [0904_1] Siano: core header - update license and include > files > To: "Uri Shkolnik" > Cc: linux-media@vger.kernel.org > Date: Monday, April 20, 2009, 8:01 PM > On Mon, 20 Apr 2009 09:40:42 -0700 > (PDT) > Uri Shkolnik > wrote: > > > > > > > > > --- On Mon, 4/20/09, Mauro Carvalho Chehab > wrote: > > > > > From: Mauro Carvalho Chehab > > > Subject: Re: [PATCH] [0904_1] Siano: core header > - update license and include files > > > To: "Uri Shkolnik" > > > Cc: linux-media@vger.kernel.org > > > Date: Monday, April 20, 2009, 5:42 PM > > > On Sun, 5 Apr 2009 01:09:16 -0700 > > > (PDT) > > > Uri Shkolnik > > > wrote: > > > > > > > > > > > # HG changeset patch > > > > # User Uri Shkolnik > > > > # Date 1238689930 -10800 > > > > # Node ID > c3f0f50d46058f07fb355d8e5531f35cfd0ca37e > > > > # Parent > > > 7311d23c3355629b617013cd51223895a2423770 > > > > [PATCH] [0904_1] Siano: core header - update > license > > > and included files > > > > > > > > From: Uri Shkolnik > > > > > > > > This patch does not include any > implementation > > > changes. > > > > It update the smscoreapi.h license to be > identical to > > > > > > > other Siano's headers and the #include files > list. > > > > > > s/update/updates/ > > > > > > > #include > > > > #include > > > > @@ -28,15 +28,23 @@ > > > > #include > > > > #include > > > > #include > > > > +#include > > > > +#include > > > > +#include > > > > +#include > > > > + > > > > #include > > > > -#include > > > > -#include "compat.h" > > > > > > Hmm... Why do you need the above changes? Also, > #include > > > "compat.h" is > > > required, in order to compile inside the > out-of-tree kernel > > > tree. > > > > > > Also, the header changes should be on a > different > > > changeset, since they aren't > > > related to what's described, e. g. this has > nothing to do > > > with licensing change. > > > > > > > > > Cheers, > > > Mauro > > > > > > > 1) "compat.h" became as result > of old ML review > > ---> +#include > > I have no idea when do you need to include linux/compat.h. > However, as > compilation is currently fine, I see no reasons why to add > it. I also don't > have any idea why do you need to add other include files, > since it is properly > compiling without adding any other header. > > In the case of "compat.h", this is local to the out-of-tree > compilation, having > some needed defines to compile against older kernel > versions. This header it is > automatically stripped from upstream changes. > > > 2) There were a mail exchanged, back in mid-summer > 2008, regarding the license. One template has been approved > both by Siano and the reviewers back then, and the patch > comes the align this particular file with that old > decision. > > This seems fine to my eyes. > > > Regarding the change-set - since there were no > implementation changes (only license text modification and > re-arranging the include files list (I hadn't counted > "compat.h" --> as an > implementation change) I decided to put them in one patch. > If higher resolution is needed, I'll do so, > > If all you're doing is rearranging, it would be fine to add > it at the same > changeset, but you should explicitly mention this at the > description. > > Also, fyi, the proper include sequence is: > > 1) Include all kernel headers that aren't at -hg (no > particular order here - I > generally use some alphabetic order, but this is just my > personal preference); > > 2) #include "compat.h" > > 3) The other v4l/dvb core headers and local headers. > > Cheers, > Mauro > Just to make sure (sorry to be a little nagger about it...) Should I ignore the old request to replace "compat.h" with , and stay with "compat.h" ? 10x, Uri -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [0904_10] Siano: smsdvb - add events mechanism
--- On Mon, 4/20/09, Mauro Carvalho Chehab wrote: > From: Mauro Carvalho Chehab > Subject: Re: [PATCH] [0904_10] Siano: smsdvb - add events mechanism > To: "Uri Shkolnik" > Cc: "LinuxML" > Date: Monday, April 20, 2009, 8:14 PM > On Mon, 20 Apr 2009 09:56:26 -0700 > (PDT) > Uri Shkolnik > wrote: > > > > > > > > > --- On Mon, 4/20/09, Mauro Carvalho Chehab > wrote: > > > > > From: Mauro Carvalho Chehab > > > Subject: Re: [PATCH] [0904_10] Siano: smsdvb - > add events mechanism > > > To: "Uri Shkolnik" > > > Cc: "LinuxML" > > > Date: Monday, April 20, 2009, 7:21 PM > > > On Sun, 5 Apr 2009 03:18:01 -0700 > > > (PDT) > > > Uri Shkolnik > > > wrote: > > > > > > > > > > > # HG changeset patch > > > > # User Uri Shkolnik > > > > # Date 1238742622 -10800 > > > > # Node ID > ec7ee486fb86d51bdb48e6a637a6ddd52e9e08c2 > > > > # Parent > > > 020ba7b31c963bd36d607848198e9e4258a6f80e > > > > [PATCH] [0904_10] Siano: smsdvb - add > events > > > mechanism > > > > > > > > From: Uri Shkolnik > > > > > > > > Add events mechanism that will notify the > "cards" > > > component > > > > (which represent the specific hardware > target) for DVB > > > related > > > > events. > > > > > > > > > This patch contains unrelated coding style fixes. > Some of > > > them seem to be > > > related to previous changesets not applied. > > > > > > It is better to split coding style and real > changes into > > > separate patches. > > > > > > > +/* Events that may come from DVB v3 adapter > */ > > > > +static void sms_board_dvb3_event(struct > > > smscore_device_t *coredev, > > > > + enum > > > SMS_DVB3_EVENTS event) { > > > > + switch (event) { > > > > + case DVB3_EVENT_INIT: > > > > + > > > sms_debug("DVB3_EVENT_INIT"); > > > > + /* > > > sms_board_event(coredev, BOARD_EVENT_BIND); */ > > > > + break; > > > > + case DVB3_EVENT_SLEEP: > > > > + > > > sms_debug("DVB3_EVENT_SLEEP"); > > > > + /* > > > sms_board_event(coredev, > BOARD_EVENT_POWER_SUSPEND); */ > > > > + break; > > > > + case DVB3_EVENT_HOTPLUG: > > > > + > > > sms_debug("DVB3_EVENT_HOTPLUG"); > > > > + /* > > > sms_board_event(coredev, BOARD_EVENT_POWER_INIT); > */ > > > > + break; > > > > + case DVB3_EVENT_FE_LOCK: > > > > + > > > sms_debug("DVB3_EVENT_FE_LOCK"); > > > > + /* > > > sms_board_event(coredev, BOARD_EVENT_FE_LOCK); > */ > > > > + break; > > > > + case DVB3_EVENT_FE_UNLOCK: > > > > + > > > sms_debug("DVB3_EVENT_FE_UNLOCK"); > > > > + /* > > > sms_board_event(coredev, BOARD_EVENT_FE_UNLOCK); > */ > > > > + break; > > > > + case DVB3_EVENT_UNC_OK: > > > > + > > > sms_debug("DVB3_EVENT_UNC_OK"); > > > > + /* > > > sms_board_event(coredev, > BOARD_EVENT_MULTIPLEX_OK); */ > > > > + break; > > > > + case DVB3_EVENT_UNC_ERR: > > > > + > > > sms_debug("DVB3_EVENT_UNC_ERR"); > > > > + /* > > > sms_board_event(coredev, > BOARD_EVENT_MULTIPLEX_ERRORS); */ > > > > + break; > > > > + > > > > + default: > > > > + > > > sms_err("Unknown dvb3 api event"); > > > > + break; > > > > + } > > > > +} > > > > > > This seems to be the core of this changeset. > However, it > > > just prints debug > > > messages, since the real call to the event > notification > > > mechanism is commented. > > > > > > > > > Cheers, > > > Mauro > > > > > > > The Siano driver is composed from several > components. The sms_board_event() is called from one > component (dvb3 in this case) to the "cards" component. > > The series of patches I submitted, came to bring the > 'dvb3' component as close as possible to the current file > used by Siano. Since the "cards" has not been patched (yet), > those functions have been add, but commented out. > > This makes the above patch meaningless. If you first need > to create this function, then add the function first, then > add its call at the proper places, otherwise, it is > impossible for someone that it is reviewing your patch > series what are you doing with it. > > > > I did the same with the endian and IR calls in other > patches (add 'place holders' e.g. a comment, to be > un-comment later when those component will be patches and > avaliable). > > The same applies to the parts: first add the function, then > add the function calls (or do both on the same patch), not > the reverse. > > > > Cheers, > Mauro > got it. will do. -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [0904_13] Siano: move DVB_API and remove redundant code
--- On Mon, 4/20/09, Mauro Carvalho Chehab wrote: > From: Mauro Carvalho Chehab > Subject: Re: [PATCH] [0904_13] Siano: move DVB_API and remove redundant code > To: "Uri Shkolnik" > Cc: "LinuxML" > Date: Monday, April 20, 2009, 9:02 PM > On Sun, 5 Apr 2009 03:31:32 -0700 > (PDT) > Uri Shkolnik > wrote: > > > > > # HG changeset patch > > # User Uri Shkolnik > > # Date 1238755204 -10800 > > # Node ID f65a29f0f9a66f82a91525ae0085a15f00ac91c2 > > # Parent > 897669fdeb3be75a2bde978557b5398a4a7d8914 > > [PATCH] [0904_13] Siano: move DVB_API and remove > redundant code > > > > From: Uri Shkolnik > > > > The DVB-API related information has been moved from > the core header > > to the smsdvb, and the redundant code has been removed > from the > > core header. > > > > This code has been moved since it is used only by > > the smsdvb client component. > > This patch depends on the previous patches that I asked > some changes. Please > re-submit it together with the other patches that weren't > committed. It is > probably not much valuable to commit the later patches, so > I'll stop analysing > the code here. > > The patch itself looks sane to my eyes. > > > > Priority: normal > > > > Signed-off-by: Uri Shkolnik > > > > diff -r 897669fdeb3b -r f65a29f0f9a6 > linux/drivers/media/dvb/siano/smscoreapi.h > > --- > a/linux/drivers/media/dvb/siano/smscoreapi.h > Fri Apr 03 13:31:13 2009 +0300 > > +++ > b/linux/drivers/media/dvb/siano/smscoreapi.h > Fri Apr 03 13:40:04 2009 +0300 > > @@ -36,15 +36,6 @@ along with this program. If > not, see > #include > > > > /* #include "smsir.h" */ > > - > > -#define SMS_DVB3_SUBSYS > > -#ifdef SMS_DVB3_SUBSYS > > -#include "dmxdev.h" > > -#include "dvbdev.h" > > -#include "dvb_demux.h" > > -#include "dvb_frontend.h" > > - > > -#endif > > > > #define kmutex_init(_p_) mutex_init(_p_) > > #define kmutex_lock(_p_) mutex_lock(_p_) > > diff -r 897669fdeb3b -r f65a29f0f9a6 > linux/drivers/media/dvb/siano/smsdvb.c > > --- > a/linux/drivers/media/dvb/siano/smsdvb.c > Fri Apr 03 13:31:13 2009 +0300 > > +++ > b/linux/drivers/media/dvb/siano/smsdvb.c > Fri Apr 03 13:40:04 2009 +0300 > > @@ -22,6 +22,11 @@ along with this program. If > not, see > #include > > #include > > #include > > + > > +#include "dmxdev.h" > > +#include "dvbdev.h" > > +#include "dvb_demux.h" > > +#include "dvb_frontend.h" > > > > #include "smscoreapi.h" > > /*#include "smsendian.h"*/ > > @@ -52,7 +57,7 @@ struct smsdvb_client_t { > > fe_status_t fe_status; > > int fe_ber, fe_snr, fe_unc, > fe_signal_strength; > > > > - struct completion tune_done, > stat_done; > > + struct completion tune_done; > > > > /* todo: save freq/band > instead whole struct */ > > struct > dvb_frontend_parameters fe_params; > > > > > > > > > > -- > > To unsubscribe from this list: send the line > "unsubscribe linux-media" in > > the body of a message to majord...@vger.kernel.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > > > Cheers, > Mauro > OK I'll submit patches to fix the various rejects on the coming Wednesday (I'm ooo tomorrow). BTW - is it possible for me to clone the current tree you currently have? (after applying the approved patches), it will help me for future patches. Regards, Uri -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [0904_14] Siano: assemble all components to one kernel module
--- On Mon, 4/20/09, Mauro Carvalho Chehab wrote: > From: Mauro Carvalho Chehab > Subject: Re: [PATCH] [0904_14] Siano: assemble all components to one kernel > module > To: "Uri Shkolnik" > Cc: "LinuxML" > Date: Monday, April 20, 2009, 9:03 PM > On Sun, 5 Apr 2009 04:42:11 -0700 > (PDT) > Uri Shkolnik > wrote: > > > > > # HG changeset patch > > # User Uri Shkolnik > > # Date 1238756860 -10800 > > # Node ID 616e696ce6f0c0d76a1aaea8b36e0345112c5ab6 > > # Parent > f65a29f0f9a66f82a91525ae0085a15f00ac91c2 > > [PATCH] [0904_14] Siano: assemble all components to > one kernel module > > > > From: Uri Shkolnik > > > > Previously, the support for Siano-based devices > > has been combined from several kernel modules. > > This patch assembles all into single kernel module. > > Why? It seems better to keep it more modular. > > Cheers, > Mauro > The driver remains as modular as it was before (regarding sources files). Why to load smsusb.ko and than load smsdvb.ko and than load usbcore.ko? (and ir and endian... and...) The driver handles any device (or devices) with Siano silicon on it, simple as that. The new build method (Makefile and Kconfig) after the patches (yet to be fully submitted), build the driver to match the system it targets. (If USB exist than it builds the USB interface driver (otherwise it doesn't) and links it to the single module, same for SDIO, and any other interface driver, same for any clients and any other component). Regards, Uri -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [0904_13] Siano: move DVB_API and remove redundant code
--- On Mon, 4/20/09, Mauro Carvalho Chehab wrote: > From: Mauro Carvalho Chehab > Subject: Re: [PATCH] [0904_13] Siano: move DVB_API and remove redundant code > To: "Uri Shkolnik" > Cc: "LinuxML" > Date: Monday, April 20, 2009, 9:19 PM > On Mon, 20 Apr 2009 11:07:57 -0700 > (PDT) > Uri Shkolnik > wrote: > > > > > > > > > --- On Mon, 4/20/09, Mauro Carvalho Chehab > wrote: > > > > > From: Mauro Carvalho Chehab > > > Subject: Re: [PATCH] [0904_13] Siano: move > DVB_API and remove redundant code > > > To: "Uri Shkolnik" > > > Cc: "LinuxML" > > > Date: Monday, April 20, 2009, 9:02 PM > > > On Sun, 5 Apr 2009 03:31:32 -0700 > > > (PDT) > > > Uri Shkolnik > > > wrote: > > > > > > > > > > > # HG changeset patch > > > > # User Uri Shkolnik > > > > # Date 1238755204 -10800 > > > > # Node ID > f65a29f0f9a66f82a91525ae0085a15f00ac91c2 > > > > # Parent > > > 897669fdeb3be75a2bde978557b5398a4a7d8914 > > > > [PATCH] [0904_13] Siano: move DVB_API and > remove > > > redundant code > > > > > > > > From: Uri Shkolnik > > > > > > > > The DVB-API related information has been > moved from > > > the core header > > > > to the smsdvb, and the redundant code has > been removed > > > from the > > > > core header. > > > > > > > > This code has been moved since it is used > only by > > > > the smsdvb client component. > > > > > > This patch depends on the previous patches that I > asked > > > some changes. Please > > > re-submit it together with the other patches that > weren't > > > committed. It is > > > probably not much valuable to commit the later > patches, so > > > I'll stop analysing > > > the code here. > > > > > > The patch itself looks sane to my eyes. > > > > > > > > Priority: normal > > > > > > > > Signed-off-by: Uri Shkolnik > > > > > > > > diff -r 897669fdeb3b -r f65a29f0f9a6 > > > linux/drivers/media/dvb/siano/smscoreapi.h > > > > --- > > > > a/linux/drivers/media/dvb/siano/smscoreapi.h > > > Fri Apr 03 13:31:13 2009 +0300 > > > > +++ > > > > b/linux/drivers/media/dvb/siano/smscoreapi.h > > > Fri Apr 03 13:40:04 2009 +0300 > > > > @@ -36,15 +36,6 @@ along with this > program. If > > > not, see > > > #include > > > > > > > > /* #include "smsir.h" */ > > > > - > > > > -#define SMS_DVB3_SUBSYS > > > > -#ifdef SMS_DVB3_SUBSYS > > > > -#include "dmxdev.h" > > > > -#include "dvbdev.h" > > > > -#include "dvb_demux.h" > > > > -#include "dvb_frontend.h" > > > > - > > > > -#endif > > > > > > > > #define kmutex_init(_p_) mutex_init(_p_) > > > > #define kmutex_lock(_p_) mutex_lock(_p_) > > > > diff -r 897669fdeb3b -r f65a29f0f9a6 > > > linux/drivers/media/dvb/siano/smsdvb.c > > > > --- > > > a/linux/drivers/media/dvb/siano/smsdvb.c > > > Fri Apr 03 13:31:13 2009 +0300 > > > > +++ > > > b/linux/drivers/media/dvb/siano/smsdvb.c > > > Fri Apr 03 13:40:04 2009 +0300 > > > > @@ -22,6 +22,11 @@ along with this > program. If > > > not, see > > > #include > > > > #include > > > > #include > > > > + > > > > +#include "dmxdev.h" > > > > +#include "dvbdev.h" > > > > +#include "dvb_demux.h" > > > > +#include "dvb_frontend.h" > > > > > > > > #include "smscoreapi.h" > > > > /*#include "smsendian.h"*/ > > > > @@ -52,7 +57,7 @@ struct smsdvb_client_t { > > > > fe_status_t fe_status; > > > > int fe_ber, fe_snr, fe_unc, > > > fe_signal_strength; > > > > > > > > - struct completion tune_done, > > > stat_done; > > > > + struct completion tune_done; > > > > > > > > /* todo: save freq/band > > > instead whole struct */ > > > > struct > > > dvb_frontend_parameters fe_params; > > > > > > > > > > > > > > > > > > > > -- > > > > To unsubscribe from this list: send the > line > > > "unsubscribe linux-media" in > > > > the body of a message to majord...@vger.kernel.org > > > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > > > > > > > > > > > > > Cheers, > > > Mauro > > > > > > > OK > > > > I'll submit patches to fix the various rejects on the > coming Wednesday (I'm ooo tomorrow). > > > > BTW - is it possible for me to clone the current tree > you currently have? (after applying the approved patches), > it will help me for future patches. > > Sure. The better is to apply your patches over the fresh > clone. You can use > the ./hgimport script to help you to pick the patches from > your old tree. > > Cheers, > Mauro > Regarding the ./hgimport script - how do I tell that script to refer to your tree and not to any other hg tree? Isn't the default look-up is the dvb-api trunk? Regards, Uri -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [0904_14] Siano: assemble all components to one kernel module
--- On Mon, 4/20/09, Mauro Carvalho Chehab wrote: > From: Mauro Carvalho Chehab > Subject: Re: [PATCH] [0904_14] Siano: assemble all components to one kernel > module > To: "Uri Shkolnik" > Cc: "LinuxML" > Date: Monday, April 20, 2009, 11:50 PM > On Mon, 20 Apr 2009 11:16:32 -0700 > (PDT) > Uri Shkolnik > wrote: > > > > From: Mauro Carvalho Chehab > > > Subject: Re: [PATCH] [0904_14] Siano: assemble > all components to one kernel module > > > To: "Uri Shkolnik" > > > Cc: "LinuxML" > > > Date: Monday, April 20, 2009, 9:03 PM > > > On Sun, 5 Apr 2009 04:42:11 -0700 > > > (PDT) > > > Uri Shkolnik > > > wrote: > > > > > > > > > > > # HG changeset patch > > > > # User Uri Shkolnik > > > > # Date 1238756860 -10800 > > > > # Node ID > 616e696ce6f0c0d76a1aaea8b36e0345112c5ab6 > > > > # Parent > > > f65a29f0f9a66f82a91525ae0085a15f00ac91c2 > > > > [PATCH] [0904_14] Siano: assemble all > components to > > > one kernel module > > > > > > > > From: Uri Shkolnik > > > > > > > > Previously, the support for Siano-based > devices > > > > has been combined from several kernel > modules. > > > > This patch assembles all into single kernel > module. > > > > > > Why? It seems better to keep it more modular. > > > > > > Cheers, > > > Mauro > > > > > > > The driver remains as modular as it was before > (regarding sources files). > > Why to load smsusb.ko and than load smsdvb.ko and than > load usbcore.ko? (and ir and endian... and...) > > > > The driver handles any device (or devices) with Siano > silicon on it, simple as that. > > > > The new build method (Makefile and Kconfig) after the > patches (yet to be fully submitted), build the driver to > match the system it targets. (If USB exist than it builds > the USB interface driver (otherwise it doesn't) and links it > to the single module, same for SDIO, and any other interface > driver, same for any clients and any other component). > > Before seeing the other patches, it is hard for me to > manifest, but, IMO, it is > better to have the BUS configurable, e. g. just because you > have USB interface, > it doesn't mean that you want siano for USB, instead of > using SDIO. > > Cheers, > Mauro > -- > To unsubscribe from this list: send the line "unsubscribe > linux-media" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > "better to have the BUS configurable, e. g. just because you have USB interface, it doesn't mean that you want siano for USB, instead of using SDIO." Since the module is using dynamic registration, I don't find it a problem. When the system has both USB and SDIO buses, both USB and SDIO interface driver will be compiled and linked to the module. When a Siano based device (or multiple Siano devices) will be connected, they will be register internally in the core and activated. Any combination is allow (multiple SDIO, multiple USB and any mix). Regards, Uri -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0904_1_1] Siano: core header - update license [Replace 0904_1]
# HG changeset patch # User Uri Shkolnik # Date 1240828880 -10800 # Node ID 24e0283cbbc9992ea6bc9775906821e323726f34 # Parent 7311d23c3355629b617013cd51223895a2423770 Modify the file license to match all other Siano's files From: Uri Shkolnik Modify the file license to match all other Siano's files Priority: normal Signed-off-by: Uri Shkolnik diff -r 7311d23c3355 -r 24e0283cbbc9 linux/drivers/media/dvb/siano/smscoreapi.h --- a/linux/drivers/media/dvb/siano/smscoreapi.hSun Mar 15 12:05:57 2009 +0200 +++ b/linux/drivers/media/dvb/siano/smscoreapi.hMon Apr 27 13:41:20 2009 +0300 @@ -1,26 +1,26 @@ -/* - * Driver for the Siano SMS1xxx USB dongle - * - * author: Anatoly Greenblat - * - * Copyright (c), 2005-2008 Siano Mobile Silicon, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. - * - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ +/ -#ifndef __smscoreapi_h__ -#define __smscoreapi_h__ +Siano Mobile Silicon, Inc. +MDTV receiver kernel modules. +Copyright (C) 2006-2008, Uri Shkolnik, Anatoly Greenblat + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + + This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. + +/ + +#ifndef __SMS_CORE_API_H__ +#define __SMS_CORE_API_H__ #include #include @@ -598,4 +598,4 @@ int smscore_led_state(struct smscore_dev dprintk(KERN_DEBUG, DBG_ADV, fmt, ##arg) -#endif /* __smscoreapi_h__ */ +#endif /* __SMS_CORE_API_H__ */ -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0904_1_2] Siano: core header - update include files
# HG changeset patch # User Uri Shkolnik # Date 1240829297 -10800 # Node ID f8f75fb71210dfde89f994a97d8a4fa1e6b7b7bc # Parent 24e0283cbbc9992ea6bc9775906821e323726f34 Re-order the include files list From: Uri Shkolnik Re-order the include files list, put the DVB-API v3 within its own section, within a define container. Priority: normal Signed-off-by: Uri Shkolnik diff -r 24e0283cbbc9 -r f8f75fb71210 linux/drivers/media/dvb/siano/smscoreapi.h --- a/linux/drivers/media/dvb/siano/smscoreapi.hMon Apr 27 13:41:20 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.hMon Apr 27 13:48:17 2009 +0300 @@ -28,15 +28,20 @@ along with this program. If not, see #include #include +#include +#include +#include + #include -#include #include "compat.h" +#define SMS_DVB3_SUBSYS +#ifdef SMS_DVB3_SUBSYS #include "dmxdev.h" #include "dvbdev.h" #include "dvb_demux.h" #include "dvb_frontend.h" - +#endif #define kmutex_init(_p_) mutex_init(_p_) #define kmutex_lock(_p_) mutex_lock(_p_) -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [0904_4] Siano: core header indentation
[[ Got qmail error on previous mail, re-submit. ]] --- On Mon, 4/27/09, Uri Shkolnik wrote: Mauro, This patch (original 0904_4) is labeled as "RFC" but there are no comment at all. Please either accept or comment. 10x, Uri -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0904_7_1] Siano: smsdvb - modify license
# HG changeset patch # User Uri Shkolnik # Date 1240832608 -10800 # Node ID 39bbe3b24abaaa3e049a855cb51be0b917b0c711 # Parent 4a0b207a424af7f05d8eb417a698a82a61dd086f Siano: smsdvb - Fix licese to match all other Siano's files From: Uri Shkolnik Siano: smsdvb - Fix license to match all other Siano's files Priority: normal Signed-off-by: Uri Shkolnik diff -r 4a0b207a424a -r 39bbe3b24aba linux/drivers/media/dvb/siano/smsdvb.c --- a/linux/drivers/media/dvb/siano/smsdvb.cThu Apr 02 20:50:24 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsdvb.cMon Apr 27 14:43:28 2009 +0300 @@ -1,23 +1,23 @@ -/* - * Driver for the Siano SMS1xxx USB dongle - * - * Author: Uri Shkolni - * - * Copyright (c), 2005-2008 Siano Mobile Silicon, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. - * - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ +/ + +Siano Mobile Silicon, Inc. +MDTV receiver kernel modules. +Copyright (C) 2006-2008, Uri Shkolnik + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + + This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. + +/ #include #include -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0904_7_2] Siano: smsdvb - purge whitespaces
# HG changeset patch # User Uri Shkolnik # Date 1240833806 -10800 # Node ID cbd828b0fe102fa023280cfeadbcb20b54a39a47 # Parent 39bbe3b24abaaa3e049a855cb51be0b917b0c711 Siano: smsdvb - whitespace cleanup From: Uri Shkolnik Whitespace cleanup, no implementation changes Priority: normal Signed-off-by: Uri Shkolnik diff -r 39bbe3b24aba -r cbd828b0fe10 linux/drivers/media/dvb/siano/smsdvb.c --- a/linux/drivers/media/dvb/siano/smsdvb.cMon Apr 27 14:43:28 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsdvb.cMon Apr 27 15:03:26 2009 +0300 @@ -33,15 +33,15 @@ struct smsdvb_client_t { struct smscore_device_t *coredev; struct smscore_client_t *smsclient; - struct dvb_adapter adapter; - struct dvb_demuxdemux; - struct dmxdev dmxdev; - struct dvb_frontend frontend; + struct dvb_adapter adapter; + struct dvb_demux demux; + struct dmxdev dmxdev; + struct dvb_frontend frontend; - fe_status_t fe_status; - int fe_ber, fe_snr, fe_unc, fe_signal_strength; + fe_status_t fe_status; + int fe_ber, fe_snr, fe_unc, fe_signal_strength; - struct completion tune_done, stat_done; + struct completion tune_done, stat_done; /* todo: save freq/band instead whole struct */ struct dvb_frontend_parameters fe_params; @@ -61,7 +61,7 @@ static int smsdvb_onresponse(void *conte struct smsdvb_client_t *client = (struct smsdvb_client_t *) context; struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *) (((u8 *) cb->p) + cb->offset); - u32 *pMsgData = (u32 *)phdr+1; + u32 *pMsgData = (u32 *) phdr + 1; /*u32 MsgDataLen = phdr->msgLength - sizeof(struct SmsMsgHdr_ST);*/ /*smsendian_handle_rx_message((struct SmsMsgData_ST *) phdr);*/ @@ -177,8 +177,8 @@ static int smsdvb_onresponse(void *conte if (client->fe_status & FE_HAS_LOCK) sms_board_led_feedback(client->coredev, - (client->fe_unc == 0) ? - SMS_LED_HI : SMS_LED_LO); + (client->fe_unc == 0) ? + SMS_LED_HI : SMS_LED_LO); else sms_board_led_feedback(client->coredev, SMS_LED_OFF); @@ -203,7 +203,7 @@ static void smsdvb_onremove(void *contex { kmutex_lock(&g_smsdvb_clientslock); - smsdvb_unregister_client((struct smsdvb_client_t *) context); + smsdvb_unregister_client((struct smsdvb_client_t *)context); kmutex_unlock(&g_smsdvb_clientslock); } @@ -214,13 +214,12 @@ static int smsdvb_start_feed(struct dvb_ container_of(feed->demux, struct smsdvb_client_t, demux); struct SmsMsgData_ST PidMsg; - sms_debug("add pid %d(%x)", - feed->pid, feed->pid); + sms_debug("add pid %d(%x)", feed->pid, feed->pid); PidMsg.xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; PidMsg.xMsgHeader.msgDstId = HIF_TASK; PidMsg.xMsgHeader.msgFlags = 0; - PidMsg.xMsgHeader.msgType = MSG_SMS_ADD_PID_FILTER_REQ; + PidMsg.xMsgHeader.msgType = MSG_SMS_ADD_PID_FILTER_REQ; PidMsg.xMsgHeader.msgLength = sizeof(PidMsg); PidMsg.msgData[0] = feed->pid; @@ -234,31 +233,31 @@ static int smsdvb_stop_feed(struct dvb_d container_of(feed->demux, struct smsdvb_client_t, demux); struct SmsMsgData_ST PidMsg; - sms_debug("remove pid %d(%x)", - feed->pid, feed->pid); + sms_debug("remove pid %d(%x)", feed->pid, feed->pid); PidMsg.xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; PidMsg.xMsgHeader.msgDstId = HIF_TASK; PidMsg.xMsgHeader.msgFlags = 0; - PidMsg.xMsgHeader.msgType = MSG_SMS_REMOVE_PID_FILTER_REQ; + PidMsg.xMsgHeader.msgType = MSG_SMS_REMOVE_PID_FILTER_REQ; PidMsg.xMsgHeader.msgLength = sizeof(PidMsg); PidMsg.msgData[0] = feed->pid; - return smsclient_sendrequest(client->smsclient, -&PidMsg, sizeof(PidMsg)); + return smsclient_sendrequest(client->smsclient, &PidMsg, + sizeof(PidMsg)); } static int smsdvb_sendrequest_and_wait(struct smsdvb_client_t *client, - void *buffer, size_t size, - struct completion *completion) + void *buffer, size_t size, + struct completion *completion) { - int rc = smsclient_sendrequest(client->smsclient, buffer, size); + int rc; + + rc = smsclient_sendrequest(client->smsclient, buffer, size); if (rc < 0)
[PATCH] [0904_7_3] Siano: smsdvb - remove redundent complete
# HG changeset patch # User Uri Shkolnik # Date 1240834193 -10800 # Node ID 5601aa2e8c5e2af2b1f62e03fd4c4e04006c7b87 # Parent cbd828b0fe102fa023280cfeadbcb20b54a39a47 Siano: smsdvb - remove redundant complete instruction From: Uri Shkolnik Remove redundant complete instruction from smsdvb, in the past this was used by the statistics state machine, but no longer. Priority: normal Signed-off-by: Uri Shkolnik diff -r cbd828b0fe10 -r 5601aa2e8c5e linux/drivers/media/dvb/siano/smsdvb.c --- a/linux/drivers/media/dvb/siano/smsdvb.cMon Apr 27 15:03:26 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsdvb.cMon Apr 27 15:09:53 2009 +0300 @@ -550,7 +550,6 @@ static int smsdvb_hotplug(struct smscore client->coredev = coredev; init_completion(&client->tune_done); - init_completion(&client->stat_done); kmutex_lock(&g_smsdvb_clientslock); -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [0904_8] Siano: add messages handling for big-endian target
Mauro, The patch is labeled as "rejected" Regards, Uri --- On Mon, 4/20/09, Mauro Carvalho Chehab wrote: > From: Mauro Carvalho Chehab > Subject: Re: [PATCH] [0904_8] Siano: add messages handling for big-endian > target > To: "Mauro Carvalho Chehab" > Cc: "Uri Shkolnik" , "LinuxML" > Date: Monday, April 20, 2009, 7:17 PM > On Mon, 20 Apr 2009 12:48:39 -0300 > Mauro Carvalho Chehab > wrote: > > > On Sun, 5 Apr 2009 01:59:50 -0700 (PDT) > > Uri Shkolnik > wrote: > > > > > > > > Add code that modify the content of Siano's > protocol > > > messages when running with big-endian target. > > > > Maybe due to one of the other patches that weren't > applied, but this one didn't compile: > > Sorry, my fault. This is some trash from a previous patch > that got rejected. Patch added, thanks. > > Cheers, > Mauro > -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [0904_14] Siano: assemble all components to one kernel module
--- On Tue, 4/21/09, Mauro Carvalho Chehab wrote: > From: Mauro Carvalho Chehab > Subject: Re: [PATCH] [0904_14] Siano: assemble all components to one kernel > module > To: "Trent Piepho" > Cc: "Uri Shkolnik" , linux-media@vger.kernel.org > Date: Tuesday, April 21, 2009, 9:10 PM > On Tue, 21 Apr 2009 10:54:40 -0700 > (PDT) > Trent Piepho > wrote: > > > On Tue, 21 Apr 2009, Uri Shkolnik wrote: > > > --- On Tue, 4/21/09, Trent Piepho > wrote: > > > > From: Trent Piepho > > > > Subject: Re: [PATCH] [0904_14] Siano: > assemble all components to one kernel module > > > > To: "Uri Shkolnik" > > > > Cc: "Mauro Carvalho Chehab" , > "LinuxML" > > > > Date: Tuesday, April 21, 2009, 6:17 AM > > > > On Mon, 20 Apr 2009, Uri Shkolnik > > > > wrote: > > > > > > > > > > "better to have the BUS configurable, > e. g. just > > > > because you have USB interface, it doesn't > mean that you > > > > want siano for USB, instead of using SDIO." > > > > > > > > > > Since the module is using dynamic > registration, I > > > > don't find it a problem. > > > > > When the system has both USB and SDIO > buses, both USB > > > > and SDIO interface driver will be compiled > and linked to the > > > > module. When a Siano based device (or > multiple Siano > > > > devices) will be connected, they will be > register internally > > > > in the core and activated. Any combination > is allow > > > > (multiple SDIO, multiple USB and any mix). > > > > > > > > This is not the way linux drivers normally > work. > > > > Usually there are > > > > multiple modules so that only the ones that > need to be > > > > loaded are loaded. > > > > It sounds like you are designing this to be > custom compiled > > > > for each > > > > system, but that's not usually they way > things work. > > > > > > I think I didn't express myself clearly. > > > > > > Lets say that someone build a kernel X. > > > This kernel has (from all buses) only USB. The > Siano module will build with USB interface driver at this > system. > > > > > > If the system includes SDIO and OMAP SPI/SPP, the > module build will discard the USB interface driver, but the > SDIO and the OMAP SPI will be built. > > The patch you've provided just merge everything. If you're > proposing a newer > model, you should send a patchset with the complete Kbuild > refactor. For now, > it is better to postpone this patch until we merge > non-kbuild changes. > > > Can you name another driver that works this way? > It is considered better > > to build a new module for a different interface. > That way one can decide > > at run time if the interface is needed or not and only > load the module if > > needed. If everything is built into one module > then one must decide at > > compile time what interfaces to support. But it > is often the case that > > kernels are compiled on different systems than run > them. > > This model also sounds different to me from what I've seen > so far. > > Cheers, > Mauro > -- > To unsubscribe from this list: send the line "unsubscribe > linux-media" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Hi, Lets review some other DVB enabled modules 1) PLUTO Kconfig config DVB_PLUTO2 tristate "Pluto2 cards" depends on DVB_CORE && PCI && I2C select I2C_ALGOBIT select DVB_TDA1004X help Support for PCI cards based on the Pluto2 FPGA like the Satelco Easywatch Mobile Terrestrial DVB-T Receiver. Since these cards have no MPEG decoder onboard, they transmit only compressed MPEG data over the PCI bus, so you need an external software decoder to watch TV on your computer. Say Y or M if you own such a device and want to use it. As we can see, it depends on PCI and I2C (and DVB_CORE, but that is outside the current discussion), which means, that if the target system lacks either PCI or I2C (and many Linux target do not have those) the entire Pluto module will not be built, even if selected. DM1105 - similar case. TTUSB_BUDGET - config DVB_TTUSB_BUDGET tristate "Technotrend/Hauppauge Nova-USB devices" depends on DVB
Re: [PATCH] [0904_14] Siano: assemble all components to one kernel module
--- On Tue, 4/28/09, Trent Piepho wrote: > From: Trent Piepho > Subject: Re: [PATCH] [0904_14] Siano: assemble all components to one kernel > module > To: "Uri Shkolnik" > Cc: "Mauro Carvalho Chehab" , > linux-media@vger.kernel.org > Date: Tuesday, April 28, 2009, 9:58 PM > On Mon, 27 Apr 2009, Uri Shkolnik > wrote: > > --- On Tue, 4/21/09, Mauro Carvalho Chehab > wrote: > > > > > If the system includes SDIO and OMAP > SPI/SPP, the > > > module build will discard the USB interface > driver, but the > > > SDIO and the OMAP SPI will be built. > > > > > > The patch you've provided just merge everything. > If you're > > > proposing a newer > > > model, you should send a patchset with the > complete Kbuild > > > refactor. For now, > > > it is better to postpone this patch until we > merge > > > non-kbuild changes. > > > > > > > Can you name another driver that works this > way? > > > It is considered better > > > > to build a new module for a different > interface. > > > That way one can decide > > > > at run time if the interface is needed or > not and only > > > load the module if > > > > needed. If everything is built into one > module > > > then one must decide at > > > > compile time what interfaces to support. > But it > > > is often the case that > > > > kernels are compiled on different systems > than run > > > them. > > > > > > This model also sounds different to me from what > I've seen > > > so far. > > > > > > > 1) PLUTO Kconfig > > > > config DVB_PLUTO2 > > tristate "Pluto2 cards" > > depends on DVB_CORE && PCI > && I2C > > As we can see, it depends on PCI and I2C (and > DVB_CORE, but that is outside the current discussion), which > means, that if the target system lacks either PCI or I2C > (and many Linux target do not have those) the entire Pluto > module will not be built, even if selected. > > I do not think you understand. This driver is for a > device that is access > via a PCI bus. It creates an i2c adapter that is used > to control the tuner > chip on the device. The device is not accessed via > i2c. What's more, and > this is a key point you are missing, it can not be accessed > by PCI *or* > I2C. This is the same with all the other drivers you > may have found that > use both PCI and I2C. It's a totally different > situation. > > Look at the how the B2C2 flexcop driver works. This > hardware is availble > in both PCI and USB versions. > I fully understand it. Note that I gave the two examples that reside near-by the Siano sources in the VL tree, there are multiple other. I didn't dive into the source to see what the drivers do, I only show what the Kconfig(s) tell. > > > config DVB_TTUSB_BUDGET > > tristate "Technotrend/Hauppauge > Nova-USB devices" > > depends on DVB_CORE && USB > && I2C && PCI > > Support for external USB > adapters designed by Technotrend and > > > > This module while not be build (even if chosen) on > target system that lacks USB stack (additional to PCI and > I2C). > > This looks like a mistake. The driver is for a USB > device and should not > depend on PCI, but the driver uses the pci dma api. > Same as above > > First, SMS (Siano based device) requires at least one > available bus (either USB, SDIO, SPI/SPP, HIF/Parallel, > TS_I2C, ), not a combination like the TTUSB. (Note, if > multiple buses available, the module can use them > simultaneously, for example - two different instances (SDIO > and USB) dongles may co-exist on the same system). > > > > There is no reason to prevent some systems which have > only SDIO interface to work if there is no USB and vice > versa. > > > > Only if there are no supported (by SMS) buses at all, > the drive will not be built. > > > > Second, in order to reduce module size, there is no > need to compile and link to the binary module a bus > interface component that will never be used, more than that, > if there are no suitable (external) headers, the build > process will fail. > > So, the Kconfig and Makefile need to ensure that the > module will be built and function OK on target systems which > have full set AND subset of the total supported buses (by > SMS). > > The point you are missing is that by compiling all support > into one module > you a
Re: [PATCH] [0904_7_2] Siano: smsdvb - purge whitespaces
--- On Mon, 5/11/09, Mauro Carvalho Chehab wrote: > From: Mauro Carvalho Chehab > Subject: Re: [PATCH] [0904_7_2] Siano: smsdvb - purge whitespaces > To: "Uri Shkolnik" > Cc: "LinuxML" > Date: Monday, May 11, 2009, 1:29 PM > Em Mon, 27 Apr 2009 05:11:27 -0700 > (PDT) > Uri Shkolnik > escreveu: > > > > > # HG changeset patch > > # User Uri Shkolnik > > # Date 1240833806 -10800 > > # Node ID cbd828b0fe102fa023280cfeadbcb20b54a39a47 > > # Parent > 39bbe3b24abaaa3e049a855cb51be0b917b0c711 > > Siano: smsdvb - whitespace cleanup > > > > From: Uri Shkolnik > > > > Whitespace cleanup, no implementation changes > > This patch didn't apply. Probably, it were applied out of > order. The other > Siano patches I had were already applied. Please check if I > forgot something. > > > > > Priority: normal > > > > Signed-off-by: Uri Shkolnik > > > > diff -r 39bbe3b24aba -r cbd828b0fe10 > linux/drivers/media/dvb/siano/smsdvb.c > > --- > a/linux/drivers/media/dvb/siano/smsdvb.c > Mon Apr 27 14:43:28 2009 +0300 > > +++ > b/linux/drivers/media/dvb/siano/smsdvb.c > Mon Apr 27 15:03:26 2009 +0300 > > @@ -33,15 +33,15 @@ struct smsdvb_client_t { > > struct smscore_device_t > *coredev; > > struct smscore_client_t > *smsclient; > > > > - struct dvb_adapter > adapter; > > - struct dvb_demux > demux; > > - struct dmxdev > dmxdev; > > - struct dvb_frontend > frontend; > > + struct dvb_adapter adapter; > > + struct dvb_demux demux; > > + struct dmxdev dmxdev; > > + struct dvb_frontend frontend; > > > > - fe_status_t > fe_status; > > - int > fe_ber, > fe_snr, fe_unc, fe_signal_strength; > > + fe_status_t fe_status; > > + int fe_ber, fe_snr, fe_unc, > fe_signal_strength; > > > > - struct completion > tune_done, stat_done; > > + struct completion tune_done, > stat_done; > > > > /* todo: save freq/band > instead whole struct */ > > struct > dvb_frontend_parameters fe_params; > > @@ -61,7 +61,7 @@ static int smsdvb_onresponse(void > *conte > > struct smsdvb_client_t > *client = (struct smsdvb_client_t *) context; > > struct SmsMsgHdr_ST *phdr = > (struct SmsMsgHdr_ST *) (((u8 *) cb->p) > > > + cb->offset); > > - u32 *pMsgData = (u32 *)phdr+1; > > + u32 *pMsgData = (u32 *) phdr + 1; > > /*u32 MsgDataLen = > phdr->msgLength - sizeof(struct SmsMsgHdr_ST);*/ > > > > > /*smsendian_handle_rx_message((struct SmsMsgData_ST *) > phdr);*/ > > @@ -177,8 +177,8 @@ static int smsdvb_onresponse(void > *conte > > > > if (client->fe_status > & FE_HAS_LOCK) > > > sms_board_led_feedback(client->coredev, > > - > > (client->fe_unc == 0) ? > > - > > SMS_LED_HI : SMS_LED_LO); > > + > (client->fe_unc == > 0) ? > > + > SMS_LED_HI : > SMS_LED_LO); > > else > > > sms_board_led_feedback(client->coredev, SMS_LED_OFF); > > > > @@ -203,7 +203,7 @@ static void smsdvb_onremove(void > *contex > > { > > > kmutex_lock(&g_smsdvb_clientslock); > > > > - smsdvb_unregister_client((struct > smsdvb_client_t *) context); > > + smsdvb_unregister_client((struct > smsdvb_client_t *)context); > > > > > kmutex_unlock(&g_smsdvb_clientslock); > > } > > @@ -214,13 +214,12 @@ static int > smsdvb_start_feed(struct dvb_ > > > container_of(feed->demux, struct smsdvb_client_t, > demux); > > struct SmsMsgData_ST PidMsg; > > > > - sms_debug("add pid %d(%x)", > > - > feed->pid, feed->pid); > > + sms_debug("add pid %d(%x)", > feed->pid, feed->pid); > > > > PidMsg.xMsgHeader.msgSrcId = > DVBT_BDA_CONTROL_MSG_ID; > > PidMsg.xMsgHeader.msgDstId = > HIF_TASK; > > PidMsg.xMsgHeader.msgFlags = > 0; > > - PidMsg.xMsgHeader.msgType = > MSG_SMS_ADD_PID_FILTER_REQ; > > + PidMsg.xMsgHeader.msgType = > MSG_SMS_ADD_PID_FILTER_REQ; > > PidMsg.xMsgHeader.msgLength = > sizeof(PidMsg); > > PidMsg.msgData[0] = > feed->pid; > > > > @@ -234,31 +233,31 @@ static int > smsdvb_stop_feed(struct dvb_d
Re: [PATCH] [0904_7_2] Siano: smsdvb - purge whitespaces
--- On Mon, 5/11/09, Mauro Carvalho Chehab wrote: > From: Mauro Carvalho Chehab > Subject: Re: [PATCH] [0904_7_2] Siano: smsdvb - purge whitespaces > To: "Uri Shkolnik" > Cc: "LinuxML" > Date: Monday, May 11, 2009, 1:29 PM > Em Mon, 27 Apr 2009 05:11:27 -0700 > (PDT) > Uri Shkolnik > escreveu: > > > > > # HG changeset patch > > # User Uri Shkolnik > > # Date 1240833806 -10800 > > # Node ID cbd828b0fe102fa023280cfeadbcb20b54a39a47 > > # Parent > 39bbe3b24abaaa3e049a855cb51be0b917b0c711 > > Siano: smsdvb - whitespace cleanup > > > > From: Uri Shkolnik > > > > Whitespace cleanup, no implementation changes > > This patch didn't apply. Probably, it were applied out of > order. The other > Siano patches I had were already applied. Please check if I > forgot something. > > > > > Priority: normal > > > > > > -- > > To unsubscribe from this list: send the line > "unsubscribe linux-media" in > > the body of a message to majord...@vger.kernel.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > > > Cheers, > Mauro > -- > The exist patches' order is 1..19, patch #1 has been replaced by patches 1.1 (1_1) and 1.2 (1_2), and patches 7 by patches 7.1 ... 7.3 (7_1, 7_2, 7_3). When you finish to merge the patches which have been approved, please let me know where that merged tree is, and I'll copy it, and continue the patches from that point (kind of synchronization). Thanks, Uri -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [0904_7_2] Siano: smsdvb - purge whitespaces
--- On Mon, 5/11/09, Mauro Carvalho Chehab wrote: > From: Mauro Carvalho Chehab > Subject: Re: [PATCH] [0904_7_2] Siano: smsdvb - purge whitespaces > To: "Uri Shkolnik" > Cc: "LinuxML" > Date: Monday, May 11, 2009, 6:59 PM > Em Mon, 11 May 2009 07:47:32 -0700 > (PDT) > Uri Shkolnik > escreveu: > > > The exist patches' order is 1..19, patch #1 has been > replaced by patches 1.1 (1_1) and 1.2 (1_2), and patches 7 > by patches 7.1 ... 7.3 (7_1, 7_2, 7_3). > > > > When you finish to merge the patches which have been > approved, please let me know where that merged tree is, and > I'll copy it, and continue the patches from that point (kind > of synchronization). > > Uri, > > Since several patches were already applied, could you > please re-send the > patches that are still pending? You may send also the other > patches you have > for me. > > > > Cheers, > Mauro > Mauro, I don't know which patches were already applied... The simple solution is that you'll give me a link to the current tree you have (after the approved/merged patches) and I'll continue from that point. Uri -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0905_01] Siano: smsusb - update license
# HG changeset patch # User Uri Shkolnik # Date 1242126057 -10800 # Node ID 766d02fa7c5c42cc6480eaefb14c7dd6f9c0d370 # Parent 8d37e850566419e7905e66f875b9384d96bf340d [0905_01] Siano: smsusb - update license From: Uri Shkolnik This patch updates the license of the USB interface driver Priority: normal Signed-off-by: Uri Shkolnik diff -r 8d37e8505664 -r 766d02fa7c5c linux/drivers/media/dvb/siano/smsusb.c --- a/linux/drivers/media/dvb/siano/smsusb.cMon May 11 09:37:41 2009 -0700 +++ b/linux/drivers/media/dvb/siano/smsusb.cTue May 12 14:00:57 2009 +0300 @@ -1,23 +1,23 @@ -/* - * Driver for the Siano SMS1xxx USB dongle - * - * author: Anatoly Greenblat - * - * Copyright (c), 2005-2008 Siano Mobile Silicon, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. - * - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ +/ + +Siano Mobile Silicon, Inc. +MDTV receiver kernel modules. +Copyright (C) 2005-2009, Uri Shkolnik, Anatoly Greenblat + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + + This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. + +/ #include #include -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0905_02] Siano: smsusb - handle byte ordering and big endianity
# HG changeset patch # User Uri Shkolnik # Date 1242127626 -10800 # Node ID 26c02c133d7e1f9932c1968f669ab0bfaf2761fa # Parent 766d02fa7c5c42cc6480eaefb14c7dd6f9c0d370 [0905_02] Siano: smsusb - handle byte ordering and big endianity From: Uri Shkolnik This patch adds support for byte ordering and big endianity handling for the USB interface driver Priority: normal Signed-off-by: Uri Shkolnik diff -r 766d02fa7c5c -r 26c02c133d7e linux/drivers/media/dvb/siano/smsusb.c --- a/linux/drivers/media/dvb/siano/smsusb.cTue May 12 14:00:57 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsusb.cTue May 12 14:27:06 2009 +0300 @@ -26,6 +26,7 @@ along with this program. If not, see udev, usb_sndbulkpipe(dev->udev, 2), buffer, size, &dummy, 1000); } @@ -337,8 +339,8 @@ static int smsusb_init_device(struct usb case SMS_VEGA: dev->buffer_size = USB2_BUFFER_SIZE; dev->response_alignment = - dev->udev->ep_in[1]->desc.wMaxPacketSize - - sizeof(struct SmsMsgHdr_ST); + le16_to_cpu(dev->udev->ep_in[1]->desc.wMaxPacketSize) - + sizeof(struct SmsMsgHdr_ST); params.flags |= SMS_DEVICE_FAMILY2; break; -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0905_01_1] Siano: Makefile - add smsendian to build
# HG changeset patch # User Uri Shkolnik # Date 1242135753 -10800 # Node ID 697459f4baf6e95a906b852250699a18d1016724 # Parent 26c02c133d7e1f9932c1968f669ab0bfaf2761fa [0905_01_1] Siano: Makefile - add smsendian to build From: Uri Shkolnik Add smsendian component to the module build Priority: normal Signed-off-by: Uri Shkolnik diff -r 26c02c133d7e -r 697459f4baf6 linux/drivers/media/dvb/siano/Makefile --- a/linux/drivers/media/dvb/siano/MakefileTue May 12 14:27:06 2009 +0300 +++ b/linux/drivers/media/dvb/siano/MakefileTue May 12 16:42:33 2009 +0300 @@ -1,4 +1,4 @@ sms1xxx-objs := smscoreapi.o sms-cards.o -sms1xxx-objs := smscoreapi.o sms-cards.o +sms1xxx-objs := smscoreapi.o sms-cards.o smsendian.o obj-$(CONFIG_DVB_SIANO_SMS1XXX) += sms1xxx.o obj-$(CONFIG_DVB_SIANO_SMS1XXX) += smsusb.o -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0905_02] Siano: smsusb - remove old kernels support
# HG changeset patch # User Uri Shkolnik # Date 1242136071 -10800 # Node ID 126c0974c2db4e2777e5d9b068fa976fe3a59675 # Parent 697459f4baf6e95a906b852250699a18d1016724 [0905_02] Siano: smsusb - remove old kernels support From: Uri Shkolnik Remove backward support for kernel versions older than 2.6.19 Priority: normal Signed-off-by: Uri Shkolnik diff -r 697459f4baf6 -r 126c0974c2db linux/drivers/media/dvb/siano/smsusb.c --- a/linux/drivers/media/dvb/siano/smsusb.cTue May 12 16:42:33 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsusb.cTue May 12 16:47:51 2009 +0300 @@ -60,11 +60,7 @@ static int smsusb_submit_urb(struct smsu static int smsusb_submit_urb(struct smsusb_device_t *dev, struct smsusb_urb_t *surb); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19) static void smsusb_onresponse(struct urb *urb) -#else -static void smsusb_onresponse(struct urb *urb, struct pt_regs *regs) -#endif { struct smsusb_urb_t *surb = (struct smsusb_urb_t *) urb->context; struct smsusb_device_t *dev = surb->dev; -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0905_01_2] Siano: make single kernel object (module)
# HG changeset patch # User Uri Shkolnik # Date 1242137970 -10800 # Node ID db8bfae234d4730f18823ca0686762a13e7997c9 # Parent 126c0974c2db4e2777e5d9b068fa976fe3a59675 [0905_01_2] Siano: make single kernel object (module) From: Uri Shkolnik This patch consolidates the components to single kernel object (module) Priority: normal Signed-off-by: Uri Shkolnik diff -r 126c0974c2db -r db8bfae234d4 linux/drivers/media/dvb/siano/Makefile --- a/linux/drivers/media/dvb/siano/MakefileTue May 12 16:47:51 2009 +0300 +++ b/linux/drivers/media/dvb/siano/MakefileTue May 12 17:19:30 2009 +0300 @@ -1,10 +1,8 @@ sms1xxx-objs := smscoreapi.o sms-cards.o -sms1xxx-objs := smscoreapi.o sms-cards.o smsendian.o +sms1xxx-objs := smscoreapi.o sms-cards.o smsendian.o smsusb.o smsdvb.o obj-$(CONFIG_DVB_SIANO_SMS1XXX) += sms1xxx.o -obj-$(CONFIG_DVB_SIANO_SMS1XXX) += smsusb.o -obj-$(CONFIG_DVB_SIANO_SMS1XXX) += smsdvb.o -EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core +EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core -DSMS_DVB3_SUBSYS -DSMS_USB_DRV EXTRA_CFLAGS += $(extra-cflags-y) $(extra-cflags-m) diff -r 126c0974c2db -r db8bfae234d4 linux/drivers/media/dvb/siano/smscoreapi.c --- a/linux/drivers/media/dvb/siano/smscoreapi.cTue May 12 16:47:51 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.cTue May 12 17:19:30 2009 +0300 @@ -1321,8 +1321,8 @@ static int __init smscore_module_init(vo } #endif -#if 0 /* def SMS_DVB_CLIENT */ - /* DVB Register */ +#ifdef SMS_DVB3_SUBSYS + /* DVB v.3 Register */ rc = smsdvb_register(); if (rc) { sms_err("Error registering DVB client.\n"); @@ -1339,12 +1339,12 @@ static int __init smscore_module_init(vo } #endif -#if 0 /* def SMS_USB_BUS_DRV */ +#ifdef SMS_USB_DRV /* USB Register */ rc = smsusb_register(); if (rc) { sms_err("Error registering USB bus driver.\n"); - goto sms_bus_drv_error; + goto sms_usb_drv_error; } #endif @@ -1358,21 +1358,13 @@ static int __init smscore_module_init(vo #endif return rc; -#if 0 -sms_bus_drv_error: -#endif /* 0 */ -#if 0 /* def SMS_NET_CLIENT */ - smsnet_unregister(); -smsnet_error: -#endif -#if 0 /* def SMS_DVB_CLIENT */ +sms_usb_drv_error: +#ifdef SMS_DVB3_SUBSYS smsdvb_unregister(); smsdvb_error: #endif -#if 0 /* def SMS_CHAR_CLIENT */ - smschar_unregister(); -smschar_error: -#endif + + sms_debug("rc %d", rc); return rc; @@ -1380,14 +1372,15 @@ smschar_error: static void __exit smscore_module_exit(void) { -#if 0 /* def SMS_CHAR_CLIENT */ - /* Char interface UnRegister */ - smschar_unregister(); +#ifdef SMS_DVB3_SUBSYS + /* DVB v.3 unregister */ + smsdvb_unregister(); #endif -#if 0 /* def SMS_DVB_CLIENT */ - /* DVB UnRegister */ - smsdvb_unregister(); + /* Unegister interfaces objects */ +#ifdef SMS_USB_DRV + /* USB unregister */ + smsusb_unregister(); #endif #if 0 /* def SMS_NET_CLIENT */ diff -r 126c0974c2db -r db8bfae234d4 linux/drivers/media/dvb/siano/smscoreapi.h --- a/linux/drivers/media/dvb/siano/smscoreapi.hTue May 12 16:47:51 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.hTue May 12 17:19:30 2009 +0300 @@ -35,7 +35,6 @@ along with this program. If not, see #include "compat.h" -#define SMS_DVB3_SUBSYS #ifdef SMS_DVB3_SUBSYS #include "dmxdev.h" #include "dvbdev.h" @@ -661,6 +660,15 @@ int smscore_get_board_id(struct smscore_ int smscore_led_state(struct smscore_device_t *core, int led); +#ifdef SMS_DVB3_SUBSYS +extern int smsdvb_register(void); +extern void smsdvb_unregister(void); +#endif + +#ifdef SMS_USB_DRV +extern int smsusb_register(void); +extern void smsusb_unregister(void); +#endif /* */ diff -r 126c0974c2db -r db8bfae234d4 linux/drivers/media/dvb/siano/smsdvb.c --- a/linux/drivers/media/dvb/siano/smsdvb.cTue May 12 16:47:51 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsdvb.cTue May 12 17:19:30 2009 +0300 @@ -518,7 +518,7 @@ adapter_error: return rc; } -int smsdvb_module_init(void) +int smsdvb_register(void) { int rc; @@ -532,7 +532,7 @@ int smsdvb_module_init(void) return rc; } -void smsdvb_module_exit(void) +void smsdvb_unregister(void) { smscore_unregister_hotplug(smsdvb_hotplug); @@ -545,9 +545,6 @@ void smsdvb_module_exit(void) kmutex_unlock(&g_smsdvb_clientslock); } -module_init(smsdvb_module_init); -module_exit(smsdvb_module_exit); - MODULE_DESCRIPTION("SMS DVB subsystem adaptation module"); MODULE_AUTHOR("Siano Mobile Silicon, INC. (u...@siano-ms.com)"); MODULE_LICENSE("GPL"); diff -r 126c0974c2db -r db8bfae234d4 linux/drivers/media/dvb/siano/smsusb.c --- a/linu
[PATCH] [0905_03] Siano: smsusb - remove old backward support
# HG changeset patch # User Uri Shkolnik # Date 1242136071 -10800 # Node ID 126c0974c2db4e2777e5d9b068fa976fe3a59675 # Parent 697459f4baf6e95a906b852250699a18d1016724 [0905_03] Siano: smsusb - remove old backward support From: Uri Shkolnik Remove backward support for kernel versions older than 2.6.19. Priority: normal Signed-off-by: Uri Shkolnik diff -r 697459f4baf6 -r 126c0974c2db linux/drivers/media/dvb/siano/smsusb.c --- a/linux/drivers/media/dvb/siano/smsusb.cTue May 12 16:42:33 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsusb.cTue May 12 16:47:51 2009 +0300 @@ -60,11 +60,7 @@ static int smsusb_submit_urb(struct smsu static int smsusb_submit_urb(struct smsusb_device_t *dev, struct smsusb_urb_t *surb); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19) static void smsusb_onresponse(struct urb *urb) -#else -static void smsusb_onresponse(struct urb *urb, struct pt_regs *regs) -#endif { struct smsusb_urb_t *surb = (struct smsusb_urb_t *) urb->context; struct smsusb_device_t *dev = surb->dev; -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0905_05] Siano: smsusb - lost buffers bug fix
# HG changeset patch # User Uri Shkolnik # Date 1242138741 -10800 # Node ID ae0f17b305e7762643a9bc7f43c302c11f7b55b5 # Parent db8bfae234d4730f18823ca0686762a13e7997c9 [0905_05] Siano: smsusb - lost buffers bug fix From: Uri Shkolnik This patch fixes a problem were protocol buffers have been lost during USB disconnect events. Priority: normal Signed-off-by: Uri Shkolnik diff -r db8bfae234d4 -r ae0f17b305e7 linux/drivers/media/dvb/siano/smsusb.c --- a/linux/drivers/media/dvb/siano/smsusb.cTue May 12 17:19:30 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsusb.cTue May 12 17:32:21 2009 +0300 @@ -65,14 +65,14 @@ static void smsusb_onresponse(struct urb struct smsusb_urb_t *surb = (struct smsusb_urb_t *) urb->context; struct smsusb_device_t *dev = surb->dev; - if (urb->status < 0) { - sms_err("error, urb status %d, %d bytes", + if (urb->status == -ESHUTDOWN) { + sms_err("error, urb status %d (-ESHUTDOWN), %d bytes", urb->status, urb->actual_length); return; } - if (urb->actual_length > 0) { - struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *) surb->cb->p; + if ((urb->actual_length > 0) && (urb->status == 0)) { + struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *)surb->cb->p; smsendian_handle_message_header(phdr); if (urb->actual_length >= phdr->msgLength) { @@ -111,7 +111,10 @@ static void smsusb_onresponse(struct urb "msglen %d actual %d", phdr->msgLength, urb->actual_length); } - } + } else + sms_err("error, urb status %d, %d bytes", + urb->status, urb->actual_length); + exit_and_resubmit: smsusb_submit_urb(dev, surb); -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0905_06] Siano: smsdvb - add big endian support
# HG changeset patch # User Uri Shkolnik # Date 1242139255 -10800 # Node ID 291604c1821496dd4acd1d5411f8ea3ae955fd2c # Parent ae0f17b305e7762643a9bc7f43c302c11f7b55b5 [0905_06] Siano: smsdvb - add big endian support From: Uri Shkolnik Add support for Siano protocol messages with big endian systems. Priority: normal Signed-off-by: Uri Shkolnik diff -r ae0f17b305e7 -r 291604c18214 linux/drivers/media/dvb/siano/smsdvb.c --- a/linux/drivers/media/dvb/siano/smsdvb.cTue May 12 17:32:21 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsdvb.cTue May 12 17:40:55 2009 +0300 @@ -23,6 +23,7 @@ along with this program. If not, see #include "smscoreapi.h" +#include "smsendian.h" #include "sms-cards.h" DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); @@ -59,6 +60,8 @@ static int smsdvb_onresponse(void *conte struct smsdvb_client_t *client = (struct smsdvb_client_t *) context; struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *)(((u8 *) cb->p) + cb->offset); + + smsendian_handle_rx_message((struct SmsMsgData_ST *) phdr); switch (phdr->msgType) { case MSG_SMS_DVBT_BDA_DATA: @@ -149,6 +152,7 @@ static int smsdvb_start_feed(struct dvb_ PidMsg.xMsgHeader.msgLength = sizeof(PidMsg); PidMsg.msgData[0] = feed->pid; + smsendian_handle_tx_message((struct SmsMsgHdr_ST *)&PidMsg); return smsclient_sendrequest(client->smsclient, &PidMsg, sizeof(PidMsg)); } @@ -169,6 +173,7 @@ static int smsdvb_stop_feed(struct dvb_d PidMsg.xMsgHeader.msgLength = sizeof(PidMsg); PidMsg.msgData[0] = feed->pid; + smsendian_handle_tx_message((struct SmsMsgHdr_ST *)&PidMsg); return smsclient_sendrequest(client->smsclient, &PidMsg, sizeof(PidMsg)); } @@ -177,7 +182,10 @@ static int smsdvb_sendrequest_and_wait(s void *buffer, size_t size, struct completion *completion) { - int rc = smsclient_sendrequest(client->smsclient, buffer, size); + int rc; + + smsendian_handle_tx_message((struct SmsMsgHdr_ST *)buffer); + rc = smsclient_sendrequest(client->smsclient, buffer, size); if (rc < 0) return rc; -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0905_07] Siano: smsdvb - use 'push' status mechanism
# HG changeset patch # User Uri Shkolnik # Date 1242142336 -10800 # Node ID 10143bda4ddae2b30af23adb15e536dc8bef7962 # Parent 291604c1821496dd4acd1d5411f8ea3ae955fd2c [0905_07] Siano: smsdvb - use 'push' status mechanism From: Uri Shkolnik This patch replace the old method of pulling the device status by sending "get_statistics" request, to push mode. This make status update much faster, and reduce various operation time (UHF scan now takes 15s instead of 2m). In order to make the change the following modification have been applied: 1) core header - update statistics headers. 2) dvb adapter - omit the statistics request, add handling of status indications. 3) core 'onresponse' - re-route messages addressed to other adapter to the dvb adapter. Priority: normal Signed-off-by: Uri Shkolnik diff -r 291604c18214 -r 10143bda4dda linux/drivers/media/dvb/siano/smscoreapi.c --- a/linux/drivers/media/dvb/siano/smscoreapi.cTue May 12 17:40:55 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.cTue May 12 18:32:16 2009 +0300 @@ -904,15 +904,11 @@ smscore_client_t *smscore_find_client(st * */ void smscore_onresponse(struct smscore_device_t *coredev, - struct smscore_buffer_t *cb) -{ - struct SmsMsgHdr_ST *phdr = - (struct SmsMsgHdr_ST *)((u8 *) cb->p + cb->offset); - struct smscore_client_t *client = - smscore_find_client(coredev, phdr->msgType, phdr->msgDstId); + struct smscore_buffer_t *cb) { + struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *) ((u8 *) cb->p + + cb->offset); + struct smscore_client_t *client; int rc = -EBUSY; - -#if 1 static unsigned long last_sample_time; /* = 0; */ static int data_total; /* = 0; */ unsigned long time_now = jiffies_to_msecs(jiffies); @@ -930,7 +926,16 @@ void smscore_onresponse(struct smscore_d } data_total += cb->size; -#endif + /* Do we need to re-route? */ + if ((phdr->msgType == MSG_SMS_HO_PER_SLICES_IND) || + (phdr->msgType == MSG_SMS_TRANSMISSION_IND)) { + if (coredev->mode == DEVICE_MODE_DVBT_BDA) + phdr->msgDstId = DVBT_BDA_CONTROL_MSG_ID; + } + + + client = smscore_find_client(coredev, phdr->msgType, phdr->msgDstId); + /* If no client registered for type & id, * check for control client where type is not registered */ if (client) diff -r 291604c18214 -r 10143bda4dda linux/drivers/media/dvb/siano/smscoreapi.h --- a/linux/drivers/media/dvb/siano/smscoreapi.hTue May 12 17:40:55 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.hTue May 12 18:32:16 2009 +0300 @@ -213,19 +213,15 @@ struct smscore_device_t { #define MSG_SMS_INIT_DEVICE_RES579 #define MSG_SMS_ADD_PID_FILTER_REQ 601 #define MSG_SMS_ADD_PID_FILTER_RES 602 -#define MSG_SMS_REMOVE_PID_FILTER_REQ 603 -#define MSG_SMS_REMOVE_PID_FILTER_RES 604 -#define MSG_SMS_DAB_CHANNEL607 -#define MSG_SMS_GET_PID_FILTER_LIST_REQ608 -#define MSG_SMS_GET_PID_FILTER_LIST_RES609 -#define MSG_SMS_GET_STATISTICS_REQ 615 -#define MSG_SMS_GET_STATISTICS_RES 616 +#define MSG_SMS_REMOVE_PID_FILTER_REQ 603 +#define MSG_SMS_REMOVE_PID_FILTER_RES 604 +#define MSG_SMS_DAB_CHANNEL607 +#define MSG_SMS_GET_PID_FILTER_LIST_REQ608 +#define MSG_SMS_GET_PID_FILTER_LIST_RES609 #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_STATISTICS_EX_REQ 653 -#define MSG_SMS_GET_STATISTICS_EX_RES 654 -#define MSG_SMS_SLEEP_RESUME_COMP_IND 655 +#define MSG_SMS_SET_ANTENNA_CONFIG_REQ 651 +#define MSG_SMS_SET_ANTENNA_CONFIG_RES 652 +#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_SWDOWNLOAD_TRIGGER_REQ 664 @@ -347,225 +343,202 @@ struct SmsFirmware_ST { u8 Payload[1]; }; -struct SMSHOSTLIB_STATISTICS_ST { - u32 Reserved; /* Reserved */ +/* Statistics information returned as response for + * SmsHostApiGetStatistics_Req */ +struct SMSHOSTLIB_STATISTICS_S { + u32 Reserved; /* Reserved */ /* Common parameters */ - u32 IsRfLocked; /* 0 - not locked, 1 - locked */ - u32 IsDemodLocked; /* 0 - not locked, 1 - locked */ - u32 IsExternalLNAO
[PATCH] [0905_08] Siano: smsdvb - move the dvb related included files
# HG changeset patch # User Uri Shkolnik # Date 1242142695 -10800 # Node ID 777b32ac3080215d26c35853ea41c1f8f992b70c # Parent 10143bda4ddae2b30af23adb15e536dc8bef7962 [0905_08] Siano: smsdvb - move the dvb related included files From: Uri Shkolnik This patch moves the DVB API related headers from the core, to the smbdvb (dvb adapter) which is the only component that uses these headers. Priority: normal Signed-off-by: Uri Shkolnik diff -r 10143bda4dda -r 777b32ac3080 linux/drivers/media/dvb/siano/smscoreapi.h --- a/linux/drivers/media/dvb/siano/smscoreapi.hTue May 12 18:32:16 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.hTue May 12 18:38:15 2009 +0300 @@ -34,13 +34,6 @@ along with this program. If not, see #include "compat.h" - -#ifdef SMS_DVB3_SUBSYS -#include "dmxdev.h" -#include "dvbdev.h" -#include "dvb_demux.h" -#include "dvb_frontend.h" -#endif #define kmutex_init(_p_) mutex_init(_p_) #define kmutex_lock(_p_) mutex_lock(_p_) diff -r 10143bda4dda -r 777b32ac3080 linux/drivers/media/dvb/siano/smsdvb.c --- a/linux/drivers/media/dvb/siano/smsdvb.cTue May 12 18:32:16 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsdvb.cTue May 12 18:38:15 2009 +0300 @@ -21,6 +21,11 @@ along with this program. If not, see #include + +#include "dmxdev.h" +#include "dvbdev.h" +#include "dvb_demux.h" +#include "dvb_frontend.h" #include "smscoreapi.h" #include "smsendian.h" -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0905_09] Siano: smsdvb - small type fix
# HG changeset patch # User Uri Shkolnik # Date 1242143183 -10800 # Node ID 179c1575678e08b5626bb918ef300b3ecead633c # Parent 777b32ac3080215d26c35853ea41c1f8f992b70c [0905_09] Siano: smsdvb - small type fix From: Uri Shkolnik Fix type at the module description Priority: normal Signed-off-by: Uri Shkolnik diff -r 777b32ac3080 -r 179c1575678e linux/drivers/media/dvb/siano/smsdvb.c --- a/linux/drivers/media/dvb/siano/smsdvb.cTue May 12 18:38:15 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsdvb.cTue May 12 18:46:23 2009 +0300 @@ -601,5 +601,5 @@ void smsdvb_unregister(void) } MODULE_DESCRIPTION("SMS DVB subsystem adaptation module"); -MODULE_AUTHOR("Siano Mobile Silicon, INC. (u...@siano-ms.com)"); +MODULE_AUTHOR("Siano Mobile Silicon, Inc. (u...@siano-ms.com)"); MODULE_LICENSE("GPL"); -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0905_10] Siano - perform clean multi-modules build
# HG changeset patch # User Uri Shkolnik # Date 1242323350 -10800 # Node ID f93a86c6f9785cb60e015e811ddfca6850135887 # Parent 0018ed9bbca31e76a17ead56e2e953c325c7cf3f [0905_10] Siano - perform clean multi-modules build From: Uri Shkolnik Clean up the multi dynamic module build, so no warning/errors will occur either with clean kernel git or Siano's repository. Priority: normal Signed-off-by: Uri Shkolnik diff -r 0018ed9bbca3 -r f93a86c6f978 linux/drivers/media/dvb/siano/Kconfig --- a/linux/drivers/media/dvb/siano/Kconfig Tue May 12 16:13:13 2009 + +++ b/linux/drivers/media/dvb/siano/Kconfig Thu May 14 20:49:10 2009 +0300 @@ -2,25 +2,74 @@ # Siano Mobile Silicon Digital TV device configuration # -config DVB_SIANO_SMS1XXX - tristate "Siano SMS1XXX USB dongle support" - depends on DVB_CORE && USB +config SMS_SIANO_MDTV + tristate "Siano SMS1xxx based MDTV receiver" + default m ---help--- - Choose Y here if you have a USB dongle with a SMS1XXX chipset. + Choose Y or M here if you have MDTV receiver with a Siano chipset. - To compile this driver as a module, choose M here: the - module will be called sms1xxx. + To compile this driver as a module, choose M here + (The modules will be called smsmdtv). -config DVB_SIANO_SMS1XXX_SMS_IDS - bool "Enable support for Siano Mobile Silicon default USB IDs" - depends on DVB_SIANO_SMS1XXX - default y + Note: All dependents, if selected, will be part of this module. + + Further documentation on this driver can be found on the WWW at http://www.siano-ms.com/ + +if SMS_SIANO_MDTV +menu "Siano module components" + +# Kernel sub systems support +config SMS_DVB3_SUBSYS + tristate "DVB v.3 Subsystem support" + depends on DVB_CORE + default m if DVB_CORE ---help--- - Choose Y here if you have a USB dongle with a SMS1XXX chipset - that uses Siano Mobile Silicon's default usb vid:pid. + Choose if you would like to have DVB v.3 kernel sub-system support. - Choose N here if you would prefer to use Siano's external driver. +#config SMS_DVB5_S2API_SUBSYS +# tristate "DVB v.5 (S2 API) Subsystem support" +# default n +# ---help--- +# Choose if you would like to have DVB v.5 (S2 API) kernel sub-system support. +# +#config SMS_HOSTLIB_SUBSYS +# tristate "Host Library Subsystem support" +# default n +# ---help--- +# Choose if you would like to have Siano's host library kernel sub-system support. +# +#if SMS_HOSTLIB_SUBSYS +# +#config SMS_NET_SUBSYS +# tristate "Siano Network Adapter" +# depends on SMS_HOSTLIB_SUBSYS +# default n +# ---help--- +# Choose if you would like to have Siano's network adapter support. +#endif # SMS_HOSTLIB_SUBSYS - Further documentation on this driver can be found on the WWW at - <http://www.siano-ms.com/>. +# Hardware interfaces support +config SMS_USB_DRV + tristate "USB interface support" + depends on USB + default m if USB + ---help--- + Choose if you would like to have Siano's support for USB interface + +config SMS_SDIO_DRV + tristate "SDIO interface support" + depends on MMC + default m if MMC + ---help--- + Choose if you would like to have Siano's support for SDIO interface + +#config SMS_SPI_PXA310_DRV +# tristate "PXA 310 SPI interface support" +# depends on ARM && ARCH_PXA && MACH_ZYLONITE && PXA_SSP && SPI +# default m if ARM && ARCH_PXA && MACH_ZYLONITE && PXA_SSP && SPI +# ---help--- +# Choose if you would like to have Siano's support for PXA 310 SPI interface + +endmenu +endif # SMS_SIANO_MDTV diff -r 0018ed9bbca3 -r f93a86c6f978 linux/drivers/media/dvb/siano/Makefile --- a/linux/drivers/media/dvb/siano/MakefileTue May 12 16:13:13 2009 + +++ b/linux/drivers/media/dvb/siano/MakefileThu May 14 20:49:10 2009 +0300 @@ -1,8 +1,9 @@ sms1xxx-objs := smscoreapi.o sms-cards.o -sms1xxx-objs := smscoreapi.o sms-cards.o smsendian.o +smsmdtv-objs := smscoreapi.o sms-cards.o smsendian.o -obj-$(CONFIG_DVB_SIANO_SMS1XXX) += sms1xxx.o -obj-$(CONFIG_DVB_SIANO_SMS1XXX) += smsusb.o -obj-$(CONFIG_DVB_SIANO_SMS1XXX) += smsdvb.o +obj-$(CONFIG_SMS_SIANO_MDTV) += smsmdtv.o +obj-$(CONFIG_SMS_USB_DRV) += smsusb.o +obj-$(CONFIG_SMS_DVB3_SUBSYS) += smsdvb.o +#obj-$(CONFIG_SMS_SDIO_DRV) += smssdio.o EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core diff -r 0018ed9bbca3 -r f93a86c6f978 linux/drivers/media/dvb/siano/smsendian.h --- a/linux/drivers/media/dvb/siano/smsendian.h Tue May 12 16:13:13 2009 + +++ b/linux/drivers/media/dvb/siano/smsendian.h Thu May 14 20:49:10 20
[PATCH] [0905_11] Siano: smsusb - add big endien support
# HG changeset patch # User Uri Shkolnik # Date 1242323662 -10800 # Node ID 483a3656a227acbceb26da96b02bebd0058a3961 # Parent f93a86c6f9785cb60e015e811ddfca6850135887 [0905_11] Siano: smsusb - add big endien support From: Uri Shkolnik Add support for big endien target hosts, which use USB interface. Priority: normal Signed-off-by: Uri Shkolnik diff -r f93a86c6f978 -r 483a3656a227 linux/drivers/media/dvb/siano/smsusb.c --- a/linux/drivers/media/dvb/siano/smsusb.cThu May 14 20:49:10 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsusb.cThu May 14 20:54:22 2009 +0300 @@ -78,6 +78,7 @@ static void smsusb_onresponse(struct urb if ((urb->actual_length > 0) && (urb->status == 0)) { struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *)surb->cb->p; + smsendian_handle_message_header(phdr); if (urb->actual_length >= phdr->msgLength) { surb->cb->size = phdr->msgLength; -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0905_12] Siano: move dvb-api headers' includes to dvb adapter
# HG changeset patch # User Uri Shkolnik # Date 1242323970 -10800 # Node ID cc2c1513b97c4247614fadcab0a61f3979837d86 # Parent 483a3656a227acbceb26da96b02bebd0058a3961 [0905_12] Siano: move dvb-api headers' includes to dvb adapter From: Uri Shkolnik Move the DVB-API v3 headers' include list from the core component to the smsdvb (DVB adapter) which is the only one that uses them. Priority: normal Signed-off-by: Uri Shkolnik diff -r 483a3656a227 -r cc2c1513b97c linux/drivers/media/dvb/siano/smscoreapi.h --- a/linux/drivers/media/dvb/siano/smscoreapi.hThu May 14 20:54:22 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.hThu May 14 20:59:30 2009 +0300 @@ -35,13 +35,6 @@ along with this program. If not, see #include "compat.h" -#define SMS_DVB3_SUBSYS -#ifdef SMS_DVB3_SUBSYS -#include "dmxdev.h" -#include "dvbdev.h" -#include "dvb_demux.h" -#include "dvb_frontend.h" -#endif #define kmutex_init(_p_) mutex_init(_p_) #define kmutex_lock(_p_) mutex_lock(_p_) diff -r 483a3656a227 -r cc2c1513b97c linux/drivers/media/dvb/siano/smsdvb.c --- a/linux/drivers/media/dvb/siano/smsdvb.cThu May 14 20:54:22 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsdvb.cThu May 14 20:59:30 2009 +0300 @@ -21,6 +21,11 @@ along with this program. If not, see #include + +#include "dmxdev.h" +#include "dvbdev.h" +#include "dvb_demux.h" +#include "dvb_frontend.h" #include "smscoreapi.h" #include "smsendian.h" -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0905_14] Siano: USB - move the device id table to the cards module
# HG changeset patch # User Uri Shkolnik # Date 1242325466 -10800 # Node ID fe5ecbb828340406923d06b4ea93a210aafb5c7e # Parent 5a6de44c39c9198bc1af79f5901dc769690885de [0905_14] Siano: USB - move the device id table to the cards module From: Uri Shkolnik The card modules is the component which handles various targets, so the IDs table should reside within it. Priority: normal Signed-off-by: Uri Shkolnik diff -r 5a6de44c39c9 -r fe5ecbb82834 linux/drivers/media/dvb/siano/sms-cards.c --- a/linux/drivers/media/dvb/siano/sms-cards.c Thu May 14 21:14:46 2009 +0300 +++ b/linux/drivers/media/dvb/siano/sms-cards.c Thu May 14 21:24:26 2009 +0300 @@ -18,6 +18,51 @@ */ #include "sms-cards.h" + +struct usb_device_id smsusb_id_table[] = { + { USB_DEVICE(0x187f, 0x0010), + .driver_info = SMS1XXX_BOARD_SIANO_STELLAR }, + { USB_DEVICE(0x187f, 0x0100), + .driver_info = SMS1XXX_BOARD_SIANO_STELLAR }, + { USB_DEVICE(0x187f, 0x0200), + .driver_info = SMS1XXX_BOARD_SIANO_NOVA_A }, + { USB_DEVICE(0x187f, 0x0201), + .driver_info = SMS1XXX_BOARD_SIANO_NOVA_B }, + { USB_DEVICE(0x187f, 0x0300), + .driver_info = SMS1XXX_BOARD_SIANO_VEGA }, + { USB_DEVICE(0x2040, 0x1700), + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_CATAMOUNT }, + { USB_DEVICE(0x2040, 0x1800), + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_OKEMO_A }, + { USB_DEVICE(0x2040, 0x1801), + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_OKEMO_B }, + { USB_DEVICE(0x2040, 0x2000), + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD }, + { USB_DEVICE(0x2040, 0x2009), + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2 }, + { USB_DEVICE(0x2040, 0x200a), + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD }, + { USB_DEVICE(0x2040, 0x2010), + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD }, + { USB_DEVICE(0x2040, 0x2011), + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD }, + { USB_DEVICE(0x2040, 0x2019), + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD }, + { USB_DEVICE(0x2040, 0x5500), + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, + { USB_DEVICE(0x2040, 0x5510), + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, + { USB_DEVICE(0x2040, 0x5520), + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, + { USB_DEVICE(0x2040, 0x5530), + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, + { USB_DEVICE(0x2040, 0x5580), + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, + { USB_DEVICE(0x2040, 0x5590), + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, + { } /* Terminating entry */ +}; +MODULE_DEVICE_TABLE(usb, smsusb_id_table); static int sms_dbg; module_param_named(cards_dbg, sms_dbg, int, 0644); diff -r 5a6de44c39c9 -r fe5ecbb82834 linux/drivers/media/dvb/siano/sms-cards.h --- a/linux/drivers/media/dvb/siano/sms-cards.h Thu May 14 21:14:46 2009 +0300 +++ b/linux/drivers/media/dvb/siano/sms-cards.h Thu May 14 21:24:26 2009 +0300 @@ -45,6 +45,8 @@ struct sms_board { struct sms_board *sms_get_board(int id); +extern struct usb_device_id smsusb_id_table[]; + int sms_board_setup(struct smscore_device_t *coredev); #define SMS_LED_OFF 0 diff -r 5a6de44c39c9 -r fe5ecbb82834 linux/drivers/media/dvb/siano/smsusb.c --- a/linux/drivers/media/dvb/siano/smsusb.cThu May 14 21:14:46 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsusb.cThu May 14 21:24:26 2009 +0300 @@ -488,53 +488,6 @@ static int smsusb_resume(struct usb_inte return 0; } -struct usb_device_id smsusb_id_table[] = { -#ifdef CONFIG_DVB_SIANO_SMS1XXX_SMS_IDS - { USB_DEVICE(0x187f, 0x0010), - .driver_info = SMS1XXX_BOARD_SIANO_STELLAR }, - { USB_DEVICE(0x187f, 0x0100), - .driver_info = SMS1XXX_BOARD_SIANO_STELLAR }, - { USB_DEVICE(0x187f, 0x0200), - .driver_info = SMS1XXX_BOARD_SIANO_NOVA_A }, - { USB_DEVICE(0x187f, 0x0201), - .driver_info = SMS1XXX_BOARD_SIANO_NOVA_B }, - { USB_DEVICE(0x187f, 0x0300), - .driver_info = SMS1XXX_BOARD_SIANO_VEGA }, -#endif - { USB_DEVICE(0x2040, 0x1700), - .driver_info = SMS1XXX_BOARD_HAUPPAUGE_CATAMOUNT }, - { USB_DEVICE(0x2040, 0x1800), - .driver_info = SMS1XXX_BOARD_HAUPPAUGE_OKEMO_A }, - { USB_DEVICE(0x2040, 0x1801), - .driver_info = SMS1XXX_BOARD_HAUPPAUGE_OKEMO_B }, - { USB_DEVICE(0x2040, 0x2000), - .driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD }, - { USB_DEVICE(0x2040, 0x2009), - .driver_info = SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2 }, - { USB_DEVICE(0x2040, 0x200a), - .d
[PATCH] [0905_15] Siano: smscards - add two more targets
# HG changeset patch # User Uri Shkolnik # Date 1242325845 -10800 # Node ID 0f7ae5e8b09ff516f35f299e81aacbba237ba038 # Parent fe5ecbb828340406923d06b4ea93a210aafb5c7e [0905_15] Siano: smscards - add two more targets From: Uri Shkolnik Add two more target to the cards, Nice and Venice Priority: normal Signed-off-by: Uri Shkolnik diff -r fe5ecbb82834 -r 0f7ae5e8b09f linux/drivers/media/dvb/siano/sms-cards.c --- a/linux/drivers/media/dvb/siano/sms-cards.c Thu May 14 21:24:26 2009 +0300 +++ b/linux/drivers/media/dvb/siano/sms-cards.c Thu May 14 21:30:45 2009 +0300 @@ -60,8 +60,13 @@ struct usb_device_id smsusb_id_table[] = .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, { USB_DEVICE(0x2040, 0x5590), .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, - { } /* Terminating entry */ -}; + { USB_DEVICE(0x187f, 0x0202), + .driver_info = SMS1XXX_BOARD_SIANO_NICE }, + { USB_DEVICE(0x187f, 0x0301), + .driver_info = SMS1XXX_BOARD_SIANO_VENICE }, + { } /* Terminating entry */ + }; + MODULE_DEVICE_TABLE(usb, smsusb_id_table); static int sms_dbg; diff -r fe5ecbb82834 -r 0f7ae5e8b09f linux/drivers/media/dvb/siano/sms-cards.h --- a/linux/drivers/media/dvb/siano/sms-cards.h Thu May 14 21:24:26 2009 +0300 +++ b/linux/drivers/media/dvb/siano/sms-cards.h Thu May 14 21:30:45 2009 +0300 @@ -34,6 +34,8 @@ #define SMS1XXX_BOARD_HAUPPAUGE_WINDHAM 8 #define SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD 9 #define SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2 10 +#define SMS1XXX_BOARD_SIANO_NICE 11 +#define SMS1XXX_BOARD_SIANO_VENICE 12 struct sms_board { enum sms_device_type_st type; -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0905_16] Siano: smscards - add gpio look-up table
# HG changeset patch # User Uri Shkolnik # Date 1242326150 -10800 # Node ID dd2de98ad42c1328d24e7bf90903fab1e1368b0b # Parent 0f7ae5e8b09ff516f35f299e81aacbba237ba038 [0905_16] Siano: smscards - add gpio look-up table From: Uri Shkolnik Add gpio look-up table for various requirements, any target may select any gpio and assign it to a function Priority: normal Signed-off-by: Uri Shkolnik diff -r 0f7ae5e8b09f -r dd2de98ad42c linux/drivers/media/dvb/siano/sms-cards.h --- a/linux/drivers/media/dvb/siano/sms-cards.h Thu May 14 21:30:45 2009 +0300 +++ b/linux/drivers/media/dvb/siano/sms-cards.h Thu May 14 21:35:50 2009 +0300 @@ -37,9 +37,43 @@ #define SMS1XXX_BOARD_SIANO_NICE 11 #define SMS1XXX_BOARD_SIANO_VENICE 12 +struct sms_board_gpio_cfg { + int lna_vhf_exist; + int lna_vhf_ctrl; + int lna_uhf_exist; + int lna_uhf_ctrl; + int lna_uhf_d_ctrl; + int lna_sband_exist; + int lna_sband_ctrl; + int lna_sband_d_ctrl; + int foreign_lna0_ctrl; + int foreign_lna1_ctrl; + int foreign_lna2_ctrl; + int rf_switch_vhf; + int rf_switch_uhf; + int rf_switch_sband; + int leds_power; + int led0; + int led1; + int led2; + int led3; + int led4; + int ir; + int eeprom_wp; + int mrc_sense; + int mrc_pdn_resetn; + int mrc_gp0; /* mrcs spi int */ + int mrc_gp1; + int mrc_gp2; + int mrc_gp3; + int mrc_gp4; + int host_spi_gsp_ts_int; +}; + struct sms_board { enum sms_device_type_st type; char *name, *fw[DEVICE_MODE_MAX]; + struct sms_board_gpio_cfg board_cfg; /* gpios */ int led_power, led_hi, led_lo, lna_ctrl, rf_switch; -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0905_17] Siano: bind infra-red component
# HG changeset patch # User Uri Shkolnik # Date 1242327012 -10800 # Node ID 438275c8cf1084ed8983b084a8d4d7ef03c05022 # Parent dd2de98ad42c1328d24e7bf90903fab1e1368b0b [0905_17] Siano: bind infra-red component From: Uri Shkolnik Add the infra-red to the makefile and declare the assignment in the cards components. Priority: normal Signed-off-by: Uri Shkolnik diff -r dd2de98ad42c -r 438275c8cf10 linux/drivers/media/dvb/siano/Makefile --- a/linux/drivers/media/dvb/siano/MakefileThu May 14 21:35:50 2009 +0300 +++ b/linux/drivers/media/dvb/siano/MakefileThu May 14 21:50:12 2009 +0300 @@ -1,4 +1,4 @@ smsmdtv-objs := smscoreapi.o sms-cards.o -smsmdtv-objs := smscoreapi.o sms-cards.o smsendian.o +smsmdtv-objs := smscoreapi.o sms-cards.o smsendian.o smsir.o obj-$(CONFIG_SMS_SIANO_MDTV) += smsmdtv.o obj-$(CONFIG_SMS_USB_DRV) += smsusb.o diff -r dd2de98ad42c -r 438275c8cf10 linux/drivers/media/dvb/siano/sms-cards.c --- a/linux/drivers/media/dvb/siano/sms-cards.c Thu May 14 21:35:50 2009 +0300 +++ b/linux/drivers/media/dvb/siano/sms-cards.c Thu May 14 21:50:12 2009 +0300 @@ -18,6 +18,7 @@ */ #include "sms-cards.h" +#include "smsir.h" struct usb_device_id smsusb_id_table[] = { { USB_DEVICE(0x187f, 0x0010), diff -r dd2de98ad42c -r 438275c8cf10 linux/drivers/media/dvb/siano/sms-cards.h --- a/linux/drivers/media/dvb/siano/sms-cards.h Thu May 14 21:35:50 2009 +0300 +++ b/linux/drivers/media/dvb/siano/sms-cards.h Thu May 14 21:50:12 2009 +0300 @@ -22,6 +22,7 @@ #include #include "smscoreapi.h" +#include "smsir.h" #define SMS_BOARD_UNKNOWN 0 #define SMS1XXX_BOARD_SIANO_STELLAR 1 @@ -74,6 +75,7 @@ struct sms_board { enum sms_device_type_st type; char *name, *fw[DEVICE_MODE_MAX]; struct sms_board_gpio_cfg board_cfg; + enum ir_kb_type ir_kb_type; /* gpios */ int led_power, led_hi, led_lo, lna_ctrl, rf_switch; @@ -82,6 +84,7 @@ struct sms_board *sms_get_board(int id); struct sms_board *sms_get_board(int id); extern struct usb_device_id smsusb_id_table[]; +extern struct smscore_device_t *coredev; int sms_board_setup(struct smscore_device_t *coredev); diff -r dd2de98ad42c -r 438275c8cf10 linux/drivers/media/dvb/siano/smscoreapi.h --- a/linux/drivers/media/dvb/siano/smscoreapi.hThu May 14 21:35:50 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.hThu May 14 21:50:12 2009 +0300 @@ -35,6 +35,7 @@ along with this program. If not, see #include "compat.h" +#include "smsir.h" #define kmutex_init(_p_) mutex_init(_p_) #define kmutex_lock(_p_) mutex_lock(_p_) @@ -168,7 +169,7 @@ struct smscore_device_t { u32 fw_buf_size; /* Infrared (IR) */ - /* struct ir_t ir; */ + struct ir_t ir; int led_state; }; diff -r dd2de98ad42c -r 438275c8cf10 linux/drivers/media/dvb/siano/smsir.c --- a/linux/drivers/media/dvb/siano/smsir.c Thu May 14 21:35:50 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsir.c Thu May 14 21:50:12 2009 +0300 @@ -99,7 +99,7 @@ static void sms_ir_rc5_event(struct smsc bool toggle_changed; u16 keycode; - sms_info("IR RC5 word: address %d, command %d, toggle %d", + sms_log("IR RC5 word: address %d, command %d, toggle %d", addr, cmd, toggle); toggle_changed = ir_toggle != toggle; @@ -118,7 +118,7 @@ static void sms_ir_rc5_event(struct smsc (keycode != KEY_VOLUMEUP && keycode != KEY_VOLUMEDOWN)) return; /* accept only repeated volume, reject other keys */ - sms_info("kernel input keycode (from ir) %d", keycode); + sms_log("kernel input keycode (from ir) %d", keycode); input_report_key(coredev->ir.input_dev, keycode, 1); input_sync(coredev->ir.input_dev); @@ -147,7 +147,7 @@ static u32 ir_rc5_decode(unsigned int co break; case 3: /* dprintk(1, "ir-common: ir_rc5_decode(%x) bad code\n", org_code);*/ - sms_info("bad code"); + sms_log("bad code"); return 0; } } @@ -175,7 +175,7 @@ static void sms_rc5_parse_word(struct sm RC5_PUSH_BIT(rc5_word, (ir_word>>i)&1, j) rc5_word = ir_rc5_decode(rc5_word); - /* sms_info("temp = 0x%x, rc5_code = 0x%x", ir_word, rc5_word); */ + /* sms_log("temp = 0x%x, rc5_code = 0x%x", ir_word, rc5_word); */ sms_ir_rc5_event(coredev, RC5_TOGGLE(rc5_word), @@ -210,11 +210,11 @@ static void sms_rc5_accumulate_bits(stru if (ir_pos == RC5_WORD_LEN) sms_rc5_parse_word(coredev); else if (ir_pos) /* timeout within a word */
[PATCH] [0905_18] Siano: IR - add SMS IR protocol
# HG changeset patch # User Uri Shkolnik # Date 1242327653 -10800 # Node ID fdfd103426e8aeabb18aaa1e117238e3ca450d0e # Parent 438275c8cf1084ed8983b084a8d4d7ef03c05022 [0905_18] Siano: IR - add SMS IR protocol From: Uri Shkolnik Add the SMS Infra-red protocol handling to the core component. Priority: normal Signed-off-by: Uri Shkolnik diff -r 438275c8cf10 -r fdfd103426e8 linux/drivers/media/dvb/siano/smscoreapi.c --- a/linux/drivers/media/dvb/siano/smscoreapi.cThu May 14 21:50:12 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.cThu May 14 22:00:53 2009 +0300 @@ -34,6 +34,7 @@ #include "smscoreapi.h" #include "smsendian.h" #include "sms-cards.h" +#include "smsir.h" static int sms_dbg; module_param_named(debug, sms_dbg, int, 0644); @@ -349,6 +350,7 @@ int smscore_register_device(struct smsde init_completion(&dev->init_device_done); init_completion(&dev->reload_start_done); init_completion(&dev->resume_done); + init_completion(&dev->ir_init_done); /* alloc common buffer */ dev->common_buffer_size = params->buffer_size * params->num_buffers; @@ -404,6 +406,71 @@ int smscore_register_device(struct smsde } EXPORT_SYMBOL_GPL(smscore_register_device); + +static int smscore_sendrequest_and_wait(struct smscore_device_t *coredev, + void *buffer, size_t size, struct completion *completion) { + int rc = coredev->sendrequest_handler(coredev->context, buffer, size); + if (rc < 0) { + sms_info("sendrequest returned error %d", rc); + return rc; + } + + return wait_for_completion_timeout(completion, + msecs_to_jiffies(SMS_PROTOCOL_MAX_RAOUNDTRIP_MS)) ? + 0 : -ETIME; +} + +/** + * Starts & enables IR operations + * + * @return 0 on success, < 0 on error. + */ +static int smscore_init_ir(struct smscore_device_t *coredev) +{ + int ir_io; + int rc; + void *buffer; + + coredev->ir.input_dev = NULL; + ir_io = sms_get_board(smscore_get_board_id(coredev))->board_cfg.ir; + if (ir_io) {/* only if IR port exist we use IR sub-module */ + sms_info("IR loading"); + rc = sms_ir_init(coredev); + + if (rc != 0) + sms_err("Error initialization DTV IR sub-module"); + else { + buffer = kmalloc(sizeof(struct SmsMsgData_ST2) + + SMS_DMA_ALIGNMENT, + GFP_KERNEL | GFP_DMA); + if (buffer) { + struct SmsMsgData_ST2 *msg = + (struct SmsMsgData_ST2 *) + SMS_ALIGN_ADDRESS(buffer); + + SMS_INIT_MSG(&msg->xMsgHeader, + MSG_SMS_START_IR_REQ, + sizeof(struct SmsMsgData_ST2)); + msg->msgData[0] = coredev->ir.controller; + msg->msgData[1] = coredev->ir.timeout; + + smsendian_handle_tx_message( + (struct SmsMsgHdr_ST2 *)msg); + rc = smscore_sendrequest_and_wait(coredev, msg, + msg->xMsgHeader. msgLength, + &coredev->ir_init_done); + + kfree(buffer); + } else + sms_err + ("Sending IR initialization message failed"); + } + } else + sms_info("IR port has not been detected"); + + return 0; +} + /** * sets initial device mode and notifies client hotplugs that device is ready * @@ -424,6 +491,7 @@ int smscore_start_device(struct smscore_ kmutex_lock(&g_smscore_deviceslock); rc = smscore_notify_callbacks(coredev, coredev->device, 1); + smscore_init_ir(coredev); sms_info("device %p started, rc %d", coredev, rc); @@ -433,20 +501,6 @@ int smscore_start_device(struct smscore_ } EXPORT_SYMBOL_GPL(smscore_start_device); -static int smscore_sendrequest_and_wait(struct smscore_device_t *coredev, - void *buffer, size_t size, - struct completion *completion) -{ - int rc = coredev->sendrequest_handler(coredev->context, buffer, size); - if (rc < 0) { - sms_info("sendrequest returned error %d", rc); - return rc; - } - - return wait_for_
[PATCH] [0905_19] Siano: smscards - fix wrong firmware assignment
# HG changeset patch # User Uri Shkolnik # Date 1242327843 -10800 # Node ID ccbe8d7a70064b1552f2034b958551b8fc294d8e # Parent fdfd103426e8aeabb18aaa1e117238e3ca450d0e [0905_19] Siano: smscards - fix wrong firmware assignment From: Uri Shkolnik Remove wrong firmware assignments for Nova, Stellar Priority: normal Signed-off-by: Uri Shkolnik diff -r fdfd103426e8 -r ccbe8d7a7006 linux/drivers/media/dvb/siano/sms-cards.c --- a/linux/drivers/media/dvb/siano/sms-cards.c Thu May 14 22:00:53 2009 +0300 +++ b/linux/drivers/media/dvb/siano/sms-cards.c Thu May 14 22:04:03 2009 +0300 @@ -81,17 +81,14 @@ static struct sms_board sms_boards[] = { [SMS1XXX_BOARD_SIANO_STELLAR] = { .name = "Siano Stellar Digital Receiver", .type = SMS_STELLAR, - .fw[DEVICE_MODE_DVBT_BDA] = "sms1xxx-stellar-dvbt-01.fw", }, [SMS1XXX_BOARD_SIANO_NOVA_A] = { .name = "Siano Nova A Digital Receiver", .type = SMS_NOVA_A0, - .fw[DEVICE_MODE_DVBT_BDA] = "sms1xxx-nova-a-dvbt-01.fw", }, [SMS1XXX_BOARD_SIANO_NOVA_B] = { .name = "Siano Nova B Digital Receiver", .type = SMS_NOVA_B0, - .fw[DEVICE_MODE_DVBT_BDA] = "sms1xxx-nova-b-dvbt-01.fw", }, [SMS1XXX_BOARD_SIANO_VEGA] = { .name = "Siano Vega Digital Receiver", -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0905_20] Siano: smscards - add table entities to new cards
# HG changeset patch # User Uri Shkolnik # Date 1242328012 -10800 # Node ID 9341c85c499e5052022ffd4ad154e912bffabe59 # Parent ccbe8d7a70064b1552f2034b958551b8fc294d8e [0905_20] Siano: smscards - add table entities to new cards From: Uri Shkolnik Add new board descriptions to table, for Venice and Vega Priority: normal Signed-off-by: Uri Shkolnik diff -r ccbe8d7a7006 -r 9341c85c499e linux/drivers/media/dvb/siano/sms-cards.c --- a/linux/drivers/media/dvb/siano/sms-cards.c Thu May 14 22:04:03 2009 +0300 +++ b/linux/drivers/media/dvb/siano/sms-cards.c Thu May 14 22:06:52 2009 +0300 @@ -129,6 +129,16 @@ static struct sms_board sms_boards[] = { .type = SMS_NOVA_B0, .fw[DEVICE_MODE_DVBT_BDA] = "sms1xxx-hcw-55xxx-dvbt-02.fw", .lna_ctrl = -1, + }, + [SMS1XXX_BOARD_SIANO_NICE] = { + /* 11 */ + .name = "Siano Nice Digital Receiver", + .type = SMS_NOVA_B0, + }, + [SMS1XXX_BOARD_SIANO_VENICE] = { + /* 12 */ + .name = "Siano Venice Digital Receiver", + .type = SMS_VEGA, }, }; -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0905_22] Siano: smscore - fix bug in gpio implementation
# HG changeset patch # User Uri Shkolnik # Date 1242329318 -10800 # Node ID 8b645aa2ab13f22b8d4dcd8e6353fce2c976cd34 # Parent 71c60eec8001438fee7e9f2e220a101576d6a219 [0905_22] Siano: smscore - fix bug in gpio implementation From: Uri Shkolnik Old implementation code was wrong. The correct code has been submmited. (old code bug may cause chip-set failure and bad reception experiance) Priority: normal Signed-off-by: Uri Shkolnik diff -r 71c60eec8001 -r 8b645aa2ab13 linux/drivers/media/dvb/siano/sms-cards.c --- a/linux/drivers/media/dvb/siano/sms-cards.c Thu May 14 22:13:13 2009 +0300 +++ b/linux/drivers/media/dvb/siano/sms-cards.c Thu May 14 22:28:38 2009 +0300 @@ -160,11 +160,11 @@ static int sms_set_gpio(struct smscore_d int lvl, ret; u32 gpio; struct smscore_gpio_config gpioconfig = { - .direction= SMS_GPIO_DIRECTION_OUTPUT, - .pullupdown = SMS_GPIO_PULLUPDOWN_NONE, - .inputcharacteristics = SMS_GPIO_INPUTCHARACTERISTICS_NORMAL, - .outputslewrate = SMS_GPIO_OUTPUTSLEWRATE_FAST, - .outputdriving= SMS_GPIO_OUTPUTDRIVING_4mA, + .Direction= SMS_GPIO_DIRECTION_OUTPUT, + .PullUpDown = SMS_GPIO_PULLUPDOWN_NONE, + .InputCharacteristics = SMS_GPIO_INPUTCHARACTERISTICS_NORMAL, + .OutputSlewRate = SMS_GPIO_OUTPUTSLEWRATE_FAST, + .OutputDriving= SMS_GPIO_OUTPUTDRIVING_4mA, }; if (pin == 0) diff -r 71c60eec8001 -r 8b645aa2ab13 linux/drivers/media/dvb/siano/smscoreapi.c --- a/linux/drivers/media/dvb/siano/smscoreapi.cThu May 14 22:13:13 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.cThu May 14 22:28:38 2009 +0300 @@ -35,6 +35,8 @@ #include "smsendian.h" #include "sms-cards.h" #include "smsir.h" + +#define MAX_GPIO_PIN_NUMBER31 static int sms_dbg; module_param_named(debug, sms_dbg, int, 0644); @@ -350,6 +352,9 @@ int smscore_register_device(struct smsde init_completion(&dev->init_device_done); init_completion(&dev->reload_start_done); init_completion(&dev->resume_done); + init_completion(&dev->gpio_configuration_done); + init_completion(&dev->gpio_set_level_done); + init_completion(&dev->gpio_get_level_done); init_completion(&dev->ir_init_done); /* alloc common buffer */ @@ -1045,6 +1050,23 @@ void smscore_onresponse(struct smscore_d case MSG_SMS_SLEEP_RESUME_COMP_IND: complete(&coredev->resume_done); break; + case MSG_SMS_GPIO_CONFIG_EX_RES: + sms_debug("MSG_SMS_GPIO_CONFIG_EX_RES"); + complete(&coredev->gpio_configuration_done); + break; + case MSG_SMS_GPIO_SET_LEVEL_RES: + sms_debug("MSG_SMS_GPIO_SET_LEVEL_RES"); + complete(&coredev->gpio_set_level_done); + break; + case MSG_SMS_GPIO_GET_LEVEL_RES: + { + u32 *msgdata = (u32 *) phdr; + coredev->gpio_get_res = msgdata[1]; + sms_debug("MSG_SMS_GPIO_GET_LEVEL_RES gpio level %d", + coredev->gpio_get_res); + complete(&coredev->gpio_get_level_done); + break; + } case MSG_SMS_START_IR_RES: complete(&coredev->ir_init_done); break; @@ -1313,74 +1335,235 @@ static int smscore_map_common_buffer(str } #endif -int smscore_configure_gpio(struct smscore_device_t *coredev, u32 pin, - struct smscore_gpio_config *pinconfig) -{ - struct { - struct SmsMsgHdr_ST hdr; - u32 data[6]; - } msg; +static int GetGpioPinParams(u32 PinNum, u32 *pTranslatedPinNum, + u32 *pGroupNum, u32 *pGroupCfg) { - if (coredev->device_flags & SMS_DEVICE_FAMILY2) { - msg.hdr.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; - msg.hdr.msgDstId = HIF_TASK; - msg.hdr.msgFlags = 0; - msg.hdr.msgType = MSG_SMS_GPIO_CONFIG_EX_REQ; - msg.hdr.msgLength = sizeof(msg); + *pGroupCfg = 1; - msg.data[0] = pin; - msg.data[1] = pinconfig->pullupdown; + if (PinNum >= 0 && PinNum <= 1) { + *pTranslatedPinNum = 0; + *pGroupNum = 9; + *pGroupCfg = 2; + } else if (PinNum >= 2 && PinNum <= 6) { + *pTranslatedPinNum = 2; + *pGroupNum = 0; +
[PATCH] [0905_21] Siano: smscards - assign gpio to HPG targets
# HG changeset patch # User Uri Shkolnik # Date 1242328393 -10800 # Node ID 71c60eec8001438fee7e9f2e220a101576d6a219 # Parent 9341c85c499e5052022ffd4ad154e912bffabe59 [0905_21] Siano: smscards - assign gpio to HPG targets From: Uri Shkolnik Assign using the new gpio structures, i/o for exist HPG targets, without removing the old implementation. Priority: normal Signed-off-by: Uri Shkolnik diff -r 9341c85c499e -r 71c60eec8001 linux/drivers/media/dvb/siano/sms-cards.c --- a/linux/drivers/media/dvb/siano/sms-cards.c Thu May 14 22:06:52 2009 +0300 +++ b/linux/drivers/media/dvb/siano/sms-cards.c Thu May 14 22:13:13 2009 +0300 @@ -113,6 +113,9 @@ static struct sms_board sms_boards[] = { .name = "Hauppauge WinTV MiniStick", .type = SMS_NOVA_B0, .fw[DEVICE_MODE_DVBT_BDA] = "sms1xxx-hcw-55xxx-dvbt-02.fw", + .board_cfg.leds_power = 26, + .board_cfg.led0 = 27, + .board_cfg.led1 = 28, .led_power = 26, .led_lo= 27, .led_hi= 28, @@ -122,7 +125,9 @@ static struct sms_board sms_boards[] = { .type = SMS_NOVA_B0, .fw[DEVICE_MODE_DVBT_BDA] = "sms1xxx-hcw-55xxx-dvbt-02.fw", .lna_ctrl = 29, + .board_cfg.foreign_lna0_ctrl = 29, .rf_switch = 17, + .board_cfg.rf_switch_uhf = 17, }, [SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2] = { .name = "Hauppauge WinTV MiniCard", -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0905_14_1] Siano: smsusb - update supported USB IDs table
# HG changeset patch # User Uri Shkolnik # Date 1242550293 -10800 # Node ID 59a05f4cb2769279a460f171250d3a7d3a85b81f # Parent 12d6b7eaffa903f00c445d7102ded42610361ae6 [0905_14_1] Siano: smsusb - update supported USB IDs table From: Uri Shkolnik Update the list of supported USB devices, with IDs of new devices, and remove the obsolete defines Priority: normal Signed-off-by: Uri Shkolnik diff -r 12d6b7eaffa9 -r 59a05f4cb276 linux/drivers/media/dvb/siano/smsusb.c --- a/linux/drivers/media/dvb/siano/smsusb.cSun May 17 11:49:44 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsusb.cSun May 17 11:51:33 2009 +0300 @@ -489,7 +489,6 @@ static int smsusb_resume(struct usb_inte } struct usb_device_id smsusb_id_table[] = { -#ifdef CONFIG_DVB_SIANO_SMS1XXX_SMS_IDS { USB_DEVICE(0x187f, 0x0010), .driver_info = SMS1XXX_BOARD_SIANO_STELLAR }, { USB_DEVICE(0x187f, 0x0100), @@ -500,7 +499,6 @@ struct usb_device_id smsusb_id_table[] = .driver_info = SMS1XXX_BOARD_SIANO_NOVA_B }, { USB_DEVICE(0x187f, 0x0300), .driver_info = SMS1XXX_BOARD_SIANO_VEGA }, -#endif { USB_DEVICE(0x2040, 0x1700), .driver_info = SMS1XXX_BOARD_HAUPPAUGE_CATAMOUNT }, { USB_DEVICE(0x2040, 0x1800), @@ -531,8 +529,13 @@ struct usb_device_id smsusb_id_table[] = .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, { USB_DEVICE(0x2040, 0x5590), .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, - { } /* Terminating entry */ -}; + { USB_DEVICE(0x187f, 0x0202), + .driver_info = SMS1XXX_BOARD_SIANO_NICE }, + { USB_DEVICE(0x187f, 0x0301), + .driver_info = SMS1XXX_BOARD_SIANO_VENICE }, + { } /* Terminating entry */ + }; + MODULE_DEVICE_TABLE(usb, smsusb_id_table); static struct usb_driver smsusb_driver = { -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0905_23] Siano: gpio - use new implementation
# HG changeset patch # User Uri Shkolnik # Date 1242331325 -10800 # Node ID 415ca02f74b960c02ddfa7ee719cf87726d97490 # Parent 8b645aa2ab13f22b8d4dcd8e6353fce2c976cd34 [0905_23] Siano: gpio - use new implementation From: Uri Shkolnik Start using the corrected gpio implementation Priority: normal Signed-off-by: Uri Shkolnik diff -r 8b645aa2ab13 -r 415ca02f74b9 linux/drivers/media/dvb/siano/sms-cards.c --- a/linux/drivers/media/dvb/siano/sms-cards.c Thu May 14 22:28:38 2009 +0300 +++ b/linux/drivers/media/dvb/siano/sms-cards.c Thu May 14 23:02:05 2009 +0300 @@ -17,6 +17,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include "smscoreapi.h" #include "sms-cards.h" #include "smsir.h" @@ -155,6 +156,174 @@ struct sms_board *sms_get_board(int id) } EXPORT_SYMBOL_GPL(sms_get_board); +static inline void sms_gpio_assign_11xx_default_led_config( + struct smscore_gpio_config *pGpioConfig) { + pGpioConfig->Direction = SMS_GPIO_DIRECTION_OUTPUT; + pGpioConfig->InputCharacteristics = + SMS_GPIO_INPUTCHARACTERISTICS_NORMAL; + pGpioConfig->OutputDriving = SMS_GPIO_OUTPUTDRIVING_4mA; + pGpioConfig->OutputSlewRate = SMS_GPIO_OUTPUTSLEWRATE_0_45_V_NS; + pGpioConfig->PullUpDown = SMS_GPIO_PULLUPDOWN_NONE; +} + +int sms_board_event(struct smscore_device_t *coredev, + enum SMS_BOARD_EVENTS gevent) { + int board_id = smscore_get_board_id(coredev); + struct sms_board *board = sms_get_board(board_id); + struct smscore_gpio_config MyGpioConfig; + + sms_gpio_assign_11xx_default_led_config(&MyGpioConfig); + + switch (gevent) { + case BOARD_EVENT_POWER_INIT: /* including hotplug */ + switch (board_id) { + case SMS1XXX_BOARD_HAUPPAUGE_WINDHAM: + /* set I/O and turn off all LEDs */ + smscore_gpio_configure(coredev, + board->board_cfg.leds_power, + &MyGpioConfig); + smscore_gpio_set_level(coredev, + board->board_cfg.leds_power, 0); + smscore_gpio_configure(coredev, board->board_cfg.led0, + &MyGpioConfig); + smscore_gpio_set_level(coredev, + board->board_cfg.led0, 0); + smscore_gpio_configure(coredev, board->board_cfg.led1, + &MyGpioConfig); + smscore_gpio_set_level(coredev, + board->board_cfg.led1, 0); + break; + case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2: + case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD: + /* set I/O and turn off LNA */ + smscore_gpio_configure(coredev, + board->board_cfg.foreign_lna0_ctrl, + &MyGpioConfig); + smscore_gpio_set_level(coredev, + board->board_cfg.foreign_lna0_ctrl, + 0); + break; + } + break; /* BOARD_EVENT_BIND */ + + case BOARD_EVENT_POWER_SUSPEND: + switch (board_id) { + case SMS1XXX_BOARD_HAUPPAUGE_WINDHAM: + smscore_gpio_set_level(coredev, + board->board_cfg.leds_power, 0); + smscore_gpio_set_level(coredev, + board->board_cfg.led0, 0); + smscore_gpio_set_level(coredev, + board->board_cfg.led1, 0); + break; + case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2: + case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD: + smscore_gpio_set_level(coredev, + board->board_cfg.foreign_lna0_ctrl, + 0); + break; + } + break; /* BOARD_EVENT_POWER_SUSPEND */ + + case BOARD_EVENT_POWER_RESUME: + switch (board_id) { + case SMS1XXX_BOARD_HAUPPAUGE_WINDHAM: + smscore_gpio_set_level(coredev, + board->board_cfg.leds_power, 1); + smscore_gpio_set_level(coredev, + board->board_cfg.led0, 1); + smscore_gpio_set_level(coredev, + board->board_cfg.led1, 0); +
[PATCH] [0905_24] Siano: smscore - fix get_common_buffer bug
# HG changeset patch # User Uri Shkolnik # Date 1242331867 -10800 # Node ID fc839f80e81fed027a4721f5c679b9af7e27c867 # Parent 415ca02f74b960c02ddfa7ee719cf87726d97490 [0905_24] Siano: smscore - fix get_common_buffer bug From: Uri Shkolnik get common buffers() should block operation until valid buffer is avaliable. Priority: normal Signed-off-by: Uri Shkolnik diff -r 415ca02f74b9 -r fc839f80e81f linux/drivers/media/dvb/siano/smscoreapi.c --- a/linux/drivers/media/dvb/siano/smscoreapi.cThu May 14 23:02:05 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.cThu May 14 23:11:07 2009 +0300 @@ -30,6 +30,7 @@ #include #include +#include #include "smscoreapi.h" #include "smsendian.h" @@ -356,6 +357,9 @@ int smscore_register_device(struct smsde init_completion(&dev->gpio_set_level_done); init_completion(&dev->gpio_get_level_done); init_completion(&dev->ir_init_done); + + /* Buffer management */ + init_waitqueue_head(&dev->buffer_mng_waitq); /* alloc common buffer */ dev->common_buffer_size = params->buffer_size * params->num_buffers; @@ -694,7 +698,9 @@ void smscore_unregister_device(struct sm * onresponse must no longer be called */ while (1) { - while ((cb = smscore_getbuffer(coredev))) { + while (!list_empty(&coredev->buffers)) { + cb = (struct smscore_buffer_t *) coredev->buffers.next; + list_del(&cb->entry); kfree(cb); num_buffers++; } @@ -715,8 +721,10 @@ void smscore_unregister_device(struct sm if (coredev->common_buffer) dma_free_coherent(NULL, coredev->common_buffer_size, - coredev->common_buffer, - coredev->common_buffer_phys); + coredev->common_buffer, coredev->common_buffer_phys); + + if (coredev->fw_buf != NULL) + kfree(coredev->fw_buf); list_del(&coredev->entry); kfree(coredev); @@ -1105,12 +1113,24 @@ struct smscore_buffer_t *smscore_getbuff struct smscore_buffer_t *cb = NULL; unsigned long flags; + DEFINE_WAIT(wait); + spin_lock_irqsave(&coredev->bufferslock, flags); - if (!list_empty(&coredev->buffers)) { - cb = (struct smscore_buffer_t *) coredev->buffers.next; - list_del(&cb->entry); - } + /* This function must return a valid buffer, since the buffer list is +* finite, we check that there is an available buffer, if not, we wait +* until such buffer become available. +*/ + + prepare_to_wait(&coredev->buffer_mng_waitq, &wait, TASK_INTERRUPTIBLE); + + if (list_empty(&coredev->buffers)) + schedule(); + + finish_wait(&coredev->buffer_mng_waitq, &wait); + + cb = (struct smscore_buffer_t *) coredev->buffers.next; + list_del(&cb->entry); spin_unlock_irqrestore(&coredev->bufferslock, flags); @@ -1127,8 +1147,8 @@ EXPORT_SYMBOL_GPL(smscore_getbuffer); * */ void smscore_putbuffer(struct smscore_device_t *coredev, - struct smscore_buffer_t *cb) -{ + struct smscore_buffer_t *cb) { + wake_up_interruptible(&coredev->buffer_mng_waitq); list_add_locked(&cb->entry, &coredev->buffers, &coredev->bufferslock); } EXPORT_SYMBOL_GPL(smscore_putbuffer); -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0905_25] Siano: smscore - fix byte ordering bug
# HG changeset patch # User Uri Shkolnik # Date 1242332055 -10800 # Node ID d826829f17df5ccb89fab3a0d48b8aadd04f9689 # Parent fc839f80e81fed027a4721f5c679b9af7e27c867 [0905_25] Siano: smscore - fix byte ordering bug From: Uri Shkolnik Fix byte ordering bug. Priority: normal Signed-off-by: Uri Shkolnik diff -r fc839f80e81f -r d826829f17df linux/drivers/media/dvb/siano/smscoreapi.c --- a/linux/drivers/media/dvb/siano/smscoreapi.cThu May 14 23:11:07 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.cThu May 14 23:14:15 2009 +0300 @@ -31,6 +31,7 @@ #include #include +#include #include "smscoreapi.h" #include "smsendian.h" @@ -516,9 +517,13 @@ static int smscore_load_firmware_family2 { struct SmsFirmware_ST *firmware = (struct SmsFirmware_ST *) buffer; struct SmsMsgHdr_ST *msg; - u32 mem_address = firmware->StartAddress; + u32 mem_address; u8 *payload = firmware->Payload; int rc = 0; + firmware->StartAddress = le32_to_cpu(firmware->StartAddress); + firmware->Length = le32_to_cpu(firmware->Length); + + mem_address = firmware->StartAddress; sms_info("loading FW to addr 0x%x size %d", mem_address, firmware->Length); -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0905_27] Siano: smscore - fix isdb-t firmware name
# HG changeset patch # User Uri Shkolnik # Date 1242332684 -10800 # Node ID 7e56c108996ef016c4b2117090e2577aea9ed56c # Parent 5ad3d2c3d7792ddf125386c43535e68b575305c3 [0905_27] Siano: smscore - fix isdb-t firmware name From: Uri Shkolnik Fix mistake with isdb-t firmware name Priority: normal Signed-off-by: Uri Shkolnik diff -r 5ad3d2c3d779 -r 7e56c108996e linux/drivers/media/dvb/siano/smscoreapi.c --- a/linux/drivers/media/dvb/siano/smscoreapi.cThu May 14 23:21:04 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.cThu May 14 23:24:44 2009 +0300 @@ -813,7 +813,7 @@ static char *smscore_fw_lkup[][SMS_NUM_O /*BDA*/ {"none", "dvb_nova_12mhz.inp", "dvb_nova_12mhz_b0.inp", "none"}, /*ISDBT*/ - {"none", "isdbt_nova_12mhz.inp", "dvb_nova_12mhz.inp", "none"}, + {"none", "isdbt_nova_12mhz.inp", "isdbt_nova_12mhz_b0.inp", "none"}, /*ISDBTBDA*/ {"none", "isdbt_nova_12mhz.inp", "isdbt_nova_12mhz_b0.inp", "none"}, /*CMMB*/ -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0905_29] Siano: smscore - bug fix at get_device_mode
# HG changeset patch # User Uri Shkolnik # Date 1242332841 -10800 # Node ID 211989f20f803bc5a719c6fda4640888e379d6fc # Parent 7e56c108996ef016c4b2117090e2577aea9ed56c [0905_29] Siano: smscore - bug fix at get_device_mode From: Uri Shkolnik Fix bug that cause error log to echo also if success Priority: normal Signed-off-by: Uri Shkolnik diff -r 7e56c108996e -r 211989f20f80 linux/drivers/media/dvb/siano/smscoreapi.c --- a/linux/drivers/media/dvb/siano/smscoreapi.cThu May 14 23:24:44 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.cThu May 14 23:27:21 2009 +0300 @@ -938,7 +938,7 @@ int smscore_set_device_mode(struct smsco coredev->device_flags &= ~SMS_DEVICE_NOT_READY; } - if (rc != 0) + if (rc < 0) sms_err("return error code %d.", rc); return rc; } -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0905_30] Siano: smsusb - fix typo in module description
# HG changeset patch # User Uri Shkolnik # Date 1242562875 -10800 # Node ID 7d204069642b6608bb3b0d6a96d1de5848df2a16 # Parent 1c7b6db1a3399ffbb7f9b6758cae6572c24b51ef [0905_30] Siano: smsusb - fix typo in module description From: Uri Shkolnik Fix small typo in the module description Priority: normal Signed-off-by: Uri Shkolnik diff -r 1c7b6db1a339 -r 7d204069642b linux/drivers/media/dvb/siano/smsusb.c --- a/linux/drivers/media/dvb/siano/smsusb.cSun May 17 11:57:48 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsusb.cSun May 17 15:21:15 2009 +0300 @@ -569,6 +569,6 @@ module_init(smsusb_module_init); module_init(smsusb_module_init); module_exit(smsusb_module_exit); -MODULE_DESCRIPTION("Driver for the Siano SMS1XXX USB dongle"); +MODULE_DESCRIPTION("Driver for the Siano SMS1xxx USB dongle"); MODULE_AUTHOR("Siano Mobile Silicon, INC. (u...@siano-ms.com)"); MODULE_LICENSE("GPL"); -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [0905_31] Siano: smsusb - change exit func debug msg
# HG changeset patch # User Uri Shkolnik # Date 1242563388 -10800 # Node ID c09c5b8b253e4a74b9a32ce8db30d35d143dedfa # Parent 7d204069642b6608bb3b0d6a96d1de5848df2a16 [0905_31] Siano: smsusb - change exit func debug msg From: Uri Shkolnik Change the debug message of the USB interface driver exit function. Priority: normal Signed-off-by: Uri Shkolnik diff -r 7d204069642b -r c09c5b8b253e linux/drivers/media/dvb/siano/smsusb.c --- a/linux/drivers/media/dvb/siano/smsusb.cSun May 17 15:21:15 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsusb.cSun May 17 15:29:48 2009 +0300 @@ -561,9 +561,9 @@ int smsusb_module_init(void) void smsusb_module_exit(void) { - sms_debug(""); /* Regular USB Cleanup */ usb_deregister(&smsusb_driver); + sms_info("end"); } module_init(smsusb_module_init); -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [09051_40] Siano - kconfig update
# HG changeset patch # User Uri Shkolnik # Date 1242734522 -10800 # Node ID c74502f4c8e97bd9cec9656793bbabc11fb72ab4 # Parent 315bc4b65b4f527c4f9bc4fe3290e10f07975437 [09051_40] Siano - kconfig update From: Uri Shkolnik This patches comes to solve the comments on Siano's patch 0905_10. It updates the kconfig to support multi-modules build. Note that the dependency on dvb_core is for the (sms)dvb module alone, since the drivers set may work with another adapter. Priority: normal Signed-off-by: Uri Shkolnik diff -r 315bc4b65b4f -r c74502f4c8e9 linux/drivers/media/dvb/siano/Kconfig --- a/linux/drivers/media/dvb/siano/Kconfig Sun May 17 12:28:55 2009 + +++ b/linux/drivers/media/dvb/siano/Kconfig Tue May 19 15:02:02 2009 +0300 @@ -2,25 +2,40 @@ # Siano Mobile Silicon Digital TV device configuration # -config DVB_SIANO_SMS1XXX - tristate "Siano SMS1XXX USB dongle support" - depends on DVB_CORE && USB +config SMS_SIANO_MDTV + tristate "Siano SMS1xxx based MDTV receiver" + default m ---help--- - Choose Y here if you have a USB dongle with a SMS1XXX chipset. + Choose Y or M here if you have MDTV receiver with a Siano chipset. - To compile this driver as a module, choose M here: the - module will be called sms1xxx. + To compile this driver as a module, choose M here + (The modules will be called smsmdtv). -config DVB_SIANO_SMS1XXX_SMS_IDS - bool "Enable support for Siano Mobile Silicon default USB IDs" - depends on DVB_SIANO_SMS1XXX - default y + Note: All dependents, if selected, will be part of this module. + + Further documentation on this driver can be found on the WWW + at http://www.siano-ms.com/ + +if SMS_SIANO_MDTV +menu "Siano module components" + +# Kernel sub systems support +config SMS_DVB3_SUBSYS + tristate "DVB v.3 Subsystem support" + depends on DVB_CORE + default m if DVB_CORE ---help--- - Choose Y here if you have a USB dongle with a SMS1XXX chipset - that uses Siano Mobile Silicon's default usb vid:pid. + Choose if you would like to have DVB v.3 kernel sub-system support. - Choose N here if you would prefer to use Siano's external driver. +# Hardware interfaces support - Further documentation on this driver can be found on the WWW at - <http://www.siano-ms.com/>. +config SMS_USB_DRV + tristate "USB interface support" + depends on USB + default m if USB + ---help--- + Choose if you would like to have Siano's support for USB interface + +endmenu +endif # SMS_SIANO_MDTV -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [09051_41] Siano - kconfig update
# HG changeset patch # User Uri Shkolnik # Date 1242734522 -10800 # Node ID c74502f4c8e97bd9cec9656793bbabc11fb72ab4 # Parent 315bc4b65b4f527c4f9bc4fe3290e10f07975437 [09051_41] Siano - kconfig update From: Uri Shkolnik This patches comes to solve the comments on Siano's patch 0905_10. It updates the kconfig and makefile to support multi-modules build. Note that the dependency on dvb_core is for the (sms)dvb module alone, since the drivers set may work with another adapter. Priority: normal Signed-off-by: Uri Shkolnik diff -r 315bc4b65b4f -r c74502f4c8e9 linux/drivers/media/dvb/siano/Kconfig --- a/linux/drivers/media/dvb/siano/Kconfig Sun May 17 12:28:55 2009 + +++ b/linux/drivers/media/dvb/siano/Kconfig Tue May 19 15:02:02 2009 +0300 @@ -2,25 +2,40 @@ # Siano Mobile Silicon Digital TV device configuration # -config DVB_SIANO_SMS1XXX - tristate "Siano SMS1XXX USB dongle support" - depends on DVB_CORE && USB +config SMS_SIANO_MDTV + tristate "Siano SMS1xxx based MDTV receiver" + default m ---help--- - Choose Y here if you have a USB dongle with a SMS1XXX chipset. + Choose Y or M here if you have MDTV receiver with a Siano chipset. - To compile this driver as a module, choose M here: the - module will be called sms1xxx. + To compile this driver as a module, choose M here + (The modules will be called smsmdtv). -config DVB_SIANO_SMS1XXX_SMS_IDS - bool "Enable support for Siano Mobile Silicon default USB IDs" - depends on DVB_SIANO_SMS1XXX - default y + Note: All dependents, if selected, will be part of this module. + + Further documentation on this driver can be found on the WWW + at http://www.siano-ms.com/ + +if SMS_SIANO_MDTV +menu "Siano module components" + +# Kernel sub systems support +config SMS_DVB3_SUBSYS + tristate "DVB v.3 Subsystem support" + depends on DVB_CORE + default m if DVB_CORE ---help--- - Choose Y here if you have a USB dongle with a SMS1XXX chipset - that uses Siano Mobile Silicon's default usb vid:pid. + Choose if you would like to have DVB v.3 kernel sub-system support. - Choose N here if you would prefer to use Siano's external driver. +# Hardware interfaces support - Further documentation on this driver can be found on the WWW at - <http://www.siano-ms.com/>. +config SMS_USB_DRV + tristate "USB interface support" + depends on USB + default m if USB + ---help--- + Choose if you would like to have Siano's support for USB interface + +endmenu +endif # SMS_SIANO_MDTV diff -r c74502f4c8e9 -r c405857480ba linux/drivers/media/dvb/siano/Makefile --- a/linux/drivers/media/dvb/siano/MakefileTue May 19 15:02:02 2009 +0300 +++ b/linux/drivers/media/dvb/siano/MakefileTue May 19 15:48:20 2009 +0300 @@ -1,8 +1,9 @@ sms1xxx-objs := smscoreapi.o sms-cards.o -sms1xxx-objs := smscoreapi.o sms-cards.o smsendian.o smsir.o -obj-$(CONFIG_DVB_SIANO_SMS1XXX) += sms1xxx.o -obj-$(CONFIG_DVB_SIANO_SMS1XXX) += smsusb.o -obj-$(CONFIG_DVB_SIANO_SMS1XXX) += smsdvb.o +smsmdtv-objs := smscoreapi.o sms-cards.o smsendian.o smsir.o + +obj-$(CONFIG_SMS_SIANO_MDTV) += smsmdtv.o +obj-$(CONFIG_SMS_USB_DRV) += smsusb.o +obj-$(CONFIG_SMS_DVB3_SUBSYS) += smsdvb.o EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [09051_42] Siano: cards - add two additional (USB) devices
# HG changeset patch # User Uri Shkolnik # Date 1242737787 -10800 # Node ID f8e348f2f312e23c42b263738d555221fba844b2 # Parent c405857480bae1fa471dedc6fe86c4a897edd696 [09051_42] Siano: cards - add two additional (USB) devices From: Uri Shkolnik Add two additional USB targets, add these to the 'cards' modules and to the 'smsusb' module. Priority: normal Signed-off-by: Uri Shkolnik diff -r c405857480ba -r f8e348f2f312 linux/drivers/media/dvb/siano/sms-cards.c --- a/linux/drivers/media/dvb/siano/sms-cards.c Tue May 19 15:48:20 2009 +0300 +++ b/linux/drivers/media/dvb/siano/sms-cards.c Tue May 19 15:56:27 2009 +0300 @@ -84,6 +84,16 @@ static struct sms_board sms_boards[] = { .type = SMS_NOVA_B0, .fw[DEVICE_MODE_DVBT_BDA] = "sms1xxx-hcw-55xxx-dvbt-02.fw", .lna_ctrl = -1, + }, + [SMS1XXX_BOARD_SIANO_NICE] = { + /* 11 */ + .name = "Siano Nice Digital Receiver", + .type = SMS_NOVA_B0, + }, + [SMS1XXX_BOARD_SIANO_VENICE] = { + /* 12 */ + .name = "Siano Venice Digital Receiver", + .type = SMS_VEGA, }, }; diff -r c405857480ba -r f8e348f2f312 linux/drivers/media/dvb/siano/sms-cards.h --- a/linux/drivers/media/dvb/siano/sms-cards.h Tue May 19 15:48:20 2009 +0300 +++ b/linux/drivers/media/dvb/siano/sms-cards.h Tue May 19 15:56:27 2009 +0300 @@ -35,6 +35,8 @@ #define SMS1XXX_BOARD_HAUPPAUGE_WINDHAM 8 #define SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD 9 #define SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2 10 +#define SMS1XXX_BOARD_SIANO_NICE 11 +#define SMS1XXX_BOARD_SIANO_VENICE 12 struct sms_board_gpio_cfg { int lna_vhf_exist; diff -r c405857480ba -r f8e348f2f312 linux/drivers/media/dvb/siano/smsusb.c --- a/linux/drivers/media/dvb/siano/smsusb.cTue May 19 15:48:20 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsusb.cTue May 19 15:56:27 2009 +0300 @@ -531,8 +531,13 @@ struct usb_device_id smsusb_id_table[] = .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, { USB_DEVICE(0x2040, 0x5590), .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, - { } /* Terminating entry */ -}; + { USB_DEVICE(0x187f, 0x0202), + .driver_info = SMS1XXX_BOARD_SIANO_NICE }, + { USB_DEVICE(0x187f, 0x0301), + .driver_info = SMS1XXX_BOARD_SIANO_VENICE }, + { } /* Terminating entry */ + }; + MODULE_DEVICE_TABLE(usb, smsusb_id_table); static struct usb_driver smsusb_driver = { -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [0905_14] Siano: USB - move the device id table to the cards module
--- On Mon, 5/18/09, Mauro Carvalho Chehab wrote: > From: Mauro Carvalho Chehab > Subject: Re: [PATCH] [0905_14] Siano: USB - move the device id table to the > cards module > To: "Uri Shkolnik" > Cc: "LinuxML" > Date: Monday, May 18, 2009, 9:41 AM > Em Thu, 14 May 2009 12:29:35 -0700 > (PDT) > Uri Shkolnik > escreveu: > > The idea of moving it to sms-cards.c is interesting, > however, I don't think > this will work fine, since having the usb probing code at > one module and the > table on another will break for udev. > > Also, by applying this patch, module loader would be > broken: > > WARNING: "smsusb_id_table" [/home/v4l/master/v4l/smsusb.ko] > undefined! > > I can see a few alternatives: > > 1) keep as-is; > 2) move usb init code to sms-cards; > 3) break sms-cards into smaller files, like sms-cards-usb > (for usb devices); > 4) having the table declared as static into some header > file. > Mauro, That patch has been suppressed by me @ the patchwork shortly after I submit it. The ID tables (for USB and for SDIO) devices will remain in their corresponding interfaces drivers. The cards/targets will keep to be managed by board ID (sms-cards.h), no need to further break the sms-cards to mini-modules, there is nothing to gain with that architecture. 10x, Uri -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [09051_43] Siano: smssdio - revert to stand alone module
# HG changeset patch # User Uri Shkolnik # Date 1242739840 -10800 # Node ID 08e292f80f37496d8d4b43a542f518196eaa4dc0 # Parent f8e348f2f312e23c42b263738d555221fba844b2 [09051_43] Siano: smssdio - revert to stand alone module From: Uri Shkolnik Make the SDIO interface driver a stand alone module. Priority: normal Signed-off-by: Uri Shkolnik diff -r f8e348f2f312 -r 08e292f80f37 linux/drivers/media/dvb/siano/smssdio.c --- a/linux/drivers/media/dvb/siano/smssdio.c Tue May 19 15:56:27 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smssdio.c Tue May 19 16:30:40 2009 +0300 @@ -332,7 +332,7 @@ static struct sdio_driver smssdio_driver /* Module functions*/ /***/ -int smssdio_register(void) +int smssdio_module_init(void) { int ret = 0; @@ -344,11 +344,14 @@ int smssdio_register(void) return ret; } -void smssdio_unregister(void) +void smssdio_module_exit(void) { sdio_unregister_driver(&smssdio_driver); } +module_init(smssdio_module_init); +module_exit(smssdio_module_exit); + MODULE_DESCRIPTION("Siano SMS1xxx SDIO driver"); MODULE_AUTHOR("Pierre Ossman"); MODULE_LICENSE("GPL"); -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [09051_43] Siano: Add new GPIO management interface
# HG changeset patch # User Uri Shkolnik # Date 1242744570 -10800 # Node ID 749c11a362a9fad1992809007247d5c76c35bfc9 # Parent 08e292f80f37496d8d4b43a542f518196eaa4dc0 [09051_43] Siano: Add new GPIO management interface From: Uri Shkolnik Add new GPIO management interface to replace old (buggy) one. Keeping old interface intact for now. Priority: normal Signed-off-by: Uri Shkolnik diff -r 08e292f80f37 -r 749c11a362a9 linux/drivers/media/dvb/siano/sms-cards.c --- a/linux/drivers/media/dvb/siano/sms-cards.c Tue May 19 16:30:40 2009 +0300 +++ b/linux/drivers/media/dvb/siano/sms-cards.c Tue May 19 17:49:30 2009 +0300 @@ -109,7 +109,7 @@ static int sms_set_gpio(struct smscore_d { int lvl, ret; u32 gpio; - struct smscore_gpio_config gpioconfig = { + struct smscore_config_gpio gpioconfig = { .direction= SMS_GPIO_DIRECTION_OUTPUT, .pullupdown = SMS_GPIO_PULLUPDOWN_NONE, .inputcharacteristics = SMS_GPIO_INPUTCHARACTERISTICS_NORMAL, diff -r 08e292f80f37 -r 749c11a362a9 linux/drivers/media/dvb/siano/smscoreapi.c --- a/linux/drivers/media/dvb/siano/smscoreapi.cTue May 19 16:30:40 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.cTue May 19 17:49:30 2009 +0300 @@ -1331,8 +1331,9 @@ static int smscore_map_common_buffer(str } #endif +/* old GPIO managments implementation */ int smscore_configure_gpio(struct smscore_device_t *coredev, u32 pin, - struct smscore_gpio_config *pinconfig) + struct smscore_config_gpio *pinconfig) { struct { struct SmsMsgHdr_ST hdr; @@ -1399,6 +1400,238 @@ int smscore_set_gpio(struct smscore_devi return coredev->sendrequest_handler(coredev->context, &msg, sizeof(msg)); +} + +/* new GPIO managment implementation */ +static int GetGpioPinParams(u32 PinNum, u32 *pTranslatedPinNum, + u32 *pGroupNum, u32 *pGroupCfg) { + + *pGroupCfg = 1; + + if (PinNum >= 0 && PinNum <= 1) { + *pTranslatedPinNum = 0; + *pGroupNum = 9; + *pGroupCfg = 2; + } else if (PinNum >= 2 && PinNum <= 6) { + *pTranslatedPinNum = 2; + *pGroupNum = 0; + *pGroupCfg = 2; + } else if (PinNum >= 7 && PinNum <= 11) { + *pTranslatedPinNum = 7; + *pGroupNum = 1; + } else if (PinNum >= 12 && PinNum <= 15) { + *pTranslatedPinNum = 12; + *pGroupNum = 2; + *pGroupCfg = 3; + } else if (PinNum == 16) { + *pTranslatedPinNum = 16; + *pGroupNum = 23; + } else if (PinNum >= 17 && PinNum <= 24) { + *pTranslatedPinNum = 17; + *pGroupNum = 3; + } else if (PinNum == 25) { + *pTranslatedPinNum = 25; + *pGroupNum = 6; + } else if (PinNum >= 26 && PinNum <= 28) { + *pTranslatedPinNum = 26; + *pGroupNum = 4; + } else if (PinNum == 29) { + *pTranslatedPinNum = 29; + *pGroupNum = 5; + *pGroupCfg = 2; + } else if (PinNum == 30) { + *pTranslatedPinNum = 30; + *pGroupNum = 8; + } else if (PinNum == 31) { + *pTranslatedPinNum = 31; + *pGroupNum = 17; + } else + return -1; + + *pGroupCfg <<= 24; + + return 0; +} + +int smscore_gpio_configure(struct smscore_device_t *coredev, u8 PinNum, + struct smscore_gpio_config *pGpioConfig) { + + u32 totalLen; + u32 TranslatedPinNum; + u32 GroupNum; + u32 ElectricChar; + u32 groupCfg; + void *buffer; + int rc; + + struct SetGpioMsg { + struct SmsMsgHdr_ST xMsgHeader; + u32 msgData[6]; + } *pMsg; + + + if (PinNum > MAX_GPIO_PIN_NUMBER) + return -EINVAL; + + if (pGpioConfig == NULL) + return -EINVAL; + + totalLen = sizeof(struct SmsMsgHdr_ST) + (sizeof(u32) * 6); + + buffer = kmalloc(totalLen + SMS_DMA_ALIGNMENT, + GFP_KERNEL | GFP_DMA); + if (!buffer) + return -ENOMEM; + + pMsg = (struct SetGpioMsg *) SMS_ALIGN_ADDRESS(buffer); + + pMsg->xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; + pMsg->xMsgHeader.msgDstId = HIF_TASK; + pMsg->xMsgHeader.msgFlags = 0; + pMsg->xMsgHeader.msgLength = (u16) totalLen; + pMsg->msgData[0] = PinNum; + + if (!(coredev->device_flags & SMS_DEVICE_FAMILY2)) { + pMsg->xMsgHeader.msgType = MSG_SMS_GPIO_CONFIG_REQ; + if (GetGpioPinParams(PinNum, &TranslatedPinNum, &
[PATCH] [09051_44] Siano: smscore - fix some new GPIO definitions names
# HG changeset patch # User Uri Shkolnik # Date 1242746121 -10800 # Node ID 2b865fa7f195524bc9e8557dac472140755058dd # Parent 749c11a362a9fad1992809007247d5c76c35bfc9 [09051_44] Siano: smscore - fix some new GPIO definitions names From: Uri Shkolnik Fix some definitions' names, in order to emphasize the names differences between the old and new GPIO implementations. Priority: normal Signed-off-by: Uri Shkolnik diff -r 749c11a362a9 -r 2b865fa7f195 linux/drivers/media/dvb/siano/smscoreapi.h --- a/linux/drivers/media/dvb/siano/smscoreapi.hTue May 19 17:49:30 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.hTue May 19 18:15:21 2009 +0300 @@ -581,10 +581,10 @@ struct smscore_gpio_config { #define SMS_GPIO_DIRECTION_OUTPUT 1 u8 Direction; -#define SMS_GPIO_PULLUPDOWN_NONE 0 -#define SMS_GPIO_PULLUPDOWN_PULLDOWN 1 -#define SMS_GPIO_PULLUPDOWN_PULLUP 2 -#define SMS_GPIO_PULLUPDOWN_KEEPER 3 +#define SMS_GPIO_PULL_UP_DOWN_NONE 0 +#define SMS_GPIO_PULL_UP_DOWN_PULLDOWN 1 +#define SMS_GPIO_PULL_UP_DOWN_PULLUP 2 +#define SMS_GPIO_PULL_UP_DOWN_KEEPER 3 u8 PullUpDown; #define SMS_GPIO_INPUT_CHARACTERISTICS_NORMAL 0 @@ -608,13 +608,12 @@ struct smscore_gpio_config { #define SMS_GPIO_OUTPUT_DRIVING_1_5mA 0 /* 11xx */ #define SMS_GPIO_OUTPUT_DRIVING_2_8mA 1 /* 11xx */ -#define SMS_GPIO_OUTPUT_DRIVING_4mA2 /* 11xx */ -#define SMS_GPIO_OUTPUT_DRIVING_7mA3 /* 11xx */ -#define SMS_GPIO_OUTPUT_DRIVING_10mA 4 /* 11xx */ -#define SMS_GPIO_OUTPUT_DRIVING_11mA 5 /* 11xx */ -#define SMS_GPIO_OUTPUT_DRIVING_14mA 6 /* 11xx */ -#undef SMS_GPIO_OUTPUT_DRIVING_16mA -#define SMS_GPIO_OUTPUT_DRIVING_16mA 7 /* 11xx */ +#define SMS_GPIO_OUTPUT_DRIVING_4mA2 /* 11xx */ +#define SMS_GPIO_OUTPUT_DRIVING_7mA3 /* 11xx */ +#define SMS_GPIO_OUTPUT_DRIVING_10mA 4 /* 11xx */ +#define SMS_GPIO_OUTPUT_DRIVING_11mA 5 /* 11xx */ +#define SMS_GPIO_OUTPUT_DRIVING_14mA 6 /* 11xx */ +#define SMS_GPIO_OUTPUT_DRIVING_16mA 7 /* 11xx */ u8 OutputDriving; }; -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [09051_45] Siano: smscards - add board (target) events
# HG changeset patch # User Uri Shkolnik # Date 1242746343 -10800 # Node ID 757712d337876acd47621f6a2712026c732da2c4 # Parent 2b865fa7f195524bc9e8557dac472140755058dd [09051_45] Siano: smscards - add board (target) events From: Uri Shkolnik Add events handling for targets. All board-specific (target specific) should reside here. Priority: normal Signed-off-by: Uri Shkolnik diff -r 2b865fa7f195 -r 757712d33787 linux/drivers/media/dvb/siano/sms-cards.h --- a/linux/drivers/media/dvb/siano/sms-cards.h Tue May 19 18:15:21 2009 +0300 +++ b/linux/drivers/media/dvb/siano/sms-cards.h Tue May 19 18:19:03 2009 +0300 @@ -85,6 +85,30 @@ struct sms_board *sms_get_board(int id); extern struct smscore_device_t *coredev; +enum SMS_BOARD_EVENTS { + BOARD_EVENT_POWER_INIT, + BOARD_EVENT_POWER_SUSPEND, + BOARD_EVENT_POWER_RESUME, + BOARD_EVENT_BIND, + BOARD_EVENT_SCAN_PROG, + BOARD_EVENT_SCAN_COMP, + BOARD_EVENT_EMERGENCY_WARNING_SIGNAL, + BOARD_EVENT_FE_LOCK, + BOARD_EVENT_FE_UNLOCK, + BOARD_EVENT_DEMOD_LOCK, + BOARD_EVENT_DEMOD_UNLOCK, + BOARD_EVENT_RECEPTION_MAX_4, + BOARD_EVENT_RECEPTION_3, + BOARD_EVENT_RECEPTION_2, + BOARD_EVENT_RECEPTION_1, + BOARD_EVENT_RECEPTION_LOST_0, + BOARD_EVENT_MULTIPLEX_OK, + BOARD_EVENT_MULTIPLEX_ERRORS +}; + +int sms_board_event(struct smscore_device_t *coredev, + enum SMS_BOARD_EVENTS gevent); + int sms_board_setup(struct smscore_device_t *coredev); #define SMS_LED_OFF 0 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [09051_45_1] Siano: smscards - add board (target) events
# HG changeset patch # User Uri Shkolnik # Date 1242746621 -10800 # Node ID 37df2d513a68b920ba4ceed0220cf6915d2d574e # Parent 2b865fa7f195524bc9e8557dac472140755058dd [09051_45_1] Siano: smscards - add board (target) events From: Uri Shkolnik Add events handling for targets. All board-specific (target specific) should reside here. Priority: normal Signed-off-by: Uri Shkolnik diff -r 2b865fa7f195 -r 37df2d513a68 linux/drivers/media/dvb/siano/sms-cards.c --- a/linux/drivers/media/dvb/siano/sms-cards.c Tue May 19 18:15:21 2009 +0300 +++ b/linux/drivers/media/dvb/siano/sms-cards.c Tue May 19 18:23:41 2009 +0300 @@ -104,6 +104,173 @@ struct sms_board *sms_get_board(int id) return &sms_boards[id]; } EXPORT_SYMBOL_GPL(sms_get_board); +static inline void sms_gpio_assign_11xx_default_led_config( + struct smscore_gpio_config *pGpioConfig) { + pGpioConfig->Direction = SMS_GPIO_DIRECTION_OUTPUT; + pGpioConfig->InputCharacteristics = + SMS_GPIO_INPUT_CHARACTERISTICS_NORMAL; + pGpioConfig->OutputDriving = SMS_GPIO_OUTPUT_DRIVING_4mA; + pGpioConfig->OutputSlewRate = SMS_GPIO_OUTPUT_SLEW_RATE_0_45_V_NS; + pGpioConfig->PullUpDown = SMS_GPIO_PULL_UP_DOWN_NONE; +} + +int sms_board_event(struct smscore_device_t *coredev, + enum SMS_BOARD_EVENTS gevent) { + int board_id = smscore_get_board_id(coredev); + struct sms_board *board = sms_get_board(board_id); + struct smscore_gpio_config MyGpioConfig; + + sms_gpio_assign_11xx_default_led_config(&MyGpioConfig); + + switch (gevent) { + case BOARD_EVENT_POWER_INIT: /* including hotplug */ + switch (board_id) { + case SMS1XXX_BOARD_HAUPPAUGE_WINDHAM: + /* set I/O and turn off all LEDs */ + smscore_gpio_configure(coredev, + board->board_cfg.leds_power, + &MyGpioConfig); + smscore_gpio_set_level(coredev, + board->board_cfg.leds_power, 0); + smscore_gpio_configure(coredev, board->board_cfg.led0, + &MyGpioConfig); + smscore_gpio_set_level(coredev, + board->board_cfg.led0, 0); + smscore_gpio_configure(coredev, board->board_cfg.led1, + &MyGpioConfig); + smscore_gpio_set_level(coredev, + board->board_cfg.led1, 0); + break; + case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2: + case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD: + /* set I/O and turn off LNA */ + smscore_gpio_configure(coredev, + board->board_cfg.foreign_lna0_ctrl, + &MyGpioConfig); + smscore_gpio_set_level(coredev, + board->board_cfg.foreign_lna0_ctrl, + 0); + break; + } + break; /* BOARD_EVENT_BIND */ + + case BOARD_EVENT_POWER_SUSPEND: + switch (board_id) { + case SMS1XXX_BOARD_HAUPPAUGE_WINDHAM: + smscore_gpio_set_level(coredev, + board->board_cfg.leds_power, 0); + smscore_gpio_set_level(coredev, + board->board_cfg.led0, 0); + smscore_gpio_set_level(coredev, + board->board_cfg.led1, 0); + break; + case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2: + case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD: + smscore_gpio_set_level(coredev, + board->board_cfg.foreign_lna0_ctrl, + 0); + break; + } + break; /* BOARD_EVENT_POWER_SUSPEND */ + + case BOARD_EVENT_POWER_RESUME: + switch (board_id) { + case SMS1XXX_BOARD_HAUPPAUGE_WINDHAM: + smscore_gpio_set_level(coredev, + board->board_cfg.leds_power, 1); + smscore_gpio_set_level(coredev, + board->board_cfg.led0, 1); + smscore_gpio_set_level(coredev, + board->board_cfg.led1, 0); + break; + case SMS1XXX_BOARD_HAUP
[PATCH] [09051_46] Siano: smsusb - remove redundant ifdef
# HG changeset patch # User Uri Shkolnik # Date 1242746858 -10800 # Node ID 98895daafb42f8b0757fd608b29c53c80327520e # Parent 37df2d513a68b920ba4ceed0220cf6915d2d574e [09051_46] Siano: smsusb - remove redundant ifdef From: Uri Shkolnik Remove a redundant ifdef Priority: normal Signed-off-by: Uri Shkolnik diff -r 37df2d513a68 -r 98895daafb42 linux/drivers/media/dvb/siano/smsusb.c --- a/linux/drivers/media/dvb/siano/smsusb.cTue May 19 18:23:41 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsusb.cTue May 19 18:27:38 2009 +0300 @@ -489,7 +489,6 @@ static int smsusb_resume(struct usb_inte } struct usb_device_id smsusb_id_table[] = { -#ifdef CONFIG_DVB_SIANO_SMS1XXX_SMS_IDS { USB_DEVICE(0x187f, 0x0010), .driver_info = SMS1XXX_BOARD_SIANO_STELLAR }, { USB_DEVICE(0x187f, 0x0100), @@ -500,7 +499,6 @@ struct usb_device_id smsusb_id_table[] = .driver_info = SMS1XXX_BOARD_SIANO_NOVA_B }, { USB_DEVICE(0x187f, 0x0300), .driver_info = SMS1XXX_BOARD_SIANO_VEGA }, -#endif { USB_DEVICE(0x2040, 0x1700), .driver_info = SMS1XXX_BOARD_HAUPPAUGE_CATAMOUNT }, { USB_DEVICE(0x2040, 0x1800), -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [09051_47] Siano: smsdvb - add DVB v3 events
# HG changeset patch # User Uri Shkolnik # Date 1242747164 -10800 # Node ID 971d4cc0d4009650bd4752c6a9fc09755ef77baf # Parent 98895daafb42f8b0757fd608b29c53c80327520e [09051_47] Siano: smsdvb - add DVB v3 events From: Uri Shkolnik Add various DVB-API v3 events, those events will trig target (card) events. Priority: normal Signed-off-by: Uri Shkolnik diff -r 98895daafb42 -r 971d4cc0d400 linux/drivers/media/dvb/siano/smsdvb.c --- a/linux/drivers/media/dvb/siano/smsdvb.cTue May 19 18:27:38 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsdvb.cTue May 19 18:32:44 2009 +0300 @@ -66,6 +66,54 @@ MODULE_PARM_DESC(debug, "set debug level /* Events that may come from DVB v3 adapter */ static void sms_board_dvb3_event(struct smsdvb_client_t *client, enum SMS_DVB3_EVENTS event) { + + struct smscore_device_t *coredev = client->coredev; + switch (event) { + case DVB3_EVENT_INIT: + sms_debug("DVB3_EVENT_INIT"); + sms_board_event(coredev, BOARD_EVENT_BIND); + break; + case DVB3_EVENT_SLEEP: + sms_debug("DVB3_EVENT_SLEEP"); + sms_board_event(coredev, BOARD_EVENT_POWER_SUSPEND); + break; + case DVB3_EVENT_HOTPLUG: + sms_debug("DVB3_EVENT_HOTPLUG"); + sms_board_event(coredev, BOARD_EVENT_POWER_INIT); + break; + case DVB3_EVENT_FE_LOCK: + if (client->event_fe_state != DVB3_EVENT_FE_LOCK) { + client->event_fe_state = DVB3_EVENT_FE_LOCK; + sms_debug("DVB3_EVENT_FE_LOCK"); + sms_board_event(coredev, BOARD_EVENT_FE_LOCK); + } + break; + case DVB3_EVENT_FE_UNLOCK: + if (client->event_fe_state != DVB3_EVENT_FE_UNLOCK) { + client->event_fe_state = DVB3_EVENT_FE_UNLOCK; + sms_debug("DVB3_EVENT_FE_UNLOCK"); + sms_board_event(coredev, BOARD_EVENT_FE_UNLOCK); + } + break; + case DVB3_EVENT_UNC_OK: + if (client->event_unc_state != DVB3_EVENT_UNC_OK) { + client->event_unc_state = DVB3_EVENT_UNC_OK; + sms_debug("DVB3_EVENT_UNC_OK"); + sms_board_event(coredev, BOARD_EVENT_MULTIPLEX_OK); + } + break; + case DVB3_EVENT_UNC_ERR: + if (client->event_unc_state != DVB3_EVENT_UNC_ERR) { + client->event_unc_state = DVB3_EVENT_UNC_ERR; + sms_debug("DVB3_EVENT_UNC_ERR"); + sms_board_event(coredev, BOARD_EVENT_MULTIPLEX_ERRORS); + } + break; + + default: + sms_err("Unknown dvb3 api event"); + break; + } } static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb) -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [09051_48] Siano: smscore - remove redundant code
# HG changeset patch # User Uri Shkolnik # Date 1242747487 -10800 # Node ID cfb4106f3ceaee9fe8f7e3acc9d4adec1baffe5e # Parent 971d4cc0d4009650bd4752c6a9fc09755ef77baf [09051_48] Siano: smscore - remove redundant code From: Uri Shkolnik remove redundant code, which in the past handled the various components (now independent modules) registrations. Priority: normal Signed-off-by: Uri Shkolnik diff -r 971d4cc0d400 -r cfb4106f3cea linux/drivers/media/dvb/siano/smscoreapi.c --- a/linux/drivers/media/dvb/siano/smscoreapi.cTue May 19 18:32:44 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.cTue May 19 18:38:07 2009 +0300 @@ -1645,99 +1645,11 @@ static int __init smscore_module_init(vo INIT_LIST_HEAD(&g_smscore_registry); kmutex_init(&g_smscore_registrylock); -#if 0 /* def SMS_CHAR_CLIENT */ - /* Char interface Register */ - rc = smschar_register(); - if (rc) { - sms_err("Error registering char device client.\n"); - goto smschar_error; - } -#endif - -#if 0 /* def SMS_DVB_CLIENT */ - /* DVB Register */ - rc = smsdvb_register(); - if (rc) { - sms_err("Error registering DVB client.\n"); - goto smsdvb_error; - } -#endif - -#if 0 /* def SMS_NET_CLIENT */ - /* DVB Register */ - rc = smsnet_register(); - if (rc) { - sms_err("Error registering Network client.\n"); - goto smsnet_error; - } -#endif - -#if 0 /* def SMS_USB_BUS_DRV */ - /* USB Register */ - rc = smsusb_register(); - if (rc) { - sms_err("Error registering USB bus driver.\n"); - goto sms_bus_drv_error; - } -#endif - -#if 0 /* def SMS_SPI_BUS_DRV */ - /* USB Register */ - rc = smsspi_register(); - if (rc) { - sms_err("Error registering spi bus driver.\n"); - goto sms_bus_drv_error; - } -#endif - - return rc; -#if 0 -sms_bus_drv_error: -#endif /* 0 */ -#if 0 /* def SMS_NET_CLIENT */ - smsnet_unregister(); -smsnet_error: -#endif -#if 0 /* def SMS_DVB_CLIENT */ - smsdvb_unregister(); -smsdvb_error: -#endif -#if 0 /* def SMS_CHAR_CLIENT */ - smschar_unregister(); -smschar_error: -#endif - sms_debug("rc %d", rc); - return rc; } static void __exit smscore_module_exit(void) { -#if 0 /* def SMS_CHAR_CLIENT */ - /* Char interface UnRegister */ - smschar_unregister(); -#endif - -#if 0 /* def SMS_DVB_CLIENT */ - /* DVB UnRegister */ - smsdvb_unregister(); -#endif - -#if 0 /* def SMS_NET_CLIENT */ - /* NET UnRegister */ - smsnet_unregister(); -#endif - -#if 0 /* def SMS_USB_BUS_DRV */ - /* Unregister USB */ - smsusb_unregister(); -#endif - -#if 0 /* def SMS_SPI_BUS_DRV */ - /* Unregister SPI */ - smsspi_unregister(); -#endif - kmutex_lock(&g_smscore_deviceslock); while (!list_empty(&g_smscore_notifyees)) { struct smscore_device_notifyee_t *notifyee = -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [09051_49] Siano: smscore - upgrade firmware loading engine
# HG changeset patch # User Uri Shkolnik # Date 1242748115 -10800 # Node ID 4d75f9d1c4f96d65a8ad312c21e488a212ee58a3 # Parent cfb4106f3ceaee9fe8f7e3acc9d4adec1baffe5e [09051_49] Siano: smscore - upgrade firmware loading engine From: Uri Shkolnik Upgrade the firmware loading (download and switching) engine. Priority: normal Signed-off-by: Uri Shkolnik diff -r cfb4106f3cea -r 4d75f9d1c4f9 linux/drivers/media/dvb/siano/smscoreapi.c --- a/linux/drivers/media/dvb/siano/smscoreapi.cTue May 19 18:38:07 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.cTue May 19 18:48:35 2009 +0300 @@ -28,7 +28,7 @@ #include #include #include - +#include #include #include #include @@ -36,7 +36,13 @@ #include "smscoreapi.h" #include "sms-cards.h" #include "smsir.h" -#include "smsendian.h" +#define MAX_GPIO_PIN_NUMBER31 + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 10) +#define REQUEST_FIRMWARE_SUPPORTED +#else +#define DEFAULT_FW_FILE_PATH "/lib/firmware" +#endif static int sms_dbg; module_param_named(debug, sms_dbg, int, 0644); @@ -459,8 +465,6 @@ static int smscore_init_ir(struct smscor msg->msgData[0] = coredev->ir.controller; msg->msgData[1] = coredev->ir.timeout; - smsendian_handle_tx_message( - (struct SmsMsgHdr_ST2 *)msg); rc = smscore_sendrequest_and_wait(coredev, msg, msg->xMsgHeader. msgLength, &coredev->ir_init_done); @@ -486,12 +490,16 @@ static int smscore_init_ir(struct smscor */ int smscore_start_device(struct smscore_device_t *coredev) { - int rc = smscore_set_device_mode( - coredev, smscore_registry_getmode(coredev->devpath)); + int rc; + +#ifdef REQUEST_FIRMWARE_SUPPORTED + rc = smscore_set_device_mode(coredev, smscore_registry_getmode( + coredev->devpath)); if (rc < 0) { - sms_info("set device mode faile , rc %d", rc); + sms_info("set device mode failed , rc %d", rc); return rc; } +#endif kmutex_lock(&g_smscore_deviceslock); @@ -632,11 +640,14 @@ static int smscore_load_firmware_from_fi loadfirmware_t loadfirmware_handler) { int rc = -ENOENT; + u8 *fw_buf; + u32 fw_buf_size; + +#ifdef REQUEST_FIRMWARE_SUPPORTED const struct firmware *fw; - u8 *fw_buffer; - if (loadfirmware_handler == NULL && !(coredev->device_flags & - SMS_DEVICE_FAMILY2)) + if (loadfirmware_handler == NULL && !(coredev->device_flags + & SMS_DEVICE_FAMILY2)) return -EINVAL; rc = request_firmware(&fw, filename, coredev->device); @@ -645,26 +656,36 @@ static int smscore_load_firmware_from_fi return rc; } sms_info("read FW %s, size=%zd", filename, fw->size); - fw_buffer = kmalloc(ALIGN(fw->size, SMS_ALLOC_ALIGNMENT), - GFP_KERNEL | GFP_DMA); - if (fw_buffer) { - memcpy(fw_buffer, fw->data, fw->size); + fw_buf = kmalloc(ALIGN(fw->size, SMS_ALLOC_ALIGNMENT), + GFP_KERNEL | GFP_DMA); + if (!fw_buf) { + sms_info("failed to allocate firmware buffer"); + return -ENOMEM; + } + memcpy(fw_buf, fw->data, fw->size); + fw_buf_size = fw->size; +#else + if (!coredev->fw_buf) { + sms_info("missing fw file buffer"); + return -EINVAL; + } + fw_buf = coredev->fw_buf; + fw_buf_size = coredev->fw_buf_size; +#endif - rc = (coredev->device_flags & SMS_DEVICE_FAMILY2) ? - smscore_load_firmware_family2(coredev, - fw_buffer, - fw->size) : - loadfirmware_handler(coredev->context, - fw_buffer, fw->size); + rc = (coredev->device_flags & SMS_DEVICE_FAMILY2) ? + smscore_load_firmware_family2(coredev, fw_buf, fw_buf_size) + : loadfirmware_handler(coredev->context, fw_buf, + fw_buf_size); - kfree(fw_buffer); - } else { - sms_info("failed to allocate firmware buffer"); - rc = -ENOMEM; - } + kfree(fw_buf); +#ifdef REQUEST_FIRMWARE_SUPPORTED release_firmware(fw); - +#else +
[PATCH] [09051_50] Siano: smscore - Add big endian support
# HG changeset patch # User Uri Shkolnik # Date 1242748399 -10800 # Node ID a93ebe0069b3d7d8d791ccb620a7797508cf724c # Parent 4d75f9d1c4f96d65a8ad312c21e488a212ee58a3 [09051_50] Siano: smscore - Add big endian support From: Uri Shkolnik Add support for big endian target, to the smscore module. Priority: normal Signed-off-by: Uri Shkolnik diff -r 4d75f9d1c4f9 -r a93ebe0069b3 linux/drivers/media/dvb/siano/smscoreapi.c --- a/linux/drivers/media/dvb/siano/smscoreapi.cTue May 19 18:48:35 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.cTue May 19 18:53:19 2009 +0300 @@ -34,8 +34,10 @@ #include #include "smscoreapi.h" +#include "smsendian.h" #include "sms-cards.h" #include "smsir.h" + #define MAX_GPIO_PIN_NUMBER31 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 10) @@ -465,6 +467,8 @@ static int smscore_init_ir(struct smscor msg->msgData[0] = coredev->ir.controller; msg->msgData[1] = coredev->ir.timeout; + smsendian_handle_tx_message( + (struct SmsMsgHdr_ST2 *)msg); rc = smscore_sendrequest_and_wait(coredev, msg, msg->xMsgHeader. msgLength, &coredev->ir_init_done); @@ -545,6 +549,7 @@ static int smscore_load_firmware_family2 sms_debug("sending reload command."); SMS_INIT_MSG(msg, MSG_SW_RELOAD_START_REQ, sizeof(struct SmsMsgHdr_ST)); + smsendian_handle_tx_message((struct SmsMsgHdr_ST *)msg); rc = smscore_sendrequest_and_wait(coredev, msg, msg->msgLength, &coredev->reload_start_done); @@ -563,6 +568,7 @@ static int smscore_load_firmware_family2 DataMsg->MemAddr = mem_address; memcpy(DataMsg->Payload, payload, payload_size); + smsendian_handle_tx_message((struct SmsMsgHdr_ST *)msg); if ((coredev->device_flags & SMS_ROM_NO_RESPONSE) && (coredev->mode == DEVICE_MODE_NONE)) rc = coredev->sendrequest_handler( @@ -595,6 +601,7 @@ static int smscore_load_firmware_family2 TriggerMsg->msgData[3] = 0; /* Parameter */ TriggerMsg->msgData[4] = 4; /* Task ID */ + smsendian_handle_tx_message((struct SmsMsgHdr_ST *)msg); if (coredev->device_flags & SMS_ROM_NO_RESPONSE) { rc = coredev->sendrequest_handler( coredev->context, TriggerMsg, @@ -608,7 +615,7 @@ static int smscore_load_firmware_family2 } else { SMS_INIT_MSG(msg, MSG_SW_RELOAD_EXEC_REQ, sizeof(struct SmsMsgHdr_ST)); - + smsendian_handle_tx_message((struct SmsMsgHdr_ST *)msg); rc = coredev->sendrequest_handler(coredev->context, msg, msg->msgLength); } @@ -767,6 +774,7 @@ static int smscore_detect_mode(struct sm SMS_INIT_MSG(msg, MSG_SMS_GET_VERSION_EX_REQ, sizeof(struct SmsMsgHdr_ST)); + smsendian_handle_tx_message((struct SmsMsgHdr_ST *)msg); rc = smscore_sendrequest_and_wait(coredev, msg, msg->msgLength, &coredev->version_ex_done); if (rc == -ETIME) { @@ -895,6 +903,7 @@ int smscore_set_device_mode(struct smsco sizeof(struct SmsMsgData_ST)); msg->msgData[0] = mode; + smsendian_handle_tx_message((struct SmsMsgHdr_ST *)msg); rc = smscore_sendrequest_and_wait( coredev, msg, msg->xMsgHeader.msgLength, &coredev->init_device_done); @@ -1102,6 +,8 @@ void smscore_onresponse(struct smscore_d rc = client->onresponse_handler(client->context, cb); if (rc < 0) { + smsendian_handle_rx_message((struct SmsMsgData_ST *)phdr); + switch (phdr->msgType) { case MSG_SMS_GET_VERSION_EX_RES: { @@ -1604,6 +1615,7 @@ int smscore_gpio_configure(struct smscor pMsg->msgData[5] = 0; } + smsendian_handle_tx_message((struct SmsMsgHdr_ST *)pMsg); rc = smscore_sendrequest_and_wait(coredev, pMsg, totalLen, &coredev->gpio_configuration_don
[PATCH] [09051_51] Siano: smscore - bind the GPIO SMS protocol
# HG changeset patch # User Uri Shkolnik # Date 1242748628 -10800 # Node ID 11b56bb92bc853666fdc1f7dc1fb799e227a2b41 # Parent a93ebe0069b3d7d8d791ccb620a7797508cf724c [09051_51] Siano: smscore - bind the GPIO SMS protocol From: Uri Shkolnik Bind SMS protocol commands to the GPIO commands Priority: normal Signed-off-by: Uri Shkolnik diff -r a93ebe0069b3 -r 11b56bb92bc8 linux/drivers/media/dvb/siano/smscoreapi.c --- a/linux/drivers/media/dvb/siano/smscoreapi.cTue May 19 18:53:19 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.cTue May 19 18:57:08 2009 +0300 @@ -360,6 +360,9 @@ int smscore_register_device(struct smsde init_completion(&dev->init_device_done); init_completion(&dev->reload_start_done); init_completion(&dev->resume_done); + init_completion(&dev->gpio_configuration_done); + init_completion(&dev->gpio_set_level_done); + init_completion(&dev->gpio_get_level_done); init_completion(&dev->ir_init_done); /* Buffer management */ @@ -1151,6 +1154,23 @@ void smscore_onresponse(struct smscore_d case MSG_SMS_SLEEP_RESUME_COMP_IND: complete(&coredev->resume_done); break; + case MSG_SMS_GPIO_CONFIG_EX_RES: + sms_debug("MSG_SMS_GPIO_CONFIG_EX_RES"); + complete(&coredev->gpio_configuration_done); + break; + case MSG_SMS_GPIO_SET_LEVEL_RES: + sms_debug("MSG_SMS_GPIO_SET_LEVEL_RES"); + complete(&coredev->gpio_set_level_done); + break; + case MSG_SMS_GPIO_GET_LEVEL_RES: + { + u32 *msgdata = (u32 *) phdr; + coredev->gpio_get_res = msgdata[1]; + sms_debug("MSG_SMS_GPIO_GET_LEVEL_RES gpio level %d", + coredev->gpio_get_res); + complete(&coredev->gpio_get_level_done); + break; + } case MSG_SMS_START_IR_RES: complete(&coredev->ir_init_done); break; -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [09051_52] Siano: smsendien - declare function as extern
# HG changeset patch # User Uri Shkolnik # Date 1242748849 -10800 # Node ID b71383c9ab1cd51cc307b488ef4397f6eb345cef # Parent 11b56bb92bc853666fdc1f7dc1fb799e227a2b41 [09051_52] Siano: smsendien - declare function as extern From: Uri Shkolnik Declare the object function as 'extern' Priority: normal Signed-off-by: Uri Shkolnik diff -r 11b56bb92bc8 -r b71383c9ab1c linux/drivers/media/dvb/siano/smsendian.h --- a/linux/drivers/media/dvb/siano/smsendian.h Tue May 19 18:57:08 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsendian.h Tue May 19 19:00:49 2009 +0300 @@ -24,9 +24,9 @@ along with this program. If not, see -void smsendian_handle_tx_message(void *buffer); -void smsendian_handle_rx_message(void *buffer); -void smsendian_handle_message_header(void *msg); +extern void smsendian_handle_tx_message(void *buffer); +extern void smsendian_handle_rx_message(void *buffer); +extern void smsendian_handle_message_header(void *msg); #endif /* __SMS_ENDIAN_H__ */ -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [09051_53] Siano: smscore - remove redundant define
# HG changeset patch # User Uri Shkolnik # Date 1242749102 -10800 # Node ID dfcfb90798d3a27cb174019b17fffdee9ce7b2b9 # Parent b71383c9ab1cd51cc307b488ef4397f6eb345cef [09051_53] Siano: smscore - remove redundant define From: Uri Shkolnik Remove redundant define. Priority: normal Signed-off-by: Uri Shkolnik diff -r b71383c9ab1c -r dfcfb90798d3 linux/drivers/media/dvb/siano/smscoreapi.h --- a/linux/drivers/media/dvb/siano/smscoreapi.hTue May 19 19:00:49 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.hTue May 19 19:05:02 2009 +0300 @@ -645,7 +645,6 @@ extern void smscore_onresponse(struct sm extern void smscore_onresponse(struct smscore_device_t *coredev, struct smscore_buffer_t *cb); -#if 1 extern int smscore_get_common_buffer_size(struct smscore_device_t *coredev); extern int smscore_map_common_buffer(struct smscore_device_t *coredev, struct vm_area_struct *vma); @@ -653,7 +652,6 @@ extern int smscore_get_fw_filename(struc int mode, char *filename); extern int smscore_send_fw_file(struct smscore_device_t *coredev, u8 *ufwbuf, int size); -#endif extern struct smscore_buffer_t *smscore_getbuffer(struct smscore_device_t *coredev); -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [09051_54] Siano: remove obsolete sms_board_setup
# HG changeset patch # User Uri Shkolnik # Date 1242749967 -10800 # Node ID 0296b0c436d6deba48c710cfb510988267cea057 # Parent dfcfb90798d3a27cb174019b17fffdee9ce7b2b9 [09051_54] Siano: remove obsolete sms_board_setup From: Uri Shkolnik Remove the target specific sms_board_setup from smsdvb. This is handled now via smsdvb and sms-cards events. Priority: normal Signed-off-by: Uri Shkolnik diff -r dfcfb90798d3 -r 0296b0c436d6 linux/drivers/media/dvb/siano/sms-cards.c --- a/linux/drivers/media/dvb/siano/sms-cards.c Tue May 19 19:05:02 2009 +0300 +++ b/linux/drivers/media/dvb/siano/sms-cards.c Tue May 19 19:19:27 2009 +0300 @@ -303,28 +303,6 @@ static int sms_set_gpio(struct smscore_d return smscore_set_gpio(coredev, gpio, lvl); } -int sms_board_setup(struct smscore_device_t *coredev) -{ - int board_id = smscore_get_board_id(coredev); - struct sms_board *board = sms_get_board(board_id); - - switch (board_id) { - case SMS1XXX_BOARD_HAUPPAUGE_WINDHAM: - /* turn off all LEDs */ - sms_set_gpio(coredev, board->led_power, 0); - sms_set_gpio(coredev, board->led_hi, 0); - sms_set_gpio(coredev, board->led_lo, 0); - break; - case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2: - case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD: - /* turn off LNA */ - sms_set_gpio(coredev, board->lna_ctrl, 0); - break; - } - return 0; -} -EXPORT_SYMBOL_GPL(sms_board_setup); - int sms_board_power(struct smscore_device_t *coredev, int onoff) { int board_id = smscore_get_board_id(coredev); diff -r dfcfb90798d3 -r 0296b0c436d6 linux/drivers/media/dvb/siano/sms-cards.h --- a/linux/drivers/media/dvb/siano/sms-cards.h Tue May 19 19:05:02 2009 +0300 +++ b/linux/drivers/media/dvb/siano/sms-cards.h Tue May 19 19:19:27 2009 +0300 @@ -109,8 +109,6 @@ int sms_board_event(struct smscore_devic int sms_board_event(struct smscore_device_t *coredev, enum SMS_BOARD_EVENTS gevent); -int sms_board_setup(struct smscore_device_t *coredev); - #define SMS_LED_OFF 0 #define SMS_LED_LO 1 #define SMS_LED_HI 2 diff -r dfcfb90798d3 -r 0296b0c436d6 linux/drivers/media/dvb/siano/smsdvb.c --- a/linux/drivers/media/dvb/siano/smsdvb.cTue May 19 19:05:02 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsdvb.cTue May 19 19:19:27 2009 +0300 @@ -600,7 +600,6 @@ static int smsdvb_hotplug(struct smscore sms_board_dvb3_event(client, DVB3_EVENT_HOTPLUG); sms_info("success"); - sms_board_setup(coredev); return 0; -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [09051_55] Siano: smscards - merge the binding handling
# HG changeset patch # User Uri Shkolnik # Date 1242750556 -10800 # Node ID d92f2dfcb226c5f8b8c3216f7cf96126f7571702 # Parent 0296b0c436d6deba48c710cfb510988267cea057 [09051_55] Siano: smscards - merge the binding handling. From: Uri Shkolnik Merge the bind handling into the events switch. Priority: normal Signed-off-by: Uri Shkolnik diff -r 0296b0c436d6 -r d92f2dfcb226 linux/drivers/media/dvb/siano/sms-cards.c --- a/linux/drivers/media/dvb/siano/sms-cards.c Tue May 19 19:19:27 2009 +0300 +++ b/linux/drivers/media/dvb/siano/sms-cards.c Tue May 19 19:29:16 2009 +0300 @@ -194,7 +194,13 @@ int sms_board_event(struct smscore_devic case BOARD_EVENT_BIND: switch (board_id) { + case SMS1XXX_BOARD_HAUPPAUGE_CATAMOUNT: + case SMS1XXX_BOARD_HAUPPAUGE_OKEMO_A: + case SMS1XXX_BOARD_HAUPPAUGE_OKEMO_B: + request_module("smsdvb"); + break; case SMS1XXX_BOARD_HAUPPAUGE_WINDHAM: + request_module("smsdvb"); smscore_gpio_set_level(coredev, board->board_cfg.leds_power, 1); smscore_gpio_set_level(coredev, @@ -366,20 +372,3 @@ int sms_board_lna_control(struct smscore return -EINVAL; } EXPORT_SYMBOL_GPL(sms_board_lna_control); - -int sms_board_load_modules(int id) -{ - switch (id) { - case SMS1XXX_BOARD_HAUPPAUGE_CATAMOUNT: - case SMS1XXX_BOARD_HAUPPAUGE_OKEMO_A: - case SMS1XXX_BOARD_HAUPPAUGE_OKEMO_B: - case SMS1XXX_BOARD_HAUPPAUGE_WINDHAM: - request_module("smsdvb"); - break; - default: - /* do nothing */ - break; - } - return 0; -} -EXPORT_SYMBOL_GPL(sms_board_load_modules); -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [09051_56] Siano: cards - merge load_module to event switch
# HG changeset patch # User Uri Shkolnik # Date 1242751505 -10800 # Node ID f78cbc153c82ebe58a1bbe82271b91f5a4a90642 # Parent d92f2dfcb226c5f8b8c3216f7cf96126f7571702 [09051_56] Siano: cards - merge load_module to event switch From: Uri Shkolnik Merge the load_module into the board_event, remove redundant function. Priority: normal Signed-off-by: Uri Shkolnik diff -r d92f2dfcb226 -r f78cbc153c82 linux/drivers/media/dvb/siano/sms-cards.c --- a/linux/drivers/media/dvb/siano/sms-cards.c Tue May 19 19:29:16 2009 +0300 +++ b/linux/drivers/media/dvb/siano/sms-cards.c Tue May 19 19:45:05 2009 +0300 @@ -194,13 +194,7 @@ int sms_board_event(struct smscore_devic case BOARD_EVENT_BIND: -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [09051_57] Siano: smscards - remove redundant code
# HG changeset patch # User Uri Shkolnik # Date 1242751824 -10800 # Node ID fd16bcd8b9f1fffe0b605ca5b3b2138fc920e927 # Parent f78cbc153c82ebe58a1bbe82271b91f5a4a90642 [09051_57] Siano: smscards - remove redundant code From: Uri Shkolnik Remove code that has been duplicate with the new boards events manager Priority: normal Signed-off-by: Uri Shkolnik diff -r f78cbc153c82 -r fd16bcd8b9f1 linux/drivers/media/dvb/siano/sms-cards.c --- a/linux/drivers/media/dvb/siano/sms-cards.c Tue May 19 19:45:05 2009 +0300 +++ b/linux/drivers/media/dvb/siano/sms-cards.c Tue May 19 19:50:24 2009 +0300 @@ -281,98 +281,3 @@ int sms_board_event(struct smscore_devic return 0; } EXPORT_SYMBOL_GPL(sms_board_event); - -static int sms_set_gpio(struct smscore_device_t *coredev, int pin, int enable) -{ - int lvl, ret; - u32 gpio; - struct smscore_config_gpio gpioconfig = { - .direction= SMS_GPIO_DIRECTION_OUTPUT, - .pullupdown = SMS_GPIO_PULLUPDOWN_NONE, - .inputcharacteristics = SMS_GPIO_INPUTCHARACTERISTICS_NORMAL, - .outputslewrate = SMS_GPIO_OUTPUTSLEWRATE_FAST, - .outputdriving= SMS_GPIO_OUTPUTDRIVING_4mA, - }; - - if (pin == 0) - return -EINVAL; - - if (pin < 0) { - /* inverted gpio */ - gpio = pin * -1; - lvl = enable ? 0 : 1; - } else { - gpio = pin; - lvl = enable ? 1 : 0; - } - - ret = smscore_configure_gpio(coredev, gpio, &gpioconfig); - if (ret < 0) - return ret; - - return smscore_set_gpio(coredev, gpio, lvl); -} - -int sms_board_power(struct smscore_device_t *coredev, int onoff) -{ - int board_id = smscore_get_board_id(coredev); - struct sms_board *board = sms_get_board(board_id); - - switch (board_id) { - case SMS1XXX_BOARD_HAUPPAUGE_WINDHAM: - /* power LED */ - sms_set_gpio(coredev, -board->led_power, onoff ? 1 : 0); - break; - case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2: - case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD: - /* LNA */ - if (!onoff) - sms_set_gpio(coredev, board->lna_ctrl, 0); - break; - } - return 0; -} -EXPORT_SYMBOL_GPL(sms_board_power); - -int sms_board_led_feedback(struct smscore_device_t *coredev, int led) -{ - int board_id = smscore_get_board_id(coredev); - struct sms_board *board = sms_get_board(board_id); - - /* dont touch GPIO if LEDs are already set */ - if (smscore_led_state(coredev, -1) == led) - return 0; - - switch (board_id) { - case SMS1XXX_BOARD_HAUPPAUGE_WINDHAM: - sms_set_gpio(coredev, -board->led_lo, (led & SMS_LED_LO) ? 1 : 0); - sms_set_gpio(coredev, -board->led_hi, (led & SMS_LED_HI) ? 1 : 0); - - smscore_led_state(coredev, led); - break; - } - return 0; -} -EXPORT_SYMBOL_GPL(sms_board_led_feedback); - -int sms_board_lna_control(struct smscore_device_t *coredev, int onoff) -{ - int board_id = smscore_get_board_id(coredev); - struct sms_board *board = sms_get_board(board_id); - - sms_debug("%s: LNA %s", __func__, onoff ? "enabled" : "disabled"); - - switch (board_id) { - case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2: - case SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD: - sms_set_gpio(coredev, -board->rf_switch, onoff ? 1 : 0); - return sms_set_gpio(coredev, - board->lna_ctrl, onoff ? 1 : 0); - } - return -EINVAL; -} -EXPORT_SYMBOL_GPL(sms_board_lna_control); diff -r f78cbc153c82 -r fd16bcd8b9f1 linux/drivers/media/dvb/siano/sms-cards.h --- a/linux/drivers/media/dvb/siano/sms-cards.h Tue May 19 19:45:05 2009 +0300 +++ b/linux/drivers/media/dvb/siano/sms-cards.h Tue May 19 19:50:24 2009 +0300 @@ -110,11 +110,4 @@ int sms_board_event(struct smscore_devic int sms_board_event(struct smscore_device_t *coredev, enum SMS_BOARD_EVENTS gevent); -#define SMS_LED_OFF 0 -#define SMS_LED_LO 1 -#define SMS_LED_HI 2 -int sms_board_led_feedback(struct smscore_device_t *coredev, int led); -int sms_board_power(struct smscore_device_t *coredev, int onoff); -int sms_board_lna_control(struct smscore_device_t *coredev, int onoff); - #endif /* __SMS_CARDS_H__ */ -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [09051_58] Siano: remove obsolete code
# HG changeset patch # User Uri Shkolnik # Date 1242752280 -10800 # Node ID 0c33837206742f128aa033b2c9fb80c725e48dd7 # Parent fd16bcd8b9f1fffe0b605ca5b3b2138fc920e927 [09051_58] Siano: remove obsolete code From: Uri Shkolnik Remove obsolete code - old gpio managment (totaly bogus), and its dependent code from cards. Priority: normal Signed-off-by: Uri Shkolnik diff -r fd16bcd8b9f1 -r 0c3383720674 linux/drivers/media/dvb/siano/sms-cards.c --- a/linux/drivers/media/dvb/siano/sms-cards.c Tue May 19 19:50:24 2009 +0300 +++ b/linux/drivers/media/dvb/siano/sms-cards.c Tue May 19 19:58:00 2009 +0300 @@ -66,24 +66,17 @@ static struct sms_board sms_boards[] = { .board_cfg.leds_power = 26, .board_cfg.led0 = 27, .board_cfg.led1 = 28, - .led_power = 26, - .led_lo= 27, - .led_hi= 28, }, [SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD] = { .name = "Hauppauge WinTV MiniCard", .type = SMS_NOVA_B0, .fw[DEVICE_MODE_DVBT_BDA] = "sms1xxx-hcw-55xxx-dvbt-02.fw", - .lna_ctrl = 29, .board_cfg.foreign_lna0_ctrl = 29, - .rf_switch = 17, - .board_cfg.rf_switch_uhf = 17, }, [SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2] = { .name = "Hauppauge WinTV MiniCard", .type = SMS_NOVA_B0, .fw[DEVICE_MODE_DVBT_BDA] = "sms1xxx-hcw-55xxx-dvbt-02.fw", - .lna_ctrl = -1, }, [SMS1XXX_BOARD_SIANO_NICE] = { /* 11 */ diff -r fd16bcd8b9f1 -r 0c3383720674 linux/drivers/media/dvb/siano/sms-cards.h --- a/linux/drivers/media/dvb/siano/sms-cards.h Tue May 19 19:50:24 2009 +0300 +++ b/linux/drivers/media/dvb/siano/sms-cards.h Tue May 19 19:58:00 2009 +0300 @@ -76,9 +76,6 @@ struct sms_board { char *name, *fw[DEVICE_MODE_MAX]; struct sms_board_gpio_cfg board_cfg; enum ir_kb_type ir_kb_type; - - /* gpios */ - int led_power, led_hi, led_lo, lna_ctrl, rf_switch; }; struct sms_board *sms_get_board(int id); diff -r fd16bcd8b9f1 -r 0c3383720674 linux/drivers/media/dvb/siano/smscoreapi.c --- a/linux/drivers/media/dvb/siano/smscoreapi.cTue May 19 19:50:24 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smscoreapi.cTue May 19 19:58:00 2009 +0300 @@ -74,14 +74,6 @@ void smscore_set_board_id(struct smscore { core->board_id = id; } - -int smscore_led_state(struct smscore_device_t *core, int led) -{ - if (led >= 0) - core->led_state = led; - return core->led_state; -} -EXPORT_SYMBOL_GPL(smscore_set_board_id); int smscore_get_board_id(struct smscore_device_t *core) { @@ -1451,78 +1443,6 @@ static int smscore_map_common_buffer(str } #endif /* SMS_HOSTLIB_SUBSYS */ -/* old GPIO managments implementation */ -int smscore_configure_gpio(struct smscore_device_t *coredev, u32 pin, - struct smscore_config_gpio *pinconfig) -{ - struct { - struct SmsMsgHdr_ST hdr; - u32 data[6]; - } msg; - - if (coredev->device_flags & SMS_DEVICE_FAMILY2) { - msg.hdr.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; - msg.hdr.msgDstId = HIF_TASK; - msg.hdr.msgFlags = 0; - msg.hdr.msgType = MSG_SMS_GPIO_CONFIG_EX_REQ; - msg.hdr.msgLength = sizeof(msg); - - msg.data[0] = pin; - msg.data[1] = pinconfig->pullupdown; - - /* Convert slew rate for Nova: Fast(0) = 3 / Slow(1) = 0; */ - msg.data[2] = pinconfig->outputslewrate == 0 ? 3 : 0; - - switch (pinconfig->outputdriving) { - case SMS_GPIO_OUTPUTDRIVING_16mA: - msg.data[3] = 7; /* Nova - 16mA */ - break; - case SMS_GPIO_OUTPUTDRIVING_12mA: - msg.data[3] = 5; /* Nova - 11mA */ - break; - case SMS_GPIO_OUTPUTDRIVING_8mA: - msg.data[3] = 3; /* Nova - 7mA */ - break; - case SMS_GPIO_OUTPUTDRIVING_4mA: - default: - msg.data[3] = 2; /* Nova - 4mA */ - break; - } - - msg.data[4] = pinconfig->direction; - msg.data[5] = 0; - } else /* TODO: SMS_DEVICE_FAMILY1 */ - return -EINVAL; - - return coredev->sendrequest_handler(coredev->context, - &msg, sizeof(msg)); -} - -int smscore_set_gpio(struct smscore_device_t *coredev, u32 pin, int level) -{ - struct { - struct SmsMsgHdr_ST hdr; - u32 data[3]; - } msg; - - if (pin > MAX_GPIO_PIN_NUMBER) - return -EI
Re: [PATCH] [09051_54] Siano: remove obsolete sms_board_setup
--- On Tue, 5/19/09, Uri Shkolnik wrote: > From: Uri Shkolnik > Subject: Re: [PATCH] [09051_54] Siano: remove obsolete sms_board_setup > To: "Michael Krufky" > Date: Tuesday, May 19, 2009, 7:57 PM > > > --- On Tue, 5/19/09, Michael Krufky > wrote: > > > From: Michael Krufky > > Subject: Re: [PATCH] [09051_54] Siano: remove obsolete > sms_board_setup > > To: "Uri Shkolnik" > > Cc: "LinuxML" , > "Mauro Carvalho Chehab" > > Date: Tuesday, May 19, 2009, 7:31 PM > > On Tue, May 19, 2009 at 12:15 PM, Uri > > Shkolnik > > wrote: > > > > > > # HG changeset patch > > > # User Uri Shkolnik > > > # Date 1242749967 -10800 > > > # Node ID > 0296b0c436d6deba48c710cfb510988267cea057 > > > # Parent > dfcfb90798d3a27cb174019b17fffdee9ce7b2b9 > > > [09051_54] Siano: remove obsolete > sms_board_setup > > > > > > From: Uri Shkolnik > > > > > > Remove the target specific sms_board_setup from > > smsdvb. This > > > is handled now via smsdvb and sms-cards events. > > > > > > Priority: normal > > > > > > Signed-off-by: Uri Shkolnik > > > > > > diff -r dfcfb90798d3 -r 0296b0c436d6 > > linux/drivers/media/dvb/siano/sms-cards.c > > > --- a/linux/drivers/media/dvb/siano/sms-cards.c > Tue > > May 19 19:05:02 2009 +0300 > > > +++ b/linux/drivers/media/dvb/siano/sms-cards.c > Tue > > May 19 19:19:27 2009 +0300 > > > @@ -303,28 +303,6 @@ static int > sms_set_gpio(struct > > smscore_d > > > return smscore_set_gpio(coredev, > gpio, > > lvl); > > > } > > > > > > -int sms_board_setup(struct smscore_device_t > > *coredev) > > > -{ > > > - int board_id = > > smscore_get_board_id(coredev); > > > - struct sms_board *board = > > sms_get_board(board_id); > > > - > > > - switch (board_id) { > > > - case SMS1XXX_BOARD_HAUPPAUGE_WINDHAM: > > > - /* turn off all LEDs */ > > > - sms_set_gpio(coredev, > > board->led_power, 0); > > > - sms_set_gpio(coredev, > > board->led_hi, 0); > > > - sms_set_gpio(coredev, > > board->led_lo, 0); > > > - break; > > > - case > > SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2: > > > - case > > SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD: > > > - /* turn off LNA */ > > > - sms_set_gpio(coredev, > > board->lna_ctrl, 0); > > > - break; > > > - } > > > - return 0; > > > -} > > > -EXPORT_SYMBOL_GPL(sms_board_setup); > > > - > > > int sms_board_power(struct smscore_device_t > > *coredev, int onoff) > > > { > > > int board_id = > > smscore_get_board_id(coredev); > > > diff -r dfcfb90798d3 -r 0296b0c436d6 > > linux/drivers/media/dvb/siano/sms-cards.h > > > --- a/linux/drivers/media/dvb/siano/sms-cards.h > Tue > > May 19 19:05:02 2009 +0300 > > > +++ b/linux/drivers/media/dvb/siano/sms-cards.h > Tue > > May 19 19:19:27 2009 +0300 > > > @@ -109,8 +109,6 @@ int sms_board_event(struct > > smscore_devic > > > int sms_board_event(struct smscore_device_t > > *coredev, > > > enum SMS_BOARD_EVENTS > gevent); > > > > > > -int sms_board_setup(struct smscore_device_t > > *coredev); > > > - > > > #define SMS_LED_OFF 0 > > > #define SMS_LED_LO 1 > > > #define SMS_LED_HI 2 > > > diff -r dfcfb90798d3 -r 0296b0c436d6 > > linux/drivers/media/dvb/siano/smsdvb.c > > > --- a/linux/drivers/media/dvb/siano/smsdvb.c > Tue > > May 19 19:05:02 2009 +0300 > > > +++ b/linux/drivers/media/dvb/siano/smsdvb.c > Tue > > May 19 19:19:27 2009 +0300 > > > @@ -600,7 +600,6 @@ static int > smsdvb_hotplug(struct > > smscore > > > sms_board_dvb3_event(client, > > DVB3_EVENT_HOTPLUG); > > > > > > sms_info("success"); > > > - sms_board_setup(coredev); > > > > > > return 0; > > > > > > > > > > > > > > > > > > -- > > > To unsubscribe from this list: send the line > > "unsubscribe linux-media" in > > > the body of a message to majord...@vger.kernel.org > > > More majordo