[pulseaudio-discuss] [PATCH v0 05/20] bluetooth: Refactor hooks in module-bluetooth-policy

Mikel Astiz mikel.astiz.oss at gmail.com
Wed Aug 22 08:08:33 PDT 2012


Hi Frédéric,

On Wed, Aug 22, 2012 at 3:09 PM, Dalleau, Frederic
<frederic.dalleau at intel.com> wrote:
> Hi Mikel,
>
> On Wed, Aug 22, 2012 at 10:08 AM, Mikel Astiz <mikel.astiz.oss at gmail.com> wrote:
>> From: Mikel Astiz <mikel.astiz at bmw-carit.de>
>>
>> Merge hooks into a single callback to avoid duplicated code.
>
> I'm no fan of this one, the idea of parsing a list to know the pointer
> type doesn't seem natural to me.
> Instead you can keep get_bluetooth_protocol and write a helper to do
> the module loading that takes the format string, sink name and role as
> input.

As mentioned in the (probably too long) cover-letter, the first 5
patches propose some refactoring and small changes to facilitate the
reading of the following ones.

In this case the real purpose of this refactoring would be patch v0
18/20. Without merging both hooks the number of duplicated lines would
be too bad IMO.

I'm fine with any other implementation proposal, but I would first
like you to consider if handling the suspend state is interesting as
proposed in patch 18/20.

Cheers,
Mikel


More information about the pulseaudio-discuss mailing list