OSDN Git Service

ALSA: ump: Redirect rawmidi substream access via own helpers
authorTakashi Iwai <tiwai@suse.de>
Tue, 23 May 2023 07:53:34 +0000 (09:53 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 23 May 2023 10:11:08 +0000 (12:11 +0200)
commit6b41e64a5d17ec01380bc7ad10afd90e63beca19
treea70d8c8b71c8a12a8e5d765a2428bfdae1f425f0
parentd9c99876868c861afd0e9ce2cea407bbc446b3c9
ALSA: ump: Redirect rawmidi substream access via own helpers

This is a code refactoring for abstracting the rawmidi access to the
UMP's own helpers.  It's a preliminary work for the later code
refactoring of the UMP layer.

Until now, we access to the rawmidi substream directly from the
driver via rawmidi access helpers, but after this change, the driver
is supposed to access via the newly introduced snd_ump_ops and
receive/transmit via snd_ump_receive() and snd_ump_transmit() helpers.
As of this commit, those are merely wrappers for the rawmidi
substream, and no much function change is seen here.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20230523075358.9672-14-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/ump.h
sound/core/ump.c
sound/usb/midi2.c