[pulseaudio-discuss] [PATCH 3/4] bluetooth: Use form factor to set port name and description
David Henningsson
david.henningsson at canonical.com
Wed Feb 20 23:49:00 PST 2013
On 02/19/2013 10:33 AM, Mikel Astiz wrote:
> + case PA_BT_FORM_FACTOR_MICROPHONE:
> + name_prefix = "microphone";
> + output_description = _("Microphone Output");
> + input_description = _("Microphone Input");
> + break;
This doesn't look quite right. "Microphone Output" will make our dear
translators wonder if you can suddenly put a microphone to your ear and
listen to music through it :-)
If you detect a microphone, there should be only one port created, in
the input direction, and the description should be just "Microphone"
(not "Microphone Input"). Feel free to make the name input-microphone,
bluetooth-input-microphone, or whatever makes the most sense, as long as
the description is kept to the bare essentials.
In the case of a dual-direction device such as a headset, there should
be two ports (one in each direction), both of them with the description
"Headset".
> + pa_assert_se(port = pa_device_port_new(u->core, u->output_port_name, output_description, 0));
> pa_assert_se(pa_hashmap_put(ports, port->name, port) >= 0);
> port->is_output = 1;
> port->is_input = 0;
> port->available = get_port_availability(u, PA_DIRECTION_OUTPUT);
>
> - pa_assert_se(port = pa_device_port_new(u->core, "bluetooth-input", _("Bluetooth Input"), 0));
> + pa_assert_se(port = pa_device_port_new(u->core, u->input_port_name, input_description, 0));
> pa_assert_se(pa_hashmap_put(ports, port->name, port) >= 0);
> port->is_output = 0;
> port->is_input = 1;
This looks like both ports are always created, which is wrong.
--
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic
More information about the pulseaudio-discuss
mailing list