Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 271955
b: refs/heads/master
c: b5f7405
h: refs/heads/master
i:
  271953: 3a9b607
  271951: 65bfd6f
v: v3
  • Loading branch information
Steven Toth authored and Mauro Carvalho Chehab committed Oct 14, 2011
1 parent de32d21 commit 0f86b0d
Show file tree
Hide file tree
Showing 5 changed files with 48 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: 6aa07d9e6329c93dfa5f6ff4fce8602f2a33b891
refs/heads/master: b5f74050043f4782517cd9aa2b68c13ebf5cfa90
4 changes: 2 additions & 2 deletions trunk/drivers/media/video/cx23885/cx23885-alsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@
#define AUDIO_SRAM_CHANNEL SRAM_CH07

#define dprintk(level, fmt, arg...) if (audio_debug >= level) \
printk(KERN_INFO "%s/1: " fmt, chip->dev->name , ## arg)
printk(KERN_INFO "%s: " fmt, chip->dev->name , ## arg)

#define dprintk_core(level, fmt, arg...) if (audio_debug >= level) \
printk(KERN_DEBUG "%s/1: " fmt, chip->dev->name , ## arg)
printk(KERN_DEBUG "%s: " fmt, chip->dev->name , ## arg)

/****************************************************************************
Module global static vars
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/cx23885/cx23885-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ MODULE_PARM_DESC(card, "card type");

#define dprintk(level, fmt, arg...)\
do { if (debug >= level)\
printk(KERN_DEBUG "%s/0: " fmt, dev->name, ## arg);\
printk(KERN_DEBUG "%s: " fmt, dev->name, ## arg);\
} while (0)

static unsigned int cx23885_devcount;
Expand Down
42 changes: 39 additions & 3 deletions trunk/drivers/media/video/cx23885/cx23885-vbi.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,30 +62,65 @@ int cx23885_vbi_fmt(struct file *file, void *priv,
return 0;
}

/* We're given the Video Interrupt status register.
* The cx23885_video_irq() func has already validated
* the potential error bits, we just need to
* deal with vbi payload and return indication if
* we actually processed any payload.
*/
int cx23885_vbi_irq(struct cx23885_dev *dev, u32 status)
{
u32 count;
int handled = 0;

if (status & VID_BC_MSK_VBI_RISCI1) {
dprintk(1, "%s() VID_BC_MSK_VBI_RISCI1\n", __func__);
spin_lock(&dev->slock);
count = cx_read(VID_A_GPCNT);
cx23885_video_wakeup(dev, &dev->vbiq, count);
spin_unlock(&dev->slock);
handled++;
}

if (status & VID_BC_MSK_VBI_RISCI2) {
dprintk(1, "%s() VID_BC_MSK_VBI_RISCI2\n", __func__);
dprintk(2, "stopper vbi\n");
spin_lock(&dev->slock);
cx23885_restart_vbi_queue(dev, &dev->vbiq);
spin_unlock(&dev->slock);
handled++;
}

return handled;
}

static int cx23885_start_vbi_dma(struct cx23885_dev *dev,
struct cx23885_dmaqueue *q,
struct cx23885_buffer *buf)
{
dprintk(1, "%s()\n", __func__);

/* setup fifo + format */
cx23885_sram_channel_setup(dev, &dev->sram_channels[SRAM_CH02],
buf->vb.width, buf->risc.dma);

/* reset counter */
cx_write(VID_A_GPCNT_CTL, 3);
q->count = 1;

/* enable irqs */
/* enable irq */
cx23885_irq_add_enable(dev, 0x01);
cx_set(VID_A_INT_MSK, 0x000022);

/* start dma */
cx_set(DEV_CNTRL2, (1<<5));
cx_set(VID_A_DMA_CTL, 0x00000022);
cx_set(VID_A_DMA_CTL, 0x22); /* FIFO and RISC enable */

return 0;
}


static int cx23885_restart_vbi_queue(struct cx23885_dev *dev,
int cx23885_restart_vbi_queue(struct cx23885_dev *dev,
struct cx23885_dmaqueue *q)
{
struct cx23885_buffer *buf;
Expand Down Expand Up @@ -115,6 +150,7 @@ void cx23885_vbi_timeout(unsigned long data)

cx23885_sram_channel_dump(dev, &dev->sram_channels[SRAM_CH02]);

/* Stop the VBI engine */
cx_clear(VID_A_DMA_CTL, 0x22);

spin_lock_irqsave(&dev->slock, flags);
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/media/video/cx23885/cx23885.h
Original file line number Diff line number Diff line change
Expand Up @@ -564,13 +564,18 @@ extern void cx23885_free_buffer(struct videobuf_queue *q,
extern int cx23885_video_register(struct cx23885_dev *dev);
extern void cx23885_video_unregister(struct cx23885_dev *dev);
extern int cx23885_video_irq(struct cx23885_dev *dev, u32 status);
extern void cx23885_video_wakeup(struct cx23885_dev *dev,
struct cx23885_dmaqueue *q, u32 count);

/* ----------------------------------------------------------- */
/* cx23885-vbi.c */
extern int cx23885_vbi_fmt(struct file *file, void *priv,
struct v4l2_format *f);
extern void cx23885_vbi_timeout(unsigned long data);
extern struct videobuf_queue_ops cx23885_vbi_qops;
extern int cx23885_restart_vbi_queue(struct cx23885_dev *dev,
struct cx23885_dmaqueue *q);
extern int cx23885_vbi_irq(struct cx23885_dev *dev, u32 status);

/* cx23885-i2c.c */
extern int cx23885_i2c_register(struct cx23885_i2c *bus);
Expand Down

0 comments on commit 0f86b0d

Please sign in to comment.