V4L/DVB (7634): au0828: Cleanup
au0828: Cleanup Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:
parent
0daa5de740
commit
a9c36aad59
|
@ -78,8 +78,7 @@ static void hauppauge_eeprom(struct au0828_dev *dev, u8 *eeprom_data)
|
||||||
tveeprom_hauppauge_analog(&dev->i2c_client, &tv, eeprom_data);
|
tveeprom_hauppauge_analog(&dev->i2c_client, &tv, eeprom_data);
|
||||||
|
|
||||||
/* Make sure we support the board model */
|
/* Make sure we support the board model */
|
||||||
switch (tv.model)
|
switch (tv.model) {
|
||||||
{
|
|
||||||
case 72001: /* WinTV-HVR950q (Retail, IR, ATSC/QAM and basic analog video */
|
case 72001: /* WinTV-HVR950q (Retail, IR, ATSC/QAM and basic analog video */
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -92,7 +91,6 @@ static void hauppauge_eeprom(struct au0828_dev *dev, u8 *eeprom_data)
|
||||||
__func__, tv.model);
|
__func__, tv.model);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void au0828_card_setup(struct au0828_dev *dev)
|
void au0828_card_setup(struct au0828_dev *dev)
|
||||||
{
|
{
|
||||||
static u8 eeprom[256];
|
static u8 eeprom[256];
|
||||||
|
@ -116,7 +114,7 @@ void au0828_card_setup(struct au0828_dev *dev)
|
||||||
/*
|
/*
|
||||||
* The bridge has between 8 and 12 gpios.
|
* The bridge has between 8 and 12 gpios.
|
||||||
* Regs 1 and 0 deal with output enables.
|
* Regs 1 and 0 deal with output enables.
|
||||||
* Regs 3 and 2 * deal with direction.
|
* Regs 3 and 2 deal with direction.
|
||||||
*/
|
*/
|
||||||
void au0828_gpio_setup(struct au0828_dev *dev)
|
void au0828_gpio_setup(struct au0828_dev *dev)
|
||||||
{
|
{
|
||||||
|
|
|
@ -143,6 +143,7 @@ static int recv_control_msg(struct au0828_dev *dev, u16 request, u32 value,
|
||||||
mutex_unlock(&dev->mutex);
|
mutex_unlock(&dev->mutex);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void au0828_usb_disconnect(struct usb_interface *interface)
|
static void au0828_usb_disconnect(struct usb_interface *interface)
|
||||||
{
|
{
|
||||||
struct au0828_dev *dev = usb_get_intfdata(interface);
|
struct au0828_dev *dev = usb_get_intfdata(interface);
|
||||||
|
|
|
@ -31,6 +31,9 @@
|
||||||
|
|
||||||
DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
|
DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
|
||||||
|
|
||||||
|
#define _AU0828_BULKPIPE 0x83
|
||||||
|
#define _BULKPIPESIZE 0xe522
|
||||||
|
|
||||||
static struct au8522_config hauppauge_hvr950q_config = {
|
static struct au8522_config hauppauge_hvr950q_config = {
|
||||||
.demod_address = 0x8e >> 1,
|
.demod_address = 0x8e >> 1,
|
||||||
.status_mode = AU8522_DEMODLOCKING,
|
.status_mode = AU8522_DEMODLOCKING,
|
||||||
|
@ -66,7 +69,8 @@ static void urb_completion(struct urb *purb)
|
||||||
ptr = (u8 *)purb->transfer_buffer;
|
ptr = (u8 *)purb->transfer_buffer;
|
||||||
|
|
||||||
/* Feed the transport payload into the kernel demux */
|
/* Feed the transport payload into the kernel demux */
|
||||||
dvb_dmx_swfilter_packets(&dev->dvb.demux, purb->transfer_buffer, purb->actual_length / 188);
|
dvb_dmx_swfilter_packets(&dev->dvb.demux,
|
||||||
|
purb->transfer_buffer, purb->actual_length / 188);
|
||||||
|
|
||||||
/* Clean the buffer before we requeue */
|
/* Clean the buffer before we requeue */
|
||||||
memset(purb->transfer_buffer, 0, URB_BUFSIZE);
|
memset(purb->transfer_buffer, 0, URB_BUFSIZE);
|
||||||
|
@ -81,7 +85,6 @@ static int stop_urb_transfer(struct au0828_dev *dev)
|
||||||
|
|
||||||
dprintk(2, "%s()\n", __func__);
|
dprintk(2, "%s()\n", __func__);
|
||||||
|
|
||||||
/* FIXME: Do we need to free the transfer_buffers? */
|
|
||||||
for (i = 0; i < URB_COUNT; i++) {
|
for (i = 0; i < URB_COUNT; i++) {
|
||||||
usb_kill_urb(dev->urbs[i]);
|
usb_kill_urb(dev->urbs[i]);
|
||||||
kfree(dev->urbs[i]->transfer_buffer);
|
kfree(dev->urbs[i]->transfer_buffer);
|
||||||
|
@ -93,9 +96,6 @@ static int stop_urb_transfer(struct au0828_dev *dev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define _AU0828_BULKPIPE 0x83
|
|
||||||
#define _BULKPIPESIZE 0xe522
|
|
||||||
|
|
||||||
static int start_urb_transfer(struct au0828_dev *dev)
|
static int start_urb_transfer(struct au0828_dev *dev)
|
||||||
{
|
{
|
||||||
struct urb *purb;
|
struct urb *purb;
|
||||||
|
|
|
@ -19,6 +19,9 @@
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* We'll start to rename these registers once we have a better
|
||||||
|
* understanding of their meaning.
|
||||||
|
*/
|
||||||
#define REG_000 0x000
|
#define REG_000 0x000
|
||||||
#define REG_001 0x001
|
#define REG_001 0x001
|
||||||
#define REG_002 0x002
|
#define REG_002 0x002
|
||||||
|
|
|
@ -37,7 +37,6 @@
|
||||||
|
|
||||||
#define DRIVER_NAME "au0828"
|
#define DRIVER_NAME "au0828"
|
||||||
#define URB_COUNT 16
|
#define URB_COUNT 16
|
||||||
//#define URB_BUFSIZE (312 * 188)
|
|
||||||
#define URB_BUFSIZE (0xe522)
|
#define URB_BUFSIZE (0xe522)
|
||||||
|
|
||||||
struct au0828_board {
|
struct au0828_board {
|
||||||
|
|
Loading…
Reference in New Issue