From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C3E5C2D0D1 for ; Sun, 29 Dec 2019 18:03:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0D8F8207FF for ; Sun, 29 Dec 2019 18:03:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577642633; bh=67hY1Lb7tlnDYo5FOvNFwjcR1GyfKn7pHF1V3ZmXvVo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=F5u4qu0t5p6CnawdAqlx9D+ucp9uZbRYWMn77/ZBXNi23muIt6Yf/XsN567g9hevk 9t8z02+LB/IzN2gm1VDvvxje8lix8ObpQDq/8ByYHkTnG351BNtOPYD2jOfVd1KtFt 1Q2RZP8HPGIDC8SA5yAz3t8H6cvOiVRVlumm6EGw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732385AbfL2RxC (ORCPT ); Sun, 29 Dec 2019 12:53:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:39498 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732369AbfL2Rw4 (ORCPT ); Sun, 29 Dec 2019 12:52:56 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CDC3621744; Sun, 29 Dec 2019 17:52:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577641976; bh=67hY1Lb7tlnDYo5FOvNFwjcR1GyfKn7pHF1V3ZmXvVo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZKaA7blgxlRK5TP06Qfy08YCI58emnoTU2SNsKdaw/dGwA+7wDcn7WvzVB05jvnjV U7KkwuAWnBC1BUBla2EakXoSgh5hBFc7sGeYkrQnIac9320thL0YtnOhWFK2zjKABt fNzjujTuw8/mE+dEdPoMKuJ4bRarsB3zOI25T/NE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yu-Hsuan Hsu , Pierre-Louis Bossart , Mark Brown , Sasha Levin Subject: [PATCH 5.4 291/434] ASoC: Intel: kbl_rt5663_rt5514_max98927: Add dmic format constraint Date: Sun, 29 Dec 2019 18:25:44 +0100 Message-Id: <20191229172721.278424035@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yu-Hsuan Hsu [ Upstream commit e2db787bdcb4f2722ecf410168f0583764634e45 ] 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 Link: https://lore.kernel.org/r/20190923162940.199580-1-yuhsuan@chromium.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- 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 74dda8784f1a..67b276a65a8d 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); } -- 2.20.1