https://github.com/torvalds/linux
Revision 0020d3ef915fc01a0184bc96eeb3c240bded5d8e authored by Hans Verkuil on 30 March 2006, 22:50:34 UTC, committed by Mauro Carvalho Chehab on 02 April 2006, 07:56:06 UTC
- msp3400c did not detect the second carrier, thus being always mono.
- properly mute the msp3400c while detecting the carrier.
- fix checks on the presence of scart2/3 inputs and scart 2 output.
- implement proper audio mode fallbacks for msp3400c/d, identical to the
  way msp3400g works.
- MODE_STEREO no longer produces dual languages when set for a bilingual
  transmission, instead it falls back to LANG1. Use LANG1_LANG2 to hear
  both languages of a bilingual transmission. This is much more intuitive
  for the user and is in accordance with the preferred usage in the v4l2
  specification.
- bttv tried to implement v4l2 calls with v4l1 calls to the i2c devices,
  completely mangling the audmode/rxsubchans handling. v4l2 calls now do
  v4l2 calls to the i2c devices.
- fixed broken i2c_vidiocschan in bttv.
- add start/end lines to LOG_STATUS.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
1 parent 9bc7400
Raw File
Tip revision: 0020d3ef915fc01a0184bc96eeb3c240bded5d8e authored by Hans Verkuil on 30 March 2006, 22:50:34 UTC
V4L/DVB (3693): Fix msp3400c and bttv stereo/mono/bilingual detection/handling
Tip revision: 0020d3e
int_sqrt.c

#include <linux/kernel.h>
#include <linux/module.h>

/**
 * int_sqrt - rough approximation to sqrt
 * @x: integer of which to calculate the sqrt
 *
 * A very rough approximation to the sqrt() function.
 */
unsigned long int_sqrt(unsigned long x)
{
	unsigned long op, res, one;

	op = x;
	res = 0;

	one = 1UL << (BITS_PER_LONG - 2);
	while (one > op)
		one >>= 2;

	while (one != 0) {
		if (op >= res + one) {
			op = op - (res + one);
			res = res +  2 * one;
		}
		res /= 2;
		one /= 4;
	}
	return res;
}
EXPORT_SYMBOL(int_sqrt);
back to top