[pulseaudio-discuss] [RFCv2 17/17] bluetooth: Postpone sink and source creation for BlueZ 5 HFP
João Paulo Rechi Vita
jprvita at gmail.com
Thu Apr 18 07:06:09 PDT 2013
On Thu, Apr 18, 2013 at 10:58 AM, Mikel Astiz <mikel.astiz.oss at gmail.com> wrote:
> Hi João Paulo,
>
> On Wed, Apr 17, 2013 at 9:20 PM, João Paulo Rechi Vita
> <jprvita at openbossa.org> wrote:
>> On Mon, Apr 15, 2013 at 6:53 PM, <jprvita at gmail.com> wrote:
>>> From: João Paulo Rechi Vita <jprvita at openbossa.org>
>>>
>>> CVSD and mSBC stream have different sample rates, and the CODEC of the
>>> Audio Connection is only on NewConnection(). Since the sample rate is
>>> needed to create the sink/source their creation is postponed to when the
>>> transport changes its state to 'playing'.
>>
>> Ideally instead of postponing the sink/source creation what I want
>> here is to update their sample rate, otherwise I can't support (1)
>> subsequent calls with different sample rates and (2) HF-initiated call
>> transfer from the HF to the AG. For (1) a workaround would be
>> destroying the sink after the call ends (HUP on stream fd) but I
>> couldn't think of anything to cover (2).
>
> As you already point out, postponing the creation seems a bad idea
> since the current approach relies on their existence to for example
> resume them automatically (connect SCO) when some audio gets streamed
> (e.g. point (2) above). This seems now more tricky with HFP 1.6 so we
> might have to reconsider this assumption if there's no other
> alternative.
>
>>
>> I've played a bit with pa_sink_update_rate() but I always got a
>> message complaining that the attached monitor source was not idle,
>> even when the sink was idle. Can someone give me any help on that?
>
> I'm not familiar with _update_rate but basically what you need is to
> be able to change the sample rate of a *suspended* sink/source. This
> sounds like a feature that the core should provide, regardless of the
> state of the monitor.
>
Yes, I'm trying to do so when both the sink and source are on the
suspended state.
--
João Paulo Rechi Vita
http://about.me/jprvita
More information about the pulseaudio-discuss
mailing list