All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ondrej Zary <linux@rainbow-software.org>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>, linux-media@vger.kernel.org
Subject: Re: [RFC PATCH 0/7] saa7134: improve v4l2-compliance
Date: Mon, 28 Jan 2013 23:40:59 +0100	[thread overview]
Message-ID: <201301282340.59707.linux@rainbow-software.org> (raw)
In-Reply-To: <201301281156.59112.hverkuil@xs4all.nl>

On Monday 28 January 2013 11:56:59 Hans Verkuil wrote:
> On Sun January 27 2013 20:45:05 Ondrej Zary wrote:
> > Hello,
> > this patch series improves v4l2-compliance of saa7134 driver. There are
> > still some problems. Controls require conversion to control framework
> > which I was unable to finish (because the driver accesses other controls
> > and also the file handle from within s_ctrl).
>
> To convert to the control framework this driver needs quite a bit of work:
> the saa6752hs driver should be done first (and moved to media/i2c as well
> as it really doesn't belong here).
>
> The filehandle shouldn't be a problem, I think after the prio conversion
> that's no longer needed at all.
>
> > Radio is now OK except for controls.
> > Video has problems with controls, debugging, formats and buffers:
> > Debug ioctls:
> >         test VIDIOC_DBG_G_CHIP_IDENT: OK (Not Supported)
> >                 fail: v4l2-test-debug.cpp(84): doioctl(node,
> > VIDIOC_DBG_G_CHIP_IDENT, &chip) Format ioctls:
> >         test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
> >                 fail: v4l2-test-formats.cpp(836): !cap->readbuffers
>
> That should be easy to fix. It's a pretty bogus field and I usually set it
> to the minimum number of buffers (which is 2 for this driver).
>
> >         test VIDIOC_G/S_PARM: FAIL
> >                 fail: v4l2-test-formats.cpp(335): !fmt.width ||
> > !fmt.height test VIDIOC_G_FBUF: FAIL
> >                 fail: v4l2-test-formats.cpp(382): !pix.colorspace
>
> That's easy enough to solve. Typically this should be set to
> V4L2_COLORSPACE_SMPTE170M.
>
> But after solving this you'll probably get a bunch of other issues due to
> a problem this driver shared with quite a few other related drivers: the
> format state is stored in struct saa7134_fh instead of in the top-level
> struct. These format states are all global and should never have been
> placed in this struct.

Got this after setting colorspace:
               fail: v4l2-test-formats.cpp(460): win.field == V4L2_FIELD_ANY

I don't know what win.field is supposed to be and where the value should came 
from. It's now taken from fh->win which is probably all zeros because no 
overlay is running?
The same problem is with g_fbuf - what should fmt.width and fmt.height be?

> In fact if I look at the fields in saa7134_fh then:
>
> - radio and type can be removed (this info can be obtained from existing
> fields elsewhere)
> - the fields win until pt_vbi should all be global fields
> - I suspect resources and qos_request should also be global, but you would
> have to analyze that.

There are two "resources" variables - one in saa7134_fh and one in 
saa7134_dev. They're used for some kind of double-locking (global and per 
file handle).

> In fact, it is likely that the whole structure can be removed and only
> v4l2_fh be used instead.

-- 
Ondrej Zary

  reply	other threads:[~2013-01-28 22:41 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-27 19:45 [RFC PATCH 0/7] saa7134: improve v4l2-compliance Ondrej Zary
2013-01-27 19:45 ` [PATCH 1/7] saa7134: v4l2-compliance: implement V4L2_CAP_DEVICE_CAPS Ondrej Zary
2013-01-28 10:07   ` Hans Verkuil
2013-01-27 19:45 ` [PATCH 2/7] saa7134: v4l2-compliance: don't report invalid audio modes for radio Ondrej Zary
2013-01-28 10:08   ` Hans Verkuil
2013-01-27 19:45 ` [PATCH 3/7] saa7134: v4l2-compliance: use v4l2_fh to fix priority handling Ondrej Zary
2013-01-28 10:08   ` Hans Verkuil
2013-01-27 19:45 ` [PATCH 4/7] saa7134: v4l2-compliance: return real frequency Ondrej Zary
2013-01-28 10:10   ` Hans Verkuil
2013-01-27 19:45 ` [PATCH 5/7] saa7134: v4l2-compliance: fix g_tuner/s_tuner Ondrej Zary
2013-01-28 10:11   ` Hans Verkuil
2013-01-27 19:45 ` [PATCH 6/7] saa7134: v4l2-compliance: remove V4L2_IN_ST_NO_SYNC from enum_input Ondrej Zary
2013-01-28 10:30   ` Mauro Carvalho Chehab
2013-01-28 11:00     ` Hans Verkuil
2013-01-28 10:37   ` Hans Verkuil
2013-01-27 19:45 ` [PATCH 7/7] saa7134: v4l2-compliance: remove bogus audio input support Ondrej Zary
2013-01-28 10:38   ` Hans Verkuil
2013-01-28 10:56 ` [RFC PATCH 0/7] saa7134: improve v4l2-compliance Hans Verkuil
2013-01-28 22:40   ` Ondrej Zary [this message]
2013-01-29  7:12     ` Hans Verkuil
2013-01-28 14:11 ` [PATCH 8/7] saa7134: v4l2-compliance: remove bogus g_parm Ondrej Zary
2013-01-28 14:19   ` Hans Verkuil
2013-01-28 14:11 ` [PATCH 9/7] saa7134: v4l2-compliance: initialize VBI structure Ondrej Zary
2013-01-28 14:21   ` Hans Verkuil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201301282340.59707.linux@rainbow-software.org \
    --to=linux@rainbow-software.org \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.