All of lore.kernel.org
 help / color / mirror / Atom feed
* Is it possible to have a binary blob custom control?
@ 2017-05-12 19:02 Patrick Doyle
       [not found] ` <CAL8zT=jwVquxzvnieVA2njSTdL98mOt+n=oy=Nb8ptXdBbJ-1w@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Patrick Doyle @ 2017-05-12 19:02 UTC (permalink / raw)
  To: linux-media

I would like to transfer a binary blob of data to my V4L2 device
driver.  Is there a way I can do this through the V4L2 "control"
framework?  Or should I implement a custom ioctl to do that?

Any recommendations or examples?

Thank you.

--wpd

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Is it possible to have a binary blob custom control?
       [not found] ` <CAL8zT=jwVquxzvnieVA2njSTdL98mOt+n=oy=Nb8ptXdBbJ-1w@mail.gmail.com>
@ 2017-05-14 12:53   ` Patrick Doyle
  2017-05-15 20:23     ` Patrick Doyle
  0 siblings, 1 reply; 3+ messages in thread
From: Patrick Doyle @ 2017-05-14 12:53 UTC (permalink / raw)
  To: Jean-Michel Hautbois; +Cc: Linux Media Mailing List

On Sun, May 14, 2017 at 3:27 AM, Jean-Michel Hautbois
<jhautbois@gmail.com> wrote:
> Maybe a debugfs would be easier than an ioctl? Do you have a good reason to
> use the control framework for that matter?

I implemented this once before, using a custom ioctl, which meant that
I had to maintain a custom kernel header file.  I am looking for a
better way to do this.  I wondered if I could do this through the V4L2
framework, but perhaps, as you suggest, the debugfs would be better.

The underlying issue I am trying to address is this:  I have an
application that used the ov7740 imager from Omnivision.  I have
custom register settings that were provided to me under NDA.  I have
asked Omnivision if I can publish those register settings in GPL'd
source code, but have received no response.  So, my alternative
approach was to modify the GPL driver to accept custom register
settings (through a new IOCTL).  That way I can bake the register
settings in my custom application and still use the GPL'd driver.

But that meant that I had to define a header file that gets included
in the kernel, and I need some way to build my application with a
reference to that header file.  This is error prone.

I like your suggestion of a debugfs API.  That way I could open
/proc/sys/debug/ov7740/custom_vga_settings and write my register
settings there.  The name is the documentation.  The format is in the
README.

Are there other ways I could do this?  Certainly?  Are there better
ways I could do this?  I'm open to opinions.

Thanks again.

--wpd

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Is it possible to have a binary blob custom control?
  2017-05-14 12:53   ` Patrick Doyle
@ 2017-05-15 20:23     ` Patrick Doyle
  0 siblings, 0 replies; 3+ messages in thread
From: Patrick Doyle @ 2017-05-15 20:23 UTC (permalink / raw)
  To: Jean-Michel Hautbois; +Cc: Linux Media Mailing List

Another possible mis-abuse of a binary blob control would be as a
mechanism for retrieving a lumanance histogram from an image
processing peripheral.  Once again, I could implement that through the
debugfs as Jean-Michel suggested, or I could do something more
standard.

Any suggestions for a "more standard" mechanism for retrieving
out-of-band data (such as a histogram) from a V4L2 camera source?

I guess, now that I have mentioned out-of-band data, I could also
start thinking about the "embedded data lines" that are provided as
the first two lines from my Sony imager.  Is there any standard way
for directing those two lines to a separate buffer?

I'd rather ask silly sounding questions, than implement silly code. :-)

--wpd

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-05-15 20:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-12 19:02 Is it possible to have a binary blob custom control? Patrick Doyle
     [not found] ` <CAL8zT=jwVquxzvnieVA2njSTdL98mOt+n=oy=Nb8ptXdBbJ-1w@mail.gmail.com>
2017-05-14 12:53   ` Patrick Doyle
2017-05-15 20:23     ` Patrick Doyle

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.