• Daniel Drake's avatar
    V4L/DVB (8318): OV7670: don't reject unsupported settings · cd257a6f
    Daniel Drake authored
    For VIDIOC_G_FMT/VIDIOC_TRY_FMT, the V4L2 API spec states:
    "Drivers should not return an error code unless the input is ambiguous"
    "Very simple, inflexible devices may even ignore all input and always
    return the default parameters."
    "When the requested buffer type is not supported drivers return an
    EINVAL error code."
    i.e. returning errors for unsupported fields is bad, and it's ok to
    unconditionally overwrite user-requested settings
    
    This patch makes ov7670 meet that behaviour, and brings it in line with
    other drivers e.g. stk-webcam. It also fixes compatibility with (unpatched)
    gstreamer.
    Signed-off-by: default avatarDaniel Drake <dsd@laptop.org>
    Acked-by: default avatarJonathan Corbet <corbet@lwn.net>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
    cd257a6f
ov7670.c 34.8 KB