public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Ricard Wanderlof <ricard2013@butoba.net>
Cc: Clemens Ladisch <clemens@ladisch.de>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: usb-audio: Fix CME quirk for UF series keyboards
Date: Fri, 14 Mar 2025 11:19:06 +0100	[thread overview]
Message-ID: <87wmcr9ap1.wl-tiwai@suse.de> (raw)
In-Reply-To: <20250313-cme-fix-v1-1-d404889e4de8@butoba.net>

On Thu, 13 Mar 2025 23:16:17 +0100,
Ricard Wanderlof wrote:
> 
> Fix quirk for CME master keyboards so it not only handles
> sysex but also song position pointer, MIDI timing clock, start
> and stop messages, and active sensing. All of these can be
> output by the CME UF series master keyboards.
> 
> Tested with a CME UF6 in a desktop Linux environment as
> well as on the Zynthian Raspberry Pi based platform.
> 
> Signed-off-by: Ricard Wanderlof <ricard2013@butoba.net>
> ---
> The CME UF6 not only sends sysex messages using CIN 0xf which
> in the standard is only intended for single-byte unparsed
> messages, but also song position pointer, as well as ordinary
> MIDI timing clock, start, stop and active sensing.
> 
> The old quirk sent all four bytes of the USB MIDI message through
> when CIN 0xf was received, which caused trailing bytes in the case
> of single byte data, which would be interpreted as zero-valued
> repeats of the previosly received channel message due to the
> running status feature of MIDI. (In practice, this causes
> continuous controllers to be reset to 0 as soon as a new value is
> set. For note messages, it basically results in a note off for
> note number 0, which is an annoyance although harmless in 
> practice.)
> 
> Furthermore, the UF6 can send multiple messages in the same
> packet. Because of this, and the 0xf quirk, we need to parse each
> such message individually to get the length right, before sending
> it on.
> 
> Finally, the UF6 sends messages with length 0 when it has nothing
> else to send; don't forward these useless messages.
> 
> According to the original comment in the code, the old
> functionality was intended to handle sysex messages only, and this
> commit will still handle that case properly, so should be
> compatible with all devices utilizing this quirk. I have only
> tested this with a CME UF6 as don't have access to any other
> CME devices (which are pretty old and rare these days).

Thanks, applied now.


Takashi

      reply	other threads:[~2025-03-14 10:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-13 22:16 [PATCH] ALSA: usb-audio: Fix CME quirk for UF series keyboards Ricard Wanderlof
2025-03-14 10:19 ` Takashi Iwai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wmcr9ap1.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=clemens@ladisch.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=ricard2013@butoba.net \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox