]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - drivers/media/v4l2-core/tuner-core.c
[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)
commitba1066d2e9686a5c96c5c0dfcbda7f874fa7b88d
tree885080bd0311655ff9ec34a4f8a2b1b279cddfc6
parent84a15ded76ec8ec23d84974238b7864813143655
[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