[alsa-devel] [PATCH 24/44] fireworks: Add MIDI interface

Clemens Ladisch clemens at ladisch.de
Thu Apr 3 23:20:03 CEST 2014

Takashi Sakamoto wrote:
> This commit adds a functionality to capture/playback MIDI messages.
> When no AMDTP streams are running, this driver starts AMDTP stream for MIDI
> stream at current sampling rate.
> +++ b/sound/firewire/fireworks/fireworks_midi.c
> +static int midi_capture_open(struct snd_rawmidi_substream *substream)
> +{
> +	struct snd_efw *efw = substream->rmidi->private_data;
> +
> +	efw->capture_substreams++;

The MIDI .open callback is not synchronized with the PCM callbacks;
this might race and must be protected with a mutex.


More information about the Alsa-devel mailing list