Hi Jim/John,
> Sorry for the delay, but I finally got to test your experimental fix. It worked great. I was able to record and playback the hacked channel successfully.
>
Good, proof of concept for that at least. :)
So for next hackish step, we need to get a mapping of PID<->Program, and then teach userhdhomerun to use that for tuning and see what happens. Fortunately there is already a tool that will scan everything and print out the mapping for us - so if one you could do the below and paste the output here - I'll see if I can teach userhdhomerun to use that.
Remember to stop tvheadend before doing this!
sudo apt-get install w-scan
sudo w_scan -f a -A 3 -c US > wscan_output.log
That will simply go scan through all frequencies and find what stuff there is, and output a line for each program. Long operation, takes half an hour for me here in DVB-C land. Info on w_scan here: http://linuxtv.org/wiki/index.php/W_scan you may want to tweek the -A parameter, read on that first.
Output in the file wscan_output.log is what we are interested in. For me I get something like this:
NatGeo HD;Stofa:610000:M256:C:6900:1540=27:1541=eng;1542:0:0:1154:1:31:0
BBC World News;Stofa:626000:M256:C:6900:1330=2:1331=eng:1339:0:1133:1:33:0
ZDF HD;Stofa:626000:M256:C:6900:2560=27:2561=deu;2562:2569:0:1256:1:33:0
Eurosport HD;Stofa:626000:M256:C:6900:2680=27:2681=dan:2689:0:1268:1:33:0
Eurosport 2 HD;Stofa:626000:M256:C:6900:2690=27:2691=dan,2692=eng:0:0:1269:1:33:0
Which contain both program number and PID's for video/audio/teletext in one convienient line per program.
> Any idea how much effort it would be to turn this into a real fix?
>
Very good question. To me it seems like no matter how it is done, it is going to be somewhat complex.
There is still some technical details/analysis I/we need to figure out. One thing that pops to mind is that right now in tvheadend (and any other linux dvb program), you can easily record more than one program on the same mux using only one tuner. You simply feed it with a filter contained the programs you want to record and that works magically. But PID filtering don't work for cablecard, here your explicitle need to ask a tuner to tune to a specific program - I haven't found in the API the possibility to record more than one program on one tuner/mux. So tvheadend expects to be able to record more than one program on a mux, and if that is not possible we need to fail that gracefully somehow.
Also there is the whole story of providing the PID<->program mapping before everything starts to work. That could/would work with the w_scan application - but is going to be difficult to explain to users. "Hey run this for a hour, then you can use tvheadend. Oh, and don't run tvheadend while you run, and remember to start it afterwards"... :)
Anyway, lets just try with output from w_scan, teach userhdhomerun to use that for mapping and see what happens. ;-)