Re: SAA7146 glitch on cold boot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday 07 July 2006 22:56, Oliver Endriss wrote:
> Andrew de Quincey wrote:
> > On Tuesday 04 July 2006 22:04, Oliver Endriss wrote:
> > > Andrew de Quincey wrote:
> > > > On Tuesday 04 July 2006 19:21, Oliver Endriss wrote:
> > > > > You might try the following:
> > > > > Copy the code of stop_ts_capture and start_ts_capture into your
> > > > > budget_fix_feed routine, replacing the calls to stop_ts_capture and
> > > > > start_ts_capture.
> > > > >
> > > > > Then disable lines of the copied code until you can identify the
> > > > > lines which are essential to fix the problem.
> > > > >
> > > > > That should give us a hint what is going on here.
> > > >
> > > > Sure, I reduced it to:
> > > >
> > > > saa7146_write(budget->dev, MC1, MASK_20);	// DMA3 off
> > > > saa7146_write(budget->dev, MC1, (MASK_04 | MASK_20));	/* DMA3 on */
>
> Ok, if we cannot fix it otherwise, your patch should execute exactly
> these 2 lines. There should be a FIXME comment explaining why the patch
> has been added. I still hope that we can find the real bug. ;-)

Yup.

> > > Hm - this means that DMA3 has either not been started or is stuck.
> > >
> > > Does it make a difference if you add both lines at the end of
> > > start_ts_capture?
> >
> > Nope no difference. I'd already tried this by stopping+starting
> > dvbtraffic before I tuned... it doesn't help (I did try again tho adding
> > the code to the driver to make sure).
> >
> > To recap:
> >
> > 1) start dvbtraffic
> >
> > 	-- IRQs are received from the saa7146.
> >
> > 2) tune and lock
> >
> > 	-- The IRQs suddenly halt for no reason.
> >
> > 3) restart dvbtraffic
> >
> > 	-- IRQs start again and everything works fine thereafter.
> >
> > And all only the very first time DMA is started on cold boot.
>
> Very strange. I don't understand why it happens only once.
>
> Basically, it looks like an initialization problem. On the other hand,
> the data transfer was working and stops later.
>
> Imho this does not look like a saa7146 bug. A hw bug should show up
> anytime, not only once after booting.
>
> Did you check the budget->feeding stuff? At the first glance it looks
> strange to me that stop_ts_capture decrements budget->feeding
> unconditionally, while start_ts_capture checks before incrementing.

I don't see how that would break only on a cold boot though... I can reboot 
the machine as many times as I want after that and it works perfectly every 
time.

> Sorry, I will not be able to have a closer look at the code before the
> end of the next week...

No probs - now I know about it, I can work around it for the moment.

_______________________________________________

linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux