Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#13339 closed Patch - Feature (fixed)

Fully Support HDHomerun Locking and Pooling

Reported by: gigem Owned by: gigem
Priority: minor Milestone: 30.0
Component: MythTV - HDHomeRun Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

While I still strongly dislike the inability to reserve HDHomerun tuners for exclusive use by MythTV (or any other application for that mater), that battle has been lost for some time. This ticket is intended to track patches to add support for dynamically reserving and locking HDHomerun tuners as needed from a pool of devices.

Attachments (4)

hdhr-locking-pooling-1.patch (30.1 KB) - added by gigem 5 years ago.
hdhr-locking-pooling-2.patch (30.4 KB) - added by gigem 5 years ago.
hdhr-locking-pooling-3.patch (29.9 KB) - added by gigem 5 years ago.
hdhr-locking-pooling-4.patch (34.5 KB) - added by gigem 5 years ago.

Download all attachments as: .zip

Change History (13)

Changed 5 years ago by gigem

comment:1 Changed 5 years ago by gigem

Patch 1 should be fully functional. However, the configuration part still has some rough edges. Suggestions on how to improve it are welcome.

Note that MythTV recordings may fail if tuners are in use by other applications. It is the responsibility of the user to make sure that doesn't happen. Ways to do that include intentionally configuring MythTV to use fewer tuners or reducing the input, recording priorities on some tuners causing MythTV to not use them unless heavy scheduling load requires them.

Changed 5 years ago by gigem

comment:2 Changed 5 years ago by gigem

Patch 2 doesn't share device selectors among different input groups. I thought they could and should be shared but they can't and shoudn't.

Changed 5 years ago by gigem

comment:3 Changed 5 years ago by gigem

Patch 3. Updated for recent changes to master. Create a new selector every time instead of caching them. It's ever so slightly slower but is consistent with the rest of the stream handler handling. Configuration improvements are still pending.

Changed 5 years ago by gigem

comment:4 Changed 5 years ago by gigem

Patch 4. Feature complete with the reworking of the configuration screens. If you've been waiting to test, please do so now. This should be very close to what gets committed to master.

comment:5 Changed 5 years ago by David Engel <dengel@…>

Resolution: fixed
Status: assignedclosed

In 57a0ad8c56/mythtv:

Fully support HDHomeRun tuner locking and pooling.

Previously, with HDHomeRuns, MythTV inputs were configured to use
specific tuners. This didn't work well when other applications were
configured to use the same HDHomeRuns. If the specific tuner was busy
when MythTV needed it, MythTV would fail. With this change, each
MythTV input is now configured to use one or more HDHomeRuns. When a
tuner is needed, MythTV will use the first free tuner from the
configured set of HDHomeRuns.

Note that multiple MythTV inputs must still be configured in order to
use multiple HDHomeRun tuners simultaneously. For example, if an
HDHomerun Quatro has 4 tuners, 4 MythTV inputs should be configured.
If two HDHomeRun Primes have 6 tuners total (3 + 3), 6 MythTV inputs
should be configured.

If other applications might be using tuners from the same HDHomeRuns,
it is up to the user to make sure the appropriate number of tuners are
available to MythTV. If MythTV needs a tuner and none is available,
MythTV will still fail. One way to prevent that is to configure fewer
MythTV inputs than there are HDHomerun tuners available. For example,
for an HDHomeRun Quatro, only configure 2 MythTV inputs leaving 2
inputs available to other applications. Alternatively, set the
recording priorities of some inputs lower so that MythTV will not try
to use them except when absolutely necessary.

Finally, this change contains a database schema update to
automatically update the HDHomeRun input configuration for optimum
use. It is commented out at this time in order to not break
compatibility with MythTV version 29. It will be uncommented before
the release of version 30. In the meantime, the configuration can be
updated simply by running mythtv-setup, entering the Capture Card
section, immediately exiting and saving the changes. Until the
configuration is updated, MythTV will continue to function as before
with each MythTV input still using the specific HDHomeRun tuner it was
previously configured to use.

Fixes #13339

comment:6 Changed 5 years ago by David Engel <dengel@…>

In e50d9c7d3a/mythtv:

Provide replacements for missing libhdhomerun functions.

Very old versions of libhdhomerun are missing some desireable
functions. Provide our own replacements for them when needed.

Refs #13339

comment:7 Changed 5 years ago by David Engel <dengel@…>

In e50d9c7d3a/mythtv:

Provide replacements for missing libhdhomerun functions.

Very old versions of libhdhomerun are missing some desireable
functions. Provide our own replacements for them when needed.

Refs #13339

comment:8 Changed 5 years ago by David Engel <dengel@…>

In 1480116ee/mythtv:

Add more specific fix for compile issues with older libhdhomeruns.

Refs #13339

comment:9 Changed 5 years ago by David Engel <dengel@…>

In 1480116ee/mythtv:

Add more specific fix for compile issues with older libhdhomeruns.

Refs #13339

Note: See TracTickets for help on using tickets.