[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201118005858.123013-2-xuyuqing@huaqin.corp-partner.google.com>
Date: Wed, 18 Nov 2020 08:58:58 +0800
From: xuyuqing <xuyuqing@...qin.corp-partner.google.com>
To: linux-kernel@...r.kernel.org
Cc: Mark Brown <broonie@...nel.org>, Taniya Das <tdas@...eaurora.org>,
Rohit kumar <rohitkr@...eaurora.org>,
Banajit Goswami <bgoswami@...eaurora.org>,
Patrick Lai <plai@...eaurora.org>,
Andy Gross <agross@...nel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Liam Girdwood <lgirdwood@...il.com>,
Rob Herring <robh+dt@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
Srini Kandagatla <srinivas.kandagatla@...aro.org>,
Stephan Gerhold <stephan@...hold.net>, dianders@...omium.org,
dgreid@...omium.org, tzungbi@...omium.org, cychiang@...omium.org,
judyhsiao@...omium.org, linux-arm-kernel@...ts.infradead.org,
linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
alsa-devel@...a-project.org,
zhouguohui@...qin.corp-partner.google.com,
xuyuqing@...qin.corp-partner.google.com
Subject: [PATCH v1 1/1] ASoC: qcom: sc7180: fix 32 bit format for adau7002
the microphone is attached to external codec(adau7002)
instead of rt5682.We need to always use 32 bit format on sc7180
to meet the clock requirement of adau7002:
The ADAU7002 requires a BCLK rate
that is a minimum of 64× the LRCLK sample rate
Signed-off-by: xuyuqing <xuyuqing@...qin.corp-partner.google.com>
---
sound/soc/qcom/sc7180.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sound/soc/qcom/sc7180.c b/sound/soc/qcom/sc7180.c
index de70fa792aea..768566bb57a5 100644
--- a/sound/soc/qcom/sc7180.c
+++ b/sound/soc/qcom/sc7180.c
@@ -245,6 +245,7 @@ static int sc7180_adau7002_snd_startup(struct snd_pcm_substream *substream)
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
+ struct snd_pcm_runtime *runtime = substream->runtime;
switch (cpu_dai->id) {
case MI2S_PRIMARY:
@@ -252,6 +253,8 @@ static int sc7180_adau7002_snd_startup(struct snd_pcm_substream *substream)
SND_SOC_DAIFMT_CBS_CFS |
SND_SOC_DAIFMT_NB_NF |
SND_SOC_DAIFMT_I2S);
+ runtime->hw.formats = SNDRV_PCM_FMTBIT_S32_LE;
+ snd_pcm_hw_constraint_msbits(runtime, 0, 32, 32);
break;
case MI2S_SECONDARY:
--
2.25.1
Powered by blists - more mailing lists