[pvrusb2] Channel-change script

Mike Isely isely at isely.net
Sat Sep 10 21:45:19 CDT 2005


On Sun, 11 Sep 2005, Per Christian Henden wrote:

> On Sunday 11 September 2005 01:14, Mike Isely wrote:
> > With your permission I will add this to the pvrusb2 driver snapshot.
> Sure, go ahead.
> I'm not using ctl_freq_table_channel and ctl_freq_table_value
> with this script, didn't notice them until after I sent the script to the
> list.

That's OK.  In fact using it might be a problem if you expect channel ids
to be other than numbers.  I only put it there as a debugging aid.

>
> But if the frequencies file exists,
> then we can just do
>
> #!/bin/bash
> i=0
> freqlist=`cat ~perchrh/.tv/freqs|grep freq|cut -c 8-`
> for freq in $freqlist
> do
>    echo $i > ctl_freq_table_channel/cur_val
>    echo ${freq}000 > ctl_freq_table_value/cur_val
>    let i++
> done
>
> to create the table.
>
> I don't notice any difference in speed or anything when changing
> channels by setting the frequency in ctl_freq_table_value
> and by programming in the table and using ctl_channel.
> Is there a difference in what code gets executed by the driver?

There is basically zero performance difference.  Using a channel number
just results in an array lookup to find the frequency and then that is
programmed in the usual way.  The table is only there to make it easy to
quickly jump channels if all you have to work with in fact is sysfs.  It
was something like a 1 hour hack to add the table.

  -Mike

-- 
                        |         Mike Isely          |     PGP fingerprint
     Spammers Die!!     |                             | 03 54 43 4D 75 E5 CC 92
                        |   isely @ pobox (dot) com   | 71 16 01 E2 B5 F5 C1 E8
                        |                             |


More information about the pvrusb2 mailing list