Commit e5c082d7 authored by Ilkka Ollakka's avatar Ilkka Ollakka

dvb-c: check symbol-rate limits from frontend

default symbol-rate is suited to dvb-s and is over limits for dvb-c, so
check given symbol-rate and default to somewhat common value if so.
parent 382188b5
......@@ -1107,6 +1107,7 @@ static int FrontendSetQPSK( access_t *p_access )
static int FrontendSetQAM( access_t *p_access )
{
access_sys_t *p_sys = p_access->p_sys;
frontend_t *p_frontend = p_sys->p_frontend;
struct dvb_frontend_parameters fep;
vlc_value_t val;
int i_ret;
......@@ -1118,8 +1119,16 @@ static int FrontendSetQAM( access_t *p_access )
fep.inversion = DecodeInversion( p_access );
/* Default symbol-rate is for dvb-s, and doesn't fit
* for dvb-c, so if it's over the limit of frontend, default to
* somewhat common value
*/
var_Get( p_access, "dvb-srate", &val );
if( val.i_int < p_frontend->info.symbol_rate_max &&
val.i_int > p_frontend->info.symbol_rate_min )
fep.u.qam.symbol_rate = val.i_int;
else
fep.u.qam.symbol_rate = 6875000;
var_Get( p_access, "dvb-fec", &val );
fep.u.qam.fec_inner = DecodeFEC( p_access, val.i_int );
......
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