Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
linuxdvb: set DELIVERY SYSTEM before satconf, fixes #2933
  • Loading branch information
perexg committed Jun 9, 2015
1 parent 07ca865 commit 21d03bd
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
21 changes: 19 additions & 2 deletions src/input/mpegts/linuxdvb/linuxdvb_frontend.c
Expand Up @@ -1110,7 +1110,7 @@ int linuxdvb2tvh_delsys ( int delsys )

int
linuxdvb_frontend_clear
( linuxdvb_frontend_t *lfe )
( linuxdvb_frontend_t *lfe, mpegts_mux_instance_t *mmi )
{
char buf1[256];

Expand Down Expand Up @@ -1140,6 +1140,23 @@ linuxdvb_frontend_clear
tvherror("linuxdvb", "%s - DTV_CLEAR failed [e=%s]", buf1, strerror(errno));
return -1;
}

if (mmi) {
dvb_mux_t *lm = (dvb_mux_t*)mmi->mmi_mux;
dvb_mux_conf_t *dmc = &lm->lm_tuning;

struct dtv_property delsys_p;
struct dtv_properties delsys_cmdseq = {
.num = 1,
.props = &delsys_p
};
delsys_p.cmd = DTV_DELIVERY_SYSTEM;
delsys_p.u.data = TR(delsys, delsys_tbl, SYS_UNDEFINED);
if ((ioctl(lfe->lfe_fe_fd, FE_SET_PROPERTY, &delsys_cmdseq)) != 0) {
tvherror("linuxdvb", "%s - DTV_DELIVERY_SYSTEM failed [e=%s]", buf1, strerror(errno));
return -1;
}
}
#endif

return 0;
Expand Down Expand Up @@ -1278,7 +1295,7 @@ linuxdvb_frontend_tune0
dvb_mux_conf_t *dmc;
struct dvb_frontend_parameters p;

r = linuxdvb_frontend_clear(lfe);
r = linuxdvb_frontend_clear(lfe, NULL);
if (r) return r;

lfe->mi_display_name((mpegts_input_t*)lfe, buf1, sizeof(buf1));
Expand Down
2 changes: 1 addition & 1 deletion src/input/mpegts/linuxdvb/linuxdvb_private.h
Expand Up @@ -367,7 +367,7 @@ void linuxdvb_frontend_add_network
( linuxdvb_frontend_t *lfe, linuxdvb_network_t *net );

int linuxdvb_frontend_clear
( linuxdvb_frontend_t *lfe );
( linuxdvb_frontend_t *lfe, mpegts_mux_instance_t *mmi );
int linuxdvb_frontend_tune0
( linuxdvb_frontend_t *lfe, mpegts_mux_instance_t *mmi, uint32_t freq );
int linuxdvb_frontend_tune1
Expand Down
2 changes: 1 addition & 1 deletion src/input/mpegts/linuxdvb/linuxdvb_satconf.c
Expand Up @@ -852,7 +852,7 @@ linuxdvb_satconf_start_mux
if (r) return r;
} else {
/* Clear the frontend settings, open frontend fd */
r = linuxdvb_frontend_clear(lfe);
r = linuxdvb_frontend_clear(lfe, mmi);
if (r) return r;
}

Expand Down

0 comments on commit 21d03bd

Please sign in to comment.