device-port: Make it impossible to have dual-direction ports

This commit is contained in:
Tanu Kaskinen 2012-06-29 18:04:59 +03:00 committed by Arun Raghavan
parent 5ceb184e3e
commit 0bbef56976
7 changed files with 101 additions and 63 deletions

View file

@ -688,7 +688,7 @@ static void ucm_add_port_combination(
port = pa_hashmap_get(ports, name);
if (!port) {
port = pa_device_port_new(core, pa_strna(name), desc, 0);
port = pa_device_port_new(core, pa_strna(name), desc, is_sink ? PA_DIRECTION_OUTPUT : PA_DIRECTION_INPUT, 0);
pa_assert(port);
pa_hashmap_put(ports, port->name, port);
@ -697,10 +697,6 @@ static void ucm_add_port_combination(
}
port->priority = priority;
if (is_sink)
port->is_output = TRUE;
else
port->is_input = TRUE;
pa_xfree(name);
pa_xfree(desc);