Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357450
b: refs/heads/master
c: 9bbc582
h: refs/heads/master
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Feb 5, 2013
1 parent 380bd51 commit d904bd3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f5e7cc4af36c631edf7dc73111d80af975f526a6
refs/heads/master: 9bbc5820ffe1675c923ed0b82952cc64a610bd5d
10 changes: 8 additions & 2 deletions trunk/drivers/media/radio/radio-miropcm20.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,21 @@ static int vidioc_g_tuner(struct file *file, void *priv,
struct v4l2_tuner *v)
{
struct pcm20 *dev = video_drvdata(file);
int res;

if (v->index)
return -EINVAL;
strlcpy(v->name, "FM", sizeof(v->name));
v->type = V4L2_TUNER_RADIO;
v->rangelow = 87*16000;
v->rangehigh = 108*16000;
v->signal = 0xffff;
v->rxsubchans = V4L2_TUNER_SUB_MONO | V4L2_TUNER_SUB_STEREO;
res = snd_aci_cmd(dev->aci, ACI_READ_TUNERSTATION, -1, -1);
v->signal = (res & 0x80) ? 0 : 0xffff;
/* Note: stereo detection does not work if the audio is muted,
it will default to mono in that case. */
res = snd_aci_cmd(dev->aci, ACI_READ_TUNERSTEREO, -1, -1);
v->rxsubchans = (res & 0x40) ? V4L2_TUNER_SUB_MONO :
V4L2_TUNER_SUB_STEREO;
v->capability = V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO;
v->audmode = dev->audmode;
return 0;
Expand Down

0 comments on commit d904bd3

Please sign in to comment.