aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>2016-01-21 12:52:59 -0500
committerMark Brown <broonie@kernel.org>2016-01-28 18:31:46 -0500
commit7ce4283ca405d459c186960ed39d41ec0e6fb2bf (patch)
treea23352ad48143f319cad4523752e993a774d0f91
parente6d00f3403c439b8d1e6f9f09d5ae3048aa726e4 (diff)
ASoC: wm_adsp: Add debug audio trace firmware
The audio trace firmware allows the capture of arbitrary streams of audio from the DSP and commonly used for debugging other firmwares. This patch adds support for this firwmare into the ADSP driver. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/wm_adsp.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 0392c58dfc5d..a81f568a9660 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -367,6 +367,24 @@ static const struct wm_adsp_fw_caps ctrl_caps[] = {
367 }, 367 },
368}; 368};
369 369
370static const struct wm_adsp_fw_caps trace_caps[] = {
371 {
372 .id = SND_AUDIOCODEC_BESPOKE,
373 .desc = {
374 .max_ch = 8,
375 .sample_rates = {
376 4000, 8000, 11025, 12000, 16000, 22050,
377 24000, 32000, 44100, 48000, 64000, 88200,
378 96000, 176400, 192000
379 },
380 .num_sample_rates = 15,
381 .formats = SNDRV_PCM_FMTBIT_S16_LE,
382 },
383 .num_regions = ARRAY_SIZE(default_regions),
384 .region_defs = default_regions,
385 },
386};
387
370static const struct { 388static const struct {
371 const char *file; 389 const char *file;
372 int compr_direction; 390 int compr_direction;
@@ -386,7 +404,12 @@ static const struct {
386 .caps = ctrl_caps, 404 .caps = ctrl_caps,
387 }, 405 },
388 [WM_ADSP_FW_ASR] = { .file = "asr" }, 406 [WM_ADSP_FW_ASR] = { .file = "asr" },
389 [WM_ADSP_FW_TRACE] = { .file = "trace" }, 407 [WM_ADSP_FW_TRACE] = {
408 .file = "trace",
409 .compr_direction = SND_COMPRESS_CAPTURE,
410 .num_caps = ARRAY_SIZE(trace_caps),
411 .caps = trace_caps,
412 },
390 [WM_ADSP_FW_SPK_PROT] = { .file = "spk-prot" }, 413 [WM_ADSP_FW_SPK_PROT] = { .file = "spk-prot" },
391 [WM_ADSP_FW_MISC] = { .file = "misc" }, 414 [WM_ADSP_FW_MISC] = { .file = "misc" },
392}; 415};