diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2012-08-03 10:16:59 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-08-11 14:41:25 -0400 |
commit | 3273781068268c404ea239dde4f6c246686dfa00 (patch) | |
tree | c37618a6f9b94cabaf72af3f4c0d1af6eb7c3f56 /drivers/media | |
parent | 467548aa9fe91c35fc908a844129a788aec6a2d0 (diff) |
[media] si470x: v4l2-compliance fixes
Just a few fixes for problems found after updating v4l2-compliance to check
the frequency band enumeration.
Note that the i2c driver doesn't fill in bus_info, but since I can't test that
driver I've decided not to fix that.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/radio/si470x/radio-si470x-common.c | 3 | ||||
-rw-r--r-- | drivers/media/radio/si470x/radio-si470x-i2c.c | 5 | ||||
-rw-r--r-- | drivers/media/radio/si470x/radio-si470x-usb.c | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/drivers/media/radio/si470x/radio-si470x-common.c b/drivers/media/radio/si470x/radio-si470x-common.c index 9e38132afec6..9bb65e170d99 100644 --- a/drivers/media/radio/si470x/radio-si470x-common.c +++ b/drivers/media/radio/si470x/radio-si470x-common.c | |||
@@ -151,6 +151,7 @@ static const struct v4l2_frequency_band bands[] = { | |||
151 | .index = 0, | 151 | .index = 0, |
152 | .capability = V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO | | 152 | .capability = V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO | |
153 | V4L2_TUNER_CAP_RDS | V4L2_TUNER_CAP_RDS_BLOCK_IO | | 153 | V4L2_TUNER_CAP_RDS | V4L2_TUNER_CAP_RDS_BLOCK_IO | |
154 | V4L2_TUNER_CAP_FREQ_BANDS | | ||
154 | V4L2_TUNER_CAP_HWSEEK_BOUNDED | | 155 | V4L2_TUNER_CAP_HWSEEK_BOUNDED | |
155 | V4L2_TUNER_CAP_HWSEEK_WRAP, | 156 | V4L2_TUNER_CAP_HWSEEK_WRAP, |
156 | .rangelow = 87500 * 16, | 157 | .rangelow = 87500 * 16, |
@@ -162,6 +163,7 @@ static const struct v4l2_frequency_band bands[] = { | |||
162 | .index = 1, | 163 | .index = 1, |
163 | .capability = V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO | | 164 | .capability = V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO | |
164 | V4L2_TUNER_CAP_RDS | V4L2_TUNER_CAP_RDS_BLOCK_IO | | 165 | V4L2_TUNER_CAP_RDS | V4L2_TUNER_CAP_RDS_BLOCK_IO | |
166 | V4L2_TUNER_CAP_FREQ_BANDS | | ||
165 | V4L2_TUNER_CAP_HWSEEK_BOUNDED | | 167 | V4L2_TUNER_CAP_HWSEEK_BOUNDED | |
166 | V4L2_TUNER_CAP_HWSEEK_WRAP, | 168 | V4L2_TUNER_CAP_HWSEEK_WRAP, |
167 | .rangelow = 76000 * 16, | 169 | .rangelow = 76000 * 16, |
@@ -173,6 +175,7 @@ static const struct v4l2_frequency_band bands[] = { | |||
173 | .index = 2, | 175 | .index = 2, |
174 | .capability = V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO | | 176 | .capability = V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO | |
175 | V4L2_TUNER_CAP_RDS | V4L2_TUNER_CAP_RDS_BLOCK_IO | | 177 | V4L2_TUNER_CAP_RDS | V4L2_TUNER_CAP_RDS_BLOCK_IO | |
178 | V4L2_TUNER_CAP_FREQ_BANDS | | ||
176 | V4L2_TUNER_CAP_HWSEEK_BOUNDED | | 179 | V4L2_TUNER_CAP_HWSEEK_BOUNDED | |
177 | V4L2_TUNER_CAP_HWSEEK_WRAP, | 180 | V4L2_TUNER_CAP_HWSEEK_WRAP, |
178 | .rangelow = 76000 * 16, | 181 | .rangelow = 76000 * 16, |
diff --git a/drivers/media/radio/si470x/radio-si470x-i2c.c b/drivers/media/radio/si470x/radio-si470x-i2c.c index 643a6ff7c5d0..f867f04cccc9 100644 --- a/drivers/media/radio/si470x/radio-si470x-i2c.c +++ b/drivers/media/radio/si470x/radio-si470x-i2c.c | |||
@@ -225,8 +225,9 @@ int si470x_vidioc_querycap(struct file *file, void *priv, | |||
225 | { | 225 | { |
226 | strlcpy(capability->driver, DRIVER_NAME, sizeof(capability->driver)); | 226 | strlcpy(capability->driver, DRIVER_NAME, sizeof(capability->driver)); |
227 | strlcpy(capability->card, DRIVER_CARD, sizeof(capability->card)); | 227 | strlcpy(capability->card, DRIVER_CARD, sizeof(capability->card)); |
228 | capability->capabilities = V4L2_CAP_HW_FREQ_SEEK | | 228 | capability->device_caps = V4L2_CAP_HW_FREQ_SEEK | V4L2_CAP_READWRITE | |
229 | V4L2_CAP_TUNER | V4L2_CAP_RADIO; | 229 | V4L2_CAP_TUNER | V4L2_CAP_RADIO | V4L2_CAP_RDS_CAPTURE; |
230 | capability->capabilities = capability->device_caps | V4L2_CAP_DEVICE_CAPS; | ||
230 | 231 | ||
231 | return 0; | 232 | return 0; |
232 | } | 233 | } |
diff --git a/drivers/media/radio/si470x/radio-si470x-usb.c b/drivers/media/radio/si470x/radio-si470x-usb.c index 146be4263ea1..be076f7181e7 100644 --- a/drivers/media/radio/si470x/radio-si470x-usb.c +++ b/drivers/media/radio/si470x/radio-si470x-usb.c | |||
@@ -531,7 +531,7 @@ int si470x_vidioc_querycap(struct file *file, void *priv, | |||
531 | strlcpy(capability->card, DRIVER_CARD, sizeof(capability->card)); | 531 | strlcpy(capability->card, DRIVER_CARD, sizeof(capability->card)); |
532 | usb_make_path(radio->usbdev, capability->bus_info, | 532 | usb_make_path(radio->usbdev, capability->bus_info, |
533 | sizeof(capability->bus_info)); | 533 | sizeof(capability->bus_info)); |
534 | capability->device_caps = V4L2_CAP_HW_FREQ_SEEK | | 534 | capability->device_caps = V4L2_CAP_HW_FREQ_SEEK | V4L2_CAP_READWRITE | |
535 | V4L2_CAP_TUNER | V4L2_CAP_RADIO | V4L2_CAP_RDS_CAPTURE; | 535 | V4L2_CAP_TUNER | V4L2_CAP_RADIO | V4L2_CAP_RDS_CAPTURE; |
536 | capability->capabilities = capability->device_caps | V4L2_CAP_DEVICE_CAPS; | 536 | capability->capabilities = capability->device_caps | V4L2_CAP_DEVICE_CAPS; |
537 | return 0; | 537 | return 0; |