Skip to content

Commit

Permalink
Remove unused HasLock call on tuner that is not yet tuned
Browse files Browse the repository at this point in the history
In DVBSignalMonitor::DVBSignalMonitor function HasLock is called.
At the time the function is called the tuner has not been
tuned yet so checking for the lock status is not useful.
There is nothing done with the results of this call except
giving an error message if the call fails.
The reason to remove this call is that the frontend
"Silicon Labs Si2168", used in the MyGica T230, returns
the EREMOTEIO error on FE_READ_STATUS if the tuner is not tuned.

Refs #13447
  • Loading branch information
kmdewaal committed Apr 30, 2019
1 parent d24813e commit e0844ea
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions mythtv/libs/libmythtv/recorders/dvbsignalmonitor.cpp
Expand Up @@ -73,11 +73,6 @@ DVBSignalMonitor::DVBSignalMonitor(int db_cardnum, DVBChannel* _channel,
// in practice, however this is correct for the 4.0 DVB API
m_signalStrength.SetRange(0, 65535);

bool ok;
_channel->HasLock(&ok);
if (!ok)
LOG(VB_GENERAL, LOG_ERR, LOC + "Cannot read DVB status" + ENO);

uint64_t rmflags = 0;

#define DVB_IO(FLAG, METHOD, MSG) \
Expand Down

2 comments on commit e0844ea

@stuarta
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make more sense to handle the EREMOTEIO on the read status?

@kmdewaal
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Handling EREMOTEIO in HasLock would also block the error messages when they are useful. Handling EREMOTEIO here in DVBSignalMonitor would defeat the only visible purpose of this code, which is to give an error message if it fails. If the purpose of the HasLock call is an undocumented side effect for specific tuners then it is possible to do an ioctl FE_READ_STATUS here, without error messages, instead of calling HasLock.

Please sign in to comment.