diff options
author | Andy Walls <awalls@radix.net> | 2009-12-31 04:54:53 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-02-26 21:10:29 +0300 |
commit | efc0b127b2e0135053680cd0118856b051450009 (patch) | |
tree | bf4028f8682ffba0170d161fdf40faba03658460 /drivers/media/video/cx18/cx18-driver.h | |
parent | 7e64dc4c4d6f5c8935fac25c7fc7aa83f9880ed7 (diff) | |
download | linux-efc0b127b2e0135053680cd0118856b051450009.tar.xz |
V4L/DVB (13902): cx18: Update MPEG Index stream buffers module option processing
Update the module options related to INDEX stream buffer allocation. A single
CX2341[5678] index entry is only 24 bytes. Large buffers for the IDX stream
will prevent the CX23418 from transferring index data over at all. Buffers
of around 1.5 kB or 64 index entries seem to be just fine. We'll default to
63 buffers/MDLs as that is the firmware limit per stream and IDX stream buffers
are not high rate. There is no reason on earth to allocate the previous 1 MB
default of buffer space for the IDX stream.
This is in anticipation of implementing the G_ENC_INDEX ioctl() in the cx18
driver.
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx18/cx18-driver.h')
-rw-r--r-- | drivers/media/video/cx18/cx18-driver.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/media/video/cx18/cx18-driver.h b/drivers/media/video/cx18/cx18-driver.h index e3f7911a7385..ff3426206765 100644 --- a/drivers/media/video/cx18/cx18-driver.h +++ b/drivers/media/video/cx18/cx18-driver.h @@ -126,10 +126,22 @@ #define CX18_625_LINE_ENC_YUV_BUFSIZE (CX18_UNIT_ENC_YUV_BUFSIZE * 576/32) #define CX18_525_LINE_ENC_YUV_BUFSIZE (CX18_UNIT_ENC_YUV_BUFSIZE * 480/32) +/* IDX buffer size should be a multiple of the index entry size from the chip */ +struct cx18_enc_idx_entry { + __le32 length; + __le32 offset_low; + __le32 offset_high; + __le32 flags; + __le32 pts_low; + __le32 pts_high; +} __attribute__ ((packed)); +#define CX18_UNIT_ENC_IDX_BUFSIZE \ + (sizeof(struct cx18_enc_idx_entry) * V4L2_ENC_IDX_ENTRIES) + /* DMA buffer, default size in kB allocated */ #define CX18_DEFAULT_ENC_TS_BUFSIZE 32 #define CX18_DEFAULT_ENC_MPG_BUFSIZE 32 -#define CX18_DEFAULT_ENC_IDX_BUFSIZE 32 +#define CX18_DEFAULT_ENC_IDX_BUFSIZE (CX18_UNIT_ENC_IDX_BUFSIZE * 1 / 1024 + 1) #define CX18_DEFAULT_ENC_YUV_BUFSIZE (CX18_UNIT_ENC_YUV_BUFSIZE * 3 / 1024 + 1) #define CX18_DEFAULT_ENC_PCM_BUFSIZE 4 |