Re: [PATCH v2 2/3] ASoC: qcom: q6apm-lpass-dais: Add MI2S clock control

From: Mohammad Rafi Shaik

Date: Mon Jun 15 2026 - 05:49:08 EST




On 6/8/2026 8:19 AM, Val Packett wrote:

On 6/7/26 11:30 PM, Mohammad Rafi Shaik wrote:
Add support for MI2S clock control within q6apm-lpass DAIs, including
handling of MCLK, BCLK, and ECLK via the DAI .set_sysclk callback.
Each MI2S port now retrieves its clock handles from the device tree,
allowing per-port clock configuration and proper enable/disable during
startup and shutdown.
[..]
@@ -297,6 +373,59 @@ static const struct snd_soc_component_driver q6apm_lpass_dai_component = {
      .remove_order   = SND_SOC_COMP_ORDER_FIRST,
  };
+static int of_q6apm_parse_dai_data(struct device *dev,
+                   struct q6apm_lpass_dai_data *data)
+{
+    struct device_node *node;
+    int ret;
+
+    for_each_child_of_node(dev->of_node, node) {
+        struct q6apm_dai_priv_data *priv;
+        int id;
+
+        ret = of_property_read_u32(node, "reg", &id);
+        if (ret || id < 0 || id >= APM_PORT_MAX) {
+            dev_err(dev, "valid dai id not found:%d\n", ret);
+            continue;
+        }
+
+        switch (id) {
+        /* MI2S specific properties */
+        case PRIMARY_MI2S_RX ... QUATERNARY_MI2S_TX:
+        case QUINARY_MI2S_RX ... QUINARY_MI2S_TX:

SENARY is also a thing these days btw..


Ack, will include SENARY dai also.

Thanks & Regards,
Rafi.


~val