]> 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)
commitf1a9bad0912fc54afdc744c235f456eb9771a20e
tree885080bd0311655ff9ec34a4f8a2b1b279cddfc6
parent13cc56a91c92e88e003601fd0ef794df2f2cba63
[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