EN50494: fix subelement creation for multi-port switches
This commit is contained in:
parent
229ef2f48e
commit
b67b98b7b6
2 changed files with 14 additions and 3 deletions
|
@ -176,6 +176,8 @@ linuxdvb_en50494_tune
|
|||
tvhlog(LOG_ERR, LINUXDVB_EN50494_NAME, "transponder value bigger then 1024");
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* tune frequency for the frontend */
|
||||
le->le_tune_freq = (t + 350) * 4000 - freq; /* real used en50494 frequency */
|
||||
|
||||
/* 2 data fields (16bit) */
|
||||
|
|
|
@ -471,15 +471,24 @@ linuxdvb_satconf_create
|
|||
TAILQ_FOREACH(lse, &ls->ls_elements, ls_link) {
|
||||
if (!lse->ls_lnb)
|
||||
lse->ls_lnb = linuxdvb_lnb_create0(NULL, NULL, lse);
|
||||
if (lst->ports > 1 && !lse->ls_switch)
|
||||
lse->ls_switch = linuxdvb_switch_create0("Generic", NULL, lse, i, -1);
|
||||
/* create multi port elements (2/4port & en50494) */
|
||||
if (lst->ports > 1) {
|
||||
if( !lse->ls_en50494 && !strcmp("en50494",lst->type))
|
||||
lse->ls_en50494 = linuxdvb_en50494_create0("en50494", NULL, lse);
|
||||
if( !lse->ls_switch && (!strcmp("2port",lst->type) || !strcmp("4port",lst->type)))
|
||||
lse->ls_switch = linuxdvb_switch_create0("Generic", NULL, lse, i, -1);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
for (; i < lst->ports; i++) {
|
||||
lse = linuxdvb_satconf_ele_create0(NULL, NULL, ls);
|
||||
lse->ls_lnb = linuxdvb_lnb_create0(NULL, NULL, lse);
|
||||
/* create multi port elements (2/4port & en50494) */
|
||||
if (lst->ports > 1) {
|
||||
lse->ls_switch = linuxdvb_switch_create0("Generic", NULL, lse, i, -1);
|
||||
if( !strcmp("en50494",lst->type))
|
||||
lse->ls_en50494 = linuxdvb_en50494_create0("en50494", NULL, lse);
|
||||
if( !strcmp("2port",lst->type) || !strcmp("4port",lst->type))
|
||||
lse->ls_switch = linuxdvb_switch_create0("Generic", NULL, lse, i, -1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue