Commit 3192e006 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] bttv: fix audio hooks

as reported by smatch:
	drivers/media/pci/bt8xx/bttv-audio-hook.c:201 lt9415_audio() warn: bitwise AND condition is false here
	drivers/media/pci/bt8xx/bttv-audio-hook.c:241 winfast2000_audio() warn: bitwise AND condition is false here
	drivers/media/pci/bt8xx/bttv-audio-hook.c:276 pvbt878p9b_audio() warn: bitwise AND condition is false here
	drivers/media/pci/bt8xx/bttv-audio-hook.c:307 fv2000s_audio() warn: bitwise AND condition is false here
	drivers/media/pci/bt8xx/bttv-audio-hook.c:334 windvr_audio() warn: bitwise AND condition is false here
	drivers/media/pci/bt8xx/bttv-audio-hook.c:371 adtvk503_audio() warn: bitwise AND condition is false here

there are some serious issues at the audio hook implementation.

They're not following what's specified at the DocBook:
	http://linuxtv.org/downloads/v4l-dvb-apis/vidioc-g-tuner.html#tuner-audmode

Basically, it was assuming that the audmode (V4L2_TUNER_MODE_foo)
is a variable with a bit maskk. However, it isn't.

The bitmask only applies to rxsubchans field (V4L2_TUNER_SUB_foo).

As the code is also too complex, and not all hooks were returning
both audmode and rxsubchans to a VIDIOC_G_TUNER, rewrite the
functions, in order to fix both for get and set tuner ioctls.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent b674ac29
This diff is collapsed.
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