Skip to contentSkip to conversation

cx23885: convert to the latest frameworks, including vb2.

GIT PULL Hans Verkuil 2 participants 2 messages Aug 14, 2014 – Sep 3, 2014 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

This pull request converts the cx23885 driver to the latest V4L2 core frameworks, removing about 1000 lines in the process.

It now passes the v4l2-compliance tests and, frankly, feels much more robust.

I have tested this with my HVR-1800 board with video (compressed and uncompressed), vbi, dvb and alsa.

As usual, the vb2 conversion is a beast of a patch. But the vb2 conversion affected video, vbi, dvb and alsa, so it's all over the place. And it is all or nothing. See the commit log of that patch for some more information.

It also changed the risc code to simplify the code and to get rid of all the timeouts that were copied-and-pasted from cx88. If anyone knows of a reason for these timeouts, please let me know. I have tried to separate the risc code changes from the vb2 changes, but that was impossible to get to work with vb1.

Regards,

Hans

The following changes since commit 0f3bf3dc1ca394a8385079a5653088672b65c5c4:

[media] cx23885: fix UNSET/TUNER_ABSENT confusion (2014-08-01 15:30:59 -0300)

are available in the git repository at:

git://linuxtv.org/hverkuil/media_tree.git cx23b

for you to fetch changes up to 295df1a7021a09ccaa3a478acbb4ed1e9fb4a023:

cx23885: Add busy checks before changing formats (2014-08-14 11:43:36 +0200)

----------------------------------------------------------------
Hans Verkuil (21):
vb2: fix wrong gfp flags
cx23885: fix querycap
cx23885: fix audio input handling
cx23885: support v4l2_fh and g/s_priority
cx23885: use core locking, switch to unlocked_ioctl.
cx23885: convert to the control framework
cx23885: convert 417 to the control framework
cx23885: fix format colorspace compliance error
cx23885: map invalid fields to a valid field.
cx23885: drop radio-related dead code
cx23885: drop type field from struct cx23885_fh
cx23885: drop unused clip fields from struct cx23885_fh
cx23885: fmt, width and height are global, not per-fh.
cx23885: drop videobuf abuse in cx23885-alsa
cx23885: use video_drvdata to get cx23885_dev pointer
cx23885: convert to vb2
cx23885: fix field handling
cx23885: fix weird sizes.
cx23885: remove FSF address as per checkpatch
cx23885: remove btcx-risc dependency
cx23885: Add busy checks before changing formats

 drivers/media/pci/cx23885/Kconfig          |    5 +-
 drivers/media/pci/cx23885/Makefile         |    1 -
 drivers/media/pci/cx23885/altera-ci.c      |    8 +-
 drivers/media/pci/cx23885/altera-ci.h      |    4 -
 drivers/media/pci/cx23885/cimax2.c         |    4 -
 drivers/media/pci/cx23885/cimax2.h         |    4 -
 drivers/media/pci/cx23885/cx23885-417.c    |  501 ++++++++++----------------------
 drivers/media/pci/cx23885/cx23885-alsa.c   |  109 +++++--
 drivers/media/pci/cx23885/cx23885-av.c     |    5 -
 drivers/media/pci/cx23885/cx23885-av.h     |    5 -
 drivers/media/pci/cx23885/cx23885-cards.c  |    6 -
 drivers/media/pci/cx23885/cx23885-core.c   |  362 ++++++++---------------
 drivers/media/pci/cx23885/cx23885-dvb.c    |  136 ++++++---
 drivers/media/pci/cx23885/cx23885-f300.c   |    4 -
 drivers/media/pci/cx23885/cx23885-i2c.c    |   12 -
 drivers/media/pci/cx23885/cx23885-input.c  |    5 -
 drivers/media/pci/cx23885/cx23885-input.h  |    5 -
 drivers/media/pci/cx23885/cx23885-ioctl.c  |   10 +-
 drivers/media/pci/cx23885/cx23885-ioctl.h  |    4 -
 drivers/media/pci/cx23885/cx23885-ir.c     |    5 -
 drivers/media/pci/cx23885/cx23885-ir.h     |    5 -
 drivers/media/pci/cx23885/cx23885-reg.h    |    4 -
 drivers/media/pci/cx23885/cx23885-vbi.c    |  282 +++++++++---------
 drivers/media/pci/cx23885/cx23885-video.c  | 1294 +++++++++++++++++++++-------------------------------------------------------------
 drivers/media/pci/cx23885/cx23885-video.h  |    5 -
 drivers/media/pci/cx23885/cx23885.h        |  127 +++-----
 drivers/media/pci/cx23885/cx23888-ir.c     |    5 -
 drivers/media/pci/cx23885/cx23888-ir.h     |    5 -
 drivers/media/pci/cx23885/netup-eeprom.c   |    4 -
 drivers/media/pci/cx23885/netup-eeprom.h   |    4 -
 drivers/media/pci/cx23885/netup-init.c     |    4 -
 drivers/media/pci/cx23885/netup-init.h     |    4 -
 drivers/media/v4l2-core/videobuf2-dma-sg.c |    2 +-
 33 files changed, 952 insertions(+), 1988 deletions(-)
#1 lore raw

Em Thu, 14 Aug 2014 12:06:42 +0200
Hans Verkuil <[email protected]> escreveu:

Quoted 45 lines

This pull request converts the cx23885 driver to the latest V4L2 core frameworks, removing about 1000 lines in the process.

It now passes the v4l2-compliance tests and, frankly, feels much more robust.

I have tested this with my HVR-1800 board with video (compressed and uncompressed), vbi, dvb and alsa.

As usual, the vb2 conversion is a beast of a patch. But the vb2 conversion affected video, vbi, dvb and alsa, so it's all over the place. And it is all or nothing. See the commit log of that patch for some more information.

It also changed the risc code to simplify the code and to get rid of all the timeouts that were copied-and-pasted from cx88. If anyone knows of a reason for these timeouts, please let me know. I have tried to separate the risc code changes from the vb2 changes, but that was impossible to get to work with vb1.

Regards,

Hans

The following changes since commit 0f3bf3dc1ca394a8385079a5653088672b65c5c4:

   [media] cx23885: fix UNSET/TUNER_ABSENT confusion (2014-08-01 15:30:59 -0300)

are available in the git repository at:

git://linuxtv.org/hverkuil/media_tree.git cx23b

for you to fetch changes up to 295df1a7021a09ccaa3a478acbb4ed1e9fb4a023:

cx23885: Add busy checks before changing formats (2014-08-14 11:43:36 +0200)

----------------------------------------------------------------
Hans Verkuil (21):
vb2: fix wrong gfp flags
cx23885: fix querycap
cx23885: fix audio input handling
cx23885: support v4l2_fh and g/s_priority
cx23885: use core locking, switch to unlocked_ioctl.
cx23885: convert to the control framework
cx23885: convert 417 to the control framework
cx23885: fix format colorspace compliance error

Quoted 8 lines

cx23885: map invalid fields to a valid field.
cx23885: drop radio-related dead code
cx23885: drop type field from struct cx23885_fh
cx23885: drop unused clip fields from struct cx23885_fh
cx23885: fmt, width and height are global, not per-fh.
cx23885: drop videobuf abuse in cx23885-alsa
cx23885: use video_drvdata to get cx23885_dev pointer
cx23885: convert to vb2

This one I didn't apply. See the comments on a separate email.

Quoted 2 lines

cx23885: fix field handling
cx23885: fix weird sizes.

Didn't apply the two above, as they likely depend on vb2 conversion.

Quoted 1 line

cx23885: remove FSF address as per checkpatch

This one is so trivial that I applied it too.

Quoted 2 lines

cx23885: remove btcx-risc dependency
cx23885: Add busy checks before changing formats

Also depends on vb2 changes.

Regards,
Mauro