Return-Path: MIME-Version: 1.0 In-Reply-To: References: <1341865311-21266-1-git-send-email-mikel.astiz.oss@gmail.com> Date: Tue, 24 Jul 2012 17:39:31 +0200 Message-ID: Subject: Re: [RFC v0] media: Extend media API with optional acquire From: Mikel Astiz To: Luiz Augusto von Dentz Cc: linux-bluetooth@vger.kernel.org, Mikel Astiz Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-bluetooth-owner@vger.kernel.org List-ID: Hi Luiz, On Mon, Jul 16, 2012 at 11:17 AM, Luiz Augusto von Dentz wrote: > Hi Mikel, > > On Mon, Jul 9, 2012 at 5:21 PM, Mikel Astiz wrote: >> From: Mikel Astiz >> unsigned int gateway_request_stream(struct audio_device *dev, >> + gboolean try_only, >> gateway_stream_cb_t cb, void *user_data) >> { >> struct gateway *gw = dev->gateway; >> GError *err = NULL; >> GIOChannel *io; >> >> + if (try_only && !gw->sco) >> + return 0; > > Perhaps if we store the status of the transport we don't need to even > call gateway_request_stream. I tried to follow this approach by adding a flag (gboolean playing) inside struct media_transport, avoiding changes in the transport callbacks. Patches will be submitted soon. Cheers, Mikel