Commit Graph

47 Commits

Author SHA1 Message Date
Patrik Jakobsson
f7cfae8296 Apply SPDX license identifiers and provice a LICENSE file
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2021-08-11 10:52:13 +02:00
Patrik Jakobsson
5f8c849f49 Rename V4L2_TYPE_GRABBER to V4L2_TYPE_VIDEO for 5.7rc1
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2020-06-05 11:34:49 +02:00
Patrik Jakobsson
5ea6be3045 Revert to discrete frame sizes and frame intervals
Skype and other applications don't support stepwise frame sizes and
frame intervals. Instead they try to handle them as discrete devices
which fails. It seems they will never fix this so instead we reduce our
functionality to just support the discrete type.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2020-05-22 16:02:19 +02:00
Andreas Kemnade
9d7ff828eb facetimehd: set device_caps in video_device
In kernel 5.4 I otherwise get this warning

WARNING: CPU: 1 PID: 451 at drivers/media/v4l2-core/v4l2-dev.c:863 __video_register_device+0x64b/0xe90 [videodev]
The code there is:

        /* the device_caps field MUST be set for all but subdevs */
        if (WARN_ON(type != VFL_TYPE_SUBDEV && !vdev->device_caps))

[patrik: ported this to the mainline branch]
Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
2019-12-05 15:26:22 +01:00
Patrik Jakobsson
8fca2ed27d fthd: Don't use hardcoded value for dma descriptor list size
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2016-10-26 20:55:27 +02:00
Patrik Jakobsson
60b2db614e fthd: Code style cleanups
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2016-10-26 16:57:23 +02:00
Patrik Jakobsson
887d0f531e fthd/v4l2: Convert to use the new vb2_queue dev field
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2016-10-10 02:42:36 +02:00
Patrik Jakobsson
187ec0c872 fthd: Fix some FIXMEs
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2016-07-04 01:14:41 +02:00
Patrik Jakobsson
45bccf0a30 fthd: Update copyrights
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2016-07-03 12:28:11 +02:00
Patrik Jakobsson
03b0c5cf7a fthd: Code style fixes
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2016-06-21 01:22:46 +02:00
Patrik Jakobsson
b2c0634371 fthd/buffer: Rename public func and remove macro
...and cleanups

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2016-06-21 01:20:33 +02:00
Patrik Jakobsson
782364ff96 fthd: Rename FTHD_BUFFERS to FTHD_NUM_BUFS
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2016-05-01 18:18:30 +02:00
Patrik Jakobsson
80c04ac390 fthd/v4l2: A bunch of trivial codestyle fixes
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2016-05-01 18:18:24 +02:00
Patrik Jakobsson
132a9c622f fthd/v4l2: Don't allow changing format if buffers are in use
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2016-05-01 13:44:21 +02:00
Patrik Jakobsson
7d5e66fef7 fthd/v4l2: Fix queue setup because of API changes
We also remove the multiple plane support from queue setup. This will
need to be fixed up again to support planar formats.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2016-05-01 13:44:21 +02:00
Patrik Jakobsson
dc55cf3a18 facetimehd: Fail when too small buffers are requested
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2016-01-03 15:41:22 +01:00
Patrik Jakobsson
96de215c26 facetimehd: Lower max resolution to known good values
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2016-01-03 13:35:29 +01:00
Patrik Jakobsson
0f646b3660 facetimehd: Fix read io mode
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2016-01-03 13:17:34 +01:00
Patrik Jakobsson
2b45fb581a facetimehd: Add control for auto white balance
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2015-12-06 14:47:26 +01:00
Patrik Jakobsson
4d67b02371 Merge branch 'my_fixes' of git://github.com/sschnelle/facetimehd 2015-11-30 21:57:44 +01:00
Patrik Jakobsson
5ad66dbd5e facetimehd: Add missing init of planes 2015-11-30 21:54:12 +01:00
Patrik Jakobsson
7532c491b7 facetimehd: Only allow framesizes for formats we support 2015-11-30 21:15:53 +01:00
Patrik Jakobsson
230e57ae45 facetimehd: Rework and fix _G_FMT/_S_FMT/_TRY_FMT 2015-11-30 21:13:26 +01:00
Patrik Jakobsson
3f5fa56ae3 facetimehd: Add basic event subscription 2015-11-30 21:13:26 +01:00
Sven Schnelle
a8c3278948 facetimehd: don't report that we can do tv standards 2015-11-30 20:26:31 +01:00
Sven Schnelle
4dd6f5459e facetimehd: remove V4L2_CAP_TIMEPERFRAME 2015-11-30 20:08:10 +01:00
Sven Schnelle
a0118922b6 Revert "facetimehd: remove explicit V4L2_CAPTURE capability"
This reverts commit b9cf9afb31.
2015-11-30 18:26:34 +01:00
Sven Schnelle
b9cf9afb31 facetimehd: remove explicit V4L2_CAPTURE capability 2015-11-30 18:23:44 +01:00
Patrik Jakobsson
d57b16fc64 facetimehd: Fix enumeration of formats 2015-11-29 23:48:57 +01:00
Patrik Jakobsson
6d58c3b96e facetimehd: Remove V4L2_CAP_TIMEPERFRAME from device caps
V4L2_CAP_TIMERPERFRAME is a streaming paramater and must not go into the
device caps. This accidentally exposed mplane support which we don't
have yet.
2015-11-29 23:11:38 +01:00
Patrik Jakobsson
7c50063de3 facetimehd: Don't expose a TV standard
We're a webcam so we don't support TV standards
2015-11-29 23:11:36 +01:00
Patrik Jakobsson
77bf571d54 Merge branch 'my_fixes' of git://github.com/sschnelle/facetimehd 2015-11-29 21:15:28 +01:00
Sven Schnelle
d1ec497e02 Merge remote-tracking branch 'patjak/master' into my_fixes 2015-11-28 23:11:00 +01:00
Sven Schnelle
6bbe3712f8 facetimehd: fix enum_frameintervals()
Signed-off-by: Sven Schnelle <svens@stackframe.org>
2015-11-28 23:09:40 +01:00
Sven Schnelle
4758d7a848 facetimehd: set framesize type to stepwise 2015-11-28 23:02:23 +01:00
Sven Schnelle
ca8c5584e0 facetimehd: add channel waitqueue
add a per channel waitqueue to be able to have more than one ringbuffer
entry in flight.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
2015-11-28 22:59:44 +01:00
Patrik Jakobsson
58195cd9e4 facetimehd: Rename firmware directory
And the v4l driver name.
2015-11-28 21:26:07 +01:00
Sven Schnelle
aebaf60c07 facetimehd: change fthd_channel_ringbuf_send() error handling
In the current implementation it returns -1 on error, an offset value
otherwise. Change it to return a negative error value, and add a pointer
to an u32 for receiving the entry offset as an extra argument.

This makes the ugly (u32)-1 return code comparision obsolete, and we
can return a more detailed error code like EAGAIN if all ringbuffer slots
are busy.
2015-11-28 21:18:22 +01:00
Patrik Jakobsson
8e83f8fbcd Merge branch 'my_fixes' of git://github.com/sschnelle/facetimehd 2015-11-28 21:16:40 +01:00
Sven Schnelle
2ff298739a facetimehd: set bus_info in v4l2 capabilities 2015-11-28 17:15:42 +01:00
Sven Schnelle
1af48495ad facetimehd: report correct amount of buffers 2015-11-28 17:10:16 +01:00
Sven Schnelle
2e7af64e81 facetimehd: add controls for brightness, contrast, saturation and hue 2015-11-28 16:17:11 +01:00
Sven Schnelle
9bc376510b facetimehd: adjust logging level in fthd_v4l2_ioctl_try_fmt_vid_cap() 2015-11-28 16:16:27 +01:00
Sven Schnelle
b93fbfc22b facetimehd: check index parameter in enum_framesizes()/enum_frameintervals()
otherwise we might have callers trying all possible index value which takes a lot
of time.
2015-11-28 16:12:19 +01:00
Patrik Jakobsson
ed773c8268 facetimehd: More Broadcom to FacetimeHD renaming 2015-11-28 13:16:53 +01:00
Sven Schnelle
9dd6bc2a02 facetimehd: don't access __iomem directly 2015-11-28 07:29:47 +01:00
Sven Schnelle
f3067f211a rename driver to facetimehd 2015-11-27 20:32:06 +01:00