seq: Fix wrong FB direction at snd_seq_create_ump_block()

snd_seq_create_ump_block() receives a snd_ump_block_info_t data at the
creation of a FB and updates its associated sequencer port, but it
handled the port direction incorrectly.  The UMP / port direction
means the connectivity, but the current code translated other way
round.  The correct translation should be that input = receiver, i.e.
a writable port for applications, and output = source, a readable port
for applications.

This patch corrects the translation, and add more comments to the
direction definition.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai 2024-07-09 07:23:23 +02:00
parent 24c7f42733
commit 48101de6fa
2 changed files with 8 additions and 8 deletions

View file

@ -250,8 +250,8 @@ typedef struct _snd_seq_port_info snd_seq_port_info_t;
/** port direction */
#define SND_SEQ_PORT_DIR_UNKNOWN 0 /**< Unknown */
#define SND_SEQ_PORT_DIR_INPUT 1 /**< Input only */
#define SND_SEQ_PORT_DIR_OUTPUT 2 /**< Output only */
#define SND_SEQ_PORT_DIR_INPUT 1 /**< Input only; sink, receiver */
#define SND_SEQ_PORT_DIR_OUTPUT 2 /**< Output only; source, transmitter */
#define SND_SEQ_PORT_DIR_BIDIRECTION 3 /**< Input/output bidirectional */
/* port type */