v4l2: fix port param enumeration for devices without controls

It is valid for V4L2 devices to not implement any controls. QUERYCTRL
returns ENOTTY in these cases. Enumerating the controls must not fail in
these cases but return no controls.
This commit is contained in:
Michael Tretter 2022-06-23 16:59:49 +02:00 committed by Wim Taymans
parent edd41d8259
commit a745374232

View file

@ -1107,6 +1107,8 @@ spa_v4l2_enum_controls(struct impl *this, int seq,
spa_log_debug(this->log, "test control %08x", queryctrl.id);
if (query_ext_ctrl_ioctl(port, &queryctrl) != 0) {
if (errno == ENOTTY)
goto enum_end;
if (errno == EINVAL) {
if (queryctrl.id != next_fl)
goto enum_end;