The current implementation does not configure the CPU DAI format for
MI2S interfaces, resulting in -EIO errors during audio playback and
capture. This prevents the correct clock from being enabled for the
MI2S interface. Configure the required DAI format to enable proper
clock settings. Tested on Lemans evk platform.
Fixes: 295aeea6646ad ("ASoC: qcom: add machine driver for sc8280xp")
Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
---
sound/soc/qcom/sc8280xp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sound/soc/qcom/sc8280xp.c b/sound/soc/qcom/sc8280xp.c
index 73f9f82c4e25..2fd06354923a 100644
--- a/sound/soc/qcom/sc8280xp.c
+++ b/sound/soc/qcom/sc8280xp.c
@@ -32,6 +32,9 @@ static int sc8280xp_snd_init(struct snd_soc_pcm_runtime *rtd)
int dp_pcm_id = 0;
switch (cpu_dai->id) {
+ case PRIMARY_MI2S_RX...QUATERNARY_MI2S_TX:
+ snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_BP_FP);
+ break;
case WSA_CODEC_DMA_RX_0:
case WSA_CODEC_DMA_RX_1:
/*
--
2.34.1
On 9/5/25 11:40 AM, Mohammad Rafi Shaik wrote: > The current implementation does not configure the CPU DAI format for > MI2S interfaces, resulting in -EIO errors during audio playback and > capture. This prevents the correct clock from being enabled for the > MI2S interface. Configure the required DAI format to enable proper > clock settings. Tested on Lemans evk platform. > > Fixes: 295aeea6646ad ("ASoC: qcom: add machine driver for sc8280xp") Why? this is not a fix, this is an enhancement to the machine driver. > Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com> > --- other than that, LGTM Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> --srini > sound/soc/qcom/sc8280xp.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/sound/soc/qcom/sc8280xp.c b/sound/soc/qcom/sc8280xp.c > index 73f9f82c4e25..2fd06354923a 100644 > --- a/sound/soc/qcom/sc8280xp.c > +++ b/sound/soc/qcom/sc8280xp.c > @@ -32,6 +32,9 @@ static int sc8280xp_snd_init(struct snd_soc_pcm_runtime *rtd) > int dp_pcm_id = 0; > > switch (cpu_dai->id) { > + case PRIMARY_MI2S_RX...QUATERNARY_MI2S_TX: > + snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_BP_FP); > + break; > case WSA_CODEC_DMA_RX_0: > case WSA_CODEC_DMA_RX_1: > /*
On 9/5/2025 4:16 PM, Srinivas Kandagatla wrote: > On 9/5/25 11:40 AM, Mohammad Rafi Shaik wrote: >> The current implementation does not configure the CPU DAI format for >> MI2S interfaces, resulting in -EIO errors during audio playback and >> capture. This prevents the correct clock from being enabled for the >> MI2S interface. Configure the required DAI format to enable proper >> clock settings. Tested on Lemans evk platform. >> >> Fixes: 295aeea6646ad ("ASoC: qcom: add machine driver for sc8280xp") > Why? this is not a fix, this is an enhancement to the machine driver. > yes, this change is enhancement to the machine driver. The reason to add fixes tag because I2S audio playback is failing with -EIO error, with this change I2S audio usecase is success without error. So added Fixes Tag. Thanks & Regards, Rafi. >> Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com> >> --- > > other than that, LGTM > > Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> > > --srini > >> sound/soc/qcom/sc8280xp.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/sound/soc/qcom/sc8280xp.c b/sound/soc/qcom/sc8280xp.c >> index 73f9f82c4e25..2fd06354923a 100644 >> --- a/sound/soc/qcom/sc8280xp.c >> +++ b/sound/soc/qcom/sc8280xp.c >> @@ -32,6 +32,9 @@ static int sc8280xp_snd_init(struct snd_soc_pcm_runtime *rtd) >> int dp_pcm_id = 0; >> >> switch (cpu_dai->id) { >> + case PRIMARY_MI2S_RX...QUATERNARY_MI2S_TX: >> + snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_BP_FP); >> + break; >> case WSA_CODEC_DMA_RX_0: >> case WSA_CODEC_DMA_RX_1: >> /* >
On 9/5/25 12:40 PM, Mohammad Rafi Shaik wrote: > The current implementation does not configure the CPU DAI format for > MI2S interfaces, resulting in -EIO errors during audio playback and > capture. This prevents the correct clock from being enabled for the > MI2S interface. Configure the required DAI format to enable proper > clock settings. Tested on Lemans evk platform. > > Fixes: 295aeea6646ad ("ASoC: qcom: add machine driver for sc8280xp") > Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com> > --- > sound/soc/qcom/sc8280xp.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/sound/soc/qcom/sc8280xp.c b/sound/soc/qcom/sc8280xp.c > index 73f9f82c4e25..2fd06354923a 100644 > --- a/sound/soc/qcom/sc8280xp.c > +++ b/sound/soc/qcom/sc8280xp.c > @@ -32,6 +32,9 @@ static int sc8280xp_snd_init(struct snd_soc_pcm_runtime *rtd) > int dp_pcm_id = 0; > > switch (cpu_dai->id) { > + case PRIMARY_MI2S_RX...QUATERNARY_MI2S_TX: there's a discontiguous (i.e. asking for another 'case') QUINARY MI2S there's also a SENARY MI2S, but that we don't define upstream today Konrad
On 9/5/2025 4:16 PM, Konrad Dybcio wrote: > On 9/5/25 12:40 PM, Mohammad Rafi Shaik wrote: >> The current implementation does not configure the CPU DAI format for >> MI2S interfaces, resulting in -EIO errors during audio playback and >> capture. This prevents the correct clock from being enabled for the >> MI2S interface. Configure the required DAI format to enable proper >> clock settings. Tested on Lemans evk platform. >> >> Fixes: 295aeea6646ad ("ASoC: qcom: add machine driver for sc8280xp") >> Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com> >> --- >> sound/soc/qcom/sc8280xp.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/sound/soc/qcom/sc8280xp.c b/sound/soc/qcom/sc8280xp.c >> index 73f9f82c4e25..2fd06354923a 100644 >> --- a/sound/soc/qcom/sc8280xp.c >> +++ b/sound/soc/qcom/sc8280xp.c >> @@ -32,6 +32,9 @@ static int sc8280xp_snd_init(struct snd_soc_pcm_runtime *rtd) >> int dp_pcm_id = 0; >> >> switch (cpu_dai->id) { >> + case PRIMARY_MI2S_RX...QUATERNARY_MI2S_TX: > > there's a discontiguous (i.e. asking for another 'case') QUINARY MI2S > Ack, it can be handled with another case because discontinuous id's. > there's also a SENARY MI2S, but that we don't define upstream today > yes. As for SENARY_MI2S, since it's not defined upstream yet no need handle now. Thanks & Regards, Rafi.> Konrad
© 2016 - 2025 Red Hat, Inc.