question about bt8xx/bttv-audio-hook.c, tvaudio.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The files drivers/media/video/bt8xx/bttv-audio-hook.c and drivers/media/video/tvaudio.c contain a number of occurrences of eg:

mode |= V4L2_TUNER_MODE_LANG1 | V4L2_TUNER_MODE_LANG2;

and

if (mode & V4L2_TUNER_MODE_MONO)

(both from tvaudio.c)

V4L2_TUNER_MODE_LANG1 | V4L2_TUNER_MODE_LANG2 is suspicious because V4L2_TUNER_MODE_LANG1 is 3 and V4L2_TUNER_MODE_LANG2 is 2, so the result is just the same as V4L2_TUNER_MODE_LANG1. Maybe V4L2_TUNER_MODE_LANG1_LANG2 was intended?

mode & V4L2_TUNER_MODE_MONO is suspicious because V4L2_TUNER_MODE_MONO is 0. Maybe & should be ==?

If & is to be changed to == everywhere, then some new code may need to be constructed to account for V4L2_TUNER_MODE_LANG1_LANG2. For example, the function tda8425_setmode has ifs for the other values, but not for this one. On the other hand, the function ta8874z_setmode already uses == (or rather switch), and does not take V4L2_TUNER_MODE_LANG1_LANG2 into account, so perhaps it is not appropriate in this context?

julia

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux