Skip to content

Commit

Permalink
Staging: go7007: add sensoray 2250/2251 support
Browse files Browse the repository at this point in the history
This is the driver for the Sensoray 2250/2251 USB devices added to
go7007 driver.


Signed-off-by: Pete Eberlein <pete@sensoray.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Pete Eberlein authored and Greg Kroah-Hartman committed Jan 6, 2009
1 parent d73f822 commit b11869d
Show file tree
Hide file tree
Showing 8 changed files with 893 additions and 3 deletions.
10 changes: 10 additions & 0 deletions drivers/staging/go7007/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,13 @@ config VIDEO_GO7007_USB
To compile this driver as a module, choose M here: the
module will be called go7007-usb

config VIDEO_GO7007_USB_S2250_BOARD
tristate "Sensoray 2250/2251 support"
depends on VIDEO_GO7007_USB && DVB_USB
default N
---help---
This is a video4linux driver for the Sensoray 2250/2251 device

To compile this driver as a module, choose M here: the
module will be called s2250-board

15 changes: 12 additions & 3 deletions drivers/staging/go7007/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,23 @@

obj-$(CONFIG_VIDEO_GO7007) += go7007.o
obj-$(CONFIG_VIDEO_GO7007_USB) += go7007-usb.o
obj-$(CONFIG_VIDEO_GO7007_USB_S2250_BOARD) += s2250.o

go7007-objs += go7007-v4l2.o go7007-driver.o go7007-i2c.o go7007-fw.o snd-go7007.o
go7007-objs += go7007-v4l2.o go7007-driver.o go7007-i2c.o go7007-fw.o \
snd-go7007.o wis-saa7113.o

s2250-objs += s2250-board.o s2250-loader.o

#ifneq ($(SAA7134_BUILD),)
#obj-m += saa7134-go7007.o
# Uncompile when the saa7134 patches get into upstream
#ifneq ($(CONFIG_VIDEO_SAA7134),)
#obj-$(CONFIG_VIDEO_SAA7134) += saa7134-go7007.o
#EXTRA_CFLAGS += -Idrivers/media/video/saa7134
#endif

ifneq ($(CONFIG_VIDEO_GO7007_USB_S2250_BOARD),)
EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-usb
endif

EXTRA_CFLAGS += -Idrivers/staging/saa7134
EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
3 changes: 3 additions & 0 deletions drivers/staging/go7007/go7007-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,9 @@ static int init_i2c_module(struct i2c_adapter *adapter, int id, int addr)
case I2C_DRIVERID_WIS_OV7640:
modname = "wis-ov7640";
break;
case I2C_DRIVERID_S2250:
modname = "s2250-board";
break;
default:
modname = NULL;
break;
Expand Down
1 change: 1 addition & 0 deletions drivers/staging/go7007/go7007-priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ struct go7007;
#define GO7007_BOARDID_LIFEVIEW_LR192 21 /* TV Walker Ultra */
#define GO7007_BOARDID_ENDURA 22
#define GO7007_BOARDID_ADLINK_MPG24 23
#define GO7007_BOARDID_SENSORAY_2250 24 /* Sensoray 2250/2251 */

/* Various characteristics of each board */
#define GO7007_BOARD_HAS_AUDIO (1<<0)
Expand Down
48 changes: 48 additions & 0 deletions drivers/staging/go7007/go7007-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,41 @@ static struct go7007_usb_board board_adlink_mpg24 = {
},
};

static struct go7007_usb_board board_sensoray_2250 = {
.flags = GO7007_USB_EZUSB | GO7007_USB_EZUSB_I2C,
.main_info = {
.firmware = "go7007tv.bin",
.audio_flags = GO7007_AUDIO_I2S_MODE_1 |
GO7007_AUDIO_I2S_MASTER |
GO7007_AUDIO_WORD_16,
.flags = GO7007_BOARD_HAS_AUDIO,
.audio_rate = 48000,
.audio_bclk_div = 8,
.audio_main_div = 2,
.hpi_buffer_cap = 7,
.sensor_flags = GO7007_SENSOR_656 |
GO7007_SENSOR_TV,
.num_i2c_devs = 1,
.i2c_devs = {
{
.id = I2C_DRIVERID_S2250,
.addr = 0x34,
},
},
.num_inputs = 2,
.inputs = {
{
.video_input = 0,
.name = "Composite",
},
{
.video_input = 1,
.name = "S-Video",
},
},
},
};

static struct usb_device_id go7007_usb_id_table[] = {
{
.match_flags = USB_DEVICE_ID_MATCH_DEVICE_AND_VERSION |
Expand Down Expand Up @@ -491,6 +526,14 @@ static struct usb_device_id go7007_usb_id_table[] = {
.bcdDevice_hi = 0x1,
.driver_info = (kernel_ulong_t)GO7007_BOARDID_LIFEVIEW_LR192,
},
{
.match_flags = USB_DEVICE_ID_MATCH_DEVICE_AND_VERSION,
.idVendor = 0x1943, /* Vendor ID Sensoray */
.idProduct = 0x2250, /* Product ID of 2250/2251 */
.bcdDevice_lo = 0x1,
.bcdDevice_hi = 0x1,
.driver_info = (kernel_ulong_t)GO7007_BOARDID_SENSORAY_2250,
},
{ } /* Terminating entry */
};

Expand Down Expand Up @@ -965,6 +1008,11 @@ static int go7007_usb_probe(struct usb_interface *intf,
name = "Lifeview TV Walker Ultra";
board = &board_lifeview_lr192;
break;
case GO7007_BOARDID_SENSORAY_2250:
printk(KERN_INFO "Sensoray 2250 found\n");
name = "Sensoray 2250/2251\n";
board = &board_sensoray_2250;
break;
default:
printk(KERN_ERR "go7007-usb: unknown board ID %d!\n",
(unsigned int)id->driver_info);
Expand Down
Loading

0 comments on commit b11869d

Please sign in to comment.