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 D5CEBC54798 for ; Thu, 7 Mar 2024 13:24:46 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 0091884A; Thu, 7 Mar 2024 14:24:34 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0091884A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1709817884; bh=Bw4HU4Tl1OP6J55CeRLQChe2rUzmalbRo+zdkxj5SSA=; h=From:To:In-Reply-To:References:Subject:Date:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From; b=CffKSV7BUqPhjw5gk+VQL3qjQAdMeSc+QTHP3/wUUalOrmnh1RHUtf2yRTNtCNsbj iw+EWeRo+B6tqyfOmKRlmh6xKuQTwlIsDAW3C1eLtjZtKfgyzWL/QgByhqcNb4Vss1 +unHqu2hxkUJwtkWG5euxmbw72jzxSvWBuBKQ/hk= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 45D3CF8059F; Thu, 7 Mar 2024 14:24:12 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id EAE8BF80571; Thu, 7 Mar 2024 14:24:11 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 354B2F8024E; Thu, 7 Mar 2024 14:24:06 +0100 (CET) Received: from webhooks-bot.alsa-project.org (vmi242170.contaboserver.net [207.180.221.201]) by alsa1.perex.cz (Postfix) with ESMTP id 8188FF80087 for ; Thu, 7 Mar 2024 14:24:01 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8188FF80087 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit From: GitHub issues - opened To: alsa-devel@alsa-project.org In-Reply-To: <1709817839083246231-webhooks-bot@alsa-project.org> References: <1709817839083246231-webhooks-bot@alsa-project.org> Subject: Strange trigger_htstamp after snd_pcm_drop Message-Id: <20240307132406.354B2F8024E@alsa1.perex.cz> Date: Thu, 7 Mar 2024 14:24:06 +0100 (CET) Message-ID-Hash: OELUWQEAY6J4DS6I3YNPABYE7326IXMM X-Message-ID-Hash: OELUWQEAY6J4DS6I3YNPABYE7326IXMM X-MailFrom: github@alsa-project.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: alsa-project/alsa-lib issue #387 was opened from z-s-e: I have conceptually the following situation (actual code can be found [here](https://gitlab.com/z-s-e/alpe/-/blob/main/src/alpe_alsa.cpp?ref_type=heads#L590)): ``` // sound is currently playing snd_pcm_status(pcm, pcm_status); snd_pcm_status_get_htstamp(pcm_status, &ts1); snd_pcm_drop(pcm); snd_pcm_status(pcm, pcm_status); snd_pcm_status_get_trigger_htstamp(status, &ts2); ``` On my hardware I get a `ts2` timestamp that is earlier than `ts1`. From my understanding that should be impossible, as `ts2` should contain the timestamp of when the drop happened, which should obviously be after `ts1`. Is that a bug or do I misunderstand the meaning of those timestamps? Issue URL : https://github.com/alsa-project/alsa-lib/issues/387 Repository URL: https://github.com/alsa-project/alsa-lib