aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/siano
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/siano')
-rw-r--r--drivers/media/dvb/siano/Kconfig34
-rw-r--r--drivers/media/dvb/siano/Makefile11
-rw-r--r--drivers/media/dvb/siano/sms-cards.c310
-rw-r--r--drivers/media/dvb/siano/sms-cards.h123
-rw-r--r--drivers/media/dvb/siano/smscoreapi.c1644
-rw-r--r--drivers/media/dvb/siano/smscoreapi.h775
-rw-r--r--drivers/media/dvb/siano/smsdvb.c962
-rw-r--r--drivers/media/dvb/siano/smsendian.c102
-rw-r--r--drivers/media/dvb/siano/smsendian.h32
-rw-r--r--drivers/media/dvb/siano/smsir.c114
-rw-r--r--drivers/media/dvb/siano/smsir.h55
-rw-r--r--drivers/media/dvb/siano/smssdio.c364
-rw-r--r--drivers/media/dvb/siano/smsusb.c582
13 files changed, 5108 insertions, 0 deletions
diff --git a/drivers/media/dvb/siano/Kconfig b/drivers/media/dvb/siano/Kconfig
new file mode 100644
index 00000000000..bc6456eb2c4
--- /dev/null
+++ b/drivers/media/dvb/siano/Kconfig
@@ -0,0 +1,34 @@
1#
2# Siano Mobile Silicon Digital TV device configuration
3#
4
5config SMS_SIANO_MDTV
6 tristate "Siano SMS1xxx based MDTV receiver"
7 depends on DVB_CORE && RC_CORE && HAS_DMA
8 ---help---
9 Choose Y or M here if you have MDTV receiver with a Siano chipset.
10
11 To compile this driver as a module, choose M here
12 (The module will be called smsmdtv).
13
14 Further documentation on this driver can be found on the WWW
15 at http://www.siano-ms.com/
16
17if SMS_SIANO_MDTV
18menu "Siano module components"
19
20# Hardware interfaces support
21
22config SMS_USB_DRV
23 tristate "USB interface support"
24 depends on DVB_CORE && USB
25 ---help---
26 Choose if you would like to have Siano's support for USB interface
27
28config SMS_SDIO_DRV
29 tristate "SDIO interface support"
30 depends on DVB_CORE && MMC
31 ---help---
32 Choose if you would like to have Siano's support for SDIO interface
33endmenu
34endif # SMS_SIANO_MDTV
diff --git a/drivers/media/dvb/siano/Makefile b/drivers/media/dvb/siano/Makefile
new file mode 100644
index 00000000000..c54140b5ab5
--- /dev/null
+++ b/drivers/media/dvb/siano/Makefile
@@ -0,0 +1,11 @@
1
2smsmdtv-objs := smscoreapi.o sms-cards.o smsendian.o smsir.o
3
4obj-$(CONFIG_SMS_SIANO_MDTV) += smsmdtv.o smsdvb.o
5obj-$(CONFIG_SMS_USB_DRV) += smsusb.o
6obj-$(CONFIG_SMS_SDIO_DRV) += smssdio.o
7
8EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
9
10EXTRA_CFLAGS += $(extra-cflags-y) $(extra-cflags-m)
11
diff --git a/drivers/media/dvb/siano/sms-cards.c b/drivers/media/dvb/siano/sms-cards.c
new file mode 100644
index 00000000000..af121db88ea
--- /dev/null
+++ b/drivers/media/dvb/siano/sms-cards.c
@@ -0,0 +1,310 @@
1/*
2 * Card-specific functions for the Siano SMS1xxx USB dongle
3 *
4 * Copyright (c) 2008 Michael Krufky <mkrufky@linuxtv.org>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation;
9 *
10 * Software distributed under the License is distributed on an "AS IS"
11 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
12 *
13 * See the GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19
20#include "sms-cards.h"
21#include "smsir.h"
22
23static int sms_dbg;
24module_param_named(cards_dbg, sms_dbg, int, 0644);
25MODULE_PARM_DESC(cards_dbg, "set debug level (info=1, adv=2 (or-able))");
26
27static struct sms_board sms_boards[] = {
28 [SMS_BOARD_UNKNOWN] = {
29 .name = "Unknown board",
30 },
31 [SMS1XXX_BOARD_SIANO_STELLAR] = {
32 .name = "Siano Stellar Digital Receiver",
33 .type = SMS_STELLAR,
34 },
35 [SMS1XXX_BOARD_SIANO_NOVA_A] = {
36 .name = "Siano Nova A Digital Receiver",
37 .type = SMS_NOVA_A0,
38 },
39 [SMS1XXX_BOARD_SIANO_NOVA_B] = {
40 .name = "Siano Nova B Digital Receiver",
41 .type = SMS_NOVA_B0,
42 },
43 [SMS1XXX_BOARD_SIANO_VEGA] = {
44 .name = "Siano Vega Digital Receiver",
45 .type = SMS_VEGA,
46 },
47 [SMS1XXX_BOARD_HAUPPAUGE_CATAMOUNT] = {
48 .name = "Hauppauge Catamount",
49 .type = SMS_STELLAR,
50 .fw[DEVICE_MODE_DVBT_BDA] = "sms1xxx-stellar-dvbt-01.fw",
51 },
52 [SMS1XXX_BOARD_HAUPPAUGE_OKEMO_A] = {
53 .name = "Hauppauge Okemo-A",
54 .type = SMS_NOVA_A0,
55 .fw[DEVICE_MODE_DVBT_BDA] = "sms1xxx-nova-a-dvbt-01.fw",
56 },
57 [SMS1XXX_BOARD_HAUPPAUGE_OKEMO_B] = {
58 .name = "Hauppauge Okemo-B",
59 .type = SMS_NOVA_B0,
60 .fw[DEVICE_MODE_DVBT_BDA] = "sms1xxx-nova-b-dvbt-01.fw",
61 },
62 [SMS1XXX_BOARD_HAUPPAUGE_WINDHAM] = {
63 .name = "Hauppauge WinTV MiniStick",
64 .type = SMS_NOVA_B0,
65 .fw[DEVICE_MODE_ISDBT_BDA] = "sms1xxx-hcw-55xxx-isdbt-02.fw",
66 .fw[DEVICE_MODE_DVBT_BDA] = "sms1xxx-hcw-55xxx-dvbt-02.fw",
67 .rc_codes = RC_MAP_HAUPPAUGE,
68 .board_cfg.leds_power = 26,
69 .board_cfg.led0 = 27,
70 .board_cfg.led1 = 28,
71 .board_cfg.ir = 9,
72 .led_power = 26,
73 .led_lo = 27,
74 .led_hi = 28,
75 },
76 [SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD] = {
77 .name = "Hauppauge WinTV MiniCard",
78 .type = SMS_NOVA_B0,
79 .fw[DEVICE_MODE_DVBT_BDA] = "sms1xxx-hcw-55xxx-dvbt-02.fw",
80 .lna_ctrl = 29,
81 .board_cfg.foreign_lna0_ctrl = 29,
82 .rf_switch = 17,
83 .board_cfg.rf_switch_uhf = 17,
84 },
85 [SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2] = {
86 .name = "Hauppauge WinTV MiniCard",
87 .type = SMS_NOVA_B0,
88 .fw[DEVICE_MODE_DVBT_BDA] = "sms1xxx-hcw-55xxx-dvbt-02.fw",
89 .lna_ctrl = -1,
90 },
91 [SMS1XXX_BOARD_SIANO_NICE] = {
92 /* 11 */
93 .name = "Siano Nice Digital Receiver",
94 .type = SMS_NOVA_B0,
95 },
96 [SMS1XXX_BOARD_SIANO_VENICE] = {
97 /* 12 */
98 .name = "Siano Venice Digital Receiver",
99 .type = SMS_VEGA,
100 },
101};
102
103struct sms_board *sms_get_board(unsigned id)
104{
105 BUG_ON(id >= ARRAY_SIZE(sms_boards));
106
107 return &sms_boards[id];
108}
109EXPORT_SYMBOL_GPL(sms_get_board);
110static inline void sms_gpio_assign_11xx_default_led_config(
111 struct smscore_gpio_config *pGpioConfig) {
112 pGpioConfig->Direction = SMS_GPIO_DIRECTION_OUTPUT;
113 pGpioConfig->InputCharacteristics =
114 SMS_GPIO_INPUT_CHARACTERISTICS_NORMAL;
115 pGpioConfig->OutputDriving = SMS_GPIO_OUTPUT_DRIVING_4mA;
116 pGpioConfig->OutputSlewRate = SMS_GPIO_OUTPUT_SLEW_RATE_0_45_V_NS;
117 pGpioConfig->PullUpDown = SMS_GPIO_PULL_UP_DOWN_NONE;
118}
119
120int sms_board_event(struct smscore_device_t *coredev,
121 enum SMS_BOARD_EVENTS gevent) {
122 struct smscore_gpio_config MyGpioConfig;
123
124 sms_gpio_assign_11xx_default_led_config(&MyGpioConfig);
125
126 switch (gevent) {
127 case BOARD_EVENT_POWER_INIT: /* including hotplug */
128 break; /* BOARD_EVENT_BIND */
129
130 case BOARD_EVENT_POWER_SUSPEND:
131 break; /* BOARD_EVENT_POWER_SUSPEND */
132
133 case BOARD_EVENT_POWER_RESUME:
134 break; /* BOARD_EVENT_POWER_RESUME */
135
136 case BOARD_EVENT_BIND:
137 break; /* BOARD_EVENT_BIND */
138
139 case BOARD_EVENT_SCAN_PROG:
140 break; /* BOARD_EVENT_SCAN_PROG */
141 case BOARD_EVENT_SCAN_COMP:
142 break; /* BOARD_EVENT_SCAN_COMP */
143 case BOARD_EVENT_EMERGENCY_WARNING_SIGNAL:
144 break; /* BOARD_EVENT_EMERGENCY_WARNING_SIGNAL */
145 case BOARD_EVENT_FE_LOCK:
146 break; /* BOARD_EVENT_FE_LOCK */