[alsa-devel] [PATCH 1/2] ALSA: firewire-lib: remove rx_blocks_for_midi quirk

Clemens Ladisch clemens at ladisch.de
Wed Nov 26 15:38:46 CET 2014


Takashi Sakamoto wrote:
> On Nov 26 2014 06:52, Clemens Ladisch wrote:
>> There are several devices that expect to receive MIDI data only in the
>> first eight data blocks of a packet.  If the driver restricts the data
>> rate to the allowed rate (as mandated by the specification, but not yet
>> implemented by this driver), this happens naturally.  Therefore, there
>> is no reason to ever try to use more data packets with any device.
>>
>> Signed-off-by: Clemens Ladisch <clemens at ladisch.de>
>> ---
>>  sound/firewire/amdtp.c                      |   10 +++++++---
>>  sound/firewire/amdtp.h                      |    3 ---
>>  sound/firewire/bebob/bebob_stream.c         |    7 -------
>>  sound/firewire/fireworks/fireworks_stream.c |    5 -----
>>  4 files changed, 7 insertions(+), 18 deletions(-)
>
> Can I ask your opinion about applying this patch to devices with
> non-blocking mode? At least, your comment of this patch is for blocking
> mode (the fixed number of data blocks in a packet).

This patch does not assume that there is a fixed number of data blocks.

It does not matter whether a stream is (non-)blocking: eight data blocks
per packet (i.e., one MIDI byte per MPX-MIDI data channel per packet) is
always enough for MIDI.  Even at 32 kHz, there are about 4000 packets
per seconds in blocking mode.  In non-blocking mode, the packets are
smaller (so not ecery MPX-MIDI data channels gets sent in every packet),
but there are exactly 8000 packets per second, so the overall number of
samples (= data blocks) does not change.


Regards,
Clemens


More information about the Alsa-devel mailing list