From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: Clemens Ladisch <clemens@ladisch.de>, Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH 1/2] ALSA: firewire-lib: remove rx_blocks_for_midi quirk
Date: Thu, 27 Nov 2014 21:45:00 +0900 [thread overview]
Message-ID: <54771CCC.4090101@sakamocchi.jp> (raw)
In-Reply-To: <5475E5F6.2080709@ladisch.de>
On Nov 26 2014 23:38, Clemens Ladisch wrote:
> 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@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.
I was suspicious of unfairless for 8 MPX-MIDI data streams to transfer
MIDI messages in non-blocking mode, because .the MPX-MIDI data stream in
the first data block is different per packet.
But this is not matter. At 32.0/44.1/48.0, the number of data blocks in
a packet is lesser than 8 therefore all of MPX-MIDI data stream has the
same chances to transfer MIDI messages. At 88.2 kHz or higher, the
number of data blocks in a packet is bigger than 8 but8 MPX-MIDI data
streams has a chance per packet. As a result, All of MPX-MIDI data
stream has the same opportunity to transfer MIDI messages.
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Tested-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
I tested these two patch with below devices. All of them can transmit
MIDI messages correctly at any sampling transfer tates.
M-Audio: FIreWire 1814 (snd-bebob)
M-Audio: FireWire 410 (snd-bebob)
M-Audio: FireWire AudioPhile (snd-bebob)
M-Audio: Ozonic (snd-bebob)
Yamaha: GO44 (snd-bebob)
Yamaha: GO46 (snd-bebob)
Echo Audio: AudioFire4 (snd-fireworks)
Echo Audio: AudioFirePre8 (snd-fireworks)
TC Electronic: Impact Twin (snd-dice)
These two patches solves one of issues which I wrote in my report.
9.5 A lack of throttles for MIDI messages in outgoing stream
https://github.com/takaswie/alsa-firewire-report
Thanks
Takashi Sakamoto
o-takashi@sakamocchi.jp
next prev parent reply other threads:[~2014-11-27 12:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-25 21:52 [PATCH 1/2] ALSA: firewire-lib: remove rx_blocks_for_midi quirk Clemens Ladisch
2014-11-25 21:54 ` [PATCH 2/2] ALSA: firewire-lib: limit the MIDI data rate Clemens Ladisch
2014-11-26 8:43 ` [PATCH 1/2] ALSA: firewire-lib: remove rx_blocks_for_midi quirk Takashi Iwai
2014-11-26 9:17 ` Clemens Ladisch
2014-11-26 14:22 ` Takashi Sakamoto
2014-11-26 14:38 ` Clemens Ladisch
2014-11-27 12:45 ` Takashi Sakamoto [this message]
2014-12-07 13:31 ` Takashi Sakamoto
2015-01-16 21:18 ` Clemens Ladisch
2015-01-16 21:54 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54771CCC.4090101@sakamocchi.jp \
--to=o-takashi@sakamocchi.jp \
--cc=alsa-devel@alsa-project.org \
--cc=clemens@ladisch.de \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.