[PATCH 3/4] bluetooth: Use form factor to set port name and description

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

 



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


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

  Powered by Linux