mirror of
https://github.com/DigitalDevices/dddvb.git
synced 2023-10-10 13:37:43 +02:00
set correct delsys
This commit is contained in:
parent
8dc2fd062f
commit
58c608ab30
@ -958,7 +958,8 @@ int mci_set_channels(int fd, uint32_t freq, uint8_t nchan, uint8_t standard,
|
|||||||
return mci_cmd(fd,&msg_channels);
|
return mci_cmd(fd,&msg_channels);
|
||||||
}
|
}
|
||||||
|
|
||||||
int mci_set_channels_simple(int adapt, uint32_t freq, uint8_t nchan)
|
int mci_set_channels_simple(int adapt, enum fe_delivery_system delsys,
|
||||||
|
uint32_t freq, uint8_t nchan)
|
||||||
{
|
{
|
||||||
|
|
||||||
char fn[128];
|
char fn[128];
|
||||||
@ -970,8 +971,18 @@ int mci_set_channels_simple(int adapt, uint32_t freq, uint8_t nchan)
|
|||||||
fprintf(stderr, "Could not open %s\n", fn);
|
fprintf(stderr, "Could not open %s\n", fn);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
switch(delsys){
|
||||||
|
case SYS_DVBC_ANNEX_A:
|
||||||
|
re = mci_set_channels(fd, freq, nchan, MOD_STANDARD_DVBC_8, 0, 0);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SYS_DVBT:
|
||||||
re = mci_set_channels(fd, freq, nchan, MOD_STANDARD_DVBT_8, 0, 0);
|
re = mci_set_channels(fd, freq, nchan, MOD_STANDARD_DVBT_8, 0, 0);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
re = -1;
|
||||||
|
}
|
||||||
close(fd);
|
close(fd);
|
||||||
return re;
|
return re;
|
||||||
}
|
}
|
||||||
@ -1019,7 +1030,7 @@ void set_dvb_mods(int adapt, int chans, uint32_t start_freq,
|
|||||||
enum fe_delivery_system delsys, write_data *wd)
|
enum fe_delivery_system delsys, write_data *wd)
|
||||||
{
|
{
|
||||||
if ((mci_set_output_simple(adapt, chans) < 0)||
|
if ((mci_set_output_simple(adapt, chans) < 0)||
|
||||||
(mci_set_channels_simple(adapt, start_freq, chans)< 0))
|
(mci_set_channels_simple(adapt, delsys, start_freq, chans)< 0))
|
||||||
{
|
{
|
||||||
fprintf(stderr,"Error setting up DVB Modulator\n");
|
fprintf(stderr,"Error setting up DVB Modulator\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
Loading…
Reference in New Issue
Block a user