summaryrefslogtreecommitdiff
path: root/drivers/media/pci/tw686x/tw686x.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/pci/tw686x/tw686x.h')
-rw-r--r--drivers/media/pci/tw686x/tw686x.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/media/pci/tw686x/tw686x.h b/drivers/media/pci/tw686x/tw686x.h
index 5f4c2131ddac..25e3c84331aa 100644
--- a/drivers/media/pci/tw686x/tw686x.h
+++ b/drivers/media/pci/tw686x/tw686x.h
@@ -34,6 +34,7 @@
#define TW686X_DMA_MODE_MEMCPY 0
#define TW686X_DMA_MODE_CONTIG 1
+#define TW686X_DMA_MODE_SG 2
struct tw686x_format {
char *name;
@@ -48,6 +49,12 @@ struct tw686x_dma_desc {
unsigned int size;
};
+struct tw686x_sg_desc {
+ /* 3 MSBits for flags, 13 LSBits for length */
+ __le32 flags_length;
+ __le32 phys;
+};
+
struct tw686x_audio_buf {
dma_addr_t dma;
void *virt;
@@ -80,6 +87,7 @@ struct tw686x_video_channel {
struct video_device *device;
struct tw686x_v4l2_buf *curr_bufs[2];
struct tw686x_dma_desc dma_descs[2];
+ struct tw686x_sg_desc *sg_descs[2];
struct v4l2_ctrl_handler ctrl_handler;
const struct tw686x_format *format;
@@ -154,6 +162,12 @@ static inline unsigned int max_channels(struct tw686x_dev *dev)
return dev->type & TYPE_MAX_CHANNELS; /* 4 or 8 channels */
}
+static inline unsigned is_second_gen(struct tw686x_dev *dev)
+{
+ /* each channel has its own DMA SG table */
+ return dev->type & TYPE_SECOND_GEN;
+}
+
void tw686x_enable_channel(struct tw686x_dev *dev, unsigned int channel);
void tw686x_disable_channel(struct tw686x_dev *dev, unsigned int channel);