Opened 4 years ago

Closed 2 years ago

Last modified 23 months ago

#13052 closed Bug Report - General (fixed)

MythTV assumes demux1 when frontend1 is in use, but no demux1 device is available only demux0

Reported by: Matt <maff667@…> Owned by: Klaas de Waal
Priority: minor Milestone: unknown
Component: MythTV - Channel Scanner Version: Unspecified
Severity: low Keywords: demux1, demux0, scan
Cc: Ticket locked: no


When using a TBS-5520SE the following devices are available: demux0, dvr0, frontend0, frontend1, net0

mythtv-setup and mythtv backend seem to make the assumption that if frontend1 is chosen then demux1 should be used even if no such device exists.

I think i have narrowed it down to line 606 of streamhandler.cpp

QString demux_fn = CardUtil::GetDeviceName?(DVB_DEV_DEMUX, dvb_dev);

and/or lines 2077-2096 of cardutil.cpp i.e. the GetDeviceName? function.

hope that's helpful.

The same issue appears to effect the astrometadvbt2 usb device. And a workaround would be to rename frontend1 to frontend0.



Reference urls with more details:

Attachments (1)

201902031457_mythtv_multi-standard_frontend_support.patch (2.3 KB) - added by Mike Bibbings 2 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 2 years ago by Mike Bibbings

This behaviour stems from a very old trac ticket (2009) ​ which mentions HVR3000 and HVR4000 cards. Prior to this change demux0 was always used.

Today there are many devices which have two frontends per adapter but only 1 demux/dvr, demux0, dvr0. Only one of the frontends can be used at anyone time with this demux/dvr.

For example TBS 6522 has two frontends for each adapter, frontend 0 is DVB-T/T2 demux0, frontend 1 is DVB-S/S2, demux0.

Whilst it is possible to "hack" by sym linking demux0 to demux1, this is not very user friendly.

A change in cardutil.cpp CardUtil::GetDeviceName? is required. To maintain existing behaviour, test to see if demux<n> exists where <n> is the frontend number, if the test fails return demux0. Similarly for dvr<n>.

Attached is a patch, tested against current master (but can be backported to mythtv 29 and 30 if needed).

Test system Xubuntu 18.04 with TBS 6522 PCI-e Dual DVB-S/S2,DVB-T/2 and Astrometa USB DVB/T/T2 tuners.

Patch also applied to my production system, which has Hauppauge QuadHD DVB-T/T2 and TBS-6981 Dual DVB-S/S2 tuner, with no ill effects.


Changed 2 years ago by Mike Bibbings

comment:2 Changed 2 years ago by Klaas de Waal

Owner: set to Klaas de Waal
Status: newassigned

comment:3 Changed 2 years ago by Mike Bibbings <mike.bibbings@…>

Resolution: fixed
Status: assignedclosed

In 2437415c7/mythtv:

Support single channel tuners with multiple frontends

There are single-channel multi-standard tuners that have two frontends.
Typically the first frontend can do DVB-T/T2/C and the second frontend
can do DVB-S/S2. Only one of the frontends can be used at a given moment.
In MythTV this can be realized by connecting only one frontend to a Video source.

Fixes #13052

Signed-off-by: Klaas de Waal <kdewaal@…>

comment:4 Changed 23 months ago by Klaas de Waal <kdewaal@…>

In 82a59c1298/mythtv:

Use ca0 when frontend1 is in use but no ca1 is available.

Multi-standard cards such as TBS9528 have two frontends,
frontend0 for DVB-T/T2/C and frontend1 for DVB-S/S2/DSS.
There is only one demux etc: demux0, dvr0 and ca0.
When frontend1 is selected then demux0/dvr0/ca0 should
be used with that frontend.
This has been fixed in ticket #13052 for demux0 and dvr0
but not yet for ca0.
This fix selects ca0 when ca<x> for frontend<x> is not
available, similar to what is done for demux and dvr.

Refs #13052

Note: See TracTickets for help on using tickets.