[pulseaudio-discuss] [PATCH v0 19/20] bluetooth-experimental: Fake input-output A2DP ports
Tanu Kaskinen
tanuk at iki.fi
Thu Aug 23 09:53:03 PDT 2012
On Wed, 2012-08-22 at 10:08 +0200, Mikel Astiz wrote:
> From: Mikel Astiz <mikel.astiz at bmw-carit.de>
>
> We must fake input-output A2DP ports in order to handle the
> "hfgw"->"a2dp_source" transition in module-switch-on-port-available.
> ---
> src/modules/bluetooth/module-bluetooth-device.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c
> index 6d51cf7..270132f 100644
> --- a/src/modules/bluetooth/module-bluetooth-device.c
> +++ b/src/modules/bluetooth/module-bluetooth-device.c
> @@ -2194,7 +2194,7 @@ static void create_ports_for_profile(struct userdata *u, const pa_bluetooth_devi
> pa_assert_se(port = pa_device_port_new(u->core, "a2dp-output", _("Bluetooth High Quality (A2DP)"), 0));
> pa_assert_se(pa_hashmap_put(card_new_data->ports, port->name, port) >= 0);
> port->is_output = 1;
> - port->is_input = 0;
> + port->is_input = 1; /* Fake value to be friendly with module-switch-on-port-available */
> port->priority = profile->priority * 100;
> port->available = audio_state_to_availability(device->audio_sink_state);
> pa_hashmap_put(port->profiles, profile->name, profile);
> @@ -2203,7 +2203,7 @@ static void create_ports_for_profile(struct userdata *u, const pa_bluetooth_devi
> case PROFILE_A2DP_SOURCE:
> pa_assert_se(port = pa_device_port_new(u->core, "a2dp-input", _("Bluetooth High Quality (A2DP)"), 0));
> pa_assert_se(pa_hashmap_put(card_new_data->ports, port->name, port) >= 0);
> - port->is_output = 0;
> + port->is_output = 1; /* Fake value to be friendly with module-switch-on-port-available */
> port->is_input = 1;
> port->priority = profile->priority * 100;
> port->available = audio_state_to_availability(device->audio_source_state);
The plan (or at least my plan) is to not have any dual-direction ports.
I have sent patches for removing the possibility of dual-direction
ports, but I don't remember why those patches have not been applied.
Maybe just lack of reviews. Anyway, NACK from me for this patch.
--
Tanu
More information about the pulseaudio-discuss
mailing list