[v3.8-rc1] Multimedia regression, ioctl(17,..)-API changed ?

From: JÃrg Otte
Date: Sun Dec 23 2012 - 12:11:12 EST


With kernel v3.8 all multimedia programs under KDE4 don't work (Kubuntu 12.04).
They alltogether ( at least Dragonplayer (Mediaplayer), Knotify4
(system-sound),
System-Settings-Multimedia,..) are looping forever producing 100% CPU-usage
and must be killed.

With kernel 3.7 there are no problems.

I compared an strace of Dragonplayer under 3.7 and 3.8 kernels. The
main difference
of both traces are the following corresponding outputs just before
looping in v3.8
begins:

v3.7:
ioctl(17, VIDIOC_ENUMSTD, 0x7fff6cce66a0) = -1 EINVAL (Invalid argument)
ioctl(17, VIDIOC_QUERYCTRL, 0x7fff6cce66f0) = -1 EINVAL (Invalid argument)

v3.8:
ioctl(17, VIDIOC_ENUMSTD, 0x7fffc3be6990) = -1 ENOTTY (Inappropriate
ioctl for device)
ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file
or directory)

So error number EINVAL was changed to ENOTTY/ENOENT

When Dragonplayer under v3.8 comes to ioctl(17, VIDIOC_QUERYCTRL,...)
and sees error
number ENOENT instead of EINVAL it loops forever producing 100% CPU
usage like so:

.
.
ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file
or directory)
ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file
or directory)
ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file
or directory)
ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file
or directory)
ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file
or directory)
ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file
or directory)
ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file
or directory)
ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file
or directory)
ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file
or directory)
ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file
or directory)
ioctl(17, VIDIOC_QUERYCTRL, 0x7fffc3be69e0) = -1 ENOENT (No such file
or directory)
.
and so on
.

For me it looks like that KDE4 multimedia is not aware of the new error numbers.

Looking through the commits I found driver uvcvideo producing the changed
error numbers.

commit f0ed2ce840b3a59b587e8aa398538141a86e9588
Author: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
[media] uvcvideo: Set error_idx properly for extended controls API failures

To verify this I built a v3.8-kernel without uvcvideo (USB_VIDEO_CLASS=n)
and the problem disappeared!

Simply reverting the commit is not an option for me because then I am left
with merge conflicts and I don't know how to resolve.

Unfortunately without uvcvideo I lost my usb-camera support.

-- JÃrg

Please CC me I'm not subscribed
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/