From patchwork Thu Nov 19 12:31:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 328408 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp374784ils; Thu, 19 Nov 2020 04:32:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJzyNvGj7DFBwgo9EPI77xddg+t9IvDHofDwXrjDMD9kDHO1yiEx2CEOzYKrny+LJhy6XwyP X-Received: by 2002:a50:da46:: with SMTP id a6mr26003844edk.272.1605789162725; Thu, 19 Nov 2020 04:32:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605789162; cv=none; d=google.com; s=arc-20160816; b=zC6xezq2qzTNF9nKCdj5pNixBh6T0meoC4orXmIXS8EY5JTbAuOkdHxudgm4xPdC3R 1I1Qz3Jrr62/0ahvegbGb8rgzkua9niv6dW9+B1jXn7TU+JHXm18kU6OFTAb9qTdcyK5 iohMohsfqwxfg9JfC1P+bron5zuVmu2p7hQ+IQF0dRs9/esX5bquAsRNSgEKDJkG2pSN 237mPEJSLQEn/s+iG6Wt9ZBu6I5/rQqa4czhuYWDvguXtW2KWwvPD3KE2EuUiaPJkT9R qqBKB/5bVQ0HiHb3wiUeFV5Ly4O3FhVCRXV8zOfSekXzsAh3GRg5nL5pKG76KMqjrnHZ X3ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=CzGCpiN8DDCXB/TDfvykQudKt+j67A7n1K8JxIu4JHI=; b=rI7UXkFQ41u1FhmF0tUg9Ip081mJMv2TEVOuSB885aaP4wPQohRdzGvOjWkBDE2EGc rLIzwrXlaJX9g8B+4PezEebm2X7443rMQz6d0ui+UI8R6a0Udyo/nP2ec8dLGtCbdXhx 5gVA4W3OVGSCI2Qh3LegVPaZaSZUgEt3usvq5glikkoUWkO2tTjBy5t9gE3sMbso9pUQ nnmphEF6/Kbhhkbt0ZIT8BI6/r1VSZwtzQwf2jS7aV6YDv5okvDbDpJbNd2F9nnljs9t Na1wwADk+jjjTo3WhC8vulQ5Nfq+DjO2ooivDYf4iD00u7yEbgttVgNbgPEGqe7rngz2 /Tlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="B/MIgCpu"; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a25si17615494edx.171.2020.11.19.04.32.42; Thu, 19 Nov 2020 04:32:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="B/MIgCpu"; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726545AbgKSMbv (ORCPT + 15 others); Thu, 19 Nov 2020 07:31:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725783AbgKSMbu (ORCPT ); Thu, 19 Nov 2020 07:31:50 -0500 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76FEAC0613CF for ; Thu, 19 Nov 2020 04:31:50 -0800 (PST) Received: by mail-lf1-x142.google.com with SMTP id a9so7998052lfh.2 for ; Thu, 19 Nov 2020 04:31:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=CzGCpiN8DDCXB/TDfvykQudKt+j67A7n1K8JxIu4JHI=; b=B/MIgCpuCvn1TPuZ/1KshVQ/w0EICGlUb/sM/OzYnYXJBjKsxjOt9fXEw9fnJ9uBrj 0TjkQWyIUMem3xj7jg58MOdqi0GpFXBRuwDDiMdapcosnOtAVUF4Rw1kG4tvVyftokf2 6FPgQabmxCqduNSqKaigr9YoU5B+dU8oIOSNnqKvl5FZuaGwb4uaVIvIhir9xP2Fb2ji cLVPJnbA/1G+kgGyndzwORq6FJ2NDL8pQOPue12/N4mR6Eh3aa7tojJArH3d6u6YojRG giVxQuHwue5m3sjSm4hBNUtwJlBiyNkTYl3Q5xjwq5OZ9FjR6iqmPgklBCjZVR++1gh8 nM/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=CzGCpiN8DDCXB/TDfvykQudKt+j67A7n1K8JxIu4JHI=; b=m3g82LVDX0D9wIrQce+epvcAHOhVGKRyzGrUgqo2y9Sv8W9z+fodpmtSAj4hLbOAls aivA6KYPQSfr9Uy3eQle4UOwyAD9WTX7fygx85p5Lgp1ZGDkNJal55MtYaWmOmn/KY2m R5b3NbM0cLzQ58gfss83MpyjIF0nKGcVZvLtVQfQGJZ4SbU2pNOfbfUPP5GBXPj3Od/A NMKDrTg5t5+IqHrq3ov4LE+PXLhgyU5PPPQYBHiqWJL0tEJ9OnNeL8UhBnHMt2OpJhWF LS1PIOtx6YYPg4d472UoUR6heI4kd+anYJp/o8S6iimkN2/HuhFlbRZTM/bUI6hF8NPE 5aLg== X-Gm-Message-State: AOAM531Y7g5xf6JoYaiwW37mXuKBTZpoTwYclqaCvKNLlWHl8DB8xIRx lMMJjw+qh0ohwts7HsZyygSS7BCqXKzRMg== X-Received: by 2002:ac2:563a:: with SMTP id b26mr5462533lff.596.1605789108951; Thu, 19 Nov 2020 04:31:48 -0800 (PST) Received: from eriador.lumag.spb.ru ([188.162.64.108]) by smtp.gmail.com with ESMTPSA id u28sm3962495lfn.102.2020.11.19.04.31.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Nov 2020 04:31:48 -0800 (PST) From: Dmitry Baryshkov To: Patrick Lai , Banajit Goswami , Liam Girdwood , Mark Brown Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH] ASoC: qcom: sm8250: fix HDMI audio playback Date: Thu, 19 Nov 2020 15:31:45 +0300 Message-Id: <20201119123145.709891-1-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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 Fixes: aa2e2785545a ("ASoC: qcom: sm8250: add sound card qrb5165-rb5 support") Cc: Srinivas Kandagatla --- sound/soc/qcom/sm8250.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.29.2 Reviewed-by: Srinivas Kandagatla diff --git a/sound/soc/qcom/sm8250.c b/sound/soc/qcom/sm8250.c index 35c9ad11edff..314e3e566d6d 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: