Files
cubelinux-kernel/sound/usb/midi2.h
T
Greg Kroah-Hartman 598cf27219 Linux 6.19.3
Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org
Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com>
Tested-by: Peter Schneider <pschneider1968@googlemail.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Salvatore Bonaccorso <carnil@debian.org>
Tested-by: Brett A C Sheffield <bacs@librecast.net>
Tested-by: Mark Brown <broonie@kernel.org>
Tested-by: Luna Jernberg <droidbittin@gmail.com>
Tested-by: Ronald Warsow <rwarsow@gmx.de>
Tested-by: Justin M. Forbes <jforbes@fedoraproject.org>
Tested-by: Ron Economos <re@w6rz.net>
Tested-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-19 16:33:27 +01:00

34 lines
1.3 KiB
C

// SPDX-License-Identifier: GPL-2.0-or-later
#ifndef __USB_AUDIO_MIDI2_H
#define __USB_AUDIO_MIDI2_H
#include "midi.h"
#if IS_ENABLED(CONFIG_SND_USB_AUDIO_MIDI_V2)
int snd_usb_midi_v2_create(struct snd_usb_audio *chip,
struct usb_interface *iface,
const struct snd_usb_audio_quirk *quirk,
unsigned int usb_id);
void snd_usb_midi_v2_suspend_all(struct snd_usb_audio *chip);
void snd_usb_midi_v2_resume_all(struct snd_usb_audio *chip);
void snd_usb_midi_v2_disconnect_all(struct snd_usb_audio *chip);
void snd_usb_midi_v2_free_all(struct snd_usb_audio *chip);
#else /* CONFIG_SND_USB_AUDIO_MIDI_V2 */
/* fallback to MIDI 1.0 creation */
static inline int snd_usb_midi_v2_create(struct snd_usb_audio *chip,
struct usb_interface *iface,
const struct snd_usb_audio_quirk *quirk,
unsigned int usb_id)
{
return __snd_usbmidi_create(chip->card, iface, &chip->midi_list,
quirk, usb_id, &chip->num_rawmidis);
}
static inline void snd_usb_midi_v2_suspend_all(struct snd_usb_audio *chip) {}
static inline void snd_usb_midi_v2_resume_all(struct snd_usb_audio *chip) {}
static inline void snd_usb_midi_v2_disconnect_all(struct snd_usb_audio *chip) {}
static inline void snd_usb_midi_v2_free_all(struct snd_usb_audio *chip) {}
#endif /* CONFIG_SND_USB_AUDIO_MIDI_V2 */
#endif /* __USB_AUDIO_MIDI2_H */