1
0
mirror of https://github.com/DigitalDevices/dddvb.git synced 2023-10-10 13:37:43 +02:00

more changes

This commit is contained in:
drmocm 2023-09-16 14:52:32 +02:00
parent 9af63d41f7
commit bb1408a98a

View File

@ -866,7 +866,7 @@ int mci_set_output(int fd, uint8_t connector, uint8_t nchannels, uint8_t unit,
break; break;
} }
fprintf(stderr,"Setting DVBT Modulator output to %s, %d channels, power %f%s\n", fprintf(stderr,"Setting DVB Modulator output to %s, %d channels, power %f%s\n",
con, nchannels, (double)power/100, un ); con, nchannels, (double)power/100, un );
return mci_cmd(fd,&msg_output); return mci_cmd(fd,&msg_output);
@ -1020,11 +1020,12 @@ void set_dvb_mods(int adapt, int chans, uint32_t start_freq,
char *device; char *device;
int fd; int fd;
wd->tp[i].tpid = i;
wd->tp[i].delsys = delsys;
wd->tp[i].freq = start_freq+8000000*i;
switch(delsys){ switch(delsys){
case SYS_DVBT: case SYS_DVBT:
wd->tp[i].tpid = 1; // all the same transport stream id
wd->tp[i].delsys = SYS_DVBT;
wd->tp[i].freq = start_freq+8000000*i;
wd->tp[i].qam = 2; wd->tp[i].qam = 2;
wd->tp[i].symbolrate = 0; wd->tp[i].symbolrate = 0;
wd->tp[i].bandwidth = 0; wd->tp[i].bandwidth = 0;
@ -1034,9 +1035,6 @@ void set_dvb_mods(int adapt, int chans, uint32_t start_freq,
break; break;
case SYS_DVBC_ANNEX_A: case SYS_DVBC_ANNEX_A:
wd->tp[i].tpid = i;
wd->tp[i].delsys = SYS_DVBC_ANNEX_A;
wd->tp[i].freq = start_freq+8000000*i;
wd->tp[i].qam = QAM_256; wd->tp[i].qam = QAM_256;
wd->tp[i].symbolrate = 6900000; wd->tp[i].symbolrate = 6900000;
wd->tp[i].bandwidth = 0; wd->tp[i].bandwidth = 0;
@ -1045,7 +1043,6 @@ void set_dvb_mods(int adapt, int chans, uint32_t start_freq,
wd->tp[i].trans_mode = 0; wd->tp[i].trans_mode = 0;
break; break;
} }
device = malloc(sizeof(char)*40); device = malloc(sizeof(char)*40);
snprintf(device,35,"/dev/dvb/adapter%d/mod%d",adapt,i); snprintf(device,35,"/dev/dvb/adapter%d/mod%d",adapt,i);
fd = open(device, O_RDWR); fd = open(device, O_RDWR);
@ -1056,7 +1053,29 @@ void set_dvb_mods(int adapt, int chans, uint32_t start_freq,
exit(1); exit(1);
} }
mci_set_stream( fd, i, i, MOD_STANDARD_DVBT_8, 4, 0, 0, 0, 1, 0, 4, 2, 0);
int re= 0;
uint8_t stream_format = 4; //format is ransport stream
uint8_t fft_size = wd->tp[i].trans_mode;
switch(delsys){
case SYS_DVBC_ANNEX_A:
re = mci_set_stream( fd, i, i, MOD_STANDARD_DVBC_8,
stream_format, wd->tp[i].symbolrate,
wd->tp[i].qam, 0, 0, 0, 0, 0, 0);
break;
case SYS_DVBT:
re = mci_set_stream( fd, i, i, MOD_STANDARD_DVBT_8,
stream_format, 0,
0, 0, fft_size, wd->tp[i].guard,
wd->tp[i].code_rate, wd->tp[i].qam,
0);
break;
default:
re = -1;
}
close(fd); close(fd);
free(device); free(device);
} }