summaryrefslogtreecommitdiffstats
path: root/tools/perf/trace/beauty/sndrv_ctl_ioctl.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/trace/beauty/sndrv_ctl_ioctl.sh')
-rwxr-xr-xtools/perf/trace/beauty/sndrv_ctl_ioctl.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/perf/trace/beauty/sndrv_ctl_ioctl.sh b/tools/perf/trace/beauty/sndrv_ctl_ioctl.sh
new file mode 100755
index 0000000..aad5ab1
--- /dev/null
+++ b/tools/perf/trace/beauty/sndrv_ctl_ioctl.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+sound_header_dir=$1
+
+printf "static const char *sndrv_ctl_ioctl_cmds[] = {\n"
+grep "^#define[\t ]\+SNDRV_CTL_IOCTL_" $sound_header_dir/asound.h | \
+ sed -r 's/^#define +SNDRV_CTL_IOCTL_([A-Z0-9_]+)[\t ]+_IO[RW]*\( *.U., *(0x[[:xdigit:]]+),?.*/\t[\2] = \"\1\",/g'
+printf "};\n"
OpenPOWER on IntegriCloud