mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
seq: Add snd_seq_{get|set}_ump_is_midi1() API functions
Implement the API function calls corresponding to the new sequencer port flag bit that has been added recently to the kernel. A UMP MIDI 2.0 device allow to have an optional MIDI 1.0 port while speaking in MIDI 2.0 protocol for other UMP Groups. The new seq port flag indicates that. This is rather a minor difference, and since ALSA sequencer core covers the all conversions, usually you don't have to worry about it at all. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
d969439813
commit
ddc4c668ba
4 changed files with 35 additions and 0 deletions
|
|
@ -209,6 +209,8 @@ ALSA_1.2.13 {
|
|||
@SYMBOL_PREFIX@snd_seq_queue_tempo_get_tempo_base;
|
||||
@SYMBOL_PREFIX@snd_seq_queue_tempo_set_tempo_base;
|
||||
@SYMBOL_PREFIX@snd_seq_has_tempo_base;
|
||||
@SYMBOL_PREFIX@snd_seq_port_info_get_ump_is_midi1;
|
||||
@SYMBOL_PREFIX@snd_seq_port_info_set_ump_is_midi1;
|
||||
#endif
|
||||
#ifdef HAVE_RAWMIDI_SYMS
|
||||
@SYMBOL_PREFIX@snd_ump_endpoint_info_clear;
|
||||
|
|
|
|||
|
|
@ -2431,6 +2431,19 @@ int snd_seq_port_info_get_ump_group(const snd_seq_port_info_t *info)
|
|||
return info->ump_group;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Get the status of the optional MIDI 1.0 port in MIDI 2.0 UMP Endpoint
|
||||
* \param info port_info container
|
||||
* \return 1 if it's an optional MIDI 1.0 port in MIDI 2.0 UMP Endpoint
|
||||
*
|
||||
* \sa snd_seq_get_port_info(), snd_seq_port_info_set_ump_is_midi1()
|
||||
*/
|
||||
int snd_seq_port_info_get_ump_is_midi1(const snd_seq_port_info_t *info)
|
||||
{
|
||||
assert(info);
|
||||
return !!(info->flags & SNDRV_SEQ_PORT_FLG_IS_MIDI1);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Set the client id of a port_info container
|
||||
* \param info port_info container
|
||||
|
|
@ -2635,6 +2648,22 @@ void snd_seq_port_info_set_ump_group(snd_seq_port_info_t *info, int ump_group)
|
|||
info->ump_group = ump_group;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Set the optional MIDI 1.0 port in MIDI 2.0 UMP Endpoint
|
||||
* \param info port_info container
|
||||
* \param is_midi1 non-zero for MIDI 1.0 port in MIDI 2.0 EP
|
||||
*
|
||||
* \sa snd_seq_get_port_info(), snd_seq_port_info_get_ump_is_midi1()
|
||||
*/
|
||||
void snd_seq_port_info_set_ump_is_midi1(snd_seq_port_info_t *info, int is_midi1)
|
||||
{
|
||||
assert(info);
|
||||
if (is_midi1)
|
||||
info->flags |= SNDRV_SEQ_PORT_FLG_IS_MIDI1;
|
||||
else
|
||||
info->flags &= ~SNDRV_SEQ_PORT_FLG_IS_MIDI1;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief create a sequencer port on the current client
|
||||
* \param seq sequencer handle
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue