Re: [PATCH] staging: bcm2835-audio: interpolate audio delay

2018-10-22 Thread Mike Brady
Hi Kirill. The problem that this patch seeks to resolve is that when userland asks for the delay -- the time to hear -- the driver responds with a figure that is only updated when a GPU interrupt occurs, now approximately every 10 milliseconds. As far as I am aware, there is no way to get a more

Re: [PATCH] staging: bcm2835-audio: interpolate audio delay

2018-10-18 Thread Kirill Marinushkin
Hello Mike, On 10/18/18 12:57, Mike Brady wrote: > + ktime_t now = ktime_get(); > + > + /* Give userspace better delay reporting by interpolating between GPU > + * notifications, assuming audio speed is close enough to the clock > + * used for ktime > + */ > + > + if ((k

Re: [PATCH] staging: bcm2835-audio: interpolate audio delay

2018-10-18 Thread Takashi Iwai
On Thu, 18 Oct 2018 12:57:15 +0200, Mike Brady wrote: > > When the BCM2835 audio output is used, userspace sees a jitter up to 10ms > in the audio position, aka "delay" -- the number of frames that must > be output before a new frame would be played. > Make this a bit nicer for userspace by interp

[PATCH] staging: bcm2835-audio: interpolate audio delay

2018-10-18 Thread Mike Brady
When the BCM2835 audio output is used, userspace sees a jitter up to 10ms in the audio position, aka "delay" -- the number of frames that must be output before a new frame would be played. Make this a bit nicer for userspace by interpolating the position using the CPU clock. The overhead is small -