All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: Takashi Sakamoto <o-takashi@sakamocchi.jp>,
	tiwai@suse.de, perex@perex.cz
Cc: alsa-devel@alsa-project.org,
	linux1394-devel@lists.sourceforge.net,
	ffado-devel@lists.sourceforge.net
Subject: Re: [alsa-devel] [PATCH 04/17] firewire-lib: Split some codes into functions to reuse in future
Date: Mon, 25 Nov 2013 16:27:18 +0100	[thread overview]
Message-ID: <52936C56.5010502@ladisch.de> (raw)
In-Reply-To: <1385186884-8259-5-git-send-email-o-takashi@sakamocchi.jp>

Takashi Sakamoto wrote:
> Some codes can be reused in handling transmitted stream. This commit adds new
> functions. This commit also renames some functions to keep naming consistency.

> +++ b/sound/firewire/amdtp.c

> +#define TRANSMIT_PACKET_HEADER_SIZE	4
> ...
> +static inline int queue_out_packet(struct amdtp_stream *s,
> +				   unsigned int payload_length, bool skip)
> +{
> +	return queue_packet(s, RECEIVE_PACKET_HEADER_SIZE,
> +			    payload_length, skip);

And this is what I complained about for patch 3.

> +static void check_pcm_pointer(struct amdtp_stream *s,

Thw word "check" does not imply that the pointers get changed.  Please
use something like "update_pcm_pointers".

> +static int queue_packet(struct amdtp_stream *s,
> +{
> +	p.skip = (!skip) ? 0: 1;

	p.skip = skip;

> @@ -612,8 +618,8 @@ int amdtp_stream_start(struct amdtp_stream *s, int channel, int speed)
>  	s->context = fw_iso_context_create(fw_parent_device(s->unit)->card,
>  					   FW_ISO_CONTEXT_TRANSMIT,
>  					   channel, speed, 0,
> -					   out_packet_callback, s);
> +					   out_stream_callback, s);
> -	if (IS_ERR(s->context)) {
> +	if (!amdtp_stream_running(s)) {

The stream is not yet running at this point, so using this function here
would be confusing.


Regards,
Clemens

------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk

  reply	other threads:[~2013-11-25 15:27 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   ` Clemens Ladisch [this message]
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
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=52936C56.5010502@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=ffado-devel@lists.sourceforge.net \
    --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.