All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Cc: alsa-devel@alsa-project.org, clemens@ladisch.de,
	ffado-devel@lists.sf.net
Subject: Re: [RFC][PATCH] ALSA: firewire-lib: support Linux tracing to dump a part of packet data
Date: Tue, 29 Mar 2016 15:54:08 +0200	[thread overview]
Message-ID: <s5hpoud2xvj.wl-tiwai@suse.de> (raw)
In-Reply-To: <1459081086-6145-1-git-send-email-o-takashi@sakamocchi.jp>

On Sun, 27 Mar 2016 14:18:06 +0200,
Takashi Sakamoto wrote:
> 
> When audio and music units have some quirks in their sequence of packet,
> it's really hard for non-owners to identify the quirks. To handle the
> quirks, developers need a dump for sequence of packets at least, however
> it's difficult to users who have no knowledge and equipment for this
> purpose.
> 
> This commit adds tracepoints for this situation. When users encounter
> the issue, they can dump a part of packet data via Linux tracing framework
> as long as using drivers in ALSA firewire stack.
> 
> This commit adds 'snd-firewire-lib' subsystem with 'in_packet' and
> 'out_packet' events. In the events, the content of CIP headers, the number
> of included quadlets and the index of packet managed by this module are
> recorded per packet.
> 
> This is a sample:
> 
> $ trace-cmd record -e snd_firewire_lib:out_packet -e snd_firewire_lib:in_packet
> /sys/kernel/tracing/events/snd_firewire_lib/out_packet/filter
> /sys/kernel/tracing/events/snd_firewire_lib/in_packet/filter
> Hit Ctrl^C to stop recording
> ^C
> $ trace-cmd report trace.dat
> ...
> <idle>-0  [002] 40398.221702: out_packet: 00070008 9001427a: 058: 31
> <idle>-0  [002] 40398.221703: in_packet:  01020010 9001ffff: 002: 15
> <idle>-0  [002] 40398.221703: out_packet: 00070010 9001ffff: 002: 32
> <idle>-0  [002] 40398.223679: in_packet:  010b0010 900157e4: 090: 16
> <idle>-0  [002] 40398.223681: out_packet: 00070010 900157e4: 058: 33
> <idle>-0  [002] 40398.223681: in_packet:  010b0018 9001714f: 090: 17
> ...
> 
> One line represent one packet. The legend for the last four fields is:
>  - The first quadlet of CIP header
>  - The second quadlet of CIP header
>  - The number of included quadlets
>  - The index of packet inner buffer maintained by this module
> 
> Currently, when detecting packet discontinuity, this module stops packet
> streaming. This is reasonable to packet streaming implementation. However,
> to identify the quirks, packet streaming should continue to dump enough
> sequence of packet. This commit adds a condition statement and a marker
> for this purpose.

The packet tracing is nice, and I don't see any reason against it.
But changing the driver behavior depending on the trace state is
unusual, rather a thing to be avoided in general.


thanks,

Takashi

  reply	other threads:[~2016-03-29 13:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-27 12:18 [RFC][PATCH] ALSA: firewire-lib: support Linux tracing to dump a part of packet data Takashi Sakamoto
2016-03-29 13:54 ` Takashi Iwai [this message]
2016-03-30  0:47   ` Takashi Sakamoto
2016-03-30  5:27     ` Takashi Iwai
2016-03-30 13:17       ` Takashi Sakamoto
2016-03-30 18:49 ` [FFADO-devel] " Daniel Wagner

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=s5hpoud2xvj.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    --cc=ffado-devel@lists.sf.net \
    --cc=o-takashi@sakamocchi.jp \
    /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.