[pulseaudio-discuss] [RFC 2/2] bluetooth: Add inband ringtone property

Tanu Kaskinen tanuk at iki.fi
Tue Nov 13 11:05:24 PST 2012


On Mon, 2012-11-12 at 16:19 +0100, Frédéric Danis wrote:
> ---
>  src/modules/bluetooth/module-bluetooth-device.c |   37 +++++++++++++++++++++++
>  1 file changed, 37 insertions(+)
> 
> diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c
> index 656852d..c734d6c 100644
> --- a/src/modules/bluetooth/module-bluetooth-device.c
> +++ b/src/modules/bluetooth/module-bluetooth-device.c
> @@ -122,6 +122,7 @@ struct hsp_info {
>      pa_source *sco_source;
>      void (*sco_source_set_volume)(pa_source *s);
>      pa_hook_slot *sink_state_changed_slot;
> +    pa_hook_slot *sink_property_changed_slot;
>      pa_hook_slot *source_state_changed_slot;
>      pa_hook_slot *nrec_changed_slot;
>      pa_hook_slot *output_gain_slot;
> @@ -1593,6 +1594,34 @@ static pa_hook_result_t sink_state_changed_cb(pa_core *c, pa_sink *s, struct use
>      return PA_HOOK_OK;
>  }
>  
> +static pa_hook_result_t sink_property_changed_cb(pa_core *c, pa_sink *s, struct userdata *u) {
> +    const char *str;
> +    int val;
> +    dbus_bool_t value;
> +    const char *name = "InbandRingtone";
> +
> +    pa_assert(c);
> +    pa_sink_assert_ref(s);
> +    pa_assert(u);
> +
> +    if (s != u->sink)
> +        return PA_HOOK_OK;
> +
> +    str = pa_proplist_gets(u->sink->proplist, "bluetooth.bsir");

Currently there's no code that sets the "bluetooth.bsir" property. Can
you explain how this feature is supposed to work? Communicating through
property lists isn't very nice in my opinion, but before rejecting the
patch altogether, I'd like to know more about the background.

-- 
Tanu



More information about the pulseaudio-discuss mailing list