mbox series

[0/4] em28xx: solve several issues pointed by v4l2-compliance

Message ID cover.1536949178.git.mchehab+samsung@kernel.org (mailing list archive)
Headers show
Series em28xx: solve several issues pointed by v4l2-compliance | expand

Message

Mauro Carvalho Chehab Sept. 14, 2018, 6:22 p.m. UTC
There are several non-compliance issues on em28xx.  Fix those that
I can hit with a simple grabber board like Terratec AV 350.

I also tested it with a WinTV USB2. There, I got several other compliants
all related to msp3400 driver and step size. Fixing those is more complex,
as it would require some non-trivial changes. So, for now, let's do just
the ones that aren't related to msp3400.

Mauro Carvalho Chehab (4):
  media: em28xx: fix handler for vidioc_s_input()
  media: em28xx: use a default format if TRY_FMT fails
  media: em28xx: fix input name for Terratec AV 350
  media: em28xx: make v4l2-compliance happier by starting sequence on
    zero

 drivers/media/usb/em28xx/em28xx-cards.c | 33 ++++++++-
 drivers/media/usb/em28xx/em28xx-video.c | 91 ++++++++++++++++++++++---
 drivers/media/usb/em28xx/em28xx.h       |  8 ++-
 3 files changed, 118 insertions(+), 14 deletions(-)

Comments

Mauro Carvalho Chehab Sept. 14, 2018, 7:08 p.m. UTC | #1
Em Fri, 14 Sep 2018 15:22:30 -0300
Mauro Carvalho Chehab <mchehab+samsung@kernel.org> escreveu:

> There are several non-compliance issues on em28xx.  Fix those that
> I can hit with a simple grabber board like Terratec AV 350.
> 
> I also tested it with a WinTV USB2. There, I got several other compliants
> all related to msp3400 driver and step size. Fixing those is more complex,
> as it would require some non-trivial changes. So, for now, let's do just
> the ones that aren't related to msp3400.
> 
> Mauro Carvalho Chehab (4):
>   media: em28xx: fix handler for vidioc_s_input()
>   media: em28xx: use a default format if TRY_FMT fails
>   media: em28xx: fix input name for Terratec AV 350
>   media: em28xx: make v4l2-compliance happier by starting sequence on
>     zero
> 
>  drivers/media/usb/em28xx/em28xx-cards.c | 33 ++++++++-
>  drivers/media/usb/em28xx/em28xx-video.c | 91 ++++++++++++++++++++++---
>  drivers/media/usb/em28xx/em28xx.h       |  8 ++-
>  3 files changed, 118 insertions(+), 14 deletions(-)
> 

Btw, if one wants to see the results for v4l2-compliance,
I applied those together with my tvp5150-4 test git branch:
	https://git.linuxtv.org/mchehab/experimental.git/log/?h=tvp5150-4

Results enclosed.

Thanks,
Mauro

$ v4l2-compliance -s
v4l2-compliance SHA: bc71e4a67c6fbc5940062843bc41e7c8679634ce, 64 bits

Compliance test for device /dev/video0:

Driver Info:
	Driver name      : em28xx
	Card type        : Terratec AV350
	Bus info         : usb-0000:00:14.0-2
	Driver version   : 4.19.0
	Capabilities     : 0x85220011
		Video Capture
		VBI Capture
		Audio
		Read/Write
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x05220001
		Video Capture
		Audio
		Read/Write
		Streaming
		Extended Pix Format

Required ioctls:
	test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
	test second /dev/video0 open: OK
	test VIDIOC_QUERYCAP: OK
	test VIDIOC_G/S_PRIORITY: OK
	test for unlimited opens: OK

Debug ioctls:
	test VIDIOC_DBG_G/S_REGISTER: OK
	test VIDIOC_LOG_STATUS: OK (Not Supported)

Input ioctls:
	test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
	test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
	test VIDIOC_ENUMAUDIO: OK
	test VIDIOC_G/S/ENUMINPUT: OK
	test VIDIOC_G/S_AUDIO: OK
	Inputs: 2 Audio Inputs: 1 Tuners: 0

Output ioctls:
	test VIDIOC_G/S_MODULATOR: OK (Not Supported)
	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
	test VIDIOC_ENUMAUDOUT: OK (Not Supported)
	test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
	test VIDIOC_G/S_AUDOUT: OK (Not Supported)
	Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
	test VIDIOC_ENUM/G/S/QUERY_STD: OK
	test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
	test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
	test VIDIOC_G/S_EDID: OK (Not Supported)

Control ioctls (Input 0):
	test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
	test VIDIOC_QUERYCTRL: OK
	test VIDIOC_G/S_CTRL: OK
	test VIDIOC_G/S/TRY_EXT_CTRLS: OK
	test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
	test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
	Standard Controls: 13 Private Controls: 0

Format ioctls (Input 0):
	test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
	test VIDIOC_G/S_PARM: OK
	test VIDIOC_G_FBUF: OK (Not Supported)
	test VIDIOC_G_FMT: OK
	test VIDIOC_TRY_FMT: OK
	test VIDIOC_S_FMT: OK
	test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
	test Cropping: OK (Not Supported)
	test Composing: OK (Not Supported)
	test Scaling: OK

Codec ioctls (Input 0):
	test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
	test VIDIOC_G_ENC_INDEX: OK (Not Supported)
	test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

Buffer ioctls (Input 0):
	test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
	test VIDIOC_EXPBUF: OK (Not Supported)

Control ioctls (Input 1):
	test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
	test VIDIOC_QUERYCTRL: OK
	test VIDIOC_G/S_CTRL: OK
	test VIDIOC_G/S/TRY_EXT_CTRLS: OK
	test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
	test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
	Standard Controls: 13 Private Controls: 0

Format ioctls (Input 1):
	test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
	test VIDIOC_G/S_PARM: OK
	test VIDIOC_G_FBUF: OK (Not Supported)
	test VIDIOC_G_FMT: OK
	test VIDIOC_TRY_FMT: OK
	test VIDIOC_S_FMT: OK
	test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
	test Cropping: OK (Not Supported)
	test Composing: OK (Not Supported)
	test Scaling: OK

Codec ioctls (Input 1):
	test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
	test VIDIOC_G_ENC_INDEX: OK (Not Supported)
	test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

Buffer ioctls (Input 1):
	test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
	test VIDIOC_EXPBUF: OK (Not Supported)

Test input 0:

Streaming ioctls:
	test read/write: OK
	test blocking wait: OK
	test MMAP: OK                                     
	test USERPTR: OK                                  
	test DMABUF: Cannot test, specify --expbuf-device

Total: 68, Succeeded: 68, Failed: 0, Warnings: 0