Commit 84b5dbf3 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

V4L/DVB (10955): cx231xx: CodingStyle automatic fixes with Lindent

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent e0d3bafd
...@@ -58,9 +58,8 @@ static int cx231xx_isoc_audio_deinit(struct cx231xx *dev) ...@@ -58,9 +58,8 @@ static int cx231xx_isoc_audio_deinit(struct cx231xx *dev)
dprintk("Stopping isoc\n"); dprintk("Stopping isoc\n");
for (i = 0; i < CX231XX_AUDIO_BUFS; i++) { for (i = 0; i < CX231XX_AUDIO_BUFS; i++) {
if(dev->adev.urb[i]) { if (dev->adev.urb[i]) {
if (!irqs_disabled()) if (!irqs_disabled())
usb_kill_urb(dev->adev.urb[i]); usb_kill_urb(dev->adev.urb[i]);
else else
...@@ -145,7 +144,6 @@ static void cx231xx_audio_isocirq(struct urb *urb) ...@@ -145,7 +144,6 @@ static void cx231xx_audio_isocirq(struct urb *urb)
runtime->period_size; runtime->period_size;
period_elapsed = 1; period_elapsed = 1;
} }
snd_pcm_stream_unlock(substream); snd_pcm_stream_unlock(substream);
} }
if (period_elapsed) if (period_elapsed)
...@@ -166,7 +164,7 @@ static int cx231xx_init_audio_isoc(struct cx231xx *dev) ...@@ -166,7 +164,7 @@ static int cx231xx_init_audio_isoc(struct cx231xx *dev)
int i, errCode; int i, errCode;
int sb_size; int sb_size;
cx231xx_info("%s: Starting AUDIO transfers\n",__func__); cx231xx_info("%s: Starting AUDIO transfers\n", __func__);
sb_size = CX231XX_NUM_AUDIO_PACKETS * dev->adev.max_pkt_size; sb_size = CX231XX_NUM_AUDIO_PACKETS * dev->adev.max_pkt_size;
...@@ -191,7 +189,8 @@ static int cx231xx_init_audio_isoc(struct cx231xx *dev) ...@@ -191,7 +189,8 @@ static int cx231xx_init_audio_isoc(struct cx231xx *dev)
urb->dev = dev->udev; urb->dev = dev->udev;
urb->context = dev; urb->context = dev;
urb->pipe = usb_rcvisocpipe(dev->udev, dev->adev.end_point_addr); urb->pipe =
usb_rcvisocpipe(dev->udev, dev->adev.end_point_addr);
urb->transfer_flags = URB_ISO_ASAP; urb->transfer_flags = URB_ISO_ASAP;
urb->transfer_buffer = dev->adev.transfer_buffer[i]; urb->transfer_buffer = dev->adev.transfer_buffer[i];
urb->interval = 1; urb->interval = 1;
...@@ -202,8 +201,7 @@ static int cx231xx_init_audio_isoc(struct cx231xx *dev) ...@@ -202,8 +201,7 @@ static int cx231xx_init_audio_isoc(struct cx231xx *dev)
for (j = k = 0; j < CX231XX_NUM_AUDIO_PACKETS; for (j = k = 0; j < CX231XX_NUM_AUDIO_PACKETS;
j++, k += dev->adev.max_pkt_size) { j++, k += dev->adev.max_pkt_size) {
urb->iso_frame_desc[j].offset = k; urb->iso_frame_desc[j].offset = k;
urb->iso_frame_desc[j].length = urb->iso_frame_desc[j].length = dev->adev.max_pkt_size;
dev->adev.max_pkt_size;
} }
dev->adev.urb[i] = urb; dev->adev.urb[i] = urb;
} }
...@@ -221,7 +219,7 @@ static int cx231xx_init_audio_isoc(struct cx231xx *dev) ...@@ -221,7 +219,7 @@ static int cx231xx_init_audio_isoc(struct cx231xx *dev)
static int cx231xx_cmd(struct cx231xx *dev, int cmd, int arg) static int cx231xx_cmd(struct cx231xx *dev, int cmd, int arg)
{ {
dprintk("%s transfer\n", (dev->adev.capture_stream == STREAM_ON)? dprintk("%s transfer\n", (dev->adev.capture_stream == STREAM_ON) ?
"stop" : "start"); "stop" : "start");
switch (cmd) { switch (cmd) {
...@@ -233,7 +231,7 @@ static int cx231xx_cmd(struct cx231xx *dev, int cmd, int arg) ...@@ -233,7 +231,7 @@ static int cx231xx_cmd(struct cx231xx *dev, int cmd, int arg)
dev->adev.capture_stream = STREAM_OFF; dev->adev.capture_stream = STREAM_OFF;
cx231xx_isoc_audio_deinit(dev); cx231xx_isoc_audio_deinit(dev);
} else { } else {
cx231xx_errdev( "An underrun very likely occurred. " cx231xx_errdev("An underrun very likely occurred. "
"Ignoring it.\n"); "Ignoring it.\n");
} }
return 0; return 0;
...@@ -266,8 +264,7 @@ static int snd_pcm_alloc_vmalloc_buffer(struct snd_pcm_substream *subs, ...@@ -266,8 +264,7 @@ static int snd_pcm_alloc_vmalloc_buffer(struct snd_pcm_substream *subs,
static struct snd_pcm_hardware snd_cx231xx_hw_capture = { static struct snd_pcm_hardware snd_cx231xx_hw_capture = {
.info = SNDRV_PCM_INFO_BLOCK_TRANSFER | .info = SNDRV_PCM_INFO_BLOCK_TRANSFER |
SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_MMAP_VALID,
SNDRV_PCM_INFO_MMAP_VALID,
.formats = SNDRV_PCM_FMTBIT_S16_LE, .formats = SNDRV_PCM_FMTBIT_S16_LE,
...@@ -330,7 +327,6 @@ static int snd_cx231xx_pcm_close(struct snd_pcm_substream *substream) ...@@ -330,7 +327,6 @@ static int snd_cx231xx_pcm_close(struct snd_pcm_substream *substream)
int ret; int ret;
struct cx231xx *dev = snd_pcm_substream_chip(substream); struct cx231xx *dev = snd_pcm_substream_chip(substream);
dprintk("closing device\n"); dprintk("closing device\n");
/* set alternate setting for audio interface */ /* set alternate setting for audio interface */
...@@ -402,14 +398,14 @@ static int snd_cx231xx_capture_trigger(struct snd_pcm_substream *substream, ...@@ -402,14 +398,14 @@ static int snd_cx231xx_capture_trigger(struct snd_pcm_substream *substream,
struct cx231xx *dev = snd_pcm_substream_chip(substream); struct cx231xx *dev = snd_pcm_substream_chip(substream);
int retval; int retval;
dprintk("Should %s capture\n", (cmd == SNDRV_PCM_TRIGGER_START) ?
dprintk("Should %s capture\n", (cmd == SNDRV_PCM_TRIGGER_START)? "start" : "stop");
"start": "stop");
spin_lock(&dev->adev.slock); spin_lock(&dev->adev.slock);
switch (cmd) { switch (cmd) {
case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_START:
cx231xx_cmd(dev, CX231XX_CAPTURE_STREAM_EN, CX231XX_START_AUDIO); cx231xx_cmd(dev, CX231XX_CAPTURE_STREAM_EN,
CX231XX_START_AUDIO);
retval = 0; retval = 0;
break; break;
case SNDRV_PCM_TRIGGER_STOP: case SNDRV_PCM_TRIGGER_STOP:
...@@ -492,7 +488,8 @@ static int cx231xx_audio_init(struct cx231xx *dev) ...@@ -492,7 +488,8 @@ static int cx231xx_audio_init(struct cx231xx *dev)
return err; return err;
} }
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_cx231xx_pcm_capture); snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE,
&snd_cx231xx_pcm_capture);
pcm->info_flags = 0; pcm->info_flags = 0;
pcm->private_data = dev; pcm->private_data = dev;
strcpy(pcm->name, "Conexant cx231xx Capture"); strcpy(pcm->name, "Conexant cx231xx Capture");
...@@ -509,13 +506,18 @@ static int cx231xx_audio_init(struct cx231xx *dev) ...@@ -509,13 +506,18 @@ static int cx231xx_audio_init(struct cx231xx *dev)
adev->udev = dev->udev; adev->udev = dev->udev;
/* compute alternate max packet sizes for Audio */ /* compute alternate max packet sizes for Audio */
uif = dev->udev->actconfig->interface[dev->current_pcb_config.hs_config_info[0].interface_info.audio_index+1]; uif =
dev->udev->actconfig->interface[dev->current_pcb_config.
hs_config_info[0].interface_info.
audio_index + 1];
adev->end_point_addr = le16_to_cpu(uif->altsetting[0].endpoint[isoc_pipe].desc.bEndpointAddress); adev->end_point_addr =
le16_to_cpu(uif->altsetting[0].endpoint[isoc_pipe].desc.
bEndpointAddress);
adev->num_alt = uif->num_altsetting; adev->num_alt = uif->num_altsetting;
cx231xx_info(": EndPoint Addr 0x%x, Alternate settings: %i\n", adev->end_point_addr, cx231xx_info(": EndPoint Addr 0x%x, Alternate settings: %i\n",
adev->num_alt); adev->end_point_addr, adev->num_alt);
adev->alt_max_pkt_size = kmalloc(32 * adev->num_alt, GFP_KERNEL); adev->alt_max_pkt_size = kmalloc(32 * adev->num_alt, GFP_KERNEL);
if (adev->alt_max_pkt_size == NULL) { if (adev->alt_max_pkt_size == NULL) {
...@@ -523,8 +525,9 @@ static int cx231xx_audio_init(struct cx231xx *dev) ...@@ -523,8 +525,9 @@ static int cx231xx_audio_init(struct cx231xx *dev)
return -ENOMEM; return -ENOMEM;
} }
for (i = 0; i < adev->num_alt ; i++) { for (i = 0; i < adev->num_alt; i++) {
u16 tmp = le16_to_cpu(uif->altsetting[i].endpoint[isoc_pipe].desc. u16 tmp =
le16_to_cpu(uif->altsetting[i].endpoint[isoc_pipe].desc.
wMaxPacketSize); wMaxPacketSize);
adev->alt_max_pkt_size[i] = adev->alt_max_pkt_size[i] =
(tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1); (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
#ifndef _POLARIS_REG_H_ #ifndef _POLARIS_REG_H_
#define _POLARIS_REG_H_ #define _POLARIS_REG_H_
...@@ -60,13 +59,13 @@ ...@@ -60,13 +59,13 @@
#define I2C_DEMOD_EN 0x01 /* bit0 */ #define I2C_DEMOD_EN 0x01 /* bit0 */
#define PWR_RESETOUT_EN 0x100 /* bit8 */ #define PWR_RESETOUT_EN 0x100 /* bit8 */
typedef enum{ typedef enum {
POLARIS_AVMODE_DEFAULT = 0, POLARIS_AVMODE_DEFAULT = 0,
POLARIS_AVMODE_DIGITAL = 0x10, POLARIS_AVMODE_DIGITAL = 0x10,
POLARIS_AVMODE_ANALOGT_TV = 0x20, POLARIS_AVMODE_ANALOGT_TV = 0x20,
POLARIS_AVMODE_ENXTERNAL_AV = 0x30, POLARIS_AVMODE_ENXTERNAL_AV = 0x30,
}AV_MODE; } AV_MODE;
/* Colibri Registers */ /* Colibri Registers */
...@@ -75,8 +74,6 @@ typedef enum{ ...@@ -75,8 +74,6 @@ typedef enum{
#define EU_IF 0x9 #define EU_IF 0x9
#define US_IF 0xa #define US_IF 0xa
#define SUP_BLK_TUNE1 0x00 #define SUP_BLK_TUNE1 0x00
#define SUP_BLK_TUNE2 0x01 #define SUP_BLK_TUNE2 0x01
#define SUP_BLK_TUNE3 0x02 #define SUP_BLK_TUNE3 0x02
...@@ -487,5 +484,4 @@ typedef enum{ ...@@ -487,5 +484,4 @@ typedef enum{
/* Reserved [31:25] */ /* Reserved [31:25] */
#define FLD_DIF_CTL_IP 0x01FFFFFF #define FLD_DIF_CTL_IP 0x01FFFFFF
#endif #endif
This diff is collapsed.
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include "xc5000.h" #include "xc5000.h"
#include "dvb_dummy_fe.h" #include "dvb_dummy_fe.h"
MODULE_DESCRIPTION("driver for cx231xx based DVB cards"); MODULE_DESCRIPTION("driver for cx231xx based DVB cards");
MODULE_AUTHOR("Srinivasa Deevi <srinivasa.deevi@conexant.com>"); MODULE_AUTHOR("Srinivasa Deevi <srinivasa.deevi@conexant.com>");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -65,9 +64,7 @@ struct cx231xx_dvb { ...@@ -65,9 +64,7 @@ struct cx231xx_dvb {
struct dvb_net net; struct dvb_net net;
}; };
static inline void print_err_status(struct cx231xx *dev, int packet, int status)
static inline void print_err_status(struct cx231xx *dev,
int packet, int status)
{ {
char *errmsg = "Unknown"; char *errmsg = "Unknown";
...@@ -149,8 +146,8 @@ static int start_streaming(struct cx231xx_dvb *dvb) ...@@ -149,8 +146,8 @@ static int start_streaming(struct cx231xx_dvb *dvb)
return rc; return rc;
return cx231xx_init_isoc(dev, CX231XX_DVB_MAX_PACKETS, return cx231xx_init_isoc(dev, CX231XX_DVB_MAX_PACKETS,
CX231XX_DVB_NUM_BUFS, CX231XX_DVB_MAX_PACKETSIZE, CX231XX_DVB_NUM_BUFS,
dvb_isoc_copy); CX231XX_DVB_MAX_PACKETSIZE, dvb_isoc_copy);
} }
static int stop_streaming(struct cx231xx_dvb *dvb) static int stop_streaming(struct cx231xx_dvb *dvb)
...@@ -203,8 +200,6 @@ static int stop_feed(struct dvb_demux_feed *feed) ...@@ -203,8 +200,6 @@ static int stop_feed(struct dvb_demux_feed *feed)
return err; return err;
} }
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
static int cx231xx_dvb_bus_ctrl(struct dvb_frontend *fe, int acquire) static int cx231xx_dvb_bus_ctrl(struct dvb_frontend *fe, int acquire)
{ {
...@@ -218,13 +213,11 @@ static int cx231xx_dvb_bus_ctrl(struct dvb_frontend *fe, int acquire) ...@@ -218,13 +213,11 @@ static int cx231xx_dvb_bus_ctrl(struct dvb_frontend *fe, int acquire)
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
static struct xc5000_config cnxt_rde250_tunerconfig = { static struct xc5000_config cnxt_rde250_tunerconfig = {
.i2c_address = 0x61, .i2c_address = 0x61,
.if_khz = 5380, .if_khz = 5380,
}; };
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
#if 0 #if 0
static int attach_xc5000(u8 addr, struct cx231xx *dev) static int attach_xc5000(u8 addr, struct cx231xx *dev)
...@@ -239,8 +232,7 @@ static int attach_xc5000(u8 addr, struct cx231xx *dev) ...@@ -239,8 +232,7 @@ static int attach_xc5000(u8 addr, struct cx231xx *dev)
if (!dev->dvb->frontend) { if (!dev->dvb->frontend) {
printk(KERN_ERR "%s/2: dvb frontend not attached. " printk(KERN_ERR "%s/2: dvb frontend not attached. "
"Can't attach xc5000\n", "Can't attach xc5000\n", dev->name);
dev->name);
return -EINVAL; return -EINVAL;
} }
...@@ -258,20 +250,20 @@ static int attach_xc5000(u8 addr, struct cx231xx *dev) ...@@ -258,20 +250,20 @@ static int attach_xc5000(u8 addr, struct cx231xx *dev)
} }
#endif #endif
int cx231xx_set_analog_freq(struct cx231xx *dev, u32 freq ) int cx231xx_set_analog_freq(struct cx231xx *dev, u32 freq)
{ {
int status = 0; int status = 0;
if( (dev->dvb != NULL) && (dev->dvb->frontend != NULL) ){ if ((dev->dvb != NULL) && (dev->dvb->frontend != NULL)) {
struct dvb_tuner_ops *dops = &dev->dvb->frontend->ops.tuner_ops; struct dvb_tuner_ops *dops = &dev->dvb->frontend->ops.tuner_ops;
if(dops->set_analog_params != NULL) { if (dops->set_analog_params != NULL) {
struct analog_parameters params; struct analog_parameters params;
params.frequency = freq; params.frequency = freq;
params.std = dev->norm; params.std = dev->norm;
params.mode = 0 ; /* 0- Air; 1 - cable */ params.mode = 0; /* 0- Air; 1 - cable */
/*params.audmode = ; */ /*params.audmode = ; */
/* Set the analog parameters to set the frequency */ /* Set the analog parameters to set the frequency */
...@@ -288,20 +280,22 @@ int cx231xx_reset_analog_tuner(struct cx231xx *dev) ...@@ -288,20 +280,22 @@ int cx231xx_reset_analog_tuner(struct cx231xx *dev)
{ {
int status = 0; int status = 0;
if( (dev->dvb != NULL) && (dev->dvb->frontend != NULL) ){ if ((dev->dvb != NULL) && (dev->dvb->frontend != NULL)) {
struct dvb_tuner_ops *dops = &dev->dvb->frontend->ops.tuner_ops; struct dvb_tuner_ops *dops = &dev->dvb->frontend->ops.tuner_ops;
if(dops->init != NULL && !dev->xc_fw_load_done) { if (dops->init != NULL && !dev->xc_fw_load_done) {
cx231xx_info("Reloading firmware for XC5000\n"); cx231xx_info("Reloading firmware for XC5000\n");
status = dops->init(dev->dvb->frontend); status = dops->init(dev->dvb->frontend);
if(status == 0 ) { if (status == 0) {
dev->xc_fw_load_done = 1; dev->xc_fw_load_done = 1;
cx231xx_info("XC5000 firmware download completed\n"); cx231xx_info
("XC5000 firmware download completed\n");
} else { } else {
dev->xc_fw_load_done = 0; dev->xc_fw_load_done = 0;
cx231xx_info("XC5000 firmware download failed !!!\n"); cx231xx_info
("XC5000 firmware download failed !!!\n");
} }
} }
...@@ -310,13 +304,11 @@ int cx231xx_reset_analog_tuner(struct cx231xx *dev) ...@@ -310,13 +304,11 @@ int cx231xx_reset_analog_tuner(struct cx231xx *dev)
return status; return status;
} }
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
static int register_dvb(struct cx231xx_dvb *dvb, static int register_dvb(struct cx231xx_dvb *dvb,
struct module *module, struct module *module,
struct cx231xx *dev, struct cx231xx *dev, struct device *device)
struct device *device)
{ {
int result; int result;
...@@ -326,7 +318,8 @@ static int register_dvb(struct cx231xx_dvb *dvb, ...@@ -326,7 +318,8 @@ static int register_dvb(struct cx231xx_dvb *dvb,
result = dvb_register_adapter(&dvb->adapter, dev->name, module, device, result = dvb_register_adapter(&dvb->adapter, dev->name, module, device,
adapter_nr); adapter_nr);
if (result < 0) { if (result < 0) {
printk(KERN_WARNING "%s: dvb_register_adapter failed (errno = %d)\n", printk(KERN_WARNING
"%s: dvb_register_adapter failed (errno = %d)\n",
dev->name, result); dev->name, result);
goto fail_adapter; goto fail_adapter;
} }
...@@ -339,7 +332,8 @@ static int register_dvb(struct cx231xx_dvb *dvb, ...@@ -339,7 +332,8 @@ static int register_dvb(struct cx231xx_dvb *dvb,
/* register frontend */ /* register frontend */
result = dvb_register_frontend(&dvb->adapter, dvb->frontend); result = dvb_register_frontend(&dvb->adapter, dvb->frontend);
if (result < 0) { if (result < 0) {
printk(KERN_WARNING "%s: dvb_register_frontend failed (errno = %d)\n", printk(KERN_WARNING
"%s: dvb_register_frontend failed (errno = %d)\n",
dev->name, result); dev->name, result);
goto fail_frontend; goto fail_frontend;
} }
...@@ -374,7 +368,8 @@ static int register_dvb(struct cx231xx_dvb *dvb, ...@@ -374,7 +368,8 @@ static int register_dvb(struct cx231xx_dvb *dvb,
dvb->fe_hw.source = DMX_FRONTEND_0; dvb->fe_hw.source = DMX_FRONTEND_0;
result = dvb->demux.dmx.add_frontend(&dvb->demux.dmx, &dvb->fe_hw); result = dvb->demux.dmx.add_frontend(&dvb->demux.dmx, &dvb->fe_hw);
if (result < 0) { if (result < 0) {
printk(KERN_WARNING "%s: add_frontend failed (DMX_FRONTEND_0, errno = %d)\n", printk(KERN_WARNING
"%s: add_frontend failed (DMX_FRONTEND_0, errno = %d)\n",
dev->name, result); dev->name, result);
goto fail_fe_hw; goto fail_fe_hw;
} }
...@@ -382,15 +377,17 @@ static int register_dvb(struct cx231xx_dvb *dvb, ...@@ -382,15 +377,17 @@ static int register_dvb(struct cx231xx_dvb *dvb,
dvb->fe_mem.source = DMX_MEMORY_FE; dvb->fe_mem.source = DMX_MEMORY_FE;
result = dvb->demux.dmx.add_frontend(&dvb->demux.dmx, &dvb->fe_mem); result = dvb->demux.dmx.add_frontend(&dvb->demux.dmx, &dvb->fe_mem);
if (result < 0) { if (result < 0) {
printk(KERN_WARNING "%s: add_frontend failed (DMX_MEMORY_FE, errno = %d)\n", printk(KERN_WARNING
"%s: add_frontend failed (DMX_MEMORY_FE, errno = %d)\n",
dev->name, result); dev->name, result);
goto fail_fe_mem; goto fail_fe_mem;
} }
result = dvb->demux.dmx.connect_frontend(&dvb->demux.dmx, &dvb->fe_hw); result = dvb->demux.dmx.connect_frontend(&dvb->demux.dmx, &dvb->fe_hw);
if (result < 0) { if (result < 0) {
printk(KERN_WARNING "%s: connect_frontend failed (errno = %d)\n", printk(KERN_WARNING
dev->name, result); "%s: connect_frontend failed (errno = %d)\n", dev->name,
result);
goto fail_fe_conn; goto fail_fe_conn;
} }
...@@ -398,20 +395,20 @@ static int register_dvb(struct cx231xx_dvb *dvb, ...@@ -398,20 +395,20 @@ static int register_dvb(struct cx231xx_dvb *dvb,
dvb_net_init(&dvb->adapter, &dvb->net, &dvb->demux.dmx); dvb_net_init(&dvb->adapter, &dvb->net, &dvb->demux.dmx);
return 0; return 0;
fail_fe_conn: fail_fe_conn:
dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_mem); dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_mem);
fail_fe_mem: fail_fe_mem:
dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_hw); dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_hw);
fail_fe_hw: fail_fe_hw:
dvb_dmxdev_release(&dvb->dmxdev); dvb_dmxdev_release(&dvb->dmxdev);
fail_dmxdev: fail_dmxdev:
dvb_dmx_release(&dvb->demux); dvb_dmx_release(&dvb->demux);
fail_dmx: fail_dmx:
dvb_unregister_frontend(dvb->frontend); dvb_unregister_frontend(dvb->frontend);
fail_frontend: fail_frontend:
dvb_frontend_detach(dvb->frontend); dvb_frontend_detach(dvb->frontend);
dvb_unregister_adapter(&dvb->adapter); dvb_unregister_adapter(&dvb->adapter);
fail_adapter: fail_adapter:
return result; return result;
} }
...@@ -427,7 +424,6 @@ static void unregister_dvb(struct cx231xx_dvb *dvb) ...@@ -427,7 +424,6 @@ static void unregister_dvb(struct cx231xx_dvb *dvb)
dvb_unregister_adapter(&dvb->adapter); dvb_unregister_adapter(&dvb->adapter);
} }
static int dvb_init(struct cx231xx *dev) static int dvb_init(struct cx231xx *dev)
{ {
int result = 0; int result = 0;
...@@ -455,11 +451,12 @@ static int dvb_init(struct cx231xx *dev) ...@@ -455,11 +451,12 @@ static int dvb_init(struct cx231xx *dev)
/* dev->dvb->frontend = dvb_attach(s5h1411_attach, /* dev->dvb->frontend = dvb_attach(s5h1411_attach,
&dvico_s5h1411_config, &dvico_s5h1411_config,
&dev->i2c_bus[1].i2c_adap);*/ &dev->i2c_bus[1].i2c_adap); */
dev->dvb->frontend = dvb_attach(dvb_dummy_fe_ofdm_attach); dev->dvb->frontend = dvb_attach(dvb_dummy_fe_ofdm_attach);
if(dev->dvb->frontend == NULL) { if (dev->dvb->frontend == NULL) {
printk(DRIVER_NAME ": Failed to attach dummy front end\n"); printk(DRIVER_NAME
": Failed to attach dummy front end\n");
result = -EINVAL; result = -EINVAL;
goto out_free; goto out_free;
} }
...@@ -467,7 +464,7 @@ static int dvb_init(struct cx231xx *dev) ...@@ -467,7 +464,7 @@ static int dvb_init(struct cx231xx *dev)
/* define general-purpose callback pointer */ /* define general-purpose callback pointer */
dvb->frontend->callback = cx231xx_tuner_callback; dvb->frontend->callback = cx231xx_tuner_callback;
if(dvb_attach(xc5000_attach, dev->dvb->frontend, if (dvb_attach(xc5000_attach, dev->dvb->frontend,
&dev->i2c_bus[1].i2c_adap, &dev->i2c_bus[1].i2c_adap,
&cnxt_rde250_tunerconfig) < 0) { &cnxt_rde250_tunerconfig) < 0) {
result = -EINVAL; result = -EINVAL;
...@@ -479,8 +476,9 @@ static int dvb_init(struct cx231xx *dev) ...@@ -479,8 +476,9 @@ static int dvb_init(struct cx231xx *dev)
dev->dvb->frontend = dvb_attach(dvb_dummy_fe_ofdm_attach); dev->dvb->frontend = dvb_attach(dvb_dummy_fe_ofdm_attach);
if(dev->dvb->frontend == NULL) { if (dev->dvb->frontend == NULL) {
printk(DRIVER_NAME ": Failed to attach dummy front end\n"); printk(DRIVER_NAME
": Failed to attach dummy front end\n");
result = -EINVAL; result = -EINVAL;
goto out_free; goto out_free;
} }
...@@ -488,7 +486,7 @@ static int dvb_init(struct cx231xx *dev) ...@@ -488,7 +486,7 @@ static int dvb_init(struct cx231xx *dev)
/* define general-purpose callback pointer */ /* define general-purpose callback pointer */
dvb->frontend->callback = cx231xx_tuner_callback; dvb->frontend->callback = cx231xx_tuner_callback;
if(dvb_attach(xc5000_attach, dev->dvb->frontend, if (dvb_attach(xc5000_attach, dev->dvb->frontend,
&dev->i2c_bus[1].i2c_adap, &dev->i2c_bus[1].i2c_adap,
&cnxt_rde250_tunerconfig) < 0) { &cnxt_rde250_tunerconfig) < 0) {
result = -EINVAL; result = -EINVAL;
...@@ -498,19 +496,16 @@ static int dvb_init(struct cx231xx *dev) ...@@ -498,19 +496,16 @@ static int dvb_init(struct cx231xx *dev)
default: default:
printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card" printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card"
" isn't supported yet\n", " isn't supported yet\n", dev->name);
dev->name);
break; break;
} }
if (NULL == dvb->frontend) { if (NULL == dvb->frontend) {
printk(KERN_ERR printk(KERN_ERR
"%s/2: frontend initialization failed\n", "%s/2: frontend initialization failed\n", dev->name);
dev->name);
result = -EINVAL; result = -EINVAL;
goto out_free; goto out_free;
} }
/* register everything */ /* register everything */
result = register_dvb(dvb, THIS_MODULE, dev, &dev->udev->dev); result = register_dvb(dvb, THIS_MODULE, dev, &dev->udev->dev);
...@@ -521,7 +516,7 @@ static int dvb_init(struct cx231xx *dev) ...@@ -521,7 +516,7 @@ static int dvb_init(struct cx231xx *dev)
printk(KERN_INFO "Successfully loaded cx231xx-dvb\n"); printk(KERN_INFO "Successfully loaded cx231xx-dvb\n");
return 0; return 0;
out_free: out_free:
cx231xx_set_mode(dev, CX231XX_SUSPEND); cx231xx_set_mode(dev, CX231XX_SUSPEND);
kfree(dvb); kfree(dvb);
dev->dvb = NULL; dev->dvb = NULL;
...@@ -562,4 +557,3 @@ static void __exit cx231xx_dvb_unregister(void) ...@@ -562,4 +557,3 @@ static void __exit cx231xx_dvb_unregister(void)
module_init(cx231xx_dvb_register); module_init(cx231xx_dvb_register);
module_exit(cx231xx_dvb_unregister); module_exit(cx231xx_dvb_unregister);
This diff is collapsed.
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include "cx231xx.h" #include "cx231xx.h"
static unsigned int ir_debug; static unsigned int ir_debug;
module_param(ir_debug, int, 0644); module_param(ir_debug, int, 0644);
MODULE_PARM_DESC(ir_debug, "enable debug messages [IR]"); MODULE_PARM_DESC(ir_debug, "enable debug messages [IR]");
...@@ -71,11 +70,9 @@ struct cx231xx_IR { ...@@ -71,11 +70,9 @@ struct cx231xx_IR {
unsigned int last_readcount; unsigned int last_readcount;
unsigned int repeat_interval; unsigned int repeat_interval;
int (*get_key)(struct cx231xx_IR *, struct cx231xx_ir_poll_result *); int (*get_key) (struct cx231xx_IR *, struct cx231xx_ir_poll_result *);
}; };
/********************************************************** /**********************************************************
Polling code for cx231xx Polling code for cx231xx
**********************************************************/ **********************************************************/
...@@ -196,8 +193,7 @@ int cx231xx_ir_init(struct cx231xx *dev) ...@@ -196,8 +193,7 @@ int cx231xx_ir_init(struct cx231xx *dev)
ir->polling = 100; /* ms */ ir->polling = 100; /* ms */
/* init input device */ /* init input device */
snprintf(ir->name, sizeof(ir->name), "cx231xx IR (%s)", snprintf(ir->name, sizeof(ir->name), "cx231xx IR (%s)", dev->name);
dev->name);
usb_make_path(dev->udev, ir->phys, sizeof(ir->phys)); usb_make_path(dev->udev, ir->phys, sizeof(ir->phys));
strlcat(ir->phys, "/input0", sizeof(ir->phys)); strlcat(ir->phys, "/input0", sizeof(ir->phys));
......
...@@ -60,7 +60,6 @@ ...@@ -60,7 +60,6 @@
/*****************************************************************************/ /*****************************************************************************/
#define HOST_REG2 0x001 #define HOST_REG2 0x001
/*****************************************************************************/ /*****************************************************************************/
#define HOST_REG3 0x002 #define HOST_REG3 0x002
...@@ -231,7 +230,6 @@ ...@@ -231,7 +230,6 @@
/* Reserved [3:1] */ /* Reserved [3:1] */
#define FLD_CIR_TEST_DIS 0x00000001 #define FLD_CIR_TEST_DIS 0x00000001
/*****************************************************************************/ /*****************************************************************************/
#define TEST_CTRL2 0x148 #define TEST_CTRL2 0x148
#define FLD_TSXCLK_POL_CTL 0x80000000 #define FLD_TSXCLK_POL_CTL 0x80000000
...@@ -257,7 +255,6 @@ ...@@ -257,7 +255,6 @@
#define FLD_FLTRN_BIST_TST_DONE 0x00000008 #define FLD_FLTRN_BIST_TST_DONE 0x00000008
#define FLD_VID_BIST_TST_DONE 0x00000007 #define FLD_VID_BIST_TST_DONE 0x00000007
/*****************************************************************************/ /*****************************************************************************/
/* DirectIF registers definition have been moved to DIF_reg.h */ /* DirectIF registers definition have been moved to DIF_reg.h */
/*****************************************************************************/ /*****************************************************************************/
...@@ -662,7 +659,6 @@ ...@@ -662,7 +659,6 @@
#define FLD_PLL_KI 0x00FF0000 #define FLD_PLL_KI 0x00FF0000
#define FLD_PLL_MAX_OFFSET 0x0000FFFF #define FLD_PLL_MAX_OFFSET 0x0000FFFF
/*****************************************************************************/ /*****************************************************************************/
#define HTL_CTRL 0x498 #define HTL_CTRL 0x498
/* Reserved [31:24] */ /* Reserved [31:24] */
...@@ -771,7 +767,6 @@ ...@@ -771,7 +767,6 @@
#define FLD_FIELD_PHASE_LIMIT 0x000000F0 #define FLD_FIELD_PHASE_LIMIT 0x000000F0
#define FLD_HEAD_SW_DET_LIMIT 0x0000000F #define FLD_HEAD_SW_DET_LIMIT 0x0000000F
/*****************************************************************************/ /*****************************************************************************/
#define DL_CTL 0x800 #define DL_CTL 0x800
#define DL_CTL_ADDRESS_LOW 0x800 /* Byte 1 in DL_CTL */ #define DL_CTL_ADDRESS_LOW 0x800 /* Byte 1 in DL_CTL */
...@@ -1424,7 +1419,6 @@ ...@@ -1424,7 +1419,6 @@
#define FLD_I2S_OUT_WS_SEL 0x00000020 #define FLD_I2S_OUT_WS_SEL 0x00000020
#define FLD_I2S_OUT_BCN_DEL 0x0000001F #define FLD_I2S_OUT_BCN_DEL 0x0000001F
/*****************************************************************************/ /*****************************************************************************/
#define AC97_CTL 0x91C #define AC97_CTL 0x91C
/* Reserved [31:26] */ /* Reserved [31:26] */
...@@ -1437,7 +1431,6 @@ ...@@ -1437,7 +1431,6 @@
/* Reserved [7:1] */ /* Reserved [7:1] */
#define FLD_AC97_SHUTDOWN 0x00000001 #define FLD_AC97_SHUTDOWN 0x00000001
/* Cx231xx redefine */ /* Cx231xx redefine */
#define QPSK_IAGC_CTL1 0x94c #define QPSK_IAGC_CTL1 0x94c
#define QPSK_IAGC_CTL2 0x950 #define QPSK_IAGC_CTL2 0x950
...@@ -1450,7 +1443,6 @@ ...@@ -1450,7 +1443,6 @@
#define QPSK_EQ_CTL 0x96c #define QPSK_EQ_CTL 0x96c
#define QPSK_LOCK_CTL 0x970 #define QPSK_LOCK_CTL 0x970
/*****************************************************************************/ /*****************************************************************************/
#define FM1_DFT_CTL 0x9A8 #define FM1_DFT_CTL 0x9A8
#define FLD_FM1_DFT_THRESHOLD 0xFFFF0000 #define FLD_FM1_DFT_THRESHOLD 0xFFFF0000
...@@ -1494,8 +1486,6 @@ ...@@ -1494,8 +1486,6 @@
/* Reserved [15:6] */ /* Reserved [15:6] */
#define FLD_AFE_VGA_OUT 0x0000003F #define FLD_AFE_VGA_OUT 0x0000003F
/*****************************************************************************/ /*****************************************************************************/
#define MTS_GAIN_STATUS 0x9BC #define MTS_GAIN_STATUS 0x9BC
/* Reserved [31:14] */ /* Reserved [31:14] */
...@@ -1543,7 +1533,6 @@ ...@@ -1543,7 +1533,6 @@
#define INPUT_MODE_YC2_2 2 /* INPUT_MODE_VALUE(2) */ #define INPUT_MODE_YC2_2 2 /* INPUT_MODE_VALUE(2) */
#define INPUT_MODE_YUV_3 3 /* INPUT_MODE_VALUE(3) */ #define INPUT_MODE_YUV_3 3 /* INPUT_MODE_VALUE(3) */
#define LUMA_LPF_LOW_BANDPASS 0 /* 0.6Mhz lowpass filter bandwidth */ #define LUMA_LPF_LOW_BANDPASS 0 /* 0.6Mhz lowpass filter bandwidth */
#define LUMA_LPF_MEDIUM_BANDPASS 1 /* 1.0Mhz lowpass filter bandwidth */ #define LUMA_LPF_MEDIUM_BANDPASS 1 /* 1.0Mhz lowpass filter bandwidth */
#define LUMA_LPF_HIGH_BANDPASS 2 /* 1.5Mhz lowpass filter bandwidth */ #define LUMA_LPF_HIGH_BANDPASS 2 /* 1.5Mhz lowpass filter bandwidth */
......
This diff is collapsed.
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
extern struct videobuf_queue_ops cx231xx_vbi_qops; extern struct videobuf_queue_ops cx231xx_vbi_qops;
#define NTSC_VBI_START_LINE 10 /* line 10 - 21 */ #define NTSC_VBI_START_LINE 10 /* line 10 - 21 */
#define NTSC_VBI_END_LINE 21 #define NTSC_VBI_END_LINE 21
#define NTSC_VBI_LINES (NTSC_VBI_END_LINE - NTSC_VBI_START_LINE + 1) #define NTSC_VBI_LINES (NTSC_VBI_END_LINE - NTSC_VBI_START_LINE + 1)
...@@ -42,20 +41,23 @@ extern struct videobuf_queue_ops cx231xx_vbi_qops; ...@@ -42,20 +41,23 @@ extern struct videobuf_queue_ops cx231xx_vbi_qops;
/* stream functions */ /* stream functions */
int cx231xx_init_vbi_isoc(struct cx231xx *dev, int max_packets, int cx231xx_init_vbi_isoc(struct cx231xx *dev, int max_packets,
int num_bufs, int max_pkt_size, int num_bufs, int max_pkt_size,
int (*isoc_copy) (struct cx231xx *dev, struct urb *urb)); int (*isoc_copy) (struct cx231xx * dev,
struct urb * urb));
void cx231xx_uninit_vbi_isoc(struct cx231xx *dev); void cx231xx_uninit_vbi_isoc(struct cx231xx *dev);
/* vbi data copy functions */ /* vbi data copy functions */
u32 cx231xx_get_vbi_line(struct cx231xx *dev, struct cx231xx_dmaqueue *dma_q, u32 cx231xx_get_vbi_line(struct cx231xx *dev, struct cx231xx_dmaqueue *dma_q,
u8 sav_eav, u8 *p_buffer, u32 buffer_size); u8 sav_eav, u8 * p_buffer, u32 buffer_size);
u32 cx231xx_copy_vbi_line(struct cx231xx *dev, struct cx231xx_dmaqueue *dma_q, u32 cx231xx_copy_vbi_line(struct cx231xx *dev, struct cx231xx_dmaqueue *dma_q,
u8 *p_line, u32 length, int field_number); u8 * p_line, u32 length, int field_number);
void cx231xx_reset_vbi_buffer(struct cx231xx *dev, struct cx231xx_dmaqueue *dma_q); void cx231xx_reset_vbi_buffer(struct cx231xx *dev,
struct cx231xx_dmaqueue *dma_q);
int cx231xx_do_vbi_copy(struct cx231xx *dev, struct cx231xx_dmaqueue *dma_q, int cx231xx_do_vbi_copy(struct cx231xx *dev, struct cx231xx_dmaqueue *dma_q,
u8 *p_buffer, u32 bytes_to_copy); u8 * p_buffer, u32 bytes_to_copy);
u8 cx231xx_is_vbi_buffer_done(struct cx231xx *dev,struct cx231xx_dmaqueue *dma_q); u8 cx231xx_is_vbi_buffer_done(struct cx231xx *dev,
struct cx231xx_dmaqueue *dma_q);
#endif #endif
This diff is collapsed.
This diff is collapsed.
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