diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2014-12-09 00:10:48 +0900 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-12-10 10:49:33 +0100 |
commit | 05588d340a128ff5c7b768c517150e31842a78aa (patch) | |
tree | 60a509a34e46e8ff91fae1e2da6f821adfa0d8e6 /sound/firewire/oxfw/oxfw.h | |
parent | 216e256f7bf974ba402309d0ceb24f3500dc65c4 (diff) |
ALSA: oxfw: Add support for capture/playback MIDI messages
This commit adds MIDI functionality with an assumption of 'if the device
has MIDI comformant data channels in its stream formation, the device has
one MIDI port'.
When no streams have already started, MIDI functionality starts stream
with current sampling rate.
When MIDI functionality has already starts some streams and PCM
functionality is going to start streams at different sampling rate,
this driver stops streams once and changes sampling rate, then restarts
streams for both PCM/MIDI substreams.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/oxfw/oxfw.h')
-rw-r--r-- | sound/firewire/oxfw/oxfw.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/firewire/oxfw/oxfw.h b/sound/firewire/oxfw/oxfw.h index 2211d11a79e1..83a54fc73a11 100644 --- a/sound/firewire/oxfw/oxfw.h +++ b/sound/firewire/oxfw/oxfw.h @@ -19,6 +19,7 @@ #include <sound/pcm.h> #include <sound/pcm_params.h> #include <sound/info.h> +#include <sound/rawmidi.h> #include "../lib.h" #include "../fcp.h" @@ -43,6 +44,7 @@ struct snd_oxfw { struct fw_unit *unit; const struct device_info *device_info; struct mutex mutex; + spinlock_t lock; bool has_output; u8 *tx_stream_formats[SND_OXFW_STREAM_FORMAT_ENTRIES]; @@ -55,6 +57,9 @@ struct snd_oxfw { unsigned int capture_substreams; unsigned int playback_substreams; + unsigned int midi_input_ports; + unsigned int midi_output_ports; + bool mute; s16 volume[6]; s16 volume_min; @@ -124,3 +129,5 @@ int snd_oxfw_create_pcm(struct snd_oxfw *oxfw); int snd_oxfw_create_mixer(struct snd_oxfw *oxfw); void snd_oxfw_proc_init(struct snd_oxfw *oxfw); + +int snd_oxfw_create_midi(struct snd_oxfw *oxfw); |