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=-8.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 463EEC433E0 for ; Mon, 8 Jun 2020 21:47:21 +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 C2D332068D for ; Mon, 8 Jun 2020 21:47:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="hmuFEYqA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C2D332068D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com 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 479C31672; Mon, 8 Jun 2020 23:46:29 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 479C31672 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1591652839; bh=GeSYFTKJCAVsejlHsEPGVX5vw1iu0Q+XhpyUiECawUI=; h=Subject:To:References:From:Date:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=hmuFEYqATDs6S9HZVQJYzVaC9iFyguGdB1Savy/rgZEF3bJ0arG+ED3kt8S/uDaKK nZTIOSepG2QrJlSbcjcFyJnvgzIQ2ICYfIeJeSK1r9/UdgQfxLLG1vtWfjGW2cn8Zs fT9YNLZKWT4iqhWAfHjGOJFqPOaHHymsaSJo/HIk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 5572CF802A9; Mon, 8 Jun 2020 23:45:31 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8D653F8024A; Mon, 8 Jun 2020 23:45:28 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E5238F801EB for ; Mon, 8 Jun 2020 23:45:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E5238F801EB IronPort-SDR: nVrzPZYPMFbS9bb9WmoWExUI+c9ZCjS+79rDRCINRQhXjjMCFthX9WwOdUqdYjIrS2NILqJlWu u4ij6Fj9Gdtg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2020 14:45:14 -0700 IronPort-SDR: IVz2kX9KpFHPC3Q2DPv7qDtUv0n3ZFWjE91FYCNE7d3hb1CNju5sADW6wixshELY8Os7utcM9A i4ryDcv1JHhg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,489,1583222400"; d="scan'208";a="446893881" Received: from skarmaka-mobl2.amr.corp.intel.com (HELO [10.254.104.56]) ([10.254.104.56]) by orsmga005.jf.intel.com with ESMTP; 08 Jun 2020 14:45:14 -0700 Subject: Re: [PATCH 1/3] bytcr-rt5640: Fix DMIC1 not working when connected over AIF2 To: Hans de Goede , Jaroslav Kysela References: <20200608202142.92894-1-hdegoede@redhat.com> From: Pierre-Louis Bossart Message-ID: Date: Mon, 8 Jun 2020 16:44:25 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200608202142.92894-1-hdegoede@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Cc: alsa-devel@alsa-project.org 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 6/8/20 3:21 PM, Hans de Goede wrote: > The RT5640 codec has 2 ADC-s which are caled the Stereo ADC and the > Mono ADC (even though the mono ADC seems to be stereo too?). The Stereo > ADC is connected to the AIF1 interface of the codec and the Mono ADC > to the AIF2 interface. > > Almost all X86 BYT/CHT design use the AIF1 interface, but a few models > use the AIF2 interface. For this reason the IN?-InternalMic.conf bits > not only select/enable the microphone input on the Stereo ADC, but > also on the Mono ADC, so that the analog mic. inputs also work in devices > using the AIF2 interface. > > Before this commit DigitalMics.conf was only setting up the DMIC input > on the Stereo ADC and not on the Mono ADC, causing DMIC1 to not work > when connected over AIF2. > > This commit adds selecting / enabling DMIC1 on the Mono ADC. > This fixes the internal microphone not working on the Toshiba Encore WT10A. > > Note that for devices which use the AIF1 interface this is a no-op since > the AIF1 interface is not connected to anything, there is no complete > chain so DAPM will not enable any of the elements in the chain. Sounds good to me. For the series Reviewed-by: Pierre-Louis Bossart > > Signed-off-by: Hans de Goede > --- > ucm2/codecs/rt5640/DigitalMics.conf | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/ucm2/codecs/rt5640/DigitalMics.conf b/ucm2/codecs/rt5640/DigitalMics.conf > index 503c4a9..fdd412f 100644 > --- a/ucm2/codecs/rt5640/DigitalMics.conf > +++ b/ucm2/codecs/rt5640/DigitalMics.conf > @@ -6,6 +6,9 @@ SectionDevice."Mic" { > ] > > EnableSequence [ > + cset "name='Mono ADC MIXL ADC2 Switch' on" > + cset "name='Mono ADC MIXR ADC2 Switch' on" > + cset "name='Mono ADC Capture Switch' on" > cset "name='Stereo ADC MIXL ADC2 Switch' on" > cset "name='Stereo ADC MIXR ADC2 Switch' on" > cset "name='Internal Mic Switch' on" > @@ -13,6 +16,9 @@ SectionDevice."Mic" { > ] > > DisableSequence [ > + cset "name='Mono ADC MIXL ADC2 Switch' off" > + cset "name='Mono ADC MIXR ADC2 Switch' off" > + cset "name='Mono ADC Capture Switch' off" > cset "name='Stereo ADC MIXL ADC2 Switch' off" > cset "name='Stereo ADC MIXR ADC2 Switch' off" > cset "name='Internal Mic Switch' off" >