From: Stephan Gerhold <stephan@gerhold.net>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: alsa-devel@alsa-project.org,
Banajit Goswami <bgoswami@codeaurora.org>,
Srinivasa Rao Mandadapu <srivasam@codeaurora.org>,
Patrick Lai <plai@codeaurora.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH 1/2] ASoC: qcom: lpass: Fix hardcoded SC7810 DAI IDs
Date: Fri, 15 Jan 2021 17:49:58 +0100 [thread overview]
Message-ID: <YAHHtup8hgfdf1qm@gerhold.net> (raw)
In-Reply-To: <68691a9f-f65d-da1a-a413-b624567ccc5f@linaro.org>
Hi Srinivas,
On Fri, Jan 15, 2021 at 04:14:05PM +0000, Srinivas Kandagatla wrote:
> On 14/01/2021 09:46, Stephan Gerhold wrote:
> > [...]
> > The problem was introduced in commit 7cb37b7bd0d3 ("ASoC: qcom: Add support
> > for lpass hdmi driver"). The mistake made there is that lpass.h now contains
> >
> > #include <dt-bindings/sound/sc7180-lpass.h>
> >
>
> This thing was obviously missed in the review and testing, and its really
> bad idea to have multiple header files based on different SOC for the same
> driver. We are planning to add some basic tests in ciloop to catch such
> issues!
>
> IMO, Its better to sort it out now, before this gets complicated!
>
> Am thinking of making a common header file ("lpass,h") and include that in
> the existing SoC specific header for compatibility reasons only.
>
> In future we should just keep adding new DAI index in incremental fashion to
> common header file rather than creating SoC specific one!
>
>
> > [...]
> > ---
> > Srinivas mentioned a potential different fix here:
> > https://lore.kernel.org/alsa-devel/4b34bd4f-e7bc-84f9-5e8a-b2348c17b7aa@linaro.org/
> >
> > Instead of this patch, we could change the dt-bindings for LPASS,
> > so that all SoCs use consistent DAI IDs.
>
> TBH, Am inclined to do the right thing and make DAI ID's consistent!
> Like we do at the dsp afe interfaces.
>
> This will also bring in the need to add .of_xlate_dai_name callback along
> with fixing sc7180_lpass_cpu_dai_driver array index.
>
> Without this the code will end up very confusing!
>
I agree that this would be cleaner, as I mentioned here:
>
> >
> > In general, I think this might be cleaner, especially in case more special
> > DAIs are added in the future. However, when I made this patch (before Srinivas
> > mentioned it) I tried to avoid changing the dt-bindings because:
> >
> > - Changing dt-bindings after they are added is generally discouraged.
> >
> > but more importantly:
> >
> > - lpass-ipq806x.c does not seem to have PRIMARY, SECONDARY, ...
> > but something completely different. I know nothing about that
> > platform so I don't know how to handle it.
>
... but it's still not clear to me how to handle ipq806x. The DAIs it
has don't really look similar to what MSM8916 and SC7180 have.
Right now it declares just a single DAI, but multiple "ports":
enum lpaif_i2s_ports {
IPQ806X_LPAIF_I2S_PORT_CODEC_SPK,
IPQ806X_LPAIF_I2S_PORT_CODEC_MIC,
IPQ806X_LPAIF_I2S_PORT_SEC_SPK,
IPQ806X_LPAIF_I2S_PORT_SEC_MIC,
IPQ806X_LPAIF_I2S_PORT_MI2S,
};
static struct snd_soc_dai_driver ipq806x_lpass_cpu_dai_driver = {
.id = IPQ806X_LPAIF_I2S_PORT_MI2S,
/* ... */
};
I suppose we could just declare this as MI2S_PRIMARY but not sure if
that is accurate. Do you have more information about this platform?
Thanks,
Stephan
next prev parent reply other threads:[~2021-01-15 16:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-14 9:46 [PATCH 1/2] ASoC: qcom: lpass: Fix hardcoded SC7810 DAI IDs Stephan Gerhold
2021-01-14 9:46 ` [PATCH 2/2] ASoC: qcom: lpass: Avoid redundant DAI ID lookup Stephan Gerhold
2021-01-15 16:14 ` [PATCH 1/2] ASoC: qcom: lpass: Fix hardcoded SC7810 DAI IDs Srinivas Kandagatla
2021-01-15 16:49 ` Stephan Gerhold [this message]
2021-01-15 17:15 ` Srinivas Kandagatla
2021-01-15 18:41 ` Stephan Gerhold
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=YAHHtup8hgfdf1qm@gerhold.net \
--to=stephan@gerhold.net \
--cc=alsa-devel@alsa-project.org \
--cc=bgoswami@codeaurora.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=plai@codeaurora.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=srivasam@codeaurora.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.