diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2014-04-25 22:45:10 +0900 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-05-26 14:28:14 +0200 |
commit | 53111cdc53205fd35aac392c1d33893766be514e (patch) | |
tree | 7d03049d4b5dfc0ec256e6be982192e6bb1610c8 /sound/firewire/amdtp.c | |
parent | a63d3ff1059a4d2236521e4fdbafabfc62b4f81a (diff) | |
download | op-kernel-dev-53111cdc53205fd35aac392c1d33893766be514e.zip op-kernel-dev-53111cdc53205fd35aac392c1d33893766be514e.tar.gz |
ALSA: fireworks/firewire-lib: Add a quirk of data blocks for MIDI in out-stream
Fireworks has a quirk to ignore MIDI messages in data blocks more than 8.
This commit adds a flag for this quirk and codes to skip 8 or more data
blocks to transfer MIDI messages.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/amdtp.c')
-rw-r--r-- | sound/firewire/amdtp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/firewire/amdtp.c b/sound/firewire/amdtp.c index 5e13b3f..28ee3d8 100644 --- a/sound/firewire/amdtp.c +++ b/sound/firewire/amdtp.c @@ -78,6 +78,8 @@ int amdtp_stream_init(struct amdtp_stream *s, struct fw_unit *unit, s->callbacked = false; s->sync_slave = NULL; + s->rx_blocks_for_midi = UINT_MAX; + return 0; } EXPORT_SYMBOL(amdtp_stream_init); @@ -472,7 +474,8 @@ static void amdtp_fill_midi(struct amdtp_stream *s, b = (u8 *)&buffer[s->midi_position]; port = (s->data_block_counter + f) % 8; - if ((s->midi[port] == NULL) || + if ((f >= s->rx_blocks_for_midi) || + (s->midi[port] == NULL) || (snd_rawmidi_transmit(s->midi[port], b + 1, 1) <= 0)) b[0] = 0x80; else |