Commit 739ff04f authored by Patrick Boettcher's avatar Patrick Boettcher Committed by Mauro Carvalho Chehab

[media] technisat-usb2: added driver for Technisat's USB2.0 DVB-S/S2 receiver

This patch is adding support for Technisat's new USB2.0 DVB-S/S2 receiver
device. The development was sponsored by Technisat.

The Green led is toggle depending on the frontend-state. The Red LED is turned
on all the time.

The MAC address reading from the EEPROM along with the
LRC-method to check whether its valid.

Support for the IR-receiver of the Technisat USB2 box. The keys of
small, black remote-control are built-in, repeated key behaviour are
simulated.

The i2c-mutex of the dvb-usb-structure is used as a general mutex for
USB requests, as there are 3 threads racing for atomic requests
consisting of multiple usb-requests.

A module option is there which disables the toggling of LEDs by the
driver on certain triggers. Useful when being used in a "dark"
environment.

[mchehab@redhat.com: Fix merge conflicts with RC renaming patches]
Signed-off-by: default avatarMartin Wilks <m.wilks@technisat.com>
Signed-off-by: default avatarPatrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 4f7200a8
......@@ -358,3 +358,11 @@ config DVB_USB_LME2510
select DVB_IX2505V if !DVB_FE_CUSTOMISE
help
Say Y here to support the LME DM04/QQBOX DVB-S USB2.0 .
config DVB_USB_TECHNISAT_USB2
tristate "Technisat DVB-S/S2 USB2.0 support"
depends on DVB_USB
select DVB_STB0899 if !DVB_FE_CUSTOMISE
select DVB_STB6100 if !DVB_FE_CUSTOMISE
help
Say Y here to support the Technisat USB2 DVB-S/S2 device
......@@ -91,6 +91,9 @@ obj-$(CONFIG_DVB_USB_AZ6027) += dvb-usb-az6027.o
dvb-usb-lmedm04-objs = lmedm04.o
obj-$(CONFIG_DVB_USB_LME2510) += dvb-usb-lmedm04.o
dvb-usb-technisat-usb2-objs = technisat-usb2.o
obj-$(CONFIG_DVB_USB_TECHNISAT_USB2) += dvb-usb-technisat-usb2.o
EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
# due to tuner-xc3028
EXTRA_CFLAGS += -Idrivers/media/common/tuners
......
......@@ -312,4 +312,5 @@
#define USB_PID_TERRATEC_DVBS2CI_V2 0x10ac
#define USB_PID_TECHNISAT_USB2_HDCI_V1 0x0001
#define USB_PID_TECHNISAT_USB2_HDCI_V2 0x0002
#define USB_PID_TECHNISAT_USB2_DVB_S2 0x0500
#endif
......@@ -246,7 +246,7 @@ static int rc_core_dvb_usb_remote_init(struct dvb_usb_device *d)
dev->map_name = d->props.rc.core.rc_codes;
dev->change_protocol = d->props.rc.core.change_protocol;
dev->allowed_protos = d->props.rc.core.allowed_protos;
dev->driver_type = RC_DRIVER_SCANCODE;
dev->driver_type = d->props.rc.core.driver_type;
usb_to_input_id(d->udev, &dev->input_id);
dev->input_name = "IR-receiver inside an USB DVB receiver";
dev->input_phys = d->rc_phys;
......
......@@ -181,6 +181,7 @@ struct dvb_rc_legacy {
* @rc_codes: name of rc codes table
* @protocol: type of protocol(s) currently used by the driver
* @allowed_protos: protocol(s) supported by the driver
* @driver_type: Used to point if a device supports raw mode
* @change_protocol: callback to change protocol
* @rc_query: called to query an event event.
* @rc_interval: time in ms between two queries.
......@@ -190,6 +191,7 @@ struct dvb_rc {
char *rc_codes;
u64 protocol;
u64 allowed_protos;
enum rc_driver_type driver_type;
int (*change_protocol)(struct rc_dev *dev, u64 rc_type);
char *module_name;
int (*rc_query) (struct dvb_usb_device *d);
......
This diff is collapsed.
......@@ -74,6 +74,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
rc-real-audio-220-32-keys.o \
rc-streamzap.o \
rc-tbs-nec.o \
rc-technisat-usb2.o \
rc-terratec-cinergy-xs.o \
rc-terratec-slim.o \
rc-tevii-nec.o \
......
/* rc-technisat-usb2.c - Keytable for SkyStar HD USB
*
* Copyright (C) 2010 Patrick Boettcher,
* Kernel Labs Inc. PO Box 745, St James, NY 11780
*
* Development was sponsored by Technisat Digital UK Limited, whose
* registered office is Witan Gate House 500 - 600 Witan Gate West,
* Milton Keynes, MK9 1SH
*
* 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.
*
*
* 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.
*
* THIS PROGRAM IS PROVIDED "AS IS" AND BOTH THE COPYRIGHT HOLDER AND
* TECHNISAT DIGITAL UK LTD DISCLAIM ALL WARRANTIES WITH REGARD TO
* THIS PROGRAM INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY OR
* FITNESS FOR A PARTICULAR PURPOSE. NEITHER THE COPYRIGHT HOLDER
* NOR TECHNISAT DIGITAL UK LIMITED SHALL BE LIABLE FOR ANY SPECIAL,
* DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS PROGRAM. See the
* GNU General Public License for more details.
*/
#include <media/rc-map.h>
static struct rc_map_table technisat_usb2[] = {
{0x0a0c, KEY_POWER},
{0x0a01, KEY_1},
{0x0a02, KEY_2},
{0x0a03, KEY_3},
{0x0a0d, KEY_MUTE},
{0x0a04, KEY_4},
{0x0a05, KEY_5},
{0x0a06, KEY_6},
{0x0a38, KEY_VIDEO}, /* EXT */
{0x0a07, KEY_7},
{0x0a08, KEY_8},
{0x0a09, KEY_9},
{0x0a00, KEY_0},
{0x0a4f, KEY_INFO},
{0x0a20, KEY_CHANNELUP},
{0x0a52, KEY_MENU},
{0x0a11, KEY_VOLUMEUP},
{0x0a57, KEY_OK},
{0x0a10, KEY_VOLUMEDOWN},
{0x0a2f, KEY_EPG},
{0x0a21, KEY_CHANNELDOWN},
{0x0a22, KEY_REFRESH},
{0x0a3c, KEY_TEXT},
{0x0a76, KEY_ENTER}, /* HOOK */
{0x0a0f, KEY_HELP},
{0x0a6b, KEY_RED},
{0x0a6c, KEY_GREEN},
{0x0a6d, KEY_YELLOW},
{0x0a6e, KEY_BLUE},
{0x0a29, KEY_STOP},
{0x0a23, KEY_LANGUAGE},
{0x0a53, KEY_TV},
{0x0a0a, KEY_PROGRAM},
};
static struct rc_map_list technisat_usb2_map = {
.map = {
.scan = technisat_usb2,
.size = ARRAY_SIZE(technisat_usb2),
.rc_type = RC_TYPE_RC5,
.name = RC_MAP_TECHNISAT_USB2,
}
};
static int __init init_rc_map(void)
{
return rc_map_register(&technisat_usb2_map);
}
static void __exit exit_rc_map(void)
{
rc_map_unregister(&technisat_usb2_map);
}
module_init(init_rc_map)
module_exit(exit_rc_map)
MODULE_AUTHOR("Patrick Boettcher <pboettcher@kernellabs.com>");
MODULE_LICENSE("GPL");
......@@ -131,6 +131,7 @@ void rc_map_init(void);
#define RC_MAP_REAL_AUDIO_220_32_KEYS "rc-real-audio-220-32-keys"
#define RC_MAP_STREAMZAP "rc-streamzap"
#define RC_MAP_TBS_NEC "rc-tbs-nec"
#define RC_MAP_TECHNISAT_USB2 "rc-technisat-usb2"
#define RC_MAP_TERRATEC_CINERGY_XS "rc-terratec-cinergy-xs"
#define RC_MAP_TERRATEC_SLIM "rc-terratec-slim"
#define RC_MAP_TEVII_NEC "rc-tevii-nec"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment