From: Clemens Ladisch <clemens@ladisch.de>
To: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Cc: tiwai@suse.de, alsa-devel@alsa-project.org,
linux1394-devel@lists.sourceforge.net, perex@perex.cz
Subject: Re: [alsa-devel] [PATCH 4/4] Add handling AMDTP receive stream
Date: Sun, 28 Apr 2013 14:52:51 +0200 [thread overview]
Message-ID: <517D1BA3.9010503@ladisch.de> (raw)
In-Reply-To: <1367125334-446-5-git-send-email-o-takashi@sakamocchi.jp>
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-28 12:52 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 ` Clemens Ladisch [this message]
2013-04-29 4:30 ` Takashi Sakamoto
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=517D1BA3.9010503@ladisch.de \
--to=clemens@ladisch.de \
--cc=alsa-devel@alsa-project.org \
--cc=linux1394-devel@lists.sourceforge.net \
--cc=o-takashi@sakamocchi.jp \
--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.