mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-02-16 22:05:18 -05:00
rawmidi: Add rawmidi framing API
Optionally, incoming rawmidi bytes can be put inside a frame of type snd_rawmidi_framing_tstamp_t. The main current benefit is that can enable in-kernel timestamping of incoming bytes, and that timestamp is likely to be more precise than what userspace can offer. Tstamp type framing requires a kernel >= 5.14 and a buffer size that is a multiple of sizeof(snd_rawmidi_framing_tstamp_t). It is only available on input streams. Signed-off-by: David Henningsson <coding@diwic.se> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
23a191a82c
commit
95eb312fad
5 changed files with 153 additions and 2 deletions
|
|
@ -42,12 +42,14 @@ struct _snd_rawmidi {
|
|||
snd_rawmidi_type_t type;
|
||||
snd_rawmidi_stream_t stream;
|
||||
int mode;
|
||||
int version;
|
||||
int poll_fd;
|
||||
const snd_rawmidi_ops_t *ops;
|
||||
void *private_data;
|
||||
size_t buffer_size;
|
||||
size_t avail_min;
|
||||
unsigned int no_active_sensing: 1;
|
||||
int params_mode;
|
||||
};
|
||||
|
||||
int snd_rawmidi_hw_open(snd_rawmidi_t **input, snd_rawmidi_t **output,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue