Commit 43b78667 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

V4L/DVB (12218): radio-si470x: conform to the RDS spec.

Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 8e280f24
...@@ -1254,7 +1254,7 @@ static int si470x_vidioc_querycap(struct file *file, void *priv, ...@@ -1254,7 +1254,7 @@ static int si470x_vidioc_querycap(struct file *file, void *priv,
usb_make_path(radio->usbdev, capability->bus_info, sizeof(capability->bus_info)); usb_make_path(radio->usbdev, capability->bus_info, sizeof(capability->bus_info));
capability->version = DRIVER_KERNEL_VERSION; capability->version = DRIVER_KERNEL_VERSION;
capability->capabilities = V4L2_CAP_HW_FREQ_SEEK | capability->capabilities = V4L2_CAP_HW_FREQ_SEEK |
V4L2_CAP_TUNER | V4L2_CAP_RADIO; V4L2_CAP_TUNER | V4L2_CAP_RADIO | V4L2_CAP_RDS_CAPTURE;
return 0; return 0;
} }
...@@ -1413,7 +1413,8 @@ static int si470x_vidioc_g_tuner(struct file *file, void *priv, ...@@ -1413,7 +1413,8 @@ static int si470x_vidioc_g_tuner(struct file *file, void *priv,
/* driver constants */ /* driver constants */
strcpy(tuner->name, "FM"); strcpy(tuner->name, "FM");
tuner->type = V4L2_TUNER_RADIO; tuner->type = V4L2_TUNER_RADIO;
tuner->capability = V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO; tuner->capability = V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO |
V4L2_TUNER_CAP_RDS;
/* range limits */ /* range limits */
switch ((radio->registers[SYSCONFIG2] & SYSCONFIG2_BAND) >> 6) { switch ((radio->registers[SYSCONFIG2] & SYSCONFIG2_BAND) >> 6) {
...@@ -1439,6 +1440,10 @@ static int si470x_vidioc_g_tuner(struct file *file, void *priv, ...@@ -1439,6 +1440,10 @@ static int si470x_vidioc_g_tuner(struct file *file, void *priv,
tuner->rxsubchans = V4L2_TUNER_SUB_MONO; tuner->rxsubchans = V4L2_TUNER_SUB_MONO;
else else
tuner->rxsubchans = V4L2_TUNER_SUB_MONO | V4L2_TUNER_SUB_STEREO; tuner->rxsubchans = V4L2_TUNER_SUB_MONO | V4L2_TUNER_SUB_STEREO;
/* If there is a reliable method of detecting an RDS channel,
then this code should check for that before setting this
RDS subchannel. */
tuner->rxsubchans |= V4L2_TUNER_SUB_RDS;
/* mono/stereo selector */ /* mono/stereo selector */
if ((radio->registers[POWERCFG] & POWERCFG_MONO) == 0) if ((radio->registers[POWERCFG] & POWERCFG_MONO) == 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