Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#10900 closed Patch - Bug Fix (Won't Fix)

recording fails with "TVRecEvent dtvmultiplex.cpp:323 (ParseTuningParams) DTVMux: ParseTuningParams -- Unknown tuner type" with CableCard activated in HDHomerun Prime

Reported by: dlbulk-mythtv@… Owned by: danielk
Priority: minor Milestone: 0.26
Component: MythTV - Recording Version: 0.25-fixes
Severity: medium Keywords:
Cc: Ticket locked: no

Description

I am getting exactly the same error as ticket #10712. But my box has a working CableCard? inserted and activated. This is verified through the vendor provided hdhomerun_config_gui binary. I am able to view encrypted channels using VLC.

My backend is running: ; uname -a Linux anguish 3.2.0-24-generic #37-Ubuntu SMP Wed Apr 25 08:43:22 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

; lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 12.04 LTS Release: 12.04 Codename: precise

; mythbackend --version Please attach all output as a file in bug reports. MythTV Version : v0.25 MythTV Branch : fixes/0.25 Network Protocol : 72 Library API : 0.25.20120408-1 QT Version : 4.8.1 Options compiled in:

linux profile use_hidesyms using_alsa using_oss using_pulse using_pulseoutput using_backend using_bindings_perl using_bindings_python using_bindings_php using_crystalhd using_dvb using_firewire using_frontend using_hdhomerun using_ceton using_hdpvr using_iptv using_ivtv using_joystick_menu using_libcrypto using_libdns_sd using_libxml2 using_lirc using_mheg using_opengl_video using_qtwebkit using_qtscript using_qtdbus using_v4l2 using_x11 using_xrandr using_xv using_bindings_perl using_bindings_python using_bindings_php using_mythtranscode using_opengl using_vaapi using_vdpau using_ffmpeg_threads using_live using_mheg using_libass using_libxml2

Change History (11)

comment:1 Changed 7 years ago by dlbulk-mythtv@…

mythbackend log:

Jul 11 20:25:33 mythbackend[23565]: I TVRecEvent tv_rec.cpp:1014 (HandleStateChange) TVRec(31): Changing from None to RecordingOnly
Jul 11 20:25:33 mythbackend[23565]: I TVRecEvent tv_rec.cpp:3456 (TuningCheckForHWChange) TVRec(31): HW Tuner: 31->31
Jul 11 20:25:33 mythbackend[23565]: E TVRecEvent dtvmultiplex.cpp:323 (ParseTuningParams) DTVMux: ParseTuningParams -- Unknown tuner type
Jul 11 20:25:33 mythbackend[23565]: E TVRecEvent dtvchannel.cpp:308 (SetChannelByString) DTVChan(192.168.1.105-0): SetChannelByString(704): Failed to initialize multiplex options
Jul 11 20:25:33 mythbackend[23565]: E TVRecEvent tv_rec.cpp:3642 (TuningFrequency) TVRec(31): Failed to set channel to 704. Reverting to kState_None
Jul 11 20:25:33 mythbackend[23565]: I TVRecEvent tv_rec.cpp:1014 (HandleStateChange) TVRec(31): Changing from RecordingOnly to None

comment:2 Changed 7 years ago by dlbulk-mythtv@…

Sorry, the component should have been MythTV - Recording. I am not sure how to change it.

comment:3 Changed 7 years ago by beirdo

Component: MythTV - HDHomeRunMythTV - Recording
Owner: changed from Silicondust to danielk

comment:4 Changed 7 years ago by taco12782@…

Having the same issue with exact same log information (channels and times are different, of course) with HDHomeRun Dual

comment:5 Changed 7 years ago by dlbulk-mythtv@…

Hi, I would like to help out and debug this problem using my setup.

I think the problem is due to the presence of multiple card types in my system and they share the same source from schedules direct. Here are the relevant parts:

card0: pcie, clear qam only, source1 (digital cable) card1: firewire, fw set-top box, source1 card2: hdhr, cablecard, source1

Since they share the same source, they have exactly the same set of channels.

Tuning works on both clear qam and firewire, but errors on 'unknown tuner type' on card2.

I am not familiar with mythtv internals. I sorta understand how the clear qam card tunes a channel. Here is one entry in my channel table:

mysql> select chanid, channum,freqid,sourceid,callsign,xmltvid,tvformat,mplexid,serviceid,atsc_major_chan,atsc_minor_chan from channel where callsign = "KGODT" order by channum ;
+--------+---------+--------+----------+----------+---------+----------+---------+-----------+-----------------+-----------------+
| chanid | channum | freqid | sourceid | callsign | xmltvid | tvformat | mplexid | serviceid | atsc_major_chan | atsc_minor_chan |
+--------+---------+--------+----------+----------+---------+----------+---------+-----------+-----------------+-----------------+
|   2071 | 7.1     | 7      |        2 | KGODT    | 19574   | ATSC     |     141 |         3 |               7 |               1 |
|   1707 | 707     | 707    |        1 | KGODT    | 19574   | Default  |      57 |         1 |             707 |               0 |
+--------+---------+--------+----------+----------+---------+----------+---------+-----------+-----------------+-----------------+
2 rows in set (0.00 sec)

To tune card0 to channel 707, we lookup mplexid 57 from the dtv_mplexid table. Here is the entry:

mysql> select mplexid, sourceid, frequency, modulation, sistandard from dtv_multiplex where mplexid = 141 OR mplexid = 57;
+---------+----------+-----------+------------+------------+
| mplexid | sourceid | frequency | modulation | sistandard |
+---------+----------+-----------+------------+------------+
|      57 |        1 | 567000000 | qam_256    | atsc       |
|     141 |        2 | 177000000 | 8vsb       | atsc       |
+---------+----------+-----------+------------+------------+
2 rows in set (0.00 sec)

so card0 needs to tune to frequency 567000000.

How does this scheme work for HDHR? it is not supposed to use the dtv_mplex table, is it?

comment:6 Changed 7 years ago by dlbulk-mythtv@…

one more thing. I created a dummy new backend on another system and configured the hdhr. Tuning HDHR works.

Here are the db entries corresponding to the previous example.

mysql> select chanid, channum,freqid,sourceid,callsign,xmltvid,tvformat,mplexid,serviceid,atsc_major_chan,atsc_minor_chan from channel where callsign = "KGODT" order by channum ;
+--------+---------+--------+----------+----------+---------+----------+---------+-----------+-----------------+-----------------+
| chanid | channum | freqid | sourceid | callsign | xmltvid | tvformat | mplexid | serviceid | atsc_major_chan | atsc_minor_chan |
+--------+---------+--------+----------+----------+---------+----------+---------+-----------+-----------------+-----------------+
|   1707 | 707     | 707    |        1 | KGODT    | 19574   | Default  |   32767 |         0 |             707 |               0 |
+--------+---------+--------+----------+----------+---------+----------+---------+-----------+-----------------+-----------------+
1 row in set (0.00 sec)


mysql> select mplexid, sourceid, frequency, modulation, sistandard from dtv_multiplex;
Empty set (0.00 sec)

The question is, does mythtv tune HDHR with a frequency or with a numerical channel number?

comment:7 Changed 7 years ago by tsnyder701@…

I too am having this problem. Happy to help debug.

Jul 25 03:47:14 linux-desktop mythbackend[5346]: E TVRecEvent dtvmultiplex.cpp:323 (ParseTuningParams?) DTVMux: ParseTuningParams? -- Unknown tuner type Jul 25 03:47:14 linux-desktop mythbackend[5346]: E TVRecEvent dtvchannel.cpp:308 (SetChannelByString?) DTVChan(131126A3-0): SetChannelByString?(16-263): Failed to initialize multiplex options Jul 25 03:47:14 linux-desktop mythbackend[5346]: E TVRecEvent tv_rec.cpp:3642 (TuningFrequency?) TVRec(1): Failed to set channel to 16-263. Reverting to kState_None Jul 25 03:47:14 linux-desktop mythbackend[5346]: I TVRecEvent tv_rec.cpp:1014 (HandleStateChange?) TVRec(1): Changing from WatchingLiveTV to None Jul 25 03:48:00 linux-desktop mythbackend[5346]: N Expire autoexpire.cpp:263 (CalcParams?) AutoExpire?: CalcParams?(): Max required Free Space: 1.0 GB w/freq: 15 min

comment:8 Changed 7 years ago by dlbulk-mythtv@…

Here is one fix. I have tested it on a system with a mix of different QAM tuners.

--- libs/libmythtv/dtvchannel.cpp.org	2012-04-10 00:44:11.000000000 -0700
+++ libs/libmythtv/dtvchannel.cpp	2012-07-23 22:17:37.548227944 -0700
@@ -259,7 +259,9 @@
         frequency = (freqid.toUInt() + finetune) * 1000;
         mplexid = 0;
     }
-    bool isFrequency = (frequency > 10000000);
+    
+    // do frequency tuning only if we cannot handle vchannel
+    bool isFrequency = (DTVTunerType::kTunerTypeOCUR != tunerType && (frequency > 10000000));
     bool hasTuneToChan =
         !(*it)->tuneToChannel.isEmpty() && (*it)->tuneToChannel != "Undefined"; 

comment:9 Changed 7 years ago by danielk

Milestone: unknown0.26
Status: newaccepted
Type: Bug Report - GeneralPatch - Bug Fix

comment:10 Changed 7 years ago by danielk

Resolution: Won't Fix
Status: acceptedclosed

A Virtual Channel based tuner like the HDHomeRun with CableCard? installed should not share a Video Source setup with a multiplex based tuner.

comment:11 Changed 7 years ago by dlbulk-mythtv@…

Daniel, thanks for the feedback.

Firewire tuners can also do vchannel tunning and can share the same source with multiplex based tuners. I guess this is a 'provided' but not 'supported' feature. Does the HDHR fit in the same category?

If a single line can provide the feature, shall we do it? I volunteer to support this line if it breaks. If the objection is because this tuner specific code appears in a generic function, I can hide it into HDHR specific code just like the firewire tuning code.

Can you please reconsider?

Note: See TracTickets for help on using tickets.