aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/pcm_param_trace.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-07-06 13:56:51 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-07-06 13:56:51 -0400
commit920f2ecdf6c3b3526f60fbd38c68597953cad3ee (patch)
tree18188922ba38a5c53ee8d17032eb5c46dffc7fa2 /sound/core/pcm_param_trace.h
parent9ced560b82606b35adb33a27012a148d418a4c1f (diff)
parentfc18282cdcba984ab89c74d7e844c10114ae0795 (diff)
Merge tag 'sound-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates from Takashi Iwai: "This development cycle resulted in a fair amount of changes in both core and driver sides. The most significant change in ALSA core is about PCM. Also the support of of-graph card and the new DAPM widget for DSP are noteworthy changes in ASoC core. And there're lots of small changes splat over the tree, as you can see in diffstat. Below are a few highlights: ALSA core: - Removal of set_fs() hackery from PCM core stuff, and the code reorganization / optimization thereafter - Improved support of PCM ack ops, and a new ABI for improved control/status mmap handling - Lots of constifications in various codes ASoC core: - The support of of-graph card, which may work as a better generic device for a replacement of simple-card - New widget types intended mainly for use with DSPs ASoC drivers: - New drivers for Allwinner V3s SoCs - Ensonic ES8316 codec support - More Intel SKL and KBL works - More device support for Intel SST Atom (mostly for cheap tablets and 2-in-1 devices) - Support for Rockchip PDM controllers - Support for STM32 I2S and S/PDIF controllers - Support for ZTE AUD96P22 codecs HD-audio: - Support of new Realtek codecs (ALC215/ALC285/ALC289), more quirks for HP and Dell machines - A few more fixes for i915 component binding" * tag 'sound-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (418 commits) ALSA: hda - Fix unbalance of i915 module refcount ASoC: Intel: Skylake: Remove driver debugfs exit ASoC: Intel: Skylake: explicitly add the headers sst-dsp.h ALSA: hda/realtek - Remove GPIO_MASK ALSA: hda/realtek - Fix typo of pincfg for Dell quirk ALSA: pcm: add a documentation for tracepoints ALSA: atmel: ac97c: fix error return code in atmel_ac97c_probe() ALSA: x86: fix error return code in hdmi_lpe_audio_probe() ASoC: Intel: Skylake: Add support to read firmware registers ASoC: Intel: Skylake: Add sram address to sst_addr structure ASoC: Intel: Skylake: Debugfs facility to dump module config ASoC: Intel: Skylake: Add debugfs support ASoC: fix semicolon.cocci warnings ASoC: rt5645: Add quirk override by module option ASoC: rsnd: make arrays path and cmd_case static const ASoC: audio-graph-card: add widgets and routing for external amplifier support ASoC: audio-graph-card: update bindings for amplifier support ASoC: rt5665: calibration should be done before jack detection ASoC: rsnd: constify dev_pm_ops structures. ASoC: nau8825: change crosstalk-bypass property to bool type ...
Diffstat (limited to 'sound/core/pcm_param_trace.h')
-rw-r--r--sound/core/pcm_param_trace.h142
1 files changed, 142 insertions, 0 deletions
diff --git a/sound/core/pcm_param_trace.h b/sound/core/pcm_param_trace.h
new file mode 100644
index 000000000000..86c8d658a25c
--- /dev/null
+++ b/sound/core/pcm_param_trace.h
@@ -0,0 +1,142 @@
1#undef TRACE_SYSTEM
2#define TRACE_SYSTEM snd_pcm
3
4#if !defined(_PCM_PARAMS_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
5#define _PCM_PARAMS_TRACE_H
6
7#include <linux/tracepoint.h>
8
9#define HW_PARAM_ENTRY(param) {SNDRV_PCM_HW_PARAM_##param, #param}
10#define hw_param_labels \
11 HW_PARAM_ENTRY(ACCESS), \
12 HW_PARAM_ENTRY(FORMAT), \
13 HW_PARAM_ENTRY(SUBFORMAT), \
14 HW_PARAM_ENTRY(SAMPLE_BITS), \
15 HW_PARAM_ENTRY(FRAME_BITS), \
16 HW_PARAM_ENTRY(CHANNELS), \
17 HW_PARAM_ENTRY(RATE), \
18 HW_PARAM_ENTRY(PERIOD_TIME), \
19 HW_PARAM_ENTRY(PERIOD_SIZE), \
20 HW_PARAM_ENTRY(PERIOD_BYTES), \
21 HW_PARAM_ENTRY(PERIODS), \
22 HW_PARAM_ENTRY(BUFFER_TIME), \
23 HW_PARAM_ENTRY(BUFFER_SIZE), \
24 HW_PARAM_ENTRY(BUFFER_BYTES), \
25 HW_PARAM_ENTRY(TICK_TIME)
26
27TRACE_EVENT(hw_mask_param,
28 TP_PROTO(struct snd_pcm_substream *substream, snd_pcm_hw_param_t type, int index, const struct snd_mask *prev, const struct snd_mask *curr),
29 TP_ARGS(substream, type, index, prev, curr),
30 TP_STRUCT__entry(
31 __field(int, card)
32 __field(int, device)
33 __field(int, subdevice)
34 __field(int, direction)
35 __field(snd_pcm_hw_param_t, type)
36 __field(int, index)
37 __field(int, total)
38 __array(__u32, prev_bits, 8)
39 __array(__u32, curr_bits, 8)
40 ),
41 TP_fast_assign(
42 __entry->card = substream->pcm->card->number;
43 __entry->device = substream->pcm->device;
44 __entry->subdevice = substream->number;
45 __entry->direction = substream->stream;
46 __entry->type = type;
47 __entry->index = index;
48 __entry->total = substream->runtime->hw_constraints.rules_num;
49 memcpy(__entry->prev_bits, prev->bits, sizeof(__u32) * 8);
50 memcpy(__entry->curr_bits, curr->bits, sizeof(__u32) * 8);
51 ),
52 TP_printk("pcmC%dD%d%s:%d %03d/%03d %s %08x%08x%08x%08x %08x%08x%08x%08x",
53 __entry->card,
54 __entry->device,
55 __entry->direction ? "c" : "p",
56 __entry->subdevice,
57 __entry->index,
58 __entry->total,
59 __print_symbolic(__entry->type, hw_param_labels),
60 __entry->prev_bits[3], __entry->prev_bits[2],
61 __entry->prev_bits[1], __entry->prev_bits[0],
62 __entry->curr_bits[3], __entry->curr_bits[2],
63 __entry->curr_bits[1], __entry->curr_bits[0]
64 )
65);
66
67TRACE_EVENT(hw_interval_param,
68 TP_PROTO(struct snd_pcm_substream *substream, snd_pcm_hw_param_t type, int index, const struct snd_interval *prev, const struct snd_interval *curr),
69 TP_ARGS(substream, type, index, prev, curr),
70 TP_STRUCT__entry(
71 __field(int, card)
72 __field(int, device)
73 __field(int, subdevice)
74 __field(int, direction)
75 __field(snd_pcm_hw_param_t, type)
76 __field(int, index)
77 __field(int, total)
78 __field(unsigned int, prev_min)
79 __field(unsigned int, prev_max)
80 __field(unsigned int, prev_openmin)
81 __field(unsigned int, prev_openmax)
82 __field(unsigned int, prev_integer)
83 __field(unsigned int, prev_empty)
84 __field(unsigned int, curr_min)
85 __field(unsigned int, curr_max)
86 __field(unsigned int, curr_openmin)
87 __field(unsigned int, curr_openmax)
88 __field(unsigned int, curr_integer)
89 __field(unsigned int, curr_empty)
90 ),
91 TP_fast_assign(
92 __entry->card = substream->pcm->card->number;
93 __entry->device = substream->pcm->device;
94 __entry->subdevice = substream->number;
95 __entry->direction = substream->stream;
96 __entry->type = type;
97 __entry->index = index;
98 __entry->total = substream->runtime->hw_constraints.rules_num;
99 __entry->prev_min = prev->min;
100 __entry->prev_max = prev->max;
101 __entry->prev_openmin = prev->openmin;
102 __entry->prev_openmax = prev->openmax;
103 __entry->prev_integer = prev->integer;
104 __entry->prev_empty = prev->empty;
105 __entry->curr_min = curr->min;
106 __entry->curr_max = curr->max;
107 __entry->curr_openmin = curr->openmin;
108 __entry->curr_openmax = curr->openmax;
109 __entry->curr_integer = curr->integer;
110 __entry->curr_empty = curr->empty;
111 ),
112 TP_printk("pcmC%dD%d%s:%d %03d/%03d %s %d %d %s%u %u%s %d %d %s%u %u%s",
113 __entry->card,
114 __entry->device,
115 __entry->direction ? "c" : "p",
116 __entry->subdevice,
117 __entry->index,
118 __entry->total,
119 __print_symbolic(__entry->type, hw_param_labels),
120 __entry->prev_empty,
121 __entry->prev_integer,
122 __entry->prev_openmin ? "(" : "[",
123 __entry->prev_min,
124 __entry->prev_max,
125 __entry->prev_openmax ? ")" : "]",
126 __entry->curr_empty,
127 __entry->curr_integer,
128 __entry->curr_openmin ? "(" : "[",
129 __entry->curr_min,
130 __entry->curr_max,
131 __entry->curr_openmax ? ")" : "]"
132 )
133);
134
135#endif /* _PCM_PARAMS_TRACE_H */
136
137/* This part must be outside protection */
138#undef TRACE_INCLUDE_PATH
139#define TRACE_INCLUDE_PATH .
140#undef TRACE_INCLUDE_FILE
141#define TRACE_INCLUDE_FILE pcm_param_trace
142#include <trace/define_trace.h>