ALSA: oxfw: support more MIDI ports
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Sun, 18 Oct 2015 08:09:39 +0000 (17:09 +0900)
committerTakashi Iwai <tiwai@suse.de>
Mon, 19 Oct 2015 10:01:07 +0000 (12:01 +0200)
In IEC 61883-6, sequence multiplexing is applied to MIDI conformant data
channel. As a result, eight MIDI data streams are included in the channel.
Although ALSA AM824 data block processing layer implements this
multiplexing, current OXFW driver doesn't utilize it due to wrong
calculation of MIDI ports.

This commit fixes this bug to add proper calculation. Although this commit
allows to use 8 MIDI data streams, the number of available MIDI ports is
limited by the number of ALSA MIDI ports added by the driver.

Fixes: df075feefbd3('ALSA: firewire-lib: complete AM824 data block processing layer')
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/firewire/oxfw/oxfw-stream.c

index 48798084de16a83bf146b9450e6024022e18f23d..7cb5743c073bbed3f88d2452b6b6a7047f7619f3 100644 (file)
@@ -148,7 +148,7 @@ static int start_stream(struct snd_oxfw *oxfw, struct amdtp_stream *stream,
        }
 
        pcm_channels = formation.pcm;
-       midi_ports = DIV_ROUND_UP(formation.midi, 8);
+       midi_ports = formation.midi * 8;
 
        /* The stream should have one pcm channels at least */
        if (pcm_channels == 0) {
This page took 0.02507 seconds and 5 git commands to generate.