Skip to contentSkip to conversation

ASoC: qcom: sm8250: fix HDMI audio playback

PATCH Applied Dmitry Baryshkov 4 participants 4 messages Nov 19, 2020 – Dec 29, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: qcom: sm8250: fix HDMI audio playback

Current code does not setup CPU dai (causing -EIO errors on playback) and does not pass SND_SOC_DAIFMT_I2S to codec fmt (causing i2s-hifi errors). Fix both errors to enable HDMI audio playback on SM8250. Tested on RB5 platform.

Fixes aa2e2785545a ("ASoC: qcom: sm8250: add sound card qrb5165-rb5 support")
Cc Srinivas Kandagatla <[email protected]>
---
 sound/soc/qcom/sm8250.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
sound/soc/qcom/sm8250.c +3 -1
index 35c9ad11edff..314e3e566d6d 100644
@@ -36,6 +36,7 @@ static int sm8250_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
 
 static int sm8250_snd_startup(struct snd_pcm_substream *substream)
 {
+	unsigned int fmt = SND_SOC_DAIFMT_CBS_CFS;
 	unsigned int codec_dai_fmt = SND_SOC_DAIFMT_CBS_CFS;
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
 	struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
@@ -43,10 +44,11 @@ static int sm8250_snd_startup(struct snd_pcm_substream *substream)
 
 	switch (cpu_dai->id) {
 	case TERTIARY_MI2S_RX:
-		codec_dai_fmt |= SND_SOC_DAIFMT_NB_NF;
+		codec_dai_fmt |= SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_I2S;
 		snd_soc_dai_set_sysclk(cpu_dai,
 			Q6AFE_LPASS_CLK_ID_TER_MI2S_IBIT,
 			MI2S_BCLK_RATE, SNDRV_PCM_STREAM_PLAYBACK);
+		snd_soc_dai_set_fmt(cpu_dai, fmt);
 		snd_soc_dai_set_fmt(codec_dai, codec_dai_fmt);
 		break;
 	default:
Signature · 1 line
2.29.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Dmitry Baryshkov

Current code does not setup CPU dai (causing -EIO errors on playback) and does not pass SND_SOC_DAIFMT_I2S to codec fmt (causing i2s-hifi errors). Fix both errors to enable HDMI audio playback on SM8250. Tested on RB5 platform.

Fixes aa2e2785545a ("ASoC: qcom: sm8250: add sound card qrb5165-rb5 support")
Cc Srinivas Kandagatla <[email protected]>

Thanks for the Patch, Looks good to me!

Quoted 30 lines
---
  sound/soc/qcom/sm8250.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
sound/soc/qcom/sm8250.c +3 -1
index 35c9ad11edff..314e3e566d6d 100644
@@ -36,6 +36,7 @@ static int sm8250_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
 
  static int sm8250_snd_startup(struct snd_pcm_substream *substream)
  {
+	unsigned int fmt = SND_SOC_DAIFMT_CBS_CFS;
  	unsigned int codec_dai_fmt = SND_SOC_DAIFMT_CBS_CFS;
  	struct snd_soc_pcm_runtime *rtd = substream->private_data;
  	struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
@@ -43,10 +44,11 @@ static int sm8250_snd_startup(struct snd_pcm_substream *substream)
 
  	switch (cpu_dai->id) {
  	case TERTIARY_MI2S_RX:
-		codec_dai_fmt |= SND_SOC_DAIFMT_NB_NF;
+		codec_dai_fmt |= SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_I2S;
  		snd_soc_dai_set_sysclk(cpu_dai,
  			Q6AFE_LPASS_CLK_ID_TER_MI2S_IBIT,
  			MI2S_BCLK_RATE, SNDRV_PCM_STREAM_PLAYBACK);
+		snd_soc_dai_set_fmt(cpu_dai, fmt);
  		snd_soc_dai_set_fmt(codec_dai, codec_dai_fmt);
  		break;
  	default:
maintainer
#2 lore raw
In reply to Dmitry Baryshkov
Quoted 4 lines · Dmitry Baryshkov

Current code does not setup CPU dai (causing -EIO errors on playback) and does not pass SND_SOC_DAIFMT_I2S to codec fmt (causing i2s-hifi errors). Fix both errors to enable HDMI audio playback on SM8250. Tested on RB5 platform.

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: qcom: sm8250: fix HDMI audio playback

      commit: ddf1c4b3944add7939f6778d8fb71df01e74d45f

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

#3 lore raw
In reply to Dmitry Baryshkov
This patch was applied to qcom/linux.git (refs/heads/for-next):

Hello:

This patch was applied to qcom/linux.git (refs/heads/for-next):

Quoted 10 lines · On Thu, 19 Nov 2020 15:31:45 +0300 you wrote:

Current code does not setup CPU dai (causing -EIO errors on playback) and does not pass SND_SOC_DAIFMT_I2S to codec fmt (causing i2s-hifi errors). Fix both errors to enable HDMI audio playback on SM8250. Tested on RB5 platform.

Fixes aa2e2785545a ("ASoC: qcom: sm8250: add sound card qrb5165-rb5 support")
Cc Srinivas Kandagatla <[email protected]>

[...]

Here is the summary with links:
- ASoC: qcom: sm8250: fix HDMI audio playback

    https://git.kernel.org/qcom/c/ddf1c4b3944a

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html