[alsa-devel] [RFC] compress: add support for gapless playback

Vinod Koul vinod.koul at intel.com
Wed Feb 6 15:31:18 CET 2013


On Wed, Feb 06, 2013 at 03:48:26PM +0100, Takashi Iwai wrote:
> > > How is the operation flow?  Does it drain until which point?
> > Right, we want to move from one track to another. And while at this DSP needs to
> > exhaust the buffers from first track and then we should start writing second
> > track. When userspace has finsihed wirting first track it sends partial_drain
> > and DSP decods finsihed off and returns when it is ready to accept second track
> > data. The userland sends the metadata for this followed by data write.
> 
> Hm, could you depict the flow?  Will be like below?
> 
> - Open
> - Get caps / codec caps
> - Set params
> - Set metadata of the first track
> - Fill data of the first track
> - Trigger START
> - User-space finished sending all, then trigger PARTIAL_DRAIN
PARTAIL_DRAIN is returned when DSP has finished most of data from first track
and is ready to accept second track data
> - Set metadata of the next track
> - Fill data of the next track
DSP switches to second track
Keep writing till we finish track, then trigger PARTIAL_DRAIN
Continue till you reach end of album
Then trigger DRAIN
Close

I will add this to documentation patch as well...

> OK, then PARTIAL_DRAIN doesn't sound intuitive.
> Something like CONTINUE_TO_NEXT?
Sure, anyone else with a better name :-)
> 
> (I'm not particularly good at naming, so someone must have a better
>  idea...)
Welcome to club, I wont mind naming after you :D

--
~Vinod


More information about the Alsa-devel mailing list