From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: Clemens Ladisch <clemens@ladisch.de>
Cc: alsa-devel@alsa-project.org, linux1394-devel@lists.sourceforge.net
Subject: Re: [PATCH 4/4] Add handling AMDTP receive stream
Date: Mon, 29 Apr 2013 13:30:28 +0900 [thread overview]
Message-ID: <517DF764.1020703@sakamocchi.jp> (raw)
In-Reply-To: <517D1BA3.9010503@ladisch.de>
Clemens,
Thanks for your review. Thanks for your review. I arrange these issues
to 6 items below.
amdtp[PATCH4/4]:
1. It would be easier to add some local variables for CIP headers.
OK. Actually be32_to_cpu() was used six times. I add "u32 cip_header[2]"
for them and reduce the time.
2. "CIP header error" should be handled approproately, ignored or abort.
OK. Here I want to select ignoring.
3. The comment about Fireworks' data block counter
I'm sorry but it includes wrong description in the patch. It was old one
working with inappropriate code. The wrong code reported me the wrong
result and I added the comment with it...
This comment is true:
"Echo Audio's Fireworks reports wrong number of data block counter. It
always reports it with increment by 8 blocks even if actual data blocks
different from 8."
4. The comment related to ignoring SYT field should be indicate that
ALSA has no spec equivalent to "presentation timestamp".
OK. I rewrite the comment to mean it.
5. "data_block_counter" is unused.
I forget to add some description to commit log that I plan to use it for
future patches to add handling MIDI. For my convinience, I want to keep
it here.
6. typo of "calcurate"
OK. I rewrite.
Regards
Takashi Sakamoto
o-takashi@sakamocchi.jp
(Apr 28 2013 21:52), Clemens Ladisch wrote:
> Takashi Sakamoto wrote:
>> To handle AMDTP receive stream, this patch adds some codes with condition of its
>> direction and new functions. Once amdtp_stream_init() is executed with its
>> direction, AMDTP receive and transmit stream can be handles by the same way.
>>
>> Unfortunatelly Echo Audio's Fireworks(TM) is not fully compliant to IEC 61883-6
>> against their guide. This patch include some work arounds for Fireworks.
>
>> +++ b/sound/firewire/amdtp.c
>
>> +static void handle_in_packet_data(struct amdtp_stream *s,
>> + unsigned int data_quadlets)
>
>> + /* checking CIP headers for AMDTP with restriction of this module */
>> + if (((be32_to_cpu(buffer[0]) & CIP_EOH_MASK) == CIP_EOH) ||
>> + ((be32_to_cpu(buffer[1]) & CIP_EOH_MASK) != CIP_EOH) ||
>> + ((be32_to_cpu(buffer[1]) & CIP_FMT_MASK) != CIP_FMT_AM)) {
>
> It would be easier and a little bit more efficient to convert the two
> header quadlets at the beginning and to store them in some local
> variables.
>
>> + dev_err(&s->unit->device, "CIP headers error: %08X:%08X\n",
>> + be32_to_cpu(buffer[0]), be32_to_cpu(buffer[1]));
>> + return;
>
> This error should either be ignored (resubmit the packet) or cause the
> stream to abort (see "queueing error" below).
>
> But I'm not sure which.
>
>> + * Echo Audio's Fireworks reports wrong number of data block
>> + * counter. Mostly it reports it with increment of 8 blocks
>> + * but sometimes it increments with NO-DATA packet.
>
> Does this imply that the DBC field could not be used to detect dropped
> packets?
>
>> + * Handling syt field is related to time stamp,
>> + * but the cost is bigger than the effect.
>
> Actually, the SYT specifies the presentation timestamp, but when doing
> capturing in ALSA, there is no "presentation" in the sense of the spec,
> so not handling the SYT field is the correct thing to do regardless of
> the cost. :-)
>
>> + * NOTE: this module doesn't check dbc ...
>
>> + data_block_counter = (be32_to_cpu(buffer[0]) & AMDTP_DBC_MASK);
>
> Unused.
>
>> + /* for next packet */
>> + s->data_block_quadlets = data_block_quadlets;
>> + s->data_block_counter = data_block_counter;
>
> Unused.
>
>> + /* calcurate packet index */
>
>> + /* calcurate period and buffer borders */
>
> calculate
>
>
> Regards,
> Clemens
>
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
next prev parent reply other threads:[~2013-04-29 4:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-28 5:02 [PATCH 0/4] snd-firewire-lib: add handling AMDTP receive stream Takashi Sakamoto
2013-04-28 5:02 ` [PATCH 1/4] Rename functions, structure and member name for AMDTP Takashi Sakamoto
2013-04-28 12:52 ` [alsa-devel] " Clemens Ladisch
2013-04-29 4:21 ` Takashi Sakamoto
2013-04-28 5:02 ` [PATCH 2/4] Add macros for fixed value related to AMDTP Takashi Sakamoto
2013-04-28 5:02 ` [PATCH 3/4] Add "direction" member to amdtp_stream structure for AMDTP Takashi Sakamoto
2013-04-28 5:02 ` [PATCH 4/4] Add handling AMDTP receive stream Takashi Sakamoto
2013-04-28 12:52 ` [alsa-devel] " Clemens Ladisch
2013-04-29 4:30 ` Takashi Sakamoto [this message]
2013-04-29 9:47 ` [PATCH v2 0/4] snd-firewire-lib: add " Takashi Sakamoto
2013-04-29 9:47 ` [PATCH 1/4] Rename functions, structure and member name for AMDTP Takashi Sakamoto
2013-04-29 9:47 ` [PATCH 2/4] Add macros for fixed value related to AMDTP Takashi Sakamoto
2013-04-29 9:47 ` [PATCH 3/4] Add "direction" member to amdtp_stream structure for AMDTP Takashi Sakamoto
2013-04-29 9:47 ` [PATCH 4/4] Add handling AMDTP receive stream 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=517DF764.1020703@sakamocchi.jp \
--to=o-takashi@sakamocchi.jp \
--cc=alsa-devel@alsa-project.org \
--cc=clemens@ladisch.de \
--cc=linux1394-devel@lists.sourceforge.net \
/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.