mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
device-port: Make it impossible to have dual-direction ports
This commit is contained in:
parent
5ceb184e3e
commit
0bbef56976
7 changed files with 101 additions and 63 deletions
|
|
@ -2140,16 +2140,12 @@ static void create_card_ports(struct userdata *u, pa_hashmap *ports) {
|
|||
u->output_port_name = pa_sprintf_malloc("%s-output", name_prefix);
|
||||
u->input_port_name = pa_sprintf_malloc("%s-input", name_prefix);
|
||||
|
||||
pa_assert_se(port = pa_device_port_new(u->core, u->output_port_name, output_description, 0));
|
||||
pa_assert_se(port = pa_device_port_new(u->core, u->output_port_name, output_description, PA_DIRECTION_OUTPUT, 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, u->input_port_name, input_description, 0));
|
||||
pa_assert_se(port = pa_device_port_new(u->core, u->input_port_name, input_description, PA_DIRECTION_OUTPUT, 0));
|
||||
pa_assert_se(pa_hashmap_put(ports, port->name, port) >= 0);
|
||||
port->is_output = 0;
|
||||
port->is_input = 1;
|
||||
port->available = get_port_availability(u, PA_DIRECTION_INPUT);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue