aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>2020-06-25 16:31:26 +0100
committerVinod Koul <vkoul@kernel.org>2020-07-13 09:45:45 +0530
commitc1d5616eadba1ac771b2e2c64d85f8d2a1f1f829 (patch)
tree625212d1166006e34c0a81ddcfed708b19d0da78
parenta75fefdd404a73ebfb7b0a61b51ad668fd847f3d (diff)
downloadkernel-c1d5616eadba1ac771b2e2c64d85f8d2a1f1f829.tar.gz
ASoC: q6dsp: q6afe: add more afe clocks
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
-rw-r--r--sound/soc/qcom/qdsp6/q6afe-dai.c1
-rw-r--r--sound/soc/qcom/qdsp6/q6afe.c1
-rw-r--r--sound/soc/qcom/qdsp6/q6afe.h10
3 files changed, 12 insertions, 0 deletions
diff --git a/sound/soc/qcom/qdsp6/q6afe-dai.c b/sound/soc/qcom/qdsp6/q6afe-dai.c
index 70c4c610fc58..d0d20178d3e4 100644
--- a/sound/soc/qcom/qdsp6/q6afe-dai.c
+++ b/sound/soc/qcom/qdsp6/q6afe-dai.c
@@ -556,6 +556,7 @@ static int q6afe_mi2s_set_sysclk(struct snd_soc_dai *dai,
freq, dir);
case Q6AFE_LPASS_CLK_ID_PRI_MI2S_IBIT ... Q6AFE_LPASS_CLK_ID_QUI_MI2S_OSR:
case Q6AFE_LPASS_CLK_ID_MCLK_1 ... Q6AFE_LPASS_CLK_ID_INT_MCLK_1:
+ case Q6AFE_CLK_ID_WSA_CORE_MCLK ... Q6AFE_CLK_ID_VA_CORE_2X_MCLK:
return q6afe_port_set_sysclk(port, clk_id,
Q6AFE_LPASS_CLK_ATTRIBUTE_COUPLE_NO,
Q6AFE_LPASS_CLK_ROOT_DEFAULT,
diff --git a/sound/soc/qcom/qdsp6/q6afe.c b/sound/soc/qcom/qdsp6/q6afe.c
index 22f578bccbe4..c2c6649bc630 100644
--- a/sound/soc/qcom/qdsp6/q6afe.c
+++ b/sound/soc/qcom/qdsp6/q6afe.c
@@ -1136,6 +1136,7 @@ int q6afe_port_set_sysclk(struct q6afe_port *port, int clk_id,
case Q6AFE_LPASS_CLK_ID_PRI_MI2S_IBIT ... Q6AFE_LPASS_CLK_ID_QUI_MI2S_OSR:
case Q6AFE_LPASS_CLK_ID_MCLK_1 ... Q6AFE_LPASS_CLK_ID_INT_MCLK_1:
case Q6AFE_LPASS_CLK_ID_PRI_TDM_IBIT ... Q6AFE_LPASS_CLK_ID_QUIN_TDM_EBIT:
+ case Q6AFE_CLK_ID_WSA_CORE_MCLK ... Q6AFE_CLK_ID_VA_CORE_2X_MCLK:
cset.clk_set_minor_version = AFE_API_VERSION_CLOCK_SET;
cset.clk_id = clk_id;
cset.clk_freq_in_hz = freq;
diff --git a/sound/soc/qcom/qdsp6/q6afe.h b/sound/soc/qcom/qdsp6/q6afe.h
index 755c3ddae59f..f06140488fdb 100644
--- a/sound/soc/qcom/qdsp6/q6afe.h
+++ b/sound/soc/qcom/qdsp6/q6afe.h
@@ -135,6 +135,15 @@
/* Clock ID for MCLK5 */
#define Q6AFE_LPASS_CLK_ID_MCLK_5 0x308
+#define Q6AFE_CLK_ID_WSA_CORE_MCLK 0x309
+#define Q6AFE_CLK_ID_WSA_CORE_NPL_MCLK 0x30a
+#define Q6AFE_CLK_ID_VA_CORE_MCLK 0x30b
+#define Q6AFE_CLK_ID_TX_CORE_MCLK 0x30c
+#define Q6AFE_CLK_ID_TX_CORE_NPL_MCLK 0x30d
+#define Q6AFE_CLK_ID_RX_CORE_MCLK 0x30e
+#define Q6AFE_CLK_ID_RX_CORE_NPL_MCLK 0x30f
+#define Q6AFE_CLK_ID_VA_CORE_2X_MCLK 0x310
+
/* Clock attribute for invalid use (reserved for internal usage) */
#define Q6AFE_LPASS_CLK_ATTRIBUTE_INVALID 0x0
/* Clock attribute for no couple case */
@@ -223,6 +232,7 @@ void q6afe_cdc_dma_port_prepare(struct q6afe_port *port,
int q6afe_port_set_sysclk(struct q6afe_port *port, int clk_id,
int clk_src, int clk_root,
unsigned int freq, int dir);
+struct q6afe;
int q6afe_vote_lpass_core_hw(struct q6afe *afe, uint32_t hw_block_id,
char *client_name, uint32_t *client_handle);
int q6afe_unvote_lpass_core_hw(struct q6afe *afe, uint32_t hw_block_id,