]> git.baikalelectronics.ru Git - kernel.git/commit
[media] tuner-core: map audmode to STEREO for radio devices
authorHans Verkuil <hans.verkuil@cisco.com>
Fri, 28 Sep 2012 11:18:07 +0000 (08:18 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 5 Feb 2013 18:55:38 +0000 (16:55 -0200)
commit66f9ac9d80d9ae617fba828f09ec2a7f5da114d2
tree885080bd0311655ff9ec34a4f8a2b1b279cddfc6
parent8d2a1e662987c51a835acbb05a033d136cc333a9
[media] tuner-core: map audmode to STEREO for radio devices

Fixes a v4l2-compliance error: setting audmode to a value other than mono
or stereo for a radio device should map to MODE_STEREO.
The spec specifies that for radio devices only mono and stereo audmodes are
valid. If the user specifies another audmode in v4l2_tuner, then that should
be mapped to valid audmode. That didn't happen here.
Note that tuner drivers might decide to limit the possible audmode even
further if it only supports mono. In that case the tuner driver can set
audmode to mono. However, that new value wasn't copied back to t->audmode,
and that has been fixed as well in this patch.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/v4l2-core/tuner-core.c