Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1018780ybe; Fri, 13 Sep 2019 09:48:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqy4S6TbKgaH6oCZPAl8DyE/AKC3YcQ1q3EjaudOJn4iWpUsGRrEicRyc1gX9fxnh9gKK0dC X-Received: by 2002:a50:d718:: with SMTP id t24mr45791509edi.168.1568393314151; Fri, 13 Sep 2019 09:48:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568393314; cv=none; d=google.com; s=arc-20160816; b=wT/KLqE+M6VvJ2B+AlNBi2rwh+FMmVFBmfh6SttdyTt8JDgL9Vm3qJr6eaEPyrAhT0 9ki0gIoaY9LyJ+yYQP0L2dft0H01z5mYE7gkmNVdL/HSWhr7yQL6zk5cf6+UxqnpUUaH Z0Yzy/pNwtJ34cbDj4DojVKMAkgRlyQ0TyfLV317ysNsWvuALn2XLqe03FYwVg7niC5o md0bSMXVBiFBp4AwPwe99BoLXhvd6AVlcKPt1J6nWND6ztOpbxeLRzfuSfI8nrziSDYZ V2cfCnSqendPB3ryyw+ItT3FMe/SROX9DgoVFhtfezCUwlj8jWZ2qc96uUtHEEq08HbQ 4A4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=xK3P/MTBGgvM9inB0b/+0BFfc7AXQxejr+yyElk4fOo=; b=nbr5p4yAFEMi6vSMlfSjT9pkZq89mEdpTUPOT01mDftNV44fNp+oVtROjG74l5k4k8 dX390ko0n/JSTMt9hR6OxTwP1WhpOBcJxISYp/DyaYG98bf66tTBmjJtb68rnOaJj4Ii DEHrFBRYhVuX8bzQINj5UcMo5ViUNK4uCJJQoILEwf4iiILDpuXhh0VanohJZjAU1Tbf wIVGeYasOV6qKWwvukott2SnbU9OKl97+hozqO1R95Ki8TyTvilncrESscSLMAz2Jnrz 5pSo8uj1HHdYH129c2hqQQ/xdQFPBBN+Rj8daOD+JeoXTB0J/XQB2EtducqY+pSQz+jU uYxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=RtVOQl6S; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o46si18316682edc.124.2019.09.13.09.48.07; Fri, 13 Sep 2019 09:48:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=RtVOQl6S; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730378AbfIMQBz (ORCPT + 99 others); Fri, 13 Sep 2019 12:01:55 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:37515 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726558AbfIMQBz (ORCPT ); Fri, 13 Sep 2019 12:01:55 -0400 Received: by mail-wr1-f68.google.com with SMTP id i1so32049066wro.4 for ; Fri, 13 Sep 2019 09:01:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=xK3P/MTBGgvM9inB0b/+0BFfc7AXQxejr+yyElk4fOo=; b=RtVOQl6S0qDe3qqqZfOn+HYcBwzwBHLscsskaaMW8gjHeRO1yNBIApe4AbJfwm/AhP Xy3Tly5958IZh4IzKxBy9rwkgCC7L/Zq5br8ZM7FUakg25OAfV+d7+Oief38xPlT+L5+ 7STiYilmvmSxjFst7uVDgmNORsKFwriLEL/Cs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=xK3P/MTBGgvM9inB0b/+0BFfc7AXQxejr+yyElk4fOo=; b=Deah+szyOV9yMjXNnJd+nwZ7Q8lokjE+WdCs2aZ7fqE5+qB8ZlLCy1MdvP8nycjn3+ 6h0mv/4bTbnFbiq+YdRW/2ij1K3L2pYwgtH1ILBjygmJ1x+FRu1IDEvVufR2ZeOiF/C7 JdAd/Ej84xghmhiedrIi12s8SSbBJ6Hdqmu0TBJK7sJS52AC5yjyt+rGB/sY6QJbDxYj PCnmxFBP+0danbR1oJ0h9ML9+LMds1rvuwZKsbfKT88Pj37T8ovMcCT1F2uYYVvb/KXR fJgi/l8pZVQkarGBB3RAoZtllTumBDsnEp2uL5gCpXRBuqInX1ZfJmheb7XzIjR2DDcy lFKQ== X-Gm-Message-State: APjAAAVVyd1OCk6iwtouhfnIKXxGjtHleTC7YaFcg4hXFsKtS6+Mo/vN Znm/H8Ud6hmtlJw15dxnRQeA+wnz6x7zA49hqD4/9Q== X-Received: by 2002:a5d:62c6:: with SMTP id o6mr6921750wrv.243.1568390511848; Fri, 13 Sep 2019 09:01:51 -0700 (PDT) MIME-Version: 1.0 References: <20190912022740.161798-1-yuhsuan@chromium.org> In-Reply-To: From: Yu-Hsuan Hsu Date: Sat, 14 Sep 2019 00:01:40 +0800 Message-ID: Subject: Re: [alsa-devel] [PATCH] ASoC: Intel: kbl_rt5663_rt5514_max98927: Add dmic format constraint To: Pierre-Louis Bossart Cc: linux-kernel@vger.kernel.org, Cezary Rojewski , Liam Girdwood , Jie Yang , Mark Brown , Jaroslav Kysela , Takashi Iwai , Kuninori Morimoto , Tzung-Bi Shih , Thomas Gleixner , alsa-devel@alsa-project.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Pierre-Louis Bossart =E6=96=BC 2019=E5=B9=B49=E6=9C=8812=E6=97=A5 =E9=80=B1=E5=9B=9B =E4=B8=8B=E5=8D=889:0= 2=E5=AF=AB=E9=81=93=EF=BC=9A > > On 9/11/19 9:27 PM, Yu-Hsuan Hsu wrote: > > 24 bits recording from DMIC is not supported for KBL platform because > > the TDM slot between PCH and codec is 16 bits only. We should add a > > constraint to remove that unsupported format. > > Humm, when you use DMICs they are directly connected to the PCH with a > standard 1-bit PDM. There is no notion of TDM or slot. > > It could very well be that the firmware/topology only support 16 bit (I > vaguely recall another case where 24 bits was added), but the > description in the commit message would need to be modified to make the > reason for this change clearer. (I sent it again because the previous email contains HTML subpart. Sorry for the inconvenience.) Thanks for the review! If I'm not mistaken, the microphone is attached to external codec(rt5514) instead of PCH on Kabylake platform. So there should be a TDM between DMICs and PCH. We can see in the kabylake_ssp0_hw_params function, there are some operations about setting tdm slot_width to 16 bits. Therefore, I think it only supports S16_LE format for DMICs. Is it correct? > > > > > > > Signed-off-by: Yu-Hsuan Hsu > > --- > > sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c b/soun= d/soc/intel/boards/kbl_rt5663_rt5514_max98927.c > > index 74dda8784f1a01..67b276a65a8d2d 100644 > > --- a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c > > +++ b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c > > @@ -400,6 +400,9 @@ static int kabylake_dmic_startup(struct snd_pcm_sub= stream *substream) > > snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNEL= S, > > dmic_constraints); > > > > + runtime->hw.formats =3D SNDRV_PCM_FMTBIT_S16_LE; > > + snd_pcm_hw_constraint_msbits(runtime, 0, 16, 16); > > + > > return snd_pcm_hw_constraint_list(substream->runtime, 0, > > SNDRV_PCM_HW_PARAM_RATE, &constraints_rates); > > } > > >