* Re: [PATCH] ASoC: qcom: apq8016_sbc: Fix second argument of apq8016_dai_init() [not found] <20241117232100.23760-1-spasswolf@web.de> @ 2024-11-21 14:03 ` Mark Brown 2024-11-21 14:11 ` Stephan Gerhold 1 sibling, 0 replies; 3+ messages in thread From: Mark Brown @ 2024-11-21 14:03 UTC (permalink / raw) To: Bert Karwatzki; +Cc: Stephan Gerhold, linux-kernel, linux-arm-msm, alsa-devel [-- Attachment #1: Type: text/plain, Size: 1304 bytes --] On Mon, Nov 18, 2024 at 12:20:58AM +0100, Bert Karwatzki wrote: > Since commit a78a42fb48b8 the second argument of apq8016_dai_init() has > to be an lpass id returned by qdsp6_dai_get_lpass_id(). This breaks the build: /build/stage/linux/sound/soc/qcom/apq8016_sbc.c: In function ‘apq8016_sbc_dai_in it’: /build/stage/linux/sound/soc/qcom/apq8016_sbc.c:153:38: error: implicit declarat ion of function ‘qdsp6_dai_get_lpass_id’ [-Werror=implicit-function-declaration] 153 | return apq8016_dai_init(rtd, qdsp6_dai_get_lpass_id(cpu_dai)); | ^~~~~~~~~~~~~~~~~~~~~~ /build/stage/linux/sound/soc/qcom/apq8016_sbc.c: At top level: /build/stage/linux/sound/soc/qcom/apq8016_sbc.c:165:12: error: static declaratio n of ‘qdsp6_dai_get_lpass_id’ follows non-static declaration 165 | static int qdsp6_dai_get_lpass_id(struct snd_soc_dai *cpu_dai) | ^~~~~~~~~~~~~~~~~~~~~~ /build/stage/linux/sound/soc/qcom/apq8016_sbc.c:153:38: note: previous implicit declaration of ‘qdsp6_dai_get_lpass_id’ with type ‘int()’ 153 | return apq8016_dai_init(rtd, qdsp6_dai_get_lpass_id(cpu_dai)); | ^~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: qcom: apq8016_sbc: Fix second argument of apq8016_dai_init() [not found] <20241117232100.23760-1-spasswolf@web.de> 2024-11-21 14:03 ` [PATCH] ASoC: qcom: apq8016_sbc: Fix second argument of apq8016_dai_init() Mark Brown @ 2024-11-21 14:11 ` Stephan Gerhold 2024-11-22 9:48 ` Bert Karwatzki 1 sibling, 1 reply; 3+ messages in thread From: Stephan Gerhold @ 2024-11-21 14:11 UTC (permalink / raw) To: Bert Karwatzki Cc: Stephan Gerhold, Mark Brown, linux-kernel, linux-arm-msm, alsa-devel Hi, On Mon, Nov 18, 2024 at 12:20:58AM +0100, Bert Karwatzki wrote: > Since commit a78a42fb48b8 the second argument of apq8016_dai_init() has > to be an lpass id returned by qdsp6_dai_get_lpass_id(). > > Fixes: a78a42fb48b8 ("ASoC: qcom: apq8016_sbc: Allow routing audio through QDSP6") > > Signed-off-by: Bert Karwatzki <spasswolf@web.de> > --- > sound/soc/qcom/apq8016_sbc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sound/soc/qcom/apq8016_sbc.c b/sound/soc/qcom/apq8016_sbc.c > index 3023cf180a75..ddfcd4616895 100644 > --- a/sound/soc/qcom/apq8016_sbc.c > +++ b/sound/soc/qcom/apq8016_sbc.c > @@ -150,7 +150,7 @@ static int apq8016_sbc_dai_init(struct snd_soc_pcm_runtime *rtd) > { > struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); > > - return apq8016_dai_init(rtd, cpu_dai->id); > + return apq8016_dai_init(rtd, qdsp6_dai_get_lpass_id(cpu_dai)); > } > Hm no, the code is correct the way it is. There are two cases handled by this driver: - ADSP bypass (lpass-* drivers, qcom,apq8016-sbc-sndcard): This one uses the LPASS IDs as DAI IDs, so cpu_dai->id already contains the correct value. - ADSP (qdsp6 drivers, qcom,msm8916-qdsp6-sndcard): This one uses the QDSP6 IDs (e.g. PRIMARY_MI2S_RX/TX instead of MI2S_PRIMARY), so qdsp6_dai_get_lpass_id() is used to translate that to the LPASS IDs. The code you are changing here handles the first case (ADSP bypass), the DAI IDs do not need any translation there. Thanks, Stephan ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: qcom: apq8016_sbc: Fix second argument of apq8016_dai_init() 2024-11-21 14:11 ` Stephan Gerhold @ 2024-11-22 9:48 ` Bert Karwatzki 0 siblings, 0 replies; 3+ messages in thread From: Bert Karwatzki @ 2024-11-22 9:48 UTC (permalink / raw) To: Stephan Gerhold Cc: Stephan Gerhold, Mark Brown, linux-kernel, linux-arm-msm, alsa-devel, spasswolf Am Donnerstag, dem 21.11.2024 um 15:11 +0100 schrieb Stephan Gerhold: > Hi, > > On Mon, Nov 18, 2024 at 12:20:58AM +0100, Bert Karwatzki wrote: > > Since commit a78a42fb48b8 the second argument of apq8016_dai_init() has > > to be an lpass id returned by qdsp6_dai_get_lpass_id(). > > > > Fixes: a78a42fb48b8 ("ASoC: qcom: apq8016_sbc: Allow routing audio through QDSP6") > > > > Signed-off-by: Bert Karwatzki <spasswolf@web.de> > > --- > > sound/soc/qcom/apq8016_sbc.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/sound/soc/qcom/apq8016_sbc.c b/sound/soc/qcom/apq8016_sbc.c > > index 3023cf180a75..ddfcd4616895 100644 > > --- a/sound/soc/qcom/apq8016_sbc.c > > +++ b/sound/soc/qcom/apq8016_sbc.c > > @@ -150,7 +150,7 @@ static int apq8016_sbc_dai_init(struct snd_soc_pcm_runtime *rtd) > > { > > struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); > > > > - return apq8016_dai_init(rtd, cpu_dai->id); > > + return apq8016_dai_init(rtd, qdsp6_dai_get_lpass_id(cpu_dai)); > > } > > > > Hm no, the code is correct the way it is. There are two cases handled by > this driver: > > - ADSP bypass (lpass-* drivers, qcom,apq8016-sbc-sndcard): This one > uses the LPASS IDs as DAI IDs, so cpu_dai->id already contains the > correct value. > > - ADSP (qdsp6 drivers, qcom,msm8916-qdsp6-sndcard): This one uses the > QDSP6 IDs (e.g. PRIMARY_MI2S_RX/TX instead of MI2S_PRIMARY), so > qdsp6_dai_get_lpass_id() is used to translate that to the LPASS IDs. > > The code you are changing here handles the first case (ADSP bypass), > the DAI IDs do not need any translation there. > > Thanks, > Stephan Thank you for explaining this, and sorry for causing trouble with my "fix". Bert Karwatzki ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-12-02 8:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20241117232100.23760-1-spasswolf@web.de>
2024-11-21 14:03 ` [PATCH] ASoC: qcom: apq8016_sbc: Fix second argument of apq8016_dai_init() Mark Brown
2024-11-21 14:11 ` Stephan Gerhold
2024-11-22 9:48 ` Bert Karwatzki
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox