diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-10-16 15:10:08 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-10-30 10:39:59 +0100 |
commit | 1a8506d4402b6e96c2ed778dc7ccbb48d1e02fce (patch) | |
tree | 23172e90d10c71f3b4bb20eec44b90f150c28f09 /sound/pci/hda/hda_intel.c | |
parent | 4ee3bffca4fad13a4cb672158dce0def41ab3a54 (diff) | |
download | lwn-1a8506d4402b6e96c2ed778dc7ccbb48d1e02fce.tar.gz lwn-1a8506d4402b6e96c2ed778dc7ccbb48d1e02fce.zip |
ALSA: hda - Add tracepoints to HD-audio controller driver
Add a couple of tracepoints to snd-hda-intel for tracing the position
and the trigger timings.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r-- | sound/pci/hda/hda_intel.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index d96a14e1fa95..d7481f0c194a 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -527,6 +527,9 @@ struct azx { struct list_head list; }; +#define CREATE_TRACE_POINTS +#include "hda_intel_trace.h" + /* driver types */ enum { AZX_DRIVER_ICH, @@ -2059,6 +2062,9 @@ static int azx_pcm_trigger(struct snd_pcm_substream *substream, int cmd) int rstart = 0, start, nsync = 0, sbits = 0; int nwait, timeout; + azx_dev = get_azx_dev(substream); + trace_azx_pcm_trigger(chip, azx_dev, cmd); + switch (cmd) { case SNDRV_PCM_TRIGGER_START: rstart = 1; @@ -2231,6 +2237,7 @@ static unsigned int azx_get_position(struct azx *chip, { unsigned int pos; int stream = azx_dev->substream->stream; + int delay = 0; switch (chip->position_fix[stream]) { case POS_FIX_LPIB: @@ -2264,7 +2271,6 @@ static unsigned int azx_get_position(struct azx *chip, chip->position_fix[stream] == POS_FIX_POSBUF && (chip->driver_caps & AZX_DCAPS_COUNT_LPIB_DELAY)) { unsigned int lpib_pos = azx_sd_readl(azx_dev, SD_LPIB); - int delay; if (stream == SNDRV_PCM_STREAM_PLAYBACK) delay = pos - lpib_pos; else @@ -2279,6 +2285,7 @@ static unsigned int azx_get_position(struct azx *chip, azx_dev->substream->runtime->delay = bytes_to_frames(azx_dev->substream->runtime, delay); } + trace_azx_get_position(chip, azx_dev, pos, delay); return pos; } |