[linux-dvb] Question About DVB API & Air2PC ATSC

Niklas Peinecke n.peinecke at web.de
Tue Mar 8 15:50:39 CET 2005


Kevin D Fowlks wrote:
> Hello, All
> I've written a ATSC scanner application for the Air2PC card that
> extracts the VCT sections from a channel that it finds a "Lock" on.
> Now this might be a more of a general DVB API question.
> 1) The card is supposed to support 32 Hardware PID filters.
>  Now for instance my current programs just filters for a TVCT section
>  How do I filter for multiply sections?
> I've attempted to fill in other pid sections, But doing this stops the 
> card from reciveing ANY sections. It works fine as long as i only use 
> one PID Mask pair, hence the coed that commented out.
> unsigned char filter[DMX_FILTER_SIZE];
> unsigned char mask[DMX_FILTER_SIZE];
> memset( filter, '\0', sizeof(filter));
> memset( mask, '\0', sizeof(mask));
> filter[0] = TVCG_TABLE_ID; // Look for the TVCG Table in Stream for 
> OTA   DTV
> //filter[1] = CVCG_TABLE_ID; // Look for the CVCG Table in Stream for 
> Cable DTV
>  mask[0]   = 0xFF; // Mask
> //mask[1]   = 0xFF; // Mask

In fact most B2C2-based cards have 38 hardware pid filters. But you do 
not need to take care about that, the driver does this for you. If it 
runs out of hardware filters simply the whole transport stream will be 
passed through.

See the code of azap for an example of how to set up more than one 
filter (azap sets audio & video pid).

> 2) How do I properly determine "Lock"? I understand that since the 
> signal could have errors or bad data or Fade in / out ...etc.  I 
> understand that the values returned from the card are not normalized 
> because the values might mean something differnt depending on the card 
> and hardware.  Whats the correct way to handle this?

Lock is reported by the hardware and passed through the frontend driver. 
Again see azap & femon source for an example.

HTH,

Niklas




More information about the linux-dvb mailing list