All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: Clemens Ladisch <clemens@ladisch.de>, tiwai@suse.de, perex@perex.cz
Cc: alsa-devel@alsa-project.org,
	linux1394-devel@lists.sourceforge.net,
	ffado-devel@lists.sourceforge.net
Subject: Re: [PATCH 06/17] firewire-lib: Add support for MIDI capture/playback
Date: Tue, 26 Nov 2013 21:04:08 +0900	[thread overview]
Message-ID: <52948E38.4090601@sakamocchi.jp> (raw)
In-Reply-To: <52936C6F.1030200@ladisch.de>

(Nov 26 2013 00:27), Clemens Ladisch wrote:
>> +++ b/sound/firewire/amdtp.h
>> +/*
>> + * This module supports maximum 2 MIDI channels.
>> + * Then AMDTP packets include maximum 16 MIDI streams multiplexed.
>> + * This is for our convinience.
>> + */
>> +#define AMDTP_MAX_CHANNELS_FOR_MIDI	2
>
> This does not look like 16 ports ...
>
>> -	unsigned int midi_ports;
>> +	unsigned int midi_channels;
>
> ... and "MIDI channels" means something different.  The RP-027 document
> defines things like "MIDI data stream", "MIDI Conformant Data Channel",
> and "MPX-MIDI Data Channel"; please clarify which one you mean.

In my understanding of RP-027:
'MIDI data stream' is a data stream to/from each MIDI ports
'MPX-MIDI data channel' is a data channel for each 'MIDI data stream'
'MIDI comformant data channel' has multiplexed 8 'MPX-MIDI data channel's

So I should write:

/*
  * This module supports maximum 2 MIDI comformant data channels.
  * Each MIDI comformant data channels include 8 MPX-MIDI data stream.
  * Each MPX-MIDI data streams includes data stream from/to MIDI ports.
  * Then AMDTP packets include maximum 16 MIDI streams.
  * This limitation is for our convinience.
  */

Is this OK?

>> IEC 61883-6 refers to AMEI/MMA RP-027 for implementation of MIDI conformant
>> data. This module implement 'MIDI1.0-1x-SPEED' mode. In the specification,
>> 'MIDI1.0-2x/3x-SPEED' mode is defined with 'negotiation procedure' and
>> 'encapsulation details'. But I cannot find specifications about them.
>
> The 2x/3x speed modes are not specified.

OK. I'll add it in comment.

>>   static void amdtp_fill_midi(struct amdtp_stream *s,
>>   			    __be32 *buffer, unsigned int frames)
>
>> +			if ((s->midi[port] != NULL) &&
>> +			    test_bit(port, &s->midi_triggered)) {
>
> The stream pointer (s->midi[]) is not needed when the stream is not
> active (triggered).  So you could drop the midi_triggered field and
> just update the stream pointer when triggering (like s->pcm).

Oh. That's better.

>> +			buffer[s->pcm_channels + c] =
>> +				be32_to_cpu((b[0] << 24) | (b[1] << 16));
>
> Endian conversions are required only for values that occupy more than
> one byte.  You should make 'buffer' a byte pointer so that you can copy
> b[] directly.

OK.


Thank you

Takashi Sakamoto

  reply	other threads:[~2013-11-26 12:04 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-23  6:07 [RFC][PATCH 00/17] Enhancement for firewire-lib Takashi Sakamoto
2013-11-23  6:07 ` [PATCH 01/17] firewire-lib: Rename functions, structure, member for both direction Takashi Sakamoto
2013-11-23  6:07 ` [PATCH 02/17] firewire-lib: Add macros instead of fixed value for AMDTP Takashi Sakamoto
2013-11-25 15:27   ` Clemens Ladisch
2013-11-26  9:50     ` Takashi Sakamoto
2013-11-23  6:07 ` [PATCH 03/17] firewire-lib: Add 'direction' member to 'amdtp_stream' structure Takashi Sakamoto
2013-11-25 15:27   ` [alsa-devel] " Clemens Ladisch
2013-11-26 10:01     ` Takashi Sakamoto
2013-11-23  6:07 ` [PATCH 04/17] firewire-lib: Split some codes into functions to reuse in future Takashi Sakamoto
2013-11-25 15:27   ` [alsa-devel] " Clemens Ladisch
2013-11-26 10:52     ` Takashi Sakamoto
2013-11-23  6:07 ` [PATCH 05/17] firewire-lib: Add support for AMDTP transmit stream and PCM capture Takashi Sakamoto
2013-11-25 15:27   ` [alsa-devel] " Clemens Ladisch
2013-11-26 10:50     ` Takashi Sakamoto
2013-11-26 11:17       ` Takashi Sakamoto
2013-12-18 11:57     ` Takashi Sakamoto
2013-11-23  6:07 ` [PATCH 06/17] firewire-lib: Add support for MIDI capture/playback Takashi Sakamoto
2013-11-25 15:27   ` [alsa-devel] " Clemens Ladisch
2013-11-26 12:04     ` Takashi Sakamoto [this message]
2013-11-26 13:02       ` Clemens Ladisch
2013-11-26 17:10         ` Takashi Sakamoto
2013-11-26 17:50           ` Clemens Ladisch
2013-11-27  8:33           ` Alan Horstmann
2013-11-27 16:12             ` Takashi Sakamoto
2013-11-23  6:07 ` [PATCH 07/17] firewire-lib: give syt value to handle_out_packet() Takashi Sakamoto
2013-11-25 15:27   ` [alsa-devel] " Clemens Ladisch
2013-11-26 10:59     ` Takashi Sakamoto
2013-12-18 12:29     ` Takashi Sakamoto
2013-12-18 17:26       ` Clemens Ladisch
2013-11-23  6:07 ` [PATCH 08/17] firewire-lib: Add support for duplex streams with synchronization Takashi Sakamoto
2013-11-23  6:07 ` [PATCH 09/17] firewire-lib: Add sort function for transmitted packet Takashi Sakamoto
2013-11-23  6:07 ` [PATCH 10/17] firewire-lib: Add transfer delay to synchronized duplex streams Takashi Sakamoto
2013-11-23  6:07 ` [PATCH 11/17] firewire-lib: Add support for channel mapping Takashi Sakamoto
2013-11-23  6:07 ` [PATCH 12/17] firewire-lib: Rename macros, variables and functions for CMP Takashi Sakamoto
2013-11-23  6:08 ` [PATCH 13/17] firewire-lib: Add 'direction' member to 'cmp_connection' structure Takashi Sakamoto
2013-11-23  6:08 ` [PATCH 14/17] firewire-lib: Add handling output connection by CMP Takashi Sakamoto
2013-11-23  6:08 ` [PATCH 15/17] firewire-lib: Add a new function to check others' connection Takashi Sakamoto
2013-11-23  6:08 ` [PATCH 16/17] firewire-lib: Add some AV/C general commands Takashi Sakamoto
2013-11-23  6:08 ` [PATCH 17/17] firewire-lib: Add quirks for Fireworks chipset Takashi Sakamoto
2013-11-25  3:13   ` Takashi Sakamoto

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=52948E38.4090601@sakamocchi.jp \
    --to=o-takashi@sakamocchi.jp \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    --cc=ffado-devel@lists.sourceforge.net \
    --cc=linux1394-devel@lists.sourceforge.net \
    --cc=perex@perex.cz \
    --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.