From 29aa1a26b930824394ee175c05c672a2c8f89087 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Thu, 28 May 2026 12:16:04 +0200 Subject: [PATCH] rawmidi: clarify no_active_sensing doc: output-only, does not filter input Fixes: https://github.com/alsa-project/alsa-lib/issues/29 Co-Authored-By: Claude Sonnet 4.6 Signed-off-by: Jaroslav Kysela --- src/rawmidi/rawmidi.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/rawmidi/rawmidi.c b/src/rawmidi/rawmidi.c index 4728b08a..671287a1 100644 --- a/src/rawmidi/rawmidi.c +++ b/src/rawmidi/rawmidi.c @@ -811,11 +811,15 @@ size_t snd_rawmidi_params_get_avail_min(const snd_rawmidi_params_t *params) } /** - * \brief set no-active-sensing action on snd_rawmidi_close() + * \brief control whether an Active Sensing byte is sent on output close * \param rawmidi RawMidi handle * \param params pointer to snd_rawmidi_params_t structure - * \param val value: 0 = enable to send the active sensing message, 1 = disable + * \param val 0 = send Active Sensing (0xFE) when the output stream is closed, + * 1 = suppress it (default) * \return 0 on success otherwise a negative error code + * + * This setting applies to the \b output direction only. It does not filter + * or suppress incoming Active Sensing messages received on an input stream. */ #ifndef DOXYGEN int snd_rawmidi_params_set_no_active_sensing(snd_rawmidi_t *rawmidi ATTRIBUTE_UNUSED, snd_rawmidi_params_t *params, int val) @@ -831,7 +835,7 @@ int snd_rawmidi_params_set_no_active_sensing(snd_rawmidi_t *rawmidi, snd_rawmidi /** * \brief get no-active-sensing action status * \param params pointer to snd_rawmidi_params_t structure - * \return the current status (0 = enable, 1 = disable the active sensing message) + * \return 0 if an Active Sensing byte will be sent on output close, 1 if suppressed */ int snd_rawmidi_params_get_no_active_sensing(const snd_rawmidi_params_t *params) { -- 2.52.0