[media] cx23885: convert to vb2
authorHans Verkuil <hans.verkuil@cisco.com>
Thu, 14 Aug 2014 09:43:01 +0000 (06:43 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Mon, 8 Sep 2014 13:00:59 +0000 (10:00 -0300)
commit453afdd9ce33293f640e84dc17e5f366701516e8
tree48c74ee1bb35d812a84162006c154a2cb4dfe4c7
parent73d8102298719863d54264f62521362487f84256
[media] cx23885: convert to vb2

As usual, this patch is very large due to the fact that half a vb2 conversion
isn't possible. And since this affects 417, alsa, core, dvb, vbi and video the
changes are all over.

What made this more difficult was the peculiar way the risc program was setup.
The driver allowed for running out of buffers in which case the DMA would stop
and restart when the next buffer was queued. There was also a complicated
timeout system for when buffers weren't filled. This was replaced by a much
simpler scheme where there is always one buffer around and the DMA will just
cycle that buffer until a new buffer is queued. In that case the previous
buffer will be chained to the new buffer. An interrupt is generated at the
start of the new buffer telling the driver that the previous buffer can be
passed on to userspace.

Much simpler and more robust. The old code seems to be copied from the
cx88 driver. But it didn't fit the vb2 ops very well and replacing it with
the new scheme made the code easier to understand. Not to mention that this
patch removes 600 lines of code.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/pci/cx23885/Kconfig
drivers/media/pci/cx23885/altera-ci.c
drivers/media/pci/cx23885/cx23885-417.c
drivers/media/pci/cx23885/cx23885-alsa.c
drivers/media/pci/cx23885/cx23885-core.c
drivers/media/pci/cx23885/cx23885-dvb.c
drivers/media/pci/cx23885/cx23885-vbi.c
drivers/media/pci/cx23885/cx23885-video.c
drivers/media/pci/cx23885/cx23885.h
This page took 0.027378 seconds and 5 git commands to generate.