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=-5.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 B1C56C433DF for ; Mon, 12 Oct 2020 14:48:14 +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 28E812080A for ; Mon, 12 Oct 2020 14:48:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="Hl5vdf6V"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=perex.cz header.i=@perex.cz header.b="APlWGXTR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 28E812080A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=perex.cz 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 E25161684; Mon, 12 Oct 2020 16:47:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E25161684 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1602514090; bh=vvc9OHCREkQSqNm1feM6/yeYfDisE+FAfhXTuBxvntI=; h=Subject:To:References:From:Date:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Hl5vdf6VYGReGpFD0QxfcZHNWNNu04VZCDbnWENT1eWHWP2FE4IZfG5lN5YOwsWjM SImR65NhXbWzGpukMNTbycNU51g3BDwQEmxqSZkvnEqVnULsExh6krDdf5tqFUpvAi 1ibjWq17b4NhjKgvGAttVq/4RxklBuM9ETJEjC+E= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 68C57F8020D; Mon, 12 Oct 2020 16:47:19 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2A2B5F80217; Mon, 12 Oct 2020 16:47:17 +0200 (CEST) Received: from mail1.perex.cz (mail1.perex.cz [77.48.224.245]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 8E16BF80141 for ; Mon, 12 Oct 2020 16:47:10 +0200 (CEST) Received: from mail1.perex.cz (localhost [127.0.0.1]) by smtp1.perex.cz (Perex's E-mail Delivery System) with ESMTP id 876BAA003F; Mon, 12 Oct 2020 16:47:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.perex.cz 876BAA003F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=perex.cz; s=default; t=1602514029; bh=eN+xWFxHaM5XxFYwmMtzsphG84qR19qSOiZPtrl78IQ=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=APlWGXTR+6iB97joa5UBiWgr0RIQjOEvmlRXHa+McuYy0d+T9QNAuRyFvQVpfQIYR UUw57vVlHPpSTNxh/XOyZjS8ZLLbKLQlUxVXnOyBtIvmibeDKCuTWJtmQ7pkKoo2ov qaZzqIx9i1RWmNJh42qinlP7fV4JXpjKbWlkBJfY= Received: from p1gen2.perex-int.cz (unknown [192.168.100.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: perex) by mail1.perex.cz (Perex's E-mail Delivery System) with ESMTPSA; Mon, 12 Oct 2020 16:46:56 +0200 (CEST) Subject: Re: [PATCH] ALSA: compress: allow pause and resume during draining To: Takashi Iwai References: <20201006062105.GQ2968@vkoul-mobl> <4bbc385b-d35a-8766-7981-034455287225@linux.intel.com> <000d01d69d58$4e2db6f0$ea8924d0$@samsung.com> <831bbfcf-9720-9100-8633-65932b415cab@perex.cz> <20201012052525.GH2968@vkoul-mobl> <20201012122423.GJ2968@vkoul-mobl> <5b26cdd5-8a15-fa26-86af-13bfbfad5341@perex.cz> <20201012135540.GK2968@vkoul-mobl> <777e0046-1e3a-e702-c070-cac4c0525ccd@perex.cz> From: Jaroslav Kysela Message-ID: <0afa7a39-84d5-0b9b-5453-8e7848a30bb6@perex.cz> Date: Mon, 12 Oct 2020 16:46:56 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Cc: alsa-devel@alsa-project.org, khw0178.kim@samsung.com, lgirdwood@gmail.com, kimty@samsung.com, s47.kang@samsung.com, tiwai@suse.com, 'Pierre-Louis Bossart' , Vinod Koul , hmseo@samsung.com, Gyeongtaek Lee , pilsun.jang@samsung.com, tkjung@samsung.com 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" Dne 12. 10. 20 v 16:21 Takashi Iwai napsal(a): > But, I doubt whether we really need to care about that; as mentioned > earlier, there is little to change from the user-space side. It just > pause or resume. The only difference is the resume target, and > honestly speaking, there is no interest in it from user-space side. > And, the rest is about the kernel internal, and this can be really > done in the way of the original patch. The flow is quite simple and > understandable... The core compress code already uses the state mechanism (although internally). Also, it's really unclear if all drivers were checked, if the pause triggers can be called from the drain state (I know it's another point, but the drivers should probably offer a flag that they support this). And why to call the pause release callback when there's no pause (drain + release ioctl instead drain + pause + release ioctl)? It's a clear midlevel code fault. This protection should be there not in the hw drivers. I refer the original patch: https://lore.kernel.org/alsa-devel/000c01d69585$228db6b0$67a92410$@samsung.com/ Jaroslav -- Jaroslav Kysela Linux Sound Maintainer; ALSA Project; Red Hat, Inc.