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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 5D23CECAAA1 for ; Fri, 2 Sep 2022 06:59:42 +0000 (UTC) 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 AC5521636; Fri, 2 Sep 2022 08:58:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz AC5521636 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1662101980; bh=T4S0j3D5MRrdujAXi9eoUdwyrvj1EGyb71SaLT7c3Gg=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=dkB6UXb9/yvGAL6f9Vg7YCHUG7i2d61vd5W+c+WV8cE4s3mMhWYE9YyeAhhy0AUJm MeYrewEDY4Jron7Ti/j5Gm5vbiIrgLN0FC++1S98D5hFJgvoRFW04ZBYtnBwQecqrO qE4notzK5wKB0aGA5EszX1A+Q8eiNR1vBrglW0gQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E2189F8020D; Fri, 2 Sep 2022 08:58:49 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CD9F6F8027B; Fri, 2 Sep 2022 08:58:47 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 7CF8EF80154 for ; Fri, 2 Sep 2022 08:58:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7CF8EF80154 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="scZTt4CD"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="M+tIQnSn" Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 8EAB33400B; Fri, 2 Sep 2022 06:58:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1662101920; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=slSo8r2OGE9hA7/GOrn6tbkh0qTttNDl+56W5J/9f/0=; b=scZTt4CDGMo/PT8VT0nv4CMIu0ID/flQkUEh2UDW7nJJEMBx+8iLWVSdepirgJRtWWTdAp QIDoaZlIIn7u0KUCkZ9Z4IooIFQZYi93V8mKq5T8r9ogxozkAo/h+G8OP3vD9r1Ka2/LXY ciQj0ikbF+4om9KJjEYxwT1SxQXrvYs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1662101920; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=slSo8r2OGE9hA7/GOrn6tbkh0qTttNDl+56W5J/9f/0=; b=M+tIQnSne3JeonZRZ+MQQ3k+QvwY9RzPXiSxaR2iZd2YhPsRMasruTKgQooXoO/RRyj00f TmH7AO3h6/zP1YBw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 6D35F13328; Fri, 2 Sep 2022 06:58:40 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id xKXRGaCpEWPvUQAAMHmgww (envelope-from ); Fri, 02 Sep 2022 06:58:40 +0000 Date: Fri, 02 Sep 2022 08:58:39 +0200 Message-ID: <87pmgew9cw.wl-tiwai@suse.de> From: Takashi Iwai To: Pattara Teerapong Subject: Re: [PATCH] ALSA: aloop: Fix random zeros in capture data when using jiffies timer In-Reply-To: <20220901144036.4049060-1-pteerapong@chromium.org> References: <20220901144036.4049060-1-pteerapong@chromium.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Takashi Iwai 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 Thu, 01 Sep 2022 16:40:36 +0200, Pattara Teerapong wrote: > > In loopback_jiffies_timer_pos_update(), we are getting jiffies twice. > First time for playback, second time for capture. Jiffies can be updated > between these two calls and if the capture jiffies is larger, extra zeros > will be filled in the capture buffer. > > Change to get jiffies once and use it for both playback and capture. > > Signed-off-by: Pattara Teerapong Thanks, applied. Takashi 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 B7364C54EE9 for ; Fri, 2 Sep 2022 06:58:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232239AbiIBG6w (ORCPT ); Fri, 2 Sep 2022 02:58:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235175AbiIBG6q (ORCPT ); Fri, 2 Sep 2022 02:58:46 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAF30BBA7E for ; Thu, 1 Sep 2022 23:58:41 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 8EAB33400B; Fri, 2 Sep 2022 06:58:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1662101920; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=slSo8r2OGE9hA7/GOrn6tbkh0qTttNDl+56W5J/9f/0=; b=scZTt4CDGMo/PT8VT0nv4CMIu0ID/flQkUEh2UDW7nJJEMBx+8iLWVSdepirgJRtWWTdAp QIDoaZlIIn7u0KUCkZ9Z4IooIFQZYi93V8mKq5T8r9ogxozkAo/h+G8OP3vD9r1Ka2/LXY ciQj0ikbF+4om9KJjEYxwT1SxQXrvYs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1662101920; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=slSo8r2OGE9hA7/GOrn6tbkh0qTttNDl+56W5J/9f/0=; b=M+tIQnSne3JeonZRZ+MQQ3k+QvwY9RzPXiSxaR2iZd2YhPsRMasruTKgQooXoO/RRyj00f TmH7AO3h6/zP1YBw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 6D35F13328; Fri, 2 Sep 2022 06:58:40 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id xKXRGaCpEWPvUQAAMHmgww (envelope-from ); Fri, 02 Sep 2022 06:58:40 +0000 Date: Fri, 02 Sep 2022 08:58:39 +0200 Message-ID: <87pmgew9cw.wl-tiwai@suse.de> From: Takashi Iwai To: Pattara Teerapong Cc: alsa-devel@alsa-project.org, Jaroslav Kysela , Takashi Iwai , linux-kernel@vger.kernel.org Subject: Re: [PATCH] ALSA: aloop: Fix random zeros in capture data when using jiffies timer In-Reply-To: <20220901144036.4049060-1-pteerapong@chromium.org> References: <20220901144036.4049060-1-pteerapong@chromium.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 01 Sep 2022 16:40:36 +0200, Pattara Teerapong wrote: > > In loopback_jiffies_timer_pos_update(), we are getting jiffies twice. > First time for playback, second time for capture. Jiffies can be updated > between these two calls and if the capture jiffies is larger, extra zeros > will be filled in the capture buffer. > > Change to get jiffies once and use it for both playback and capture. > > Signed-off-by: Pattara Teerapong Thanks, applied. Takashi