Server-side corking

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

 



On Tue, 2013-04-30 at 13:23 +0200, David Henningsson wrote:
> On 04/30/2013 01:05 PM, Tanu Kaskinen wrote:
> > Hi all,
> >
> > Tizen has a patch[1] that makes it possible to cork streams from the
> > server side. So far only applications have been allowed to cork streams
> > (it has been possible to cork streams also from the server side, but
> > that would cause conflicts if both applications and the server want to
> > cork and uncork the same streams).
> >
> > I'm not familiar with the use case that has inspired the patch (Jaska or
> > Janos, it would be nice if you could explain the use case), but in
> > general server-side corking sounds sensible to me. The particular
> > implementation of the patch doesn't look so good to me, though: it just
> > adds one boolean to pa_sink_input for any server-side corking (the
> > feature doesn't seem to have been added to source outputs at all). There
> > may be multiple modules doing corking, so having just one boolean will
> > still be prone to conflicts.
> >
> > I propose that we add a hashmap/list/whatever for cork requests, so that
> > there can be any number of simultaneous requests for one stream, and the
> > stream will stay corked as long as there is at least one request. When a
> > client requests corking, a cork request object will be created and
> > associated with the client, and the cork request object will be removed
> > when the client request uncorking. Similarly, modules would be able to
> > create and manage their own cork request objects.
> >
> > Comments would be very welcome. If there is no opposition, this feature
> > will probably implemented sooner or later (I doubt that Tizen wants to
> > carry that patch forever).
> >
> > [1] https://github.com/otcshare/pulseaudio/commit/f60d68bb1fc8e3b746d467d0638f522c4795229a
> >
> 
> I'm not sure a hashmap/list of cork requests is the best. I guess this 
> could depend on *why* you want to cork the stream - I believe 
> module-role-cork (which pauses music on phone calls), would pause the 
> stream even on the client side, making it possible for the user to 
> override by pressing "play" in his music player. This seems useful to me.

module-role-cork doesn't do any corking itself, it just kindly asks the
client to cork and uncork, so the client remains in full control as far
as module-role-cork is concerned. I don't propose that module-role-cork
behaviour would change at all.

If you are saying that uncorking by the application should always
*force* the stream to start to play, regardless of any server side
corking, I disagree. I think it makes sense that if there is at least
one active cork request, the stream should stay corked.

-- 
Tanu

---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux