/* stb0899_dvbs2_calc_dev compute the correction to be applied to symbol rate  */
static u32 stb0899_dvbs2_calc_dev(struct stb0899_state *state)
/* stb0899_dvbs2_calc_dev compute the correction to be applied to symbol rate  */
static u32 stb0899_dvbs2_calc_dev(struct stb0899_state *state)
{
	struct stb0899_internal *internal = &state->internal;
	u32 dec_ratio, correction, master_clk, srate;
	dec_ratio = (internal->master_clk * 2) / (5 * internal->srate);
	dec_ratio = (dec_ratio == 0) ? 1 : dec_ratio;
	master_clk = internal->master_clk / 1000;
	srate = internal->srate / 1000;
	correction = (512 * master_clk) / (2 * dec_ratio * srate);
	return	correction;
}