<p dir="ltr">On Jul 17, 2013 6:44 AM, "Tanu Kaskinen" <<a href="mailto:tanu.kaskinen@intel.com">tanu.kaskinen@intel.com</a>> wrote:<br>
><br>
> On Tue, 2013-07-16 at 13:04 -0300, João Paulo Rechi Vita wrote:<br>
> > On Tue, Jul 16, 2013 at 6:20 AM, Tanu Kaskinen<br>
> > <<a href="mailto:tanu.kaskinen@linux.intel.com">tanu.kaskinen@linux.intel.com</a>> wrote:<br>
> > > Another thing (I should have brought this up earlier, but I only<br>
> > > realized this today): not having a generic module-bluetooth-discover<br>
> > > breaks old configuration files, which I hate (FWIW, I believe Arun<br>
> > > doesn't care about breaking configuration compatibility that much, I<br>
> > > don't know David's opinion). João, would it be too much to ask from you<br>
> > > to write a stub module-bluetooth-discover, which checks the bluez<br>
> > > version at runtime and then loads module-bluez4-discover or<br>
> > > module-bluez5-discover depending on the detected version?<br>
> > ><br>
> ><br>
> > It was already agreed before that we would do it this way, and I don't<br>
> > think we should do a D-Bus roundtrip just to detect the BlueZ version.<br>
> > Right now we're compiling both modules by default and generating a<br>
> > <a href="http://default.pa">default.pa</a> that loads module-bluez4-discovery by default, so IMO it's<br>
> > already good enough to help packagers do the right thing. I'm not<br>
> > exactly sure what's the situation you want to improve not breaking<br>
> > configuration-file compatibility, but one way might make you happy is<br>
> > if we do not rename module-bluetooth-* to module-bluez4-* at this<br>
> > moment, and later when we decide to make BlueZ 5 support the default<br>
> > one we rename module-bluetooth-* to module-bluez4-* and<br>
> > module-bluez5-* to module-bluetooth-*. This will save us from breaking<br>
> > configuration files, but at the price of making the codebase a bit<br>
> > more confusing IMO, which I'm fine with as long as we have a good<br>
> > rationale for that.<br>
><br>
> The scenario that I'm talking about is when a user has modified<br>
> <a href="http://default.pa">default.pa</a> (either in /etc/pulse/<a href="http://default.pa">default.pa</a> or copied the file to<br>
> ~/.config/pulse/<a href="http://default.pa">default.pa</a>). Package management tools may or may not<br>
> notify the user about the changes in /etc/pulse/<a href="http://default.pa">default.pa</a>, but they<br>
> will certainly not rewrite it automaticallly. So /etc/pulse/<a href="http://default.pa">default.pa</a><br>
> may end up having the old contents. If the configuration is in the home<br>
> directory, the file will certainly not be updated.<br>
></p>
<p dir="ltr">If the package manager doesn't tell the user about a modified config file that's about to be overwritten by an update the fault is more on the package management software than on us. And if the user keeps <a href="http://default.pa">default.pa</a> under ~/.config he should know what he's doing.</p>

<p dir="ltr">> I'm not sure why you're against doing a D-Bus round-trip. Is it for<br>
> performance reasons? Note that the round-trip is needed only if<br>
> PulseAudio is built with support for both BlueZ 4 and 5. Also,<br>
> distributions can, if they are concerned about the round-trip more than<br>
> about retaining configuration file compatibility, modify <a href="http://default.pa">default.pa</a> so<br>
> that it loads module-bluez*-discovery directly.<br>
></p>
<p dir="ltr">My concern is about wasting resources unnecessarily. We shouldn't provide one solution for distributions that doesn't care about the system resources and encourage the ones who care to use a workaround. Then when users come reporting problems we'll have to figure out what's their distro choice as another variable in the equation.</p>

<p dir="ltr">And what if bluetoothd is not running when PulseAudio starts, and D-Bus activation is disabled? We will also have a filter_cb to monitor when it register itself on the bus? And we'll postpone endpoints and HandsfreeAudioAgent objects registration with the bus up to this point in this case?</p>

<p dir="ltr">I think we're trying to create an artificial independence of BlueZ and PulseAudio versions to support bluetooth audio devices when we have half of the implementation in one daemon and the other half in the other. Supporting both BlueZ 4 and 5 in PulseAudio should be just a way to ease the upgrade path from BlueZ 4 to BlueZ 5. At some point we should disable the compilation of BlueZ 4 support by default and make BlueZ 5 support  loaded by default in <a href="http://default.pa">default.pa</a>.</p>

<p dir="ltr">What about the idea of keep calling one of the modules set module-bluetooth-*? It could maybe even be the BlueZ 5 modules called this way, so we avoid a later rename and reinforce the obsolescence of the BlueZ 4 support.</p>

<p dir="ltr">--<br>
João Paulo Rechi Vita<br>
<a href="http://about.me/jprvita">http://about.me/jprvita</a></p>