Commit 7027c448 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] media/radio: fix querycap

Querycap should set the device_caps field.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 2eb3b1ad
...@@ -1279,10 +1279,12 @@ static int wl1273_fm_vidioc_querycap(struct file *file, void *priv, ...@@ -1279,10 +1279,12 @@ static int wl1273_fm_vidioc_querycap(struct file *file, void *priv,
strlcpy(capability->bus_info, radio->bus_type, strlcpy(capability->bus_info, radio->bus_type,
sizeof(capability->bus_info)); sizeof(capability->bus_info));
capability->capabilities = V4L2_CAP_HW_FREQ_SEEK | capability->device_caps = V4L2_CAP_HW_FREQ_SEEK |
V4L2_CAP_TUNER | V4L2_CAP_RADIO | V4L2_CAP_AUDIO | V4L2_CAP_TUNER | V4L2_CAP_RADIO | V4L2_CAP_AUDIO |
V4L2_CAP_RDS_CAPTURE | V4L2_CAP_MODULATOR | V4L2_CAP_RDS_CAPTURE | V4L2_CAP_MODULATOR |
V4L2_CAP_RDS_OUTPUT; V4L2_CAP_RDS_OUTPUT;
capability->capabilities = capability->device_caps |
V4L2_CAP_DEVICE_CAPS;
return 0; return 0;
} }
......
...@@ -198,10 +198,12 @@ static int fm_v4l2_vidioc_querycap(struct file *file, void *priv, ...@@ -198,10 +198,12 @@ static int fm_v4l2_vidioc_querycap(struct file *file, void *priv,
strlcpy(capability->card, FM_DRV_CARD_SHORT_NAME, strlcpy(capability->card, FM_DRV_CARD_SHORT_NAME,
sizeof(capability->card)); sizeof(capability->card));
sprintf(capability->bus_info, "UART"); sprintf(capability->bus_info, "UART");
capability->capabilities = V4L2_CAP_HW_FREQ_SEEK | V4L2_CAP_TUNER | capability->device_caps = V4L2_CAP_HW_FREQ_SEEK | V4L2_CAP_TUNER |
V4L2_CAP_RADIO | V4L2_CAP_MODULATOR | V4L2_CAP_RADIO | V4L2_CAP_MODULATOR |
V4L2_CAP_AUDIO | V4L2_CAP_READWRITE | V4L2_CAP_AUDIO | V4L2_CAP_READWRITE |
V4L2_CAP_RDS_CAPTURE; V4L2_CAP_RDS_CAPTURE;
capability->capabilities = capability->device_caps |
V4L2_CAP_DEVICE_CAPS;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment