[PATCH] Added module-ofono-switch-on-voicecall

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2014-03-19 at 18:48 -0700, eu at felipetonello.com wrote:
> From: "Felipe F. Tonello" <eu at felipetonello.com>
> 
> This module is used to change a card profile when a voice call is received
> from oFono.
> 
> It also provides a functionality to avoid suspension of sink/source that
> module-suspend-on-idle does. This is usefull since most of those pcms are
> dummy just to change the codec route to the modem in the kernel driver. If you
> use this functinoality, please load this module before loading
> module-suspend-on-idle.
> 
> Signed-off-by: Felipe F. Tonello <eu at felipetonello.com>
> ---
>  src/Makefile.am                                |  12 +-
>  src/modules/module-ofono-switch-on-voicecall.c | 540 +++++++++++++++++++++++++
>  2 files changed, 550 insertions(+), 2 deletions(-)
>  create mode 100644 src/modules/module-ofono-switch-on-voicecall.c

Thanks for the patch! I don't have time to do proper review now, so I'll
add this to the patch queue, which you can see here:
http://www.freedesktop.org/wiki/Software/PulseAudio/PatchStatus/

I have some comments, though:

Please follow the coding style guidelines[1]. I only glanced at the
code, but I see tabs being used for indentation and lines longer than
128 characters.

Why does this module have to be loaded before module-syspend-on-idle?
Such load order restrictions should be avoided if at all possible.

I would like to have a shared library for handling the D-Bus
communication. The library would provide an API for dealing with oFono
from various modules, one of which could be
module-ofono-switch-on-voicecall. An example of that sort of library is
libbluez5-util.so, which implements an abstraction layer for BlueZ 5.
libbluez5-util.so implements a singleton object that is created when the
first Bluetooth module is loaded and deleted when the last Bluetooth
module is unloaded. This pattern would be good for oFono also. I'm not
requiring you to do this, if you think it's too much work (I might then
some day do the refactoring myself). If you do this, you should
coordinate that work with Jo?o Paulo Rechi Vita (CC'd), who has also
written code for interfacing with oFono. Jo?o's work has not been
reviewed yet either.

[1] http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/CodingStyle/

-- 
Tanu



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux