alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
To: broonie@kernel.org
Cc: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com,
	lgirdwood@gmail.com
Subject: [PATCH 3/6] ASoC: wm_adsp: Add debug audio trace firmware
Date: Thu, 21 Jan 2016 17:52:59 +0000	[thread overview]
Message-ID: <1453398782-32198-3-git-send-email-ckeepax@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1453398782-32198-1-git-send-email-ckeepax@opensource.wolfsonmicro.com>

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>
---
 sound/soc/codecs/wm_adsp.c | 25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 0392c58..a81f568 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[] = {
 	},
 };
 
+static const struct wm_adsp_fw_caps trace_caps[] = {
+	{
+		.id = SND_AUDIOCODEC_BESPOKE,
+		.desc = {
+			.max_ch = 8,
+			.sample_rates = {
+				4000, 8000, 11025, 12000, 16000, 22050,
+				24000, 32000, 44100, 48000, 64000, 88200,
+				96000, 176400, 192000
+			},
+			.num_sample_rates = 15,
+			.formats = SNDRV_PCM_FMTBIT_S16_LE,
+		},
+		.num_regions = ARRAY_SIZE(default_regions),
+		.region_defs = default_regions,
+	},
+};
+
 static const struct {
 	const char *file;
 	int compr_direction;
@@ -386,7 +404,12 @@ static const struct {
 		.caps = ctrl_caps,
 	},
 	[WM_ADSP_FW_ASR] =      { .file = "asr" },
-	[WM_ADSP_FW_TRACE] =    { .file = "trace" },
+	[WM_ADSP_FW_TRACE] =    {
+		.file = "trace",
+		.compr_direction = SND_COMPRESS_CAPTURE,
+		.num_caps = ARRAY_SIZE(trace_caps),
+		.caps = trace_caps,
+	},
 	[WM_ADSP_FW_SPK_PROT] = { .file = "spk-prot" },
 	[WM_ADSP_FW_MISC] =     { .file = "misc" },
 };
-- 
2.1.4

  parent reply	other threads:[~2016-01-21 17:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-21 17:52 [PATCH 1/6] ASoC: wm5110: Fix up snd_soc_register_platform error path Charles Keepax
2016-01-21 17:52 ` [PATCH 2/6] ASoC: wm_adsp: Use more generic naming for regions and caps definitions Charles Keepax
2016-01-29  0:16   ` Applied "ASoC: wm_adsp: Use more generic naming for regions and caps definitions" to the asoc tree Mark Brown
2016-01-21 17:52 ` Charles Keepax [this message]
2016-01-29  0:16   ` Applied "ASoC: wm_adsp: Add debug audio trace firmware" " Mark Brown
2016-01-21 17:53 ` [PATCH 4/6] ASoC: wm5110: Add support for audio trace firmware Charles Keepax
2016-01-28 23:34   ` Mark Brown
2016-01-29 10:14     ` Charles Keepax
2016-01-29 11:40   ` Applied "ASoC: wm5110: Add support for audio trace firmware" to the asoc tree Mark Brown
2016-01-21 17:53 ` [PATCH 5/6] ASoC: wm5102: Add support for the audio trace firmware Charles Keepax
2016-01-29 11:40   ` Applied "ASoC: wm5102: Add support for the audio trace firmware" to the asoc tree Mark Brown
2016-01-21 17:53 ` [PATCH 6/6] ASoC: wm_adsp: Move setting of DSP speed into CODEC specific code Charles Keepax
2016-01-29  0:16   ` Applied "ASoC: wm_adsp: Move setting of DSP speed into CODEC specific code" to the asoc tree Mark Brown
2016-01-29  0:16 ` Applied "ASoC: wm5110: Fix up snd_soc_register_platform error path" " Mark Brown

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=1453398782-32198-3-git-send-email-ckeepax@opensource.wolfsonmicro.com \
    --to=ckeepax@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=patches@opensource.wolfsonmicro.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;
as well as URLs for NNTP newsgroup(s).