Commit 9befbcb9 authored by Jean-Paul Saman's avatar Jean-Paul Saman

New dvb and old satellite modules now use the *correct* order of unit for...

New dvb and old satellite modules now use the *correct* order of unit for tuning to a satellite channel. All information must be supplied in KHz not in MHz !!!
parent 3fe82e4e
......@@ -352,7 +352,7 @@ int E_(Open) ( vlc_object_t *p_this )
/* Workaround for backwards compatibility */
if (strncmp( p_input->psz_access, "satellite",9 ) ==0)
{
msg_Warn( p_input, "invalid frequency %d possibly in kHz, trying value *1000 Hz", u_freq );
msg_Warn( p_input, "invalid frequency %d possibly in MHz, trying value *1000 KHz", u_freq );
u_freq *= 1000;
}
......@@ -360,7 +360,7 @@ int E_(Open) ( vlc_object_t *p_this )
if ( ((u_freq) > frontend_info.frequency_max) ||
((u_freq) < frontend_info.frequency_min) )
{
msg_Warn( p_input, "invalid frequency %d (Hz), using default one", u_freq );
msg_Warn( p_input, "invalid frequency %d (KHz), using default one", u_freq );
u_freq = config_GetInt( p_input, "frequency" );
if ( ((u_freq) > frontend_info.frequency_max) ||
((u_freq) < frontend_info.frequency_min) )
......@@ -373,7 +373,7 @@ int E_(Open) ( vlc_object_t *p_this )
/* Workaround for backwards compatibility */
if (strncmp( p_input->psz_access, "satellite", 9 ) ==0)
{
msg_Warn( p_input, "invalid symbol rate %d possibly specified in kHz, trying value *1000 Hz", u_freq );
msg_Warn( p_input, "invalid symbol rate %d possibly specified in MHz, trying value *1000 KHz", u_freq );
u_srate *= 1000;
}
......
......@@ -111,22 +111,22 @@ int E_(Open) ( vlc_object_t *p_this )
}
if( i_freq > 12999 || i_freq < 10000 )
if( i_freq > (12999*1000) || i_freq < (10000*1000) )
{
msg_Warn( p_input, "invalid frequency, using default one" );
i_freq = config_GetInt( p_input, "frequency" );
if( i_freq > 12999 || i_freq < 10000 )
if( i_freq > (12999*1000) || i_freq < (10000*1000)a )
{
msg_Err( p_input, "invalid default frequency" );
return -1;
}
}
if( i_srate > 30000 || i_srate < 1000 )
if( i_srate > (30000*1000) || i_srate < (1000*1000) )
{
msg_Warn( p_input, "invalid symbol rate, using default one" );
i_srate = config_GetInt( p_input, "symbol-rate" );
if( i_srate > 30000 || i_srate < 1000 )
if( i_srate > (30000*1000) || i_srate < (1000*1000) )
{
msg_Err( p_input, "invalid default symbol rate" );
return -1;
......@@ -217,8 +217,7 @@ int E_(Open) ( vlc_object_t *p_this )
msg_Dbg( p_input, "initializing Sat Card with Freq: %d, Pol: %d, "
"FEC: %03f, Srate: %d", i_freq, b_pol, f_fec, i_srate );
if ( ioctl_SECControl( i_freq * 1000, b_pol, i_lnb_slof * 1000,
b_diseqc ) < 0 )
if ( ioctl_SECControl( i_freq, b_pol, i_lnb_slof, b_diseqc ) < 0 )
{
msg_Err( p_input, "an error occured when controling SEC" );
close( p_satellite->i_handle );
......@@ -227,8 +226,8 @@ int E_(Open) ( vlc_object_t *p_this )
}
msg_Dbg( p_input, "initializing frontend device" );
switch (ioctl_SetQPSKFrontend ( i_freq * 1000, i_srate* 1000, f_fec,
i_lnb_lof1 * 1000, i_lnb_lof2 * 1000, i_lnb_slof * 1000))
switch (ioctl_SetQPSKFrontend ( i_freq, i_srate, f_fec,
i_lnb_lof1, i_lnb_lof2, i_lnb_slof))
{
case -2:
msg_Err( p_input, "frontend returned an unexpected event" );
......
......@@ -38,7 +38,7 @@ void E_(Close) ( vlc_object_t * );
* Module descriptor
*****************************************************************************/
#define FREQ_TEXT N_("Satellite default transponder frequency")
#define FREQ_TEXT N_("Satellite default transponder frequency (KHz)")
#define FREQ_LONGTEXT ""
#define POL_TEXT N_("Satellite default transponder polarization")
......@@ -47,36 +47,36 @@ void E_(Close) ( vlc_object_t * );
#define FEC_TEXT N_("Satellite default transponder FEC")
#define FEC_LONGTEXT ""
#define SRATE_TEXT N_("Satellite default transponder symbol rate")
#define SRATE_TEXT N_("Satellite default transponder symbol rate (KHz)")
#define SRATE_LONGTEXT ""
#define DISEQC_TEXT N_("Use diseqc with antenna")
#define DISEQC_LONGTEXT ""
#define LNB_LOF1_TEXT N_("Antenna lnb_lof1 (kHz)")
#define LNB_LOF1_TEXT N_("Antenna lnb_lof1 (KHz)")
#define LNB_LOF1_LONGTEXT ""
#define LNB_LOF2_TEXT N_("Antenna lnb_lof2 (kHz)")
#define LNB_LOF2_TEXT N_("Antenna lnb_lof2 (KHz)")
#define LNB_LOF2_LONGTEXT ""
#define LNB_SLOF_TEXT N_("Antenna lnb_slof (kHz)")
#define LNB_SLOF_TEXT N_("Antenna lnb_slof (KHz)")
#define LNB_SLOF_LONGTEXT ""
vlc_module_begin();
add_category_hint( N_("Input"), NULL, VLC_FALSE );
add_integer( "frequency", 11954, NULL, FREQ_TEXT, FREQ_LONGTEXT,
add_integer( "frequency", 11954000, NULL, FREQ_TEXT, FREQ_LONGTEXT,
VLC_FALSE );
add_integer( "polarization", 0, NULL, POL_TEXT, POL_LONGTEXT,
VLC_FALSE );
add_integer( "fec", 3, NULL, FEC_TEXT, FEC_LONGTEXT, VLC_FALSE );
add_integer( "symbol-rate", 27500, NULL, SRATE_TEXT, SRATE_LONGTEXT,
add_integer( "symbol-rate", 27500000, NULL, SRATE_TEXT, SRATE_LONGTEXT,
VLC_FALSE );
add_bool( "diseqc", 0, NULL, DISEQC_TEXT, DISEQC_LONGTEXT, VLC_FALSE );
add_integer( "lnb-lof1", 10000, NULL,
add_integer( "lnb-lof1", 10000000, NULL,
LNB_LOF1_TEXT, LNB_LOF1_LONGTEXT, VLC_FALSE );
add_integer( "lnb-lof2", 10000, NULL,
add_integer( "lnb-lof2", 10000000, NULL,
LNB_LOF2_TEXT, LNB_LOF2_LONGTEXT, VLC_FALSE );
add_integer( "lnb-slof", 11700, NULL,
add_integer( "lnb-slof", 11700000, NULL,
LNB_SLOF_TEXT, LNB_SLOF_LONGTEXT, VLC_FALSE );
set_description( _("satellite input") );
set_capability( "access", 0 );
......
......@@ -2727,9 +2727,9 @@
<update_policy>GTK_UPDATE_ALWAYS</update_policy>
<snap>False</snap>
<wrap>False</wrap>
<value>11954</value>
<lower>10000</lower>
<upper>12999</upper>
<value>11954000</value>
<lower>10000000</lower>
<upper>12999000</upper>
<step>1</step>
<page>10</page>
<page_size>10</page_size>
......@@ -2851,9 +2851,9 @@
<update_policy>GTK_UPDATE_ALWAYS</update_policy>
<snap>False</snap>
<wrap>False</wrap>
<value>27500</value>
<lower>1000</lower>
<upper>30000</upper>
<value>27500000</value>
<lower>1000000</lower>
<upper>30000000</upper>
<step>1</step>
<page>10</page>
<page_size>10</page_size>
......
......@@ -2189,7 +2189,7 @@ create_intf_open (void)
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (label26), 0, 0.5);
sat_freq_adj = gtk_adjustment_new (11954, 10000, 12999, 1, 10, 10);
sat_freq_adj = gtk_adjustment_new (11954000, 10000000, 12999000, 1, 10, 10);
sat_freq = gtk_spin_button_new (GTK_ADJUSTMENT (sat_freq_adj), 1, 0);
gtk_widget_ref (sat_freq);
gtk_object_set_data_full (GTK_OBJECT (intf_open), "sat_freq", sat_freq,
......@@ -2234,7 +2234,7 @@ create_intf_open (void)
gtk_widget_show (sat_pol_hor);
gtk_box_pack_start (GTK_BOX (hbox23), sat_pol_hor, FALSE, FALSE, 0);
sat_srate_adj = gtk_adjustment_new (27500, 1000, 30000, 1, 10, 10);
sat_srate_adj = gtk_adjustment_new (27500000, 1000000, 30000000, 1, 10, 10);
sat_srate = gtk_spin_button_new (GTK_ADJUSTMENT (sat_srate_adj), 1, 0);
gtk_widget_ref (sat_srate);
gtk_object_set_data_full (GTK_OBJECT (intf_open), "sat_srate", sat_srate,
......
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