Index: src/dvb/dvb.h =================================================================== --- src/dvb/dvb.h (revision 4553) +++ src/dvb/dvb.h (working copy) @@ -173,6 +173,7 @@ struct dvb_frontend_info *tda_fe_info; int tda_adapter_num; + int tda_device_num; char *tda_demux_path; Index: src/dvb/dvb_adapter.c =================================================================== --- src/dvb/dvb_adapter.c (revision 4553) +++ src/dvb/dvb_adapter.c (working copy) @@ -241,7 +241,7 @@ { char dev[64]; - snprintf(dev, sizeof(dev), "dvb/dvb%d.dvr0", tda->tda_adapter_num); + snprintf(dev, sizeof(dev), "dvb/dvb%d.dvr%d", tda->tda_adapter_num, tda->tda_device_num); tda->tda_hostconnection = get_device_connection(dev); } @@ -250,7 +250,7 @@ * */ static void -tda_add(int adapter_num) +tda_add(int adapter_num, int device_num) { char path[200]; char fname[256]; @@ -260,7 +260,7 @@ pthread_t ptid; snprintf(path, sizeof(path), "/dev/dvb/adapter%d", adapter_num); - snprintf(fname, sizeof(fname), "%s/frontend0", path); + snprintf(fname, sizeof(fname), "%s/frontend%d", path, device_num); fe = tvh_open(fname, O_RDWR | O_NONBLOCK, 0); if(fe == -1) { @@ -273,11 +273,12 @@ tda = tda_alloc(); tda->tda_adapter_num = adapter_num; + tda->tda_device_num = device_num; tda->tda_rootpath = strdup(path); tda->tda_demux_path = malloc(256); - snprintf(tda->tda_demux_path, 256, "%s/demux0", path); + snprintf(tda->tda_demux_path, 256, "%s/demux%d", path, device_num); tda->tda_dvr_path = malloc(256); - snprintf(tda->tda_dvr_path, 256, "%s/dvr0", path); + snprintf(tda->tda_dvr_path, 256, "%s/dvr%d", path, device_num); tda->tda_fe_fd = fe; @@ -293,7 +294,7 @@ tda->tda_type = tda->tda_fe_info->type; - snprintf(buf, sizeof(buf), "%s_%s", tda->tda_rootpath, + snprintf(buf, sizeof(buf), "%s_%d_%s", tda->tda_rootpath, tda->tda_device_num, tda->tda_fe_info->name); r = strlen(buf); @@ -316,7 +317,7 @@ dvb_adapter_checkspeed(tda); tvhlog(LOG_INFO, "dvb", - "Found adapter %s (%s) via %s", path, tda->tda_fe_info->name, + "Found adapter %s (%s) via %s", fname, tda->tda_fe_info->name, hostconnection2str(tda->tda_hostconnection)); TAILQ_INSERT_TAIL(&dvb_adapters, tda, tda_global_link); @@ -341,14 +342,15 @@ htsmsg_t *l, *c; htsmsg_field_t *f; const char *name, *s; - int i, type; + int i, j, type; th_dvb_adapter_t *tda; TAILQ_INIT(&dvb_adapters); for(i = 0; i < 32; i++) if ((1 << i) & adapter_mask) - tda_add(i); + for(j = 0; j < 32; j++) + tda_add(i, j); l = hts_settings_load("dvbadapters"); if(l != NULL) {