From patchwork Fri Jun 12 09:55:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Hills X-Patchwork-Id: 192453 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=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham 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 94A4BC433DF for ; Fri, 12 Jun 2020 09:59:11 +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 15FC92081A for ; Fri, 12 Jun 2020 09:59: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="agsh/IXK"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=pogo.org.uk header.i=@pogo.org.uk header.b="fGmj5Aoe" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 15FC92081A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=xwax.org 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 A50681670; Fri, 12 Jun 2020 11:58:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A50681670 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1591955949; bh=qNxGjqjiXCcVLD335mlnfogxeLvvF3IMCDpFwRQ9ELQ=; h=From:To:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=agsh/IXKT5c/tejXZDT2lSEeiiCmLwYadZULCeJJMFcNlQgIIz0myDroSGMTMDlso rWY9PiyU/knC6Qljtl1i5Gc23FPYRMpWmkROw2HuZklILKVa/CTodzByrYIT3haZQf 1ep6iAtBqCqMOHXliUOjbjpmzAhC9iMUZQBwoq/k= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 5835FF802E2; Fri, 12 Jun 2020 11:55:48 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id ECEB7F80252; Fri, 12 Jun 2020 11:55:40 +0200 (CEST) Received: from jazz.pogo.org.uk (jazz.pogo.org.uk [213.138.114.167]) (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 ADA51F8021E for ; Fri, 12 Jun 2020 11:55:31 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz ADA51F8021E Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=pogo.org.uk header.i=@pogo.org.uk header.b="fGmj5Aoe" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=pogo.org.uk ; s=a; h=References:In-Reply-To:Message-Id:Date:Subject:To:From:Sender: Reply-To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=NtUWw1ZaFiaubZotRN+aKom7e/OBmHLdxc7fGbsNeAo=; b=fGmj5AoeZLi23NcL07fzOjUfz3 NdoS9RaiL+kp1CfOmvoSc+fLDk+9sif2Dc0TmrW7aZ/kj0xyL/O3qNERais7wqtT8xI3opgI6XF9b 7AItWhDm++nrUSJnpxze6cxVlIjRwdqi7ymJMXl2uUGJOU3LCoR4HS9mv38ifCeyP52+L8zriPakx E+y/U0JEUryv72FQRapNAghIYgA/NelQfYWuRwlaxJgVnge93j8FdTsoKZOjQIa9SLB9kaIH3AxSg SXSGWulwLzazn4qWKyOS3SuhBmb4XCaaTkN+VZPxyGrAbgIULPwV+0QYfr9ivAhSFfLzIi42qTEY0 PN6z/EQg==; Received: from cpc1-hari17-2-0-cust102.20-2.cable.virginm.net ([86.18.4.103] helo=stax.localdomain) by jazz.pogo.org.uk with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93.0.4 (FreeBSD)) (envelope-from ) id 1jjgPK-000ATU-Hz; Fri, 12 Jun 2020 10:55:30 +0100 Received: from mark by stax.localdomain with local (Exim 4.84) (envelope-from ) id 1jjgPK-00012i-6R; Fri, 12 Jun 2020 10:55:30 +0100 From: Mark Hills To: alsa-devel@alsa-project.org Subject: [RFC PATCH 1/9] control: Fix typos in the namehint example Date: Fri, 12 Jun 2020 10:55:22 +0100 Message-Id: <20200612095530.3970-1-mark@xwax.org> X-Mailer: git-send-email 2.17.5 In-Reply-To: <2006121020220.23374@stax.localdomain> References: <2006121020220.23374@stax.localdomain> 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" Ths "namehint" is a list, and there doesn't seem to have been any history where the separator would be a colon. --- src/control/namehint.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/control/namehint.c b/src/control/namehint.c index ecd470f3..d81d3a7e 100644 --- a/src/control/namehint.c +++ b/src/control/namehint.c @@ -543,10 +543,10 @@ static int add_software_devices(snd_config_t *config, snd_config_t *rw_config, * User-defined hints are gathered from namehint.IFACE tree like: * * - * namehint.pcm {
+ * namehint.pcm [
* myfile "file:FILE=/tmp/soundwave.raw|Save sound output to /tmp/soundwave.raw"
- * myplug "plug:front:Do all conversions for front speakers"
- * } + * myplug "plug:front|Do all conversions for front speakers"
+ * ] *
* * Note: The device description is separated with '|' char. From patchwork Fri Jun 12 09:55:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Hills X-Patchwork-Id: 192454 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=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham 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 A8CEDC433DF for ; Fri, 12 Jun 2020 09:58:12 +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 3041D20835 for ; Fri, 12 Jun 2020 09:58:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="JGocM5uV"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=pogo.org.uk header.i=@pogo.org.uk header.b="A1iZ6PEo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3041D20835 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=xwax.org 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 B0A9B167C; Fri, 12 Jun 2020 11:57:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B0A9B167C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1591955890; bh=zfg2WyJ0DZ74Ei9f+F54Jxz8pIxctGaJdAdvct1tBVA=; h=From:To:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=JGocM5uVFF1Zoj1hcNP6t/o8emR69g+MqMDrotWdaaproAEwd8SS5t2W7F67pm1hp yoqNpKmTWHF7RYdeTlg5c1mAglLmHjhg2cNiJjfbkD5KiYoJBU7XwlHoaMfMEE66om +2/C9JNGngibwO/AixMtVt0xLyHYbbOeIsJtcqME= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 8EBCEF802DB; Fri, 12 Jun 2020 11:55:46 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 82146F80058; Fri, 12 Jun 2020 11:55:40 +0200 (CEST) Received: from jazz.pogo.org.uk (jazz.pogo.org.uk [213.138.114.167]) (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 A6633F8024A for ; Fri, 12 Jun 2020 11:55:31 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A6633F8024A Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=pogo.org.uk header.i=@pogo.org.uk header.b="A1iZ6PEo" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=pogo.org.uk ; s=a; h=References:In-Reply-To:Message-Id:Date:Subject:To:From:Sender: Reply-To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=lsV5MuVRMYQN26g3KXblJKqMUTI4fZ8wmu/xyqSYSxI=; b=A1iZ6PEobBceNBNPEN92oKJ3nQ c89SkXMwhqMVvaMLbxWuRkgsRlBvkvjSdOWEfcb8i1HgqgK/a4i2CxISCeHj/F9aK8tgB1IDxyBkM zvImWjftW/unsM+kuJXJGA6r+b0l5BiCHpLSKlXtYn/k/lS1xiuVIQdVViJG0AHGE3AJc6zT6FFR+ 20xdI90HSl4nzmdyuXQQBTvCYt8/g2HF7lD+/BtNPjtwTrA1bydXXSPsGaadTH8NukeaJdBNq6pep j+xptAO7E/jGUM/unM7A+XGV/cDMqwEV7YsgM+ptLiy8PxBtSlJ/i3aKuixhIgM0gMCLR/rymabWv 2Ze2hS1g==; Received: from cpc1-hari17-2-0-cust102.20-2.cable.virginm.net ([86.18.4.103] helo=stax.localdomain) by jazz.pogo.org.uk with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93.0.4 (FreeBSD)) (envelope-from ) id 1jjgPK-000ATY-Ik; Fri, 12 Jun 2020 10:55:30 +0100 Received: from mark by stax.localdomain with local (Exim 4.84) (envelope-from ) id 1jjgPK-000130-7w; Fri, 12 Jun 2020 10:55:30 +0100 From: Mark Hills To: alsa-devel@alsa-project.org Subject: [RFC PATCH 5/9] pcm: Annotate the _delay functions based on findings from the previous bug Date: Fri, 12 Jun 2020 10:55:26 +0100 Message-Id: <20200612095530.3970-5-mark@xwax.org> X-Mailer: git-send-email 2.17.5 In-Reply-To: <2006121020220.23374@stax.localdomain> References: <2006121020220.23374@stax.localdomain> 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" --- src/pcm/pcm_local.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/pcm/pcm_local.h b/src/pcm/pcm_local.h index 1fa8e61d..cf018fc0 100644 --- a/src/pcm/pcm_local.h +++ b/src/pcm/pcm_local.h @@ -582,11 +582,17 @@ static inline snd_pcm_uframes_t snd_pcm_mmap_hw_offset(snd_pcm_t *pcm) return *pcm->hw.ptr % pcm->buffer_size; } +/* + * \retval number of frames pending from application to hardware + */ static inline snd_pcm_uframes_t snd_pcm_mmap_playback_delay(snd_pcm_t *pcm) { return snd_pcm_mmap_playback_hw_avail(pcm); } +/* + * \retval number of frames pending from hardware to application + */ static inline snd_pcm_uframes_t snd_pcm_mmap_capture_delay(snd_pcm_t *pcm) { return snd_pcm_mmap_capture_avail(pcm); From patchwork Fri Jun 12 09:55:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Hills X-Patchwork-Id: 192455 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=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham 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 2E43DC433E0 for ; Fri, 12 Jun 2020 09:56:43 +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 999D72081A for ; Fri, 12 Jun 2020 09:56:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="FsBBoHg9"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=pogo.org.uk header.i=@pogo.org.uk header.b="0Bg70Qpk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 999D72081A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=xwax.org 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 2859B1693; Fri, 12 Jun 2020 11:55:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2859B1693 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1591955801; bh=DtTyOfjrYJsDGllZ2sJffzlpvAFG2F9/qO6reMvLYQY=; h=From:To:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=FsBBoHg9DVQQN2JWXC15+d8Fy+8ckyUQBZD1DlFMm3ne9m8/62+d03/i/LJAbaAkV /cnm5j4a3ZSSHYW/7AjYYYHlUztyXhpOpcQmCY2GYNn83VnR1VrZ9KutBKEpwGtMmL WJ0QsFFsihi7oIyEGdpAY00rdz3862LqTwnRxcFM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 6ED11F8024A; Fri, 12 Jun 2020 11:55:42 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A39B4F802A7; Fri, 12 Jun 2020 11:55:35 +0200 (CEST) Received: from jazz.pogo.org.uk (jazz.pogo.org.uk [213.138.114.167]) (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 8A7CBF801F7 for ; Fri, 12 Jun 2020 11:55:31 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8A7CBF801F7 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=pogo.org.uk header.i=@pogo.org.uk header.b="0Bg70Qpk" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=pogo.org.uk ; s=a; h=References:In-Reply-To:Message-Id:Date:Subject:To:From:Sender: Reply-To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=AnrtO05T6/s7qGFpQKo6mDx183ZPFUUarYztePbdS48=; b=0Bg70QpkHjW1+jYHmATlH+PZ/e dn9DJRxe5SAuAveVA9kSmda2ed250p9KmQFK/N6lrb79tI3VyPZN2ezQJGsEst2qpKAYRs4bt/N0U Kn9ilopUQ3E2Kv7moK1M44gADoiY3tjBmredbsYFzD5QsjHojy3TJncxtE2U8kLzEtg25DntNm5Ye UL5Po8qpilWUJhSGt448EHZm+rnt8wRmyd5lJRd+1v2rdqgvbyL+MMw5W01ubVgKBQW/zA3bL9i3F +Wb+ADcYkFMNU2xPVAT9HSAXd/UBXm4dTEqUm9a27d4Ahlb88mj2y4oM6NN0I3fqewes+aG1sc9UN xNnKk9+A==; Received: from cpc1-hari17-2-0-cust102.20-2.cable.virginm.net ([86.18.4.103] helo=stax.localdomain) by jazz.pogo.org.uk with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93.0.4 (FreeBSD)) (envelope-from ) id 1jjgPK-000ATa-K4; Fri, 12 Jun 2020 10:55:30 +0100 Received: from mark by stax.localdomain with local (Exim 4.84) (envelope-from ) id 1jjgPK-00013A-8Z; Fri, 12 Jun 2020 10:55:30 +0100 From: Mark Hills To: alsa-devel@alsa-project.org Subject: [RFC PATCH 7/9] dsnoop: Another bug where the empty, not full, part of the ringbuffer was observed Date: Fri, 12 Jun 2020 10:55:28 +0100 Message-Id: <20200612095530.3970-7-mark@xwax.org> X-Mailer: git-send-email 2.17.5 In-Reply-To: <2006121020220.23374@stax.localdomain> References: <2006121020220.23374@stax.localdomain> 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" This looks like a simple mistake dating back to 2003 (commit 7470a5b9) where code originated from dmix. --- src/pcm/pcm_dsnoop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pcm/pcm_dsnoop.c b/src/pcm/pcm_dsnoop.c index 790d944c..3588eb91 100644 --- a/src/pcm/pcm_dsnoop.c +++ b/src/pcm/pcm_dsnoop.c @@ -241,7 +241,7 @@ static int snd_pcm_dsnoop_delay(snd_pcm_t *pcm, snd_pcm_sframes_t *delayp) /* Fall through */ case SNDRV_PCM_STATE_PREPARED: case SNDRV_PCM_STATE_SUSPENDED: - *delayp = snd_pcm_mmap_capture_hw_avail(pcm); + *delayp = snd_pcm_mmap_capture_avail(pcm); return 0; case SNDRV_PCM_STATE_XRUN: return -EPIPE; From patchwork Fri Jun 12 09:55:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Hills X-Patchwork-Id: 192452 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=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham 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 856C4C433E0 for ; Fri, 12 Jun 2020 10:00:07 +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 B93D62081A for ; Fri, 12 Jun 2020 10:00:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="NPe8Toja"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=pogo.org.uk header.i=@pogo.org.uk header.b="DqoS/riu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B93D62081A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=xwax.org 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 52C7D1682; Fri, 12 Jun 2020 11:59:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 52C7D1682 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1591956005; bh=tNh5NOqwQdq7ZhyGRvndfVkhBrttNgacdGxWlYKDOuk=; h=From:To:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=NPe8TojaqUiH+WKYZH/taEh8cwYbobCzqghIXXvhEJYC92WfiHKP6IaLJP+qtPQOQ +OTbGC9ptpXV5JaJEv14JwLrOy7zHT6tmvfjeZhfJVPvjFCR1O5PPa55lUBZnbQCDS AkoqbML5dMs3jKWhIW6a8bsFevSXYHc3VarR6fbg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 403F7F802F7; Fri, 12 Jun 2020 11:55:51 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 35CD3F802A7; Fri, 12 Jun 2020 11:55:43 +0200 (CEST) Received: from jazz.pogo.org.uk (jazz.pogo.org.uk [213.138.114.167]) (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 BA954F802A1 for ; Fri, 12 Jun 2020 11:55:31 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BA954F802A1 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=pogo.org.uk header.i=@pogo.org.uk header.b="DqoS/riu" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=pogo.org.uk ; s=a; h=References:In-Reply-To:Message-Id:Date:Subject:To:From:Sender: Reply-To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=cVHNdcB+uxc9rllU/XXpJA3VxgVtG0iEcZzsYEEAYR0=; b=DqoS/riuWYOXtm0bUAV+pVYGkc RzjoOIqHm6L5ywu5DfM4SlGl6MuPX4XjJKvTC/LT7qU7jWzeLf1jFlgkj/eo8/MX4vOYuQvWapp3x w0Hd1Uu/fVu8/r3a5vQ3xwBUxrSxhhckSjYIi6sitVn/ACsVerFD2z5CciUjla14fEprP+7WhsEhB JelRoNxuoVjOL+OyxSDY8pT0+Ues8FHQyA2IVqX7KWlNsJC/XE27IsC+MkY3xn8C/1rSy+cvTehW1 3JePRu9uWitO7P1ueKl65SvAGnHJHMxpOoxYQyelz/7n9oUeYjZLdPMh7yk10vhDAL/rIBOtSCJP6 XHsTvWKQ==; Received: from cpc1-hari17-2-0-cust102.20-2.cable.virginm.net ([86.18.4.103] helo=stax.localdomain) by jazz.pogo.org.uk with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93.0.4 (FreeBSD)) (envelope-from ) id 1jjgPK-000ATb-Kr; Fri, 12 Jun 2020 10:55:30 +0100 Received: from mark by stax.localdomain with local (Exim 4.84) (envelope-from ) id 1jjgPK-00013F-8r; Fri, 12 Jun 2020 10:55:30 +0100 From: Mark Hills To: alsa-devel@alsa-project.org Subject: [RFC PATCH 8/9] dsnoop: Make use of the (previously unused) function Date: Fri, 12 Jun 2020 10:55:29 +0100 Message-Id: <20200612095530.3970-8-mark@xwax.org> X-Mailer: git-send-email 2.17.5 In-Reply-To: <2006121020220.23374@stax.localdomain> References: <2006121020220.23374@stax.localdomain> 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" Match the equivalent funciton for playback. This is on the assumption that values should be capped at zero, which is what _rewindable() implements. --- src/pcm/pcm_dsnoop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pcm/pcm_dsnoop.c b/src/pcm/pcm_dsnoop.c index 3588eb91..7904314c 100644 --- a/src/pcm/pcm_dsnoop.c +++ b/src/pcm/pcm_dsnoop.c @@ -352,7 +352,7 @@ static int snd_pcm_dsnoop_pause(snd_pcm_t *pcm ATTRIBUTE_UNUSED, int enable ATTR static snd_pcm_sframes_t snd_pcm_dsnoop_rewindable(snd_pcm_t *pcm) { - return snd_pcm_mmap_capture_hw_avail(pcm); + return snd_pcm_mmap_capture_hw_rewindable(pcm); } static snd_pcm_sframes_t snd_pcm_dsnoop_rewind(snd_pcm_t *pcm, snd_pcm_uframes_t frames)