[pulseaudio-discuss] [RFC v0 01/15] bluetooth: Do not check profile states is device_audio_is_ready()
Tanu Kaskinen
tanuk at iki.fi
Sun Dec 30 04:23:56 PST 2012
On Thu, 2012-12-20 at 14:07 +0200, Tanu Kaskinen wrote:
> On Wed, 2012-12-19 at 13:58 +0100, Mikel Astiz wrote:
> > From: Mikel Astiz <mikel.astiz at bmw-carit.de>
> >
> > The function is used to make sure some basic information has already
> > been gathered before the device is being used. At this point profile
> > states can be ignored, since their initial value will be
> > PA_BT_AUDIO_STATE_INVALID and thus effectively similar to
> > PA_BT_AUDIO_STATE_DISCONNECTED due to audio_state_to_transport_state().
>
> Is it necessary to check d->audio_state either?
>
> Also, the function name doesn't seem very appropriate. If the purpose of
> the function is to check whether the device properties have been
> received, I think it should be called device_is_initialized() or
> something like that.
If the purpose of the function is just to check whether the device
properties have been received, then the function is redundant, because
it's sufficient to just check the device_info_valid status.
Somewhat related: the device_info_valid calculation could be better in
my opinion. I filed a bug about it:
https://bugs.freedesktop.org/show_bug.cgi?id=58885
--
Tanu
More information about the pulseaudio-discuss
mailing list