Commit 2bf290be authored by Antti Palosaari's avatar Antti Palosaari Committed by Mauro Carvalho Chehab

V4L/DVB (13364): ec168: add new driver for E3C EC168 DVB USB

E3C EC168 DVB USB driver
Signed-off-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent a15c7b42
...@@ -322,3 +322,11 @@ config DVB_USB_FRIIO ...@@ -322,3 +322,11 @@ config DVB_USB_FRIIO
depends on DVB_USB depends on DVB_USB
help help
Say Y here to support the Japanese DTV receiver Friio. Say Y here to support the Japanese DTV receiver Friio.
config DVB_USB_EC168
tristate "E3C EC168 DVB-T USB2.0 support"
depends on DVB_USB && EXPERIMENTAL
select DVB_EC100
select MEDIA_TUNER_MXL5005S if !MEDIA_TUNER_CUSTOMISE
help
Say Y here to support the E3C EC168 DVB-T USB2.0 receiver.
...@@ -82,6 +82,9 @@ obj-$(CONFIG_DVB_USB_CE6230) += dvb-usb-ce6230.o ...@@ -82,6 +82,9 @@ obj-$(CONFIG_DVB_USB_CE6230) += dvb-usb-ce6230.o
dvb-usb-friio-objs = friio.o friio-fe.o dvb-usb-friio-objs = friio.o friio-fe.o
obj-$(CONFIG_DVB_USB_FRIIO) += dvb-usb-friio.o obj-$(CONFIG_DVB_USB_FRIIO) += dvb-usb-friio.o
dvb-usb-ec168-objs = ec168.o
obj-$(CONFIG_DVB_USB_EC168) += dvb-usb-ec168.o
EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/ EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
# due to tuner-xc3028 # due to tuner-xc3028
EXTRA_CFLAGS += -Idrivers/media/common/tuners EXTRA_CFLAGS += -Idrivers/media/common/tuners
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#define USB_VID_DIBCOM 0x10b8 #define USB_VID_DIBCOM 0x10b8
#define USB_VID_DPOSH 0x1498 #define USB_VID_DPOSH 0x1498
#define USB_VID_DVICO 0x0fe9 #define USB_VID_DVICO 0x0fe9
#define USB_VID_E3C 0x18b4
#define USB_VID_ELGATO 0x0fd9 #define USB_VID_ELGATO 0x0fd9
#define USB_VID_EMPIA 0xeb1a #define USB_VID_EMPIA 0xeb1a
#define USB_VID_GENPIX 0x09c0 #define USB_VID_GENPIX 0x09c0
...@@ -104,6 +105,11 @@ ...@@ -104,6 +105,11 @@
#define USB_PID_DIBCOM_STK7770P 0x1e80 #define USB_PID_DIBCOM_STK7770P 0x1e80
#define USB_PID_DPOSH_M9206_COLD 0x9206 #define USB_PID_DPOSH_M9206_COLD 0x9206
#define USB_PID_DPOSH_M9206_WARM 0xa090 #define USB_PID_DPOSH_M9206_WARM 0xa090
#define USB_PID_E3C_EC168 0x1689
#define USB_PID_E3C_EC168_2 0xfffa
#define USB_PID_E3C_EC168_3 0xfffb
#define USB_PID_E3C_EC168_4 0x1001
#define USB_PID_E3C_EC168_5 0x1002
#define USB_PID_UNIWILL_STK7700P 0x6003 #define USB_PID_UNIWILL_STK7700P 0x6003
#define USB_PID_GENIUS_TVGO_DVB_T03 0x4012 #define USB_PID_GENIUS_TVGO_DVB_T03 0x4012
#define USB_PID_GRANDTEC_DVBT_USB_COLD 0x0fa0 #define USB_PID_GRANDTEC_DVBT_USB_COLD 0x0fa0
......
This diff is collapsed.
/*
* E3C EC168 DVB USB driver
*
* Copyright (C) 2009 Antti Palosaari <crope@iki.fi>
*
* 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, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#ifndef EC168_H
#define EC168_H
#define DVB_USB_LOG_PREFIX "ec168"
#include "dvb-usb.h"
#define deb_info(args...) dprintk(dvb_usb_ec168_debug, 0x01, args)
#define deb_rc(args...) dprintk(dvb_usb_ec168_debug, 0x02, args)
#define deb_xfer(args...) dprintk(dvb_usb_ec168_debug, 0x04, args)
#define deb_reg(args...) dprintk(dvb_usb_ec168_debug, 0x08, args)
#define deb_i2c(args...) dprintk(dvb_usb_ec168_debug, 0x10, args)
#define deb_fw(args...) dprintk(dvb_usb_ec168_debug, 0x20, args)
#define ec168_debug_dump(r, t, v, i, b, l, func) { \
int loop_; \
func("%02x %02x %02x %02x %02x %02x %02x %02x", \
t, r, v & 0xff, v >> 8, i & 0xff, i >> 8, l & 0xff, l >> 8); \
if (t == (USB_TYPE_VENDOR | USB_DIR_OUT)) \
func(" >>> "); \
else \
func(" <<< "); \
for (loop_ = 0; loop_ < l; loop_++) \
func("%02x ", b[loop_]); \
func("\n");\
}
#define EC168_USB_TIMEOUT 1000
struct ec168_req {
u8 cmd; /* [1] */
u16 value; /* [2|3] */
u16 index; /* [4|5] */
u16 size; /* [6|7] */
u8 *data;
};
enum ec168_cmd {
DOWNLOAD_FIRMWARE = 0x00,
CONFIG = 0x01,
DEMOD_RW = 0x03,
GPIO = 0x04,
STREAMING_CTRL = 0x10,
READ_I2C = 0x20,
WRITE_I2C = 0x21,
HID_DOWNLOAD = 0x30,
GET_CONFIG,
SET_CONFIG,
READ_DEMOD,
WRITE_DEMOD,
};
#endif
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