Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 356993
b: refs/heads/master
c: 8a4e786
h: refs/heads/master
i:
  356991: 0681023
v: v3
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Dec 17, 2012
1 parent 032c93a commit 3138038
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c70ffd5968476ffe9fe2a8bfdc88956ecef92d2a
refs/heads/master: 8a4e786660f512b029b56d94d1b8f0201e67aab3
2 changes: 1 addition & 1 deletion trunk/drivers/media/usb/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ endif

if MEDIA_ANALOG_TV_SUPPORT
comment "Analog TV USB devices"
source "drivers/media/usb/au0828/Kconfig"
source "drivers/media/usb/pvrusb2/Kconfig"
source "drivers/media/usb/hdpvr/Kconfig"
source "drivers/media/usb/tlg2300/Kconfig"
Expand All @@ -31,6 +30,7 @@ endif

if (MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT)
comment "Analog/digital TV USB devices"
source "drivers/media/usb/au0828/Kconfig"
source "drivers/media/usb/cx231xx/Kconfig"
source "drivers/media/usb/tm6000/Kconfig"
endif
Expand Down
17 changes: 14 additions & 3 deletions trunk/drivers/media/usb/au0828/Kconfig
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@

config VIDEO_AU0828
tristate "Auvitek AU0828 support"
depends on I2C && INPUT && DVB_CORE && USB && VIDEO_V4L2
depends on I2C && INPUT && DVB_CORE && USB
select I2C_ALGOBIT
select VIDEO_TVEEPROM
select VIDEOBUF_VMALLOC
select DVB_AU8522_DTV if MEDIA_SUBDRV_AUTOSELECT
select DVB_AU8522_V4L if MEDIA_SUBDRV_AUTOSELECT
select MEDIA_TUNER_XC5000 if MEDIA_SUBDRV_AUTOSELECT
select MEDIA_TUNER_MXL5007T if MEDIA_SUBDRV_AUTOSELECT
select MEDIA_TUNER_TDA18271 if MEDIA_SUBDRV_AUTOSELECT
---help---
This is a video4linux driver for Auvitek's USB device.
This is a hybrid analog/digital tv capture driver for
Auvitek's AU0828 USB device.

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

config VIDEO_AU0828_V4L2
bool "Auvitek AU0828 v4l2 analog video support"
depends on VIDEO_AU0828 && VIDEO_V4L2
select DVB_AU8522_V4L if MEDIA_SUBDRV_AUTOSELECT
default y
---help---
This is a video4linux driver for Auvitek's USB device.

Choose Y here to include support for v4l2 analog video
capture within the au0828 driver.
6 changes: 5 additions & 1 deletion trunk/drivers/media/usb/au0828/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
au0828-objs := au0828-core.o au0828-i2c.o au0828-cards.o au0828-dvb.o au0828-video.o au0828-vbi.o
au0828-objs := au0828-core.o au0828-i2c.o au0828-cards.o au0828-dvb.o

ifeq ($(CONFIG_VIDEO_AU0828_V4L2),y)
au0828-objs += au0828-video.o au0828-vbi.o
endif

obj-$(CONFIG_VIDEO_AU0828) += au0828.o

Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/media/usb/au0828/au0828-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,11 @@ static void hauppauge_eeprom(struct au0828_dev *dev, u8 *eeprom_data)
void au0828_card_setup(struct au0828_dev *dev)
{
static u8 eeprom[256];
#ifdef CONFIG_VIDEO_AU0828_V4L2
struct tuner_setup tun_setup;
struct v4l2_subdev *sd;
unsigned int mode_mask = T_ANALOG_TV;
#endif

dprintk(1, "%s()\n", __func__);

Expand All @@ -211,6 +213,7 @@ void au0828_card_setup(struct au0828_dev *dev)
break;
}

#ifdef CONFIG_VIDEO_AU0828_V4L2
if (AUVI_INPUT(0).type != AU0828_VMUX_UNDEFINED) {
/* Load the analog demodulator driver (note this would need to
be abstracted out if we ever need to support a different
Expand All @@ -236,6 +239,7 @@ void au0828_card_setup(struct au0828_dev *dev)
v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_type_addr,
&tun_setup);
}
#endif
}

/*
Expand Down
13 changes: 12 additions & 1 deletion trunk/drivers/media/usb/au0828/au0828-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,17 @@ static void au0828_usb_disconnect(struct usb_interface *interface)
/* Digital TV */
au0828_dvb_unregister(dev);

#ifdef CONFIG_VIDEO_AU0828_V4L2
if (AUVI_INPUT(0).type != AU0828_VMUX_UNDEFINED)
au0828_analog_unregister(dev);
#endif

/* I2C */
au0828_i2c_unregister(dev);

#ifdef CONFIG_VIDEO_AU0828_V4L2
v4l2_device_unregister(&dev->v4l2_dev);
#endif

usb_set_intfdata(interface, NULL);

Expand All @@ -155,7 +159,10 @@ static void au0828_usb_disconnect(struct usb_interface *interface)
static int au0828_usb_probe(struct usb_interface *interface,
const struct usb_device_id *id)
{
int ifnum, retval;
int ifnum;
#ifdef CONFIG_VIDEO_AU0828_V4L2
int retval;
#endif
struct au0828_dev *dev;
struct usb_device *usbdev = interface_to_usbdev(interface);

Expand Down Expand Up @@ -194,6 +201,7 @@ static int au0828_usb_probe(struct usb_interface *interface,
dev->usbdev = usbdev;
dev->boardnr = id->driver_info;

#ifdef CONFIG_VIDEO_AU0828_V4L2
/* Create the v4l2_device */
retval = v4l2_device_register(&interface->dev, &dev->v4l2_dev);
if (retval) {
Expand All @@ -203,6 +211,7 @@ static int au0828_usb_probe(struct usb_interface *interface,
kfree(dev);
return -EIO;
}
#endif

/* Power Up the bridge */
au0828_write(dev, REG_600, 1 << 4);
Expand All @@ -216,9 +225,11 @@ static int au0828_usb_probe(struct usb_interface *interface,
/* Setup */
au0828_card_setup(dev);

#ifdef CONFIG_VIDEO_AU0828_V4L2
/* Analog TV */
if (AUVI_INPUT(0).type != AU0828_VMUX_UNDEFINED)
au0828_analog_register(dev, interface);
#endif

/* Digital TV */
au0828_dvb_register(dev);
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/media/usb/au0828/au0828-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,11 @@ int au0828_i2c_register(struct au0828_dev *dev)

dev->i2c_adap.algo = &dev->i2c_algo;
dev->i2c_adap.algo_data = dev;
#ifdef CONFIG_VIDEO_AU0828_V4L2
i2c_set_adapdata(&dev->i2c_adap, &dev->v4l2_dev);
#else
i2c_set_adapdata(&dev->i2c_adap, dev);
#endif
i2c_add_adapter(&dev->i2c_adap);

dev->i2c_client.adapter = &dev->i2c_adap;
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/media/usb/au0828/au0828.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,10 @@ struct au0828_dev {
struct au0828_dvb dvb;
struct work_struct restart_streaming;

#ifdef CONFIG_VIDEO_AU0828_V4L2
/* Analog */
struct v4l2_device v4l2_dev;
#endif
int users;
unsigned int resources; /* resources in use */
struct video_device *vdev;
Expand Down

0 comments on commit 3138038

Please sign in to comment.