From: srinivas.kandagatla@linaro.org
To: broonie@kernel.org
Cc: perex@perex.cz, tiwai@suse.com, lgirdwood@gmail.com,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Subject: [PATCH v2 1/4] ASoC: qcom: q6dsp: parse Display port tokens
Date: Mon, 22 Apr 2024 14:43:51 +0100 [thread overview]
Message-ID: <20240422134354.89291-2-srinivas.kandagatla@linaro.org> (raw)
In-Reply-To: <20240422134354.89291-1-srinivas.kandagatla@linaro.org>
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
DP Module needs to know the data format type which is specified in the
tplg file, parse that info before setting up the module.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
sound/soc/qcom/qdsp6/topology.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/sound/soc/qcom/qdsp6/topology.c b/sound/soc/qcom/qdsp6/topology.c
index 70572c83e101..27a5adb201c3 100644
--- a/sound/soc/qcom/qdsp6/topology.c
+++ b/sound/soc/qcom/qdsp6/topology.c
@@ -730,6 +730,29 @@ static int audioreach_widget_i2s_module_load(struct audioreach_module *mod,
return 0;
}
+static int audioreach_widget_dp_module_load(struct audioreach_module *mod,
+ struct snd_soc_tplg_vendor_array *mod_array)
+{
+ struct snd_soc_tplg_vendor_value_elem *mod_elem;
+ int tkn_count = 0;
+
+ mod_elem = mod_array->value;
+
+ while (tkn_count <= (le32_to_cpu(mod_array->num_elems) - 1)) {
+ switch (le32_to_cpu(mod_elem->token)) {
+ case AR_TKN_U32_MODULE_FMT_DATA:
+ mod->data_format = le32_to_cpu(mod_elem->value);
+ break;
+ default:
+ break;
+ }
+ tkn_count++;
+ mod_elem++;
+ }
+
+ return 0;
+}
+
static int audioreach_widget_load_buffer(struct snd_soc_component *component,
int index, struct snd_soc_dapm_widget *w,
struct snd_soc_tplg_dapm_widget *tplg_w)
@@ -760,6 +783,9 @@ static int audioreach_widget_load_buffer(struct snd_soc_component *component,
case MODULE_ID_I2S_SOURCE:
audioreach_widget_i2s_module_load(mod, mod_array);
break;
+ case MODULE_ID_DISPLAY_PORT_SINK:
+ audioreach_widget_dp_module_load(mod, mod_array);
+ break;
default:
return -EINVAL;
}
--
2.25.1
next prev parent reply other threads:[~2024-04-22 13:44 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-22 13:43 [PATCH v2 0/4] ASoC: qcom: display port changes srinivas.kandagatla
2024-04-22 13:43 ` srinivas.kandagatla [this message]
2024-04-22 13:43 ` [PATCH v2 2/4] ASoC: qcom: common: add Display port Jack function srinivas.kandagatla
2024-04-23 11:44 ` Johan Hovold
2024-04-23 12:02 ` Johan Hovold
2024-04-23 15:55 ` Srinivas Kandagatla
2024-04-29 14:54 ` Johan Hovold
2024-05-09 8:59 ` Srinivas Kandagatla
2024-04-22 13:43 ` [PATCH v2 3/4] ASoC: qcom: sc8280xp: add Display port Jack srinivas.kandagatla
2024-04-23 11:48 ` Johan Hovold
2024-04-22 13:43 ` [PATCH v2 4/4] ASoC: qcom: sm8250: fix a typo in function name srinivas.kandagatla
2024-04-23 11:59 ` [PATCH v2 0/4] ASoC: qcom: display port changes Johan Hovold
2024-04-23 12:38 ` Srinivas Kandagatla
2024-04-23 14:58 ` Johan Hovold
2024-04-23 15:59 ` Srinivas Kandagatla
2024-04-29 15:00 ` Johan Hovold
2024-05-23 4:09 ` Xilin Wu
2024-05-24 12:50 ` Srinivas Kandagatla
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=20240422134354.89291-2-srinivas.kandagatla@linaro.org \
--to=srinivas.kandagatla@linaro.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.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 read-only IMAP folder(s) and NNTP newsgroup(s).