Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fix for the data reception problem and more
Michael Holzt writes:
> Ok, i took some time to dig through the sources of driver 0.7 and found
> the bug which occured now. This bug is existant in old drivers too(!),
> but wasn't catched there (instead some internal data structures where
> used using wrong pointers, ouch!)
>
> The calculation of the bit filter in use in function debiirq, file
> dvb.c is somewhat wrong. I get filters 128, 130 ... where the maximum
> allowed value is 31 (the card can only handle 32 bitfilters). The new
> driver catches this bug in line 575
> if ((handle>=MAXFILT) || !dvb->hfilter[handle])
> break;
> where the old driver just accessed internal structures using this wrong
> index
> if (dvb->filter_flags[handle]&FILTER_MEM)
> [...]
>
>
>
> As the bitfilter can go up to 31 maximum as indicated above, i changed
> line 516 in dvb.c to read
> int handle=(type>>8) & 0x1F;
> instead of
> int handle=(type>>8);
>
>
> This fixes the bug for me, although i'm not absolutely sure if this
> really fixes the source of the problems or probably only the place
> where it occures.
>
> Our friends at convergence need to check this.
Yes, sorry for that.
The fix is correct. If the SECTION_EIT flag is set in the mode field
of the filter, bit 7 of the returned handle is set to indicate this.
dvbd does not set the SECTION_EIT flag but the firmware implicitely
sets it for the SECTION_IPMPE mode.
Thatīs because SECTION_EIT is not just for EIT data but it just
allocates more buffer space for a filter.
And, while we are at it, as David Toth pointed out to me,
there is another bug in SetFront:
In the new driver (as suggested by Klaus Schmidinger) I also
check if the sync was lost to determine if action for a channel change
is to be taken. But I forgot to update the frontend structure with
new values before the check.
It should work like this:
SetFront(struct dvb_struct *dvb, struct frontend *front)
{
dprintk("setfront\n");
decoder_command(dvb, DVB_GET_FRONTEND, &dvb->front); /* FIX */
if (dvb->dvbtype==DVB_S) {
...
This was not tragic if you always did a getfrontend call in the
application but could result in filters being shut down when calling
a setfrontend twice in a row with the same values but with the
sync entry cleared.
Iīll put a new release on the web page later today.
Ralph
Home |
Main Index |
Thread Index