At Tue, 28 Apr 2009 12:15:25 +0200 (CEST), Jaroslav Kysela wrote:
On Tue, 28 Apr 2009, Takashi Iwai wrote:
Well, I think it'd be better, at this moment for 2.6.30, to allow problematic drivers to skip the jiffies check. Adding the fundamental change at this late stage is bad, especially if the change wasn't tested much by many others and has an influence on user-side API.
So, as I proposed, we can simply add the pcm info check, and add BATCH flag to needed drivers. Of course, it still requires some more testing, but basically it'll take back to the old behavior and should be safer.
Meanwhile, applying the delay account patch now for 2.6.31 should be good (ealier is better). It doesn't conflict with the info flag check, so we can work parallel.
Could we just add the runtime->delay variable without touching other code (pcm status), to correct the jiffies based check now?
That's possible, of course.
It seems like a good step forward to me and the lowlevel drivers will be more prepared for next PCM midlevel code changes.
Well, but I guess providing the proper FIFO size isn't trivial to each driver. There are many devices, as Mark suggested, which may be broken right now, and we can't determine all h/w specs and test them.
OTOH, adding INFO_BATCH is fairly easy, because it can be found from the pointer callback implementation of each driver. On these devices, the jiffies check doesn't help much anyway because it cannot update the hwptr any other than the period size. So, skipping jiffies check is logically correct as a regression fix.
Of course, it could help to inform whether the period-elapsed call is accurate. But, it's another story from the regression fix, which is a more urgent issue.
So, what I'm suggesting is to fix the 2.6.30 behavior in minimal effort while we introduce a better framework for 2.6.31. Both can go at the same time.
I already did some work for 2.6.30 fix. It's found in sound git tree fix/pcm-jiffies-check branch. You can pull from git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git fix/pcm-jiffies-check
This is still a test branch so it isn't merged yet. It'd be helpful if someone can test it, or let me know this change is unacceptable.
thanks,
Takashi