Permalink
Browse files

bebob: fix mappling for MIDI conformant data in stream channels

This is for devices which has usual firmware and some MIDI ports.

This is an output from M-Audio Ozonic.
$ ./firewire-request /dev/fw1 fcp 01ff02c000000000ff03ffff
0cff02c0 00000000ff 03 03 02 0101 0302 02 0201 0402 02 0501 0502

This output means that two MIDI ports use the same channels in stream.
But previous parser return ENOSYS for this device.
  • Loading branch information...
1 parent f7deeca commit 545ab7068f1d53b2b17d5615f768af1d53076d6b @takaswie committed Feb 15, 2014
Showing with 3 additions and 2 deletions.
  1. +3 −2 sound/firewire/bebob/bebob_stream.c
@@ -229,12 +229,13 @@ map_stream(struct snd_bebob *bebob, struct amdtp_stream *s)
switch (type) {
/* for MIDI conformant data channel */
case 0x0a:
- location = midi + sec_loc;
- if (location >= AMDTP_MAX_CHANNELS_FOR_MIDI) {
+ /* AMDTP_MAX_CHANNELS_FOR_MIDI is 1. */
+ if ((midi > 0) && (stm_pos != midi)) {
err = -ENOSYS;
goto end;
}
s->midi_position = stm_pos;
+ midi = stm_pos;
break;
/* for PCM data channel */
case 0x01: /* Headphone */

0 comments on commit 545ab70

Please sign in to comment.