From patchwork Mon Sep 23 16:29:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yu-Hsuan Hsu X-Patchwork-Id: 11157325 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2D83614DB for ; Mon, 23 Sep 2019 16:30:50 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B672021783 for ; Mon, 23 Sep 2019 16:30:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="Pr0yItVN"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="XlvLPuZJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B672021783 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 9390D168D; Mon, 23 Sep 2019 18:29:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9390D168D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1569256247; bh=Ojqg3k2egX0VeGH9X0BYPazpL2dd0E9KE+pkEgFUsyo=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=Pr0yItVNx02bZg1th/DxzqmZMNQEMOkm/DOB7BnIX+oDkaPQAlQZP0R1xlczbSudx drRX9bMI0adsbbuLTphCG7RnwgLYY4/20VKvW9RyZfnH3O2MAXCO7vnVahG3quX3zW cG0r2JRqxzg6vYO5iWuzH/ScgH52FZLucDV/vYO0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 0DC66F8031A; Mon, 23 Sep 2019 18:29:57 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0EC69F8044C; Mon, 23 Sep 2019 18:29:56 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 18EACF802BD for ; Mon, 23 Sep 2019 18:29:52 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 18EACF802BD Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="XlvLPuZJ" Received: by mail-pl1-x643.google.com with SMTP id y10so5415052plp.2 for ; Mon, 23 Sep 2019 09:29:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=UIQLE/TpeP0HNhlfy3lZ1lxjb/GhF1u9ggZXik+vAmU=; b=XlvLPuZJavyiPOcfVx827wot/20NwTXrHE4BD4Nakg2I6XGoYlP9HvLTQBW8nNpV6y B/yPd6PqLET2yp8IKUKnWjCeC3rdEaxGjLhmit3yM+4I2rtZOKKgG4fiqf5Uy/AAi5ov NbecdsQQ9xyUbFDDzBjphvglyA6bH74dFlR0Q= 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=UIQLE/TpeP0HNhlfy3lZ1lxjb/GhF1u9ggZXik+vAmU=; b=Gbuy6pFtcr64BdP8Rr3ONDiZ42kMX97Xe+mkaaDLHG8A8KbA3HdxCmNHoSaJf6UoFK 7/KoXanWAfEuo29A5M2BURcuPazaTU/U7X24b27Ppce4Gb2Ph9cd3cAnU8d7R3cym6/v pJvIO806+yffiNnnpoBtg/n8kA8L/3eqKKVgQqBAZpaQin1DmEP9fu6skyN+StqvmwvK Nt7HKlJV+FzH0zVYndOWC158a603yuhkWOiiM5EopuW2wL5NAZPlqlfWUcyE8itosCDd ZpWRt8rURH8lRgoa6jwVI8yK18CGb9aeJXCGOIrpMc1n7swgr4W6hUZEGYQ3dU5FQMWd YUHQ== X-Gm-Message-State: APjAAAXIKxmRLlpfwAtptxJpkEy6xIK6pThwTGmEMCVdwcA3vrNnuUKp R2DbGaSD+xJsjM3g/x4Y1cKmSg== X-Google-Smtp-Source: APXvYqwRngXV+UwA72WqOEFbZ2k5d969GaGRonb02UkUYlpokXoz7LNon/OVIE/CS/DX3WXOO3K9ow== X-Received: by 2002:a17:902:fe81:: with SMTP id x1mr635679plm.66.1569256190787; Mon, 23 Sep 2019 09:29:50 -0700 (PDT) Received: from localhost ([2401:fa00:1:10:845f:e35d:e30c:4b47]) by smtp.gmail.com with ESMTPSA id c11sm13677254pfj.114.2019.09.23.09.29.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 23 Sep 2019 09:29:49 -0700 (PDT) From: Yu-Hsuan Hsu To: linux-kernel@vger.kernel.org Date: Tue, 24 Sep 2019 00:29:40 +0800 Message-Id: <20190923162940.199580-1-yuhsuan@chromium.org> X-Mailer: git-send-email 2.23.0.351.gc4317032e6-goog MIME-Version: 1.0 Cc: Cezary Rojewski , Kuninori Morimoto , Takashi Iwai , Jie Yang , Pierre-Louis Bossart , Liam Girdwood , Tzung-Bi Shih , Mark Brown , Thomas Gleixner , alsa-devel@alsa-project.org, Yu-Hsuan Hsu Subject: [alsa-devel] [PATCH v2] ASoC: Intel: kbl_rt5663_rt5514_max98927: Add dmic format constraint X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On KBL platform, the microphone is attached to external codec(rt5514) instead of PCH. However, TDM slot between PCH and codec is 16 bits only. In order to avoid setting wrong format, we should add a constraint to force to use 16 bits format forever. Signed-off-by: Yu-Hsuan Hsu Acked-by: Pierre-Louis Bossart --- I have updated the commit message. Please see whether it is clear enough. Thanks. 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/sound/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_substream *substream) snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS, dmic_constraints); + runtime->hw.formats = 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); }