summaryrefslogtreecommitdiffstats
path: root/sound/soc/qcom/sm8250.c
diff options
context:
space:
mode:
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>2020-11-19 15:31:45 +0300
committerMark Brown <broonie@kernel.org>2020-11-20 16:08:38 +0000
commitddf1c4b3944add7939f6778d8fb71df01e74d45f (patch)
tree69b09743a2fe9e391a723a0035d07af067dc599e /sound/soc/qcom/sm8250.c
parent82d1aeb8a40740cf4208ce864cbcaa5e8bbabf4e (diff)
downloadlinux-ddf1c4b3944add7939f6778d8fb71df01e74d45f.tar.bz2
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. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Fixes: aa2e2785545a ("ASoC: qcom: sm8250: add sound card qrb5165-rb5 support") Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20201119123145.709891-1-dmitry.baryshkov@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/qcom/sm8250.c')
-rw-r--r--sound/soc/qcom/sm8250.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/soc/qcom/sm8250.c b/sound/soc/qcom/sm8250.c
index 315ed6ccb7c4..fe8fd7367e21 100644
--- a/sound/soc/qcom/sm8250.c
+++ b/sound/soc/qcom/sm8250.c
@@ -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: