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=-2.3 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 BE7E6C2BA17 for ; Sun, 5 Apr 2020 23:51:57 +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 25A4120675 for ; Sun, 5 Apr 2020 23:51:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="BaUw2XjA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 25A4120675 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 65C5C82E; Mon, 6 Apr 2020 01:51:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 65C5C82E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1586130715; bh=16OpPYwPMRdzFmmKY8d2HlrnKAcdShren9QBK4jAbq4=; h=Subject:To:References:From:Date:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=BaUw2XjA5V0+IA5I1cRNejjMt/y8F/xRZ95/czHC110f8MRZtTdRZAOcHu60+2PXt HL06bbNYZGE7XjKrgKXQbXRUJ64091uXHi7TbMjXWcfnljbyhGhtjbvYNfO15iCm50 EV9pojslITD0uTwbRsDEu9TiR4VCE1pT5VmzRPxA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E08C8F800E4; Mon, 6 Apr 2020 01:51:04 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 509D2F801DA; Mon, 6 Apr 2020 01:51:02 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 70F76F80058 for ; Mon, 6 Apr 2020 01:50:58 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 70F76F80058 IronPort-SDR: Bgc7xU6uRslUSGniNRivMgcNG+nv0ilwktjukibf2/7pjvsd0Npjvtf9gB0N/y+1HgAMcRgSkg P1xDvOufrsuA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Apr 2020 16:50:53 -0700 IronPort-SDR: e0Z+hUnwpMG43shiVck803kEt5nPO5j6lIc58BqxfeS+MBttSFPIVskYe+8Ro8LL9sKeayW9Zm gbHjbZs8xR9g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,349,1580803200"; d="scan'208";a="253949529" Received: from tecook-mobl1.amr.corp.intel.com (HELO [10.212.185.245]) ([10.212.185.245]) by orsmga006.jf.intel.com with ESMTP; 05 Apr 2020 16:50:52 -0700 Subject: Re: [PATCH 3/4] ASoC: Intel: bdw-rt5677: Remove ignore_suspend flag from SSP0 dai link To: Hans de Goede , Cezary Rojewski , alsa-devel@alsa-project.org References: <20200319204947.18963-1-cezary.rojewski@intel.com> <20200319204947.18963-4-cezary.rojewski@intel.com> <259cbb60-9e59-1132-8371-83f837577f86@redhat.com> From: Pierre-Louis Bossart Message-ID: <3af264d9-7064-dad4-b937-af45ffad4e65@linux.intel.com> Date: Sun, 5 Apr 2020 18:11:34 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Cc: Kuninori Morimoto , Curtis Malainey , tiwai@suse.com, Dominik Brodowski , lgirdwood@gmail.com, vkoul@kernel.org, broonie@kernel.org, Ben Zhang 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" > > I just noticed something which is somewhat related to this > discussion (and also somewhat off topic). > > I just noticed on a Bay Trail device with a RT5672 codec > and on a Cherry Trail device with a RT5645 codec that > if an input / recording audio stream is active while > suspending the tablet, then after resume audio is broken, > playback seems to work (audio samples get consumed at normal > speed) but it is silent.  Recording also is broken, not > sure if it is broken, or just silent too. > > When this happens, closing all apps which consume audio > and waiting 5 seconds for a runtime-suspend to kick in > fixes things. After this both record and playback > works again. > > Any idea what the cause for this problem might be? Power management for the Atom/sst stuff is far from clear for me, it uses .prepare/.complete callbacks where snd_soc_suspend()/poweroff()/resume() are invoked, so there's a bit of confusion IMO between that the framework does and what the driver should do. It's also unclear to me why the INFO_RESUME flag was set, since the driver cannot restart from the same position. I would try and triangulate with the more traditional bytcr-rt5640, to rule out a codec-specific or machine driver issue (handling of rt5645 and 5672 was done by different people and the machine driver is quite different). I would also remove the INFO_RESUME, that will force the ALSA core to call the .prepare steps and maybe restore settings that are not applied with the current resume. Either way, it's a bit of a shot in the dark :-( My 2 cents -Pierre