public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: libin.yang@intel.com
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH 1/3] ALSA: hda - add hdac stream trace
Date: Mon, 18 May 2015 10:11:44 +0200	[thread overview]
Message-ID: <s5hlhgm2tkv.wl-tiwai@suse.de> (raw)
In-Reply-To: <1431395002-111613-1-git-send-email-libin.yang@intel.com>

At Tue, 12 May 2015 09:43:20 +0800,
libin.yang@intel.com wrote:
> 
> From: Libin Yang <libin.yang@intel.com>
> 
> Add the trace of snd_hdac_stream_start and snd_hdac_stream_stop.
> 
> Signed-off-by: Libin Yang <libin.yang@intel.com>

Applied all three patches.  Thanks.


Takashi

> ---
>  sound/hda/hdac_stream.c |  5 +++++
>  sound/hda/trace.h       | 27 +++++++++++++++++++++++++++
>  2 files changed, 32 insertions(+)
> 
> diff --git a/sound/hda/hdac_stream.c b/sound/hda/hdac_stream.c
> index 1ba0462..52a894f 100644
> --- a/sound/hda/hdac_stream.c
> +++ b/sound/hda/hdac_stream.c
> @@ -10,6 +10,7 @@
>  #include <sound/pcm.h>
>  #include <sound/hdaudio.h>
>  #include <sound/hda_register.h>
> +#include "trace.h"
>  
>  /**
>   * snd_hdac_stream_init - initialize each stream (aka device)
> @@ -48,6 +49,8 @@ void snd_hdac_stream_start(struct hdac_stream *azx_dev, bool fresh_start)
>  {
>  	struct hdac_bus *bus = azx_dev->bus;
>  
> +	trace_snd_hdac_stream_start(bus, azx_dev);
> +
>  	azx_dev->start_wallclk = snd_hdac_chip_readl(bus, WALLCLK);
>  	if (!fresh_start)
>  		azx_dev->start_wallclk -= azx_dev->period_wallclk;
> @@ -82,6 +85,8 @@ EXPORT_SYMBOL_GPL(snd_hdac_stream_clear);
>   */
>  void snd_hdac_stream_stop(struct hdac_stream *azx_dev)
>  {
> +	trace_snd_hdac_stream_stop(azx_dev->bus, azx_dev);
> +
>  	snd_hdac_stream_clear(azx_dev);
>  	/* disable SIE */
>  	snd_hdac_chip_updatel(azx_dev->bus, INTCTL, 1 << azx_dev->index, 0);
> diff --git a/sound/hda/trace.h b/sound/hda/trace.h
> index 33a7eb5..e27e2c0 100644
> --- a/sound/hda/trace.h
> +++ b/sound/hda/trace.h
> @@ -50,6 +50,33 @@ TRACE_EVENT(hda_unsol_event,
>  	),
>  	TP_printk("%s", __get_str(msg))
>  );
> +
> +DECLARE_EVENT_CLASS(hdac_stream,
> +	TP_PROTO(struct hdac_bus *bus, struct hdac_stream *azx_dev),
> +
> +	TP_ARGS(bus, azx_dev),
> +
> +	TP_STRUCT__entry(
> +		__field(unsigned char, stream_tag)
> +	),
> +
> +	TP_fast_assign(
> +		__entry->stream_tag = (azx_dev)->stream_tag;
> +	),
> +
> +	TP_printk("stream_tag: %d", __entry->stream_tag)
> +);
> +
> +DEFINE_EVENT(hdac_stream, snd_hdac_stream_start,
> +	TP_PROTO(struct hdac_bus *bus, struct hdac_stream *azx_dev),
> +	TP_ARGS(bus, azx_dev)
> +);
> +
> +DEFINE_EVENT(hdac_stream, snd_hdac_stream_stop,
> +	TP_PROTO(struct hdac_bus *bus, struct hdac_stream *azx_dev),
> +	TP_ARGS(bus, azx_dev)
> +);
> +
>  #endif /* __HDAC_TRACE_H */
>  
>  /* This part must be outside protection */
> -- 
> 1.9.1
> 

      parent reply	other threads:[~2015-05-18  8:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-12  1:43 [PATCH 1/3] ALSA: hda - add hdac stream trace libin.yang
2015-05-12  1:43 ` [PATCH 2/3] ALSA: hda - rename hda_intel_trace.h to hda_controller_trace.h libin.yang
2015-05-12  1:43 ` [PATCH 3/3] ALSA: hda - add hda_intel_trace.h libin.yang
2015-05-18  8:11 ` Takashi Iwai [this message]

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=s5hlhgm2tkv.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=libin.yang@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox