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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 47C76C433F5 for ; Fri, 25 Feb 2022 10:52:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239839AbiBYKxF (ORCPT ); Fri, 25 Feb 2022 05:53:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239836AbiBYKwx (ORCPT ); Fri, 25 Feb 2022 05:52:53 -0500 Received: from mail1.perex.cz (mail1.perex.cz [77.48.224.245]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 953D717FD20 for ; Fri, 25 Feb 2022 02:52:20 -0800 (PST) Received: from mail1.perex.cz (localhost [127.0.0.1]) by smtp1.perex.cz (Perex's E-mail Delivery System) with ESMTP id 1E017A003F; Fri, 25 Feb 2022 11:52:18 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.perex.cz 1E017A003F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=perex.cz; s=default; t=1645786338; bh=iJ1NLrVE5m5/910GN8+APcCFZEpD5R1STwg2JWo5YLk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=TTTCRKQ6KbNfa0FDRsV7vkM5ih7pSBJQ3husdPxJSOrHWnuWgpFuXKoxNDf5ffyIj Yf7xOgB3bayNEA/lIkZni2ISS2qdKfRwUupvxVu01Q2ZfCp62NBMvwcLHkKM2gZpx8 KzBLzBfe6vMXmdIkThcfz/ngGU8chh185PuWmAQw= Received: from [192.168.100.98] (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; Fri, 25 Feb 2022 11:52:05 +0100 (CET) Message-ID: <83e4b67d-91d3-dca9-4b1f-d209f927d517@perex.cz> Date: Fri, 25 Feb 2022 11:52:05 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH V0 1/1] ALSA: pcm: fix blocking while loop in snd_pcm_update_hw_ptr0() Content-Language: en-US To: Raghu Bankapur , Vinod Koul , Takashi Iwai , ierre-Louis Bossart , Mark Brown , Kai Vehmanen , Ranjani Sridharan , Takashi Sakamoto , alsa-devel@alsa-project.org, Zubin Mithra , linux-kernel@vger.kernel.org Cc: Krishna Jha References: <4d8b1cb4b0db88c3e28207a81403fbf1e4a87bff.1645784757.git.quic_rbankapu@quicinc.com> From: Jaroslav Kysela In-Reply-To: <4d8b1cb4b0db88c3e28207a81403fbf1e4a87bff.1645784757.git.quic_rbankapu@quicinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 25. 02. 22 11:39, Raghu Bankapur wrote: > When period interrupts are disabled, while loop in snd_pcm_update_hw_ptr0() > results in the machine locking up if runtime->hw_ptr_buffer_jiffies is 0. > Validate runtime->hw_ptr_buffer_jiffies value before while loop to avoid > delta check. I would set hw_ptr_buffer_jiffies to 1 in this case in snd_pcm_post_start(). Jaroslav -- Jaroslav Kysela Linux Sound Maintainer; ALSA Project; Red Hat, Inc.