[linux-dvb] [PATCH 6/6] DVB-PinnSat: Misc cleanup and robustness tweaks

Sigmund Augdal Helberg sigmund at snap.tv
Wed Jan 11 13:56:58 CET 2006


On Mon, 2006-01-09 at 17:54 +0100, Edgar Toernig wrote:
> Manu Abraham wrote:
> >
> > >I still don't know what causes the audio fifo to overflow
> > >on some chipsets - the video fifo seems to never show
> > >this problem (yeah, it's two time as big but the data
> > >rate is much more then twice of that comming via DVB).
> > 
> > The reason why it overflows is data is not read from the FIFO as it 
> > should be and the PCI bus expects larger chunks. Another way of handling 
> > this is to reduce the latency, [...]
> 
> All good and fine - but I get no errors with the video fifo,
> only with the audio fifo.  Afaics, there are only two differences:
> the video fifo is two times as deep as the audio fifo (but data rates
> are 4-8 times as high), and the read-only MAX_LAT register which is
> 10us for video and 64us for audio.
> 
> > >-static int bt878_make_risc(struct bt878 *bt)
> > >+static int bt878_calc_line_size(struct bt878 *bt)
> > 
> > calc_line_size would be misleading, since it is in fact creating the 
> > RISC program itself.
> 
> No, that's bt878_risc_program.  Hence the name change.
> 
> > >+		if (astat & ~BT878_ARISCI) {
> > >+			if (time_after(jiffies, bt->error_expire))
> > >+				bt->errors = 0;
> > >+			bt->error_expire = jiffies + 5*HZ;
> > >+			bt->errors++;
> > 
> > IMHO, You shouldn't be sleeping inside an interrupt handler.
> 
> Heh?  Who's sleeping?  The expire is there to reset the error
> counter if everything was well for 5 seconds.  I don't want
> to reset dma if there's only a single error every 2 hours.
> 
> > >+			if (bt->errors == 10 || bt->errors == 15) {
> > >+				printk(KERN_ERR "bt878(%d): too many errors, "
> > >+						"resetting dma\n", bt->nr);
> > >+				/* reset dma and set fifo-trigger to minimum */
> > >+				btand(~0x1f, BT878_AGPIO_DMA_CTL);
> > >+				btor(0x13, BT878_AGPIO_DMA_CTL);
> > >+			}
> > >+			if (bt->errors == 20) {
> > >+				printk(KERN_ERR "bt878(%d): too many errors, "
> > >+						"shutting up\n", bt->nr);
> > >+				btwrite(BT878_ARISCI, BT878_AINT_MASK);
> > >+			}
> > 
> > I would say that just,
> > 
> > errors > error_count,
> > do_operations would be sufficient ..
> 
> No, won't do.
> 
> > But anyway what's the idea behind reducing the fifo size if in case of 
> > errors ? normally when we have communication errors , we generally 
> > increase the buffer size, not reduce it...
> 
> Not the fifo-depth is changed (that's not possible in the bt878), the
> trigger point at which access to the PCI bus is requested is lowered.
I would be very interrested in testing this change. Do you have a script
or something that will give quantitative information about whether the
change improved the situation or not?

Sigmund
> 
> Ciao, ET.
> 
> _______________________________________________
> linux-dvb mailing list
> linux-dvb at linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb




More information about the linux-dvb mailing list