Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3006892rdg; Tue, 17 Oct 2023 01:21:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFtSWlMiUzqjjTUZOBEvMRMUtBw1qwadkgKwBGmOlmAoNrlf7Y1tPOTQp+se4iKjMNT+iNO X-Received: by 2002:a17:90a:ee45:b0:27d:2663:c5f4 with SMTP id bu5-20020a17090aee4500b0027d2663c5f4mr1509593pjb.47.1697530872767; Tue, 17 Oct 2023 01:21:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697530872; cv=pass; d=google.com; s=arc-20160816; b=GdXilNR0U9vBHajqLVs9QQDnx+lgiSLMvVGu9eht+aJtd14pooORAQrXF9zCMZEazz pEBlDIIfmM2jsXS2+16WB9dKY22xu241nNbo/1iH9XWoUUjS3Sl1EwBvthlsDeOqWYu1 B8WzWG8fAabXyX/Blvgwd6FsJtCJTaog3DxHRU06ovVFV+Ah1p95zQnQzwb76u4EyUA+ qa3S8bIfBLKYkSEVuzGQKY0Q0mUR1wqta/7HBTBoGC0nrey5zxhd6NcP00gs2JxOaB2G Z8k6/euQMAY2H6TIAdhmFFyKBjB1l+gAwwMx58PYIiJ9ccYYU44eBJysJa32Ri0ZGl00 p+xA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:dkim-signature:mime-version:in-reply-to:from :content-language:references:cc:to:subject:date:message-id; bh=PbrB+oovZlsolrqWuTFmxhjIjrg8bn6xnv+DTNLIKSA=; fh=khxZLKPN7q/YZxE2lAzWer8vUcmDdQTiOarrPp5aOHw=; b=UP331VXphmSwdE5VuVqZH/qdNbIvB14zN5Xr8wuzFTjxL5Fl8vRZ7ncaajvSG4HtOE ZOOJ5DC2NXMLxPYzZyHLpF++a5MDD9IbZ8L+/BKkMwTwjWYUSVonWL5dx9LHQVlVatU8 iRDqV7ntDsedeSYM1eSAfuhQl0vJkRJb4xfeika0wRs1G+KpujtEBMbM2qwPGBKGz/Ke 50S+NIHNmfKmAu8StDA5sFicLUaGaw98s7o2WORITvuLVI8sf6kd92E8ihem9C1XOj1K 7evE0YuFiZZEBiwZw2/g9yomIXOb+8gsPYtegnEIRGssCK5ph8Tin1GUe7BdJXd3vcq6 d4aw== ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@opensynergy.com header.s=TM-DKIM-20210503141657 header.b=bLf6nPPM; arc=pass (i=1 spf=pass spfdomain=opensynergy.com dkim=pass dkdomain=opensynergy.com dmarc=pass fromdomain=opensynergy.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=opensynergy.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id i71-20020a63874a000000b00573f885c4easi1258600pge.753.2023.10.17.01.21.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 01:21:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=fail header.i=@opensynergy.com header.s=TM-DKIM-20210503141657 header.b=bLf6nPPM; arc=pass (i=1 spf=pass spfdomain=opensynergy.com dkim=pass dkdomain=opensynergy.com dmarc=pass fromdomain=opensynergy.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=opensynergy.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 8024F807216F; Tue, 17 Oct 2023 01:20:25 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234571AbjJQIUH (ORCPT + 99 others); Tue, 17 Oct 2023 04:20:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232134AbjJQIUG (ORCPT ); Tue, 17 Oct 2023 04:20:06 -0400 X-Greylist: delayed 490 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 17 Oct 2023 01:20:01 PDT Received: from refb02.tmes.trendmicro.eu (refb02.tmes.trendmicro.eu [18.185.115.58]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 995B593 for ; Tue, 17 Oct 2023 01:20:01 -0700 (PDT) Received: from 104.47.7.169_.trendmicro.com (unknown [172.21.9.43]) by refb02.tmes.trendmicro.eu (Postfix) with ESMTPS id 1E65710998A0F for ; Tue, 17 Oct 2023 08:11:54 +0000 (UTC) Received: from 104.47.7.169_.trendmicro.com (unknown [172.21.196.113]) by repost01.tmes.trendmicro.eu (Postfix) with SMTP id 2B89F100021E1; Tue, 17 Oct 2023 08:11:46 +0000 (UTC) X-TM-MAIL-RECEIVED-TIME: 1697530305.624000 X-TM-MAIL-UUID: b31f0a6e-29cf-415c-8686-2caf44f115c2 Received: from DEU01-BE0-obe.outbound.protection.outlook.com (unknown [104.47.7.169]) by repre01.tmes.trendmicro.eu (Trend Micro Email Security) with ESMTPS id 9897510001285; Tue, 17 Oct 2023 08:11:45 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cRE27YsJs17t4edkCIYO68CNBwMfqj2XQoXqMtoXaaofxXmBct2jeNaq/AXJzZZy1NQtS8iFOOy05V5Y+yfxrYST4meZd0EWmN0kh/U/jdQ11VGx8x4Nfb/Y6VUwNvW0YMLJFoiJY+QSZVzDihTLUk771k3KIOMhNgK1heE0fbw1atOIdShnEYdaHzIB5c0xXLpJYoYvKUxDFtxznm1BmlWfSkD2L4vMFISCsIpdX2mLN2IX+C7m3iqhSULY1X2qht6VaDQx/7n+ebUlloQ5+trx6BnnDgOKqJezNPEpLX3QaLNworOMCQJNTJ1+JMYaFq/pBV/adIayuyy88/CxJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=PbrB+oovZlsolrqWuTFmxhjIjrg8bn6xnv+DTNLIKSA=; b=YGMTg9NvfefXG+qR9D/NidnW3orqvmH06SbMMl+p/7uYOe+8m9zUFERoBiJPNdWa38kSvdOv0rWmaCwmcJDi9w9UYtOyYqy+MdKbcWUglgq1vtV/Z6WWcN/awI4GgRkUmU9HSfBfgn7+BpUb1GRWZvqEX7H2rF8yg3X7uUDo+waxgRCGr1u5yGEyQz7zQumQimobvUfejg9IyDTnxgYgkywlFfKryvg85PVAhVY3SYNC7Vx5vt9BP01kuo4hwyEbDPQDyQoANt2m1ka7F/FnnBtpAcHkLqugNJniq0vo24xaWLuCiVjNPAYEULymv0rHsAFB2jy2qeeWGBiaa9C2bQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=opensynergy.com; dmarc=pass action=none header.from=opensynergy.com; dkim=pass header.d=opensynergy.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=opensynergy.com; Content-Type: multipart/mixed; boundary="------------5wSxwIAIFbg74K4UEUVVU5hV" Message-ID: <6384c982-2b6d-474b-bf29-d495422aff20@opensynergy.com> Date: Tue, 17 Oct 2023 17:11:30 +0900 Subject: Re: [RFC PATCH] ALSA: virtio: use copy and fill_silence callbacks To: Matias Ezequiel Vara Larsen , mst@redhat.com Cc: perex@perex.cz, tiwai@suse.com, virtualization@lists.linux-foundation.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, pbonzini@redhat.com, stefanha@redhat.com, sgarzare@redhat.com, manos.pitsidianakis@linaro.org, mripard@redhat.com References: Content-Language: en-US From: Anton Yakovlev In-Reply-To: X-ClientProxiedBy: BE1P281CA0105.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:79::16) To BEZP281MB2374.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:5c::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BEZP281MB2374:EE_|FR0P281MB2336:EE_ X-MS-Office365-Filtering-Correlation-Id: 939da832-cab8-4756-122d-08dbcee8b330 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3RtIZdc9Gib4NrFTk1ytC/yVDgEI2uHnkXieJ1fBUHN8CvCTLbRfFPG/K+MkozBck759MoI5Hec58uJ2SO1dqA1gRGn81b2TD59LLsmxMN9KrtOjYWLXSD2isyO+ykoQDsWcXOD0Y+AMtRvbvcKpi+90Ateos0VWRuQIZD8wCZFkKkrp+1+dYC/MibQl8csilk4BRuSPjoFxZyS3pyxKM13BleYiXcRVFTyeh6K2vPdD5w2lsdmOu2PxRRVOG/Smwzb3Yg/X9bqdk/cxzfNZx4q2/7jR2vpQARJ7Tdr6QzBpCT35kCHmTEf13sEHb54MYk4h3OYznTi6uJED23XP61h/cOT04ImAHOrRxP/5bWb8WNxQMW/1BHcqrssYloOGTcDhHGrd5kD6+Je4lp5fonLUvw4WkrEuAG05MTuXjIDNW7H9JBbpKY+gA3Y4nbqFKvaQqyFBSvUGRCqd+P7JUJ1ELNBt6V9h29PVT2lkauVjjC9F/CVzfBlzdx6ys/UeUZ2v/vk/exgFofCz5xKfn24s69C7SMnjhiiv8IOhAnT9zsQKWVhvx8Wum9VqZVCOUovP+T9+bUB5j8FcVx7bxT6fxyIgpVQWcnnocPdGlKZ5ftKtP1osZ/if1FUCjGEaqTz6wGjOq1d8H93uKhrkKw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BEZP281MB2374.DEUP281.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230031)(346002)(136003)(376002)(366004)(396003)(39840400004)(230922051799003)(451199024)(186009)(1800799009)(64100799003)(31686004)(66476007)(478600001)(42186006)(66946007)(66556008)(316002)(83380400001)(31696002)(86362001)(38100700002)(53546011)(2616005)(26005)(33964004)(41300700001)(44832011)(5660300002)(235185007)(4326008)(8936002)(2906002)(36756003)(7416002)(30864003)(8676002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MmtxM2RxN1ZRNlByaVNqeC9tOFpwUGZldWpUaWptZkRpS0twZDB6SlJ6R2FT?= =?utf-8?B?N08yZk9PWmpLUi90VlcweHJlbkRITndkSlFhR0p1ODBENzlvOTVyNjA2OW9I?= =?utf-8?B?MEFjK3J5WkhhbW1oTDJhRGhvejkxS2o5bUVvK3BLeFFHK2Rla3dhL29mT3Bh?= =?utf-8?B?aVNDcENYTk1PWXI0QmwzV2Zucms5bmZmZkR3bHdHTlJxMHM5cTNvYjg5WGNy?= =?utf-8?B?V2VXako0VUxhVncvdnJEOUZraDNKdEo3MEViSDQ5TzJiWUZKTjJuckhlR1pS?= =?utf-8?B?UmpJVjhzdWlHM20xanl1U081RHNXN3dSd0JEaVBLVzk1bjhQT1hmZ0k4UktN?= =?utf-8?B?WVNYb3BNcVlyZnhTTUJtZjlBRXJ5MytyVzZ4NUtWMDhJK1FSMW5vQVk1SHlk?= =?utf-8?B?Vk5yRy9TZ1o0aHhpK0ZWVG91TXk5cG9sS2UyamtFV2ZsZkNvTHJQOHNLQkNB?= =?utf-8?B?TGt3UWpwQzFrS2Z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?= =?utf-8?B?SzJlWUVERzZLeFNJVzlLZzNGeHR6QjhyNm9NSmorZ0R2dk9aSVpmZ2pJRi9B?= =?utf-8?B?ajZicGRVWlpwTGZIRmtXRC9ieW9uZUxNVFNCcWZpaGgwTGJLMjFaemFMNzZN?= =?utf-8?B?RUVQbmswR2o3aDR6ZXh2SnFWY0hBQWhmTVFPZUtSVUkrcTBNZEh3YVNQMXJL?= =?utf-8?B?TXhZR05EQ2pvR1I2SnVLTVhXTTBJRXhsekduVHVkWG01THpWdkNpa2o4RGk1?= =?utf-8?B?K0dua3dhR2RpTHRNL2ZGZEtmUXR2S09aSThBZElXNTZjU0lwK0NZWGdub1Qy?= =?utf-8?B?UWlPTG9RTVBWb3RwU0VKTHpnNmZZWU9nT2R1aHRGM1hOMzBvVnpjREErM0Jl?= =?utf-8?B?U3E3cW9DOHNDQkJyOG5ydTZDWE5FeXhFTjduSmt3RlJwbzRFbk9lYURVaHBm?= =?utf-8?B?ZWxXeklJUkorUTcySGNRQ1RSL0txaVFsbTVtdXY0VG5EVC9LdG52VUI2TjBC?= =?utf-8?B?VEpWc2Nmc09aWUFmOWpLQmR4azZZbmk3dFppZmUvbCtEY0RDb2xUU3FqQnkw?= =?utf-8?B?NjdPN0xLbmxla2IrZDNMRE45QmJWZ3A3VmRkYnlKd0c1RUxZZVBnRVU2TU4y?= =?utf-8?B?OHBYVlUyLysvemF6OHVFc2Nrc2thdFR3QjFJU09BR2w3K2U1OFh2bE9wUDZX?= =?utf-8?B?c3RQNkdDSzlpbDFxdzg4enZGR25IVUR2OHlKUFMwZ2wveGRjL3ZUTk9OV1hp?= =?utf-8?Q?HcJyA/KuWrKxkstk/AGpJ0Hqq?= X-OriginatorOrg: opensynergy.com X-MS-Exchange-CrossTenant-Network-Message-Id: 939da832-cab8-4756-122d-08dbcee8b330 X-MS-Exchange-CrossTenant-AuthSource: BEZP281MB2374.DEUP281.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Oct 2023 08:11:43.8303 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 800fae25-9b1b-4edc-993d-c939c4e84a64 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 3w7T/xXAxtZvgudg/N9elnOzGWh8A8q5rWxy0REcpuP1jkelTFtU8YJHisGUUGM7yt5CiBO23tRexPVYeGDR3w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: FR0P281MB2336 X-TM-AS-ERS: 104.47.7.169-0.0.0.0 X-TMASE-Version: StarCloud-1.3-9.1.1015-27940.006 X-TMASE-Result: 10--33.263800-4.000000 X-TMASE-MatchedRID: 6OB6z8J7vlHb9FS28tHdcZGPSO6O5JCao4iCakRRMU13UOL9JcMKjtmf OvGYKiTYVw0Hm1foGgLUPeYV/AzEBlPRFBC0RHkPDDgMha/WNJVtT5dsVizXEvKRRDf7VCkpTdI L1uQT1jI2vloDwxXReRzJ0wDp/7VY+6OAjxbdVB2t/Tca+iJ/9+fShpTpYz77pZd6jUkGtmDDmd nLZf43Ht77mXRNIBCXNaDWijGbB53W+2YUVNe1Ywvpq/ti8dx8e7c6tEkXezscO9g0wIXVO79U+ uceYFnjaHUl2AwNuk+F8FPxso5y0WSgE+QHk4H2+3f6eMMms7gGAyO8UPwf/chGESF2QtYSi8+I Gr+Jb3Uyk/Hw4XN9jU/+LL3tkSXkQrGWBYGHVP07cxOrTsG6RCW82bsC8fuFZAvO4QbJLKNwk2X uU2aD+n7IEsrGVz2MjdDhGuJFbM8Asgl6PZgqJC6854ELk770UjOqjUXzJBK3+N/b9/jBFd5hLj 7OjPSxky6b1p6qbktEvQzD16INSHSid6aim3FY39nur6FlBV7/EYhqcx9Nu6jzcFhHfnxu75PzL Av3ywa/kepMMxSwrQvjx30v1PWnmYcrH7n1/Zq839xuIQKj/YsWJGFVmRxVQg/DWi2s2tEojxAN JtkcjpHaNnNrIRLo5Ut5abjquGI9ykzKox8BecVNAYApHGPk2j7jyCKpnCe3Hp9onN135Wp2VXU uZsR8A/lH/MvdoiadAEYv/mZFKZBlLa6MK1y4 X-TMASE-XGENCLOUD: 38d1e1b5-acec-4690-b1b4-f20fa81dd902-0-0-200-0 X-TM-Deliver-Signature: A078A070839785BEE5247BDF0D1A9DC6 X-TM-Addin-Auth: VrrKMsHfhnFRq/ofEJJl+rjwQoDGb6brLotK+j4o9ivaahCgbRYOyik6Q4R 4S5gzlemnhMWEohjqPVbbJoKv/1NPhkw10zvszjpT+5KFc9COUS0Nvva75cxrsmEL88aAOVhotx Y4o/ij7+nBD0ZwaKsDZWPwX/2XjaJE4MqBXMJ1IJkV5bLnRROiBlcayqP99aqwjakIIFxC3glq/ dl5818sOn9wPwnYcZLh6LiU4qO+zW28vb7DRntzL6PQ+0om3THzS5s/bliZapBpmxz9J/HE9SD/ DoVIaKK+f901TMA=.BQ8Y6GYiP81tndLGtMQXSsxU9iuwTqwiV7wrpZCNBCVbA2dAWSF7ztQfxS yoANlvmeuTNh8PWuNzTndAXle5hHCAsxGUWbDJRzRg2EmfnOb4YiLm5Zj6BJBxwQTAErWtRt62Q 8JWZ39ySfJQlZeXiZu4aa5P0R8/hiwkZ1M9l86mgltmX7JhCoy2HoPvj5EI+JhtxGIum1wtVbqI 16LP0jZcbxFBjqNgt+jEixg+/XxetX7ipSUaktT/faMJMppJrub38KW1tuqAXHq2kBdu/67lIhj rcVH5XqC78dNDB/9V1nf/yka9BJZxgLrx1/RjWof6A9hisvJowFwmuqQ8UQ== X-TM-Addin-ProductCode: EMS DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=opensynergy.com; s=TM-DKIM-20210503141657; t=1697530306; bh=T3ANmmB8l5EXi6X401WZVQn36PZqWU833Vd/WtgkIbY=; l=31308; h=Date:To:From; b=bLf6nPPMLFuVt51Fe4oPXk+r0uWhC3GkiEBcEXne9ExhwrZKlLGOm57zRW8o6Bq0z Dq3DJPNNay/DcGQSv/O2BZ8t3WbPyHCm7tJiveu8SQSB9V5go8+BtoGUh6OSnqGAIX 1FcAZ9G+FGAAv3TmIZm3oAZRm+wfHEomdYJN0TBBS63emyAabyGIMvDph+mX/fgKr3 jOogTEpc4H17wXjny1NvZmRdLJm8j/CDvJBRuCfqP+WQM7bwJ+xoLDbJknFDVt2gKT lJoD1fN/mFNBucmXt8rtSW22IJ+0ROHJNjeVeA/mekS9SL5OFFRdEvZvzYKD+CEkjA ZJHiRwQuBQ0eQ== X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 17 Oct 2023 01:20:25 -0700 (PDT) --------------5wSxwIAIFbg74K4UEUVVU5hV Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Matias, Thanks for your help! I updated and corrected your patch a little bit (see attachment). All changes were tested, there were no problems on my side. See also a few inline comments. On 13.10.2023 00:10, Matias Ezequiel Vara Larsen wrote: > This commit replaces the mmap mechanism with the copy() and > fill_silence() callbacks for both capturing and playback for the > virtio-sound driver. This change is required to prevent the updating of > the content of a buffer that is already in the available ring. > > The current mechanism splits a dma buffer into descriptors that are > exposed to the device. This dma buffer is shared with the user > application. When the device consumes a buffer, the driver moves the > request from the used ring to available ring. > > The driver exposes the buffer to the device without knowing if the > content has been updated from the user. The section 2.8.21.1 of the > virtio spec states that: "The device MAY access the descriptor chains > the driver created and the memory they refer to immediately". If the > device picks up buffers from the available ring just after it is > notified, it happens that the content may be old. > > By providing the copy() callback, the driver first updates the content > of the buffer, and then, exposes the buffer to the device by enqueuing > it in the available ring. Thus, device always picks up a buffer that is > updated. > > For capturing, the driver starts by exposing all the available buffers > to device. After device updates the content of a buffer, it enqueues it > in the used ring. It is only after the copy() for capturing is issued > that the driver re-enqueues the buffer in the available ring. > > Note that the copy() function assumes that user is always writing a > period. Testing shows that this is true but I may be wrong. This RFC > aims at clarifying this. > > Signed-off-by: Matias Ezequiel Vara Larsen > --- > sound/virtio/virtio_pcm.c | 11 ++-- > sound/virtio/virtio_pcm.h | 9 +++- > sound/virtio/virtio_pcm_msg.c | 50 ++++++++++++++++--- > sound/virtio/virtio_pcm_ops.c | 94 +++++++++++++++++++++++++++++++---- > 4 files changed, 137 insertions(+), 27 deletions(-) > > diff --git a/sound/virtio/virtio_pcm.c b/sound/virtio/virtio_pcm.c > index c10d91fff2fb..bfe982952303 100644 > --- a/sound/virtio/virtio_pcm.c > +++ b/sound/virtio/virtio_pcm.c > @@ -104,8 +104,6 @@ static int virtsnd_pcm_build_hw(struct virtio_pcm_substream *vss, > * only message-based transport. > */ > vss->hw.info = > - SNDRV_PCM_INFO_MMAP | > - SNDRV_PCM_INFO_MMAP_VALID | > SNDRV_PCM_INFO_BATCH | > SNDRV_PCM_INFO_BLOCK_TRANSFER | > SNDRV_PCM_INFO_INTERLEAVED | We need also necessary to disable rewinds, since now only sequential reading/writing of frames is supported. > @@ -471,12 +469,11 @@ int virtsnd_pcm_build_devs(struct virtio_snd *snd) > for (kss = ks->substream; kss; kss = kss->next) > vs->substreams[kss->number]->substream = kss; > > - snd_pcm_set_ops(vpcm->pcm, i, &virtsnd_pcm_ops); > + if (i == SNDRV_PCM_STREAM_CAPTURE) > + snd_pcm_set_ops(vpcm->pcm, i, &virtsnd_pcm_capture_ops); > + else > + snd_pcm_set_ops(vpcm->pcm, i, &virtsnd_pcm_playback_ops); > } > - > - snd_pcm_set_managed_buffer_all(vpcm->pcm, > - SNDRV_DMA_TYPE_VMALLOC, NULL, > - 0, 0); It is not right. Buffer allocation/freeing is controlled by the kernel subsystem, so the driver doesn't have to worry about it. > } > > return 0; > diff --git a/sound/virtio/virtio_pcm.h b/sound/virtio/virtio_pcm.h > index 062eb8e8f2cf..1c1106ec971f 100644 > --- a/sound/virtio/virtio_pcm.h > +++ b/sound/virtio/virtio_pcm.h > @@ -50,6 +50,8 @@ struct virtio_pcm_substream { > struct work_struct elapsed_period; > spinlock_t lock; > size_t buffer_bytes; > + u8 *buffer; > + size_t buffer_sz; > size_t hw_ptr; > bool xfer_enabled; > bool xfer_xrun; > @@ -90,7 +92,8 @@ struct virtio_pcm { > struct virtio_pcm_stream streams[SNDRV_PCM_STREAM_LAST + 1]; > }; > > -extern const struct snd_pcm_ops virtsnd_pcm_ops; > +extern const struct snd_pcm_ops virtsnd_pcm_playback_ops; > +extern const struct snd_pcm_ops virtsnd_pcm_capture_ops; > > int virtsnd_pcm_validate(struct virtio_device *vdev); > > @@ -117,7 +120,9 @@ int virtsnd_pcm_msg_alloc(struct virtio_pcm_substream *vss, > > void virtsnd_pcm_msg_free(struct virtio_pcm_substream *vss); > > -int virtsnd_pcm_msg_send(struct virtio_pcm_substream *vss); > +int virtsnd_pcm_msg_send(struct virtio_pcm_substream *vss, bool single); > + > +int virtsnd_pcm_msg_send_locked(struct virtio_pcm_substream *vss, bool single); > > unsigned int virtsnd_pcm_msg_pending_num(struct virtio_pcm_substream *vss); > > diff --git a/sound/virtio/virtio_pcm_msg.c b/sound/virtio/virtio_pcm_msg.c > index aca2dc1989ba..9a5f9814cb62 100644 > --- a/sound/virtio/virtio_pcm_msg.c > +++ b/sound/virtio/virtio_pcm_msg.c > @@ -132,7 +132,6 @@ static void virtsnd_pcm_sg_from(struct scatterlist *sgs, int nsgs, u8 *data, > int virtsnd_pcm_msg_alloc(struct virtio_pcm_substream *vss, > unsigned int periods, unsigned int period_bytes) > { > - struct snd_pcm_runtime *runtime = vss->substream->runtime; > unsigned int i; > > vss->msgs = kcalloc(periods, sizeof(*vss->msgs), GFP_KERNEL); > @@ -142,7 +141,7 @@ int virtsnd_pcm_msg_alloc(struct virtio_pcm_substream *vss, > vss->nmsgs = periods; > > for (i = 0; i < periods; ++i) { > - u8 *data = runtime->dma_area + period_bytes * i; > + u8 *data = vss->buffer + period_bytes * i; > int sg_num = virtsnd_pcm_sg_num(data, period_bytes); > struct virtio_pcm_msg *msg; > > @@ -186,10 +185,12 @@ void virtsnd_pcm_msg_free(struct virtio_pcm_substream *vss) > /** > * virtsnd_pcm_msg_send() - Send asynchronous I/O messages. > * @vss: VirtIO PCM substream. > + * @single: true to enqueue a single message, false to enqueue all of them. > * > * All messages are organized in an ordered circular list. Each time the > - * function is called, all currently non-enqueued messages are added to the > - * virtqueue. For this, the function keeps track of two values: > + * function is called, first non-enqueued message is added to the virtqueue. > + * When single is True, only the first message is enqueued. When False, all the > + * available messages are enqueued. The function keeps track of two values: > * > * msg_last_enqueued = index of the last enqueued message, > * msg_count = # of pending messages in the virtqueue. > @@ -198,7 +199,7 @@ void virtsnd_pcm_msg_free(struct virtio_pcm_substream *vss) > * spinlocks to be held by caller. > * Return: 0 on success, -errno on failure. > */ > -int virtsnd_pcm_msg_send(struct virtio_pcm_substream *vss) > +int virtsnd_pcm_msg_send(struct virtio_pcm_substream *vss, bool single) I would propose to make this function more generic, specifing the offset and size for the modified part of the buffer. This way no assumptions need to be made. We can also guarantee that we only put fully written/read messages into the virtqueue. > { > struct snd_pcm_runtime *runtime = vss->substream->runtime; > struct virtio_snd *snd = vss->snd; > @@ -211,6 +212,13 @@ int virtsnd_pcm_msg_send(struct virtio_pcm_substream *vss) > i = (vss->msg_last_enqueued + 1) % runtime->periods; > n = runtime->periods - vss->msg_count; > > + if (single) { > + if (n < 1) > + return -EFAULT; > + > + n = 1; > + } > + > for (; n; --n, i = (i + 1) % runtime->periods) { > struct virtio_pcm_msg *msg = vss->msgs[i]; > struct scatterlist *psgs[] = { > @@ -250,6 +258,36 @@ int virtsnd_pcm_msg_send(struct virtio_pcm_substream *vss) > return 0; > } > > +/** > + * virtsnd_pcm_msg_send_locked() - Send asynchronous I/O messages. > + * @vss: VirtIO PCM substream. > + * @single: true to enqueue a single message, false to enqueue all of them. > + * > + * This function holds the tx/rx queue and the VirtIO substream spinlocks > + * before calling virtsnd_pcm_msg_send(). This is a wrapper function to ease > + * the invocation of virtsnd_pcm_msg_send(). > + * > + * Context: Any context. > + * Return: 0 on success, -errno on failure. > + */ > + > +int virtsnd_pcm_msg_send_locked(struct virtio_pcm_substream *vss, bool single) > +{ > + struct virtio_snd_queue *queue; > + int rc; > + unsigned long flags; > + > + queue = virtsnd_pcm_queue(vss); > + > + spin_lock_irqsave(&queue->lock, flags); > + spin_lock(&vss->lock); > + rc = virtsnd_pcm_msg_send(vss, single); > + spin_unlock(&vss->lock); > + spin_unlock_irqrestore(&queue->lock, flags); > + > + return rc; > +} > + > /** > * virtsnd_pcm_msg_pending_num() - Returns the number of pending I/O messages. > * @vss: VirtIO substream. > @@ -320,8 +358,6 @@ static void virtsnd_pcm_msg_complete(struct virtio_pcm_msg *msg, > le32_to_cpu(msg->status.latency_bytes)); > > schedule_work(&vss->elapsed_period); > - > - virtsnd_pcm_msg_send(vss); > } else if (!vss->msg_count) { > wake_up_all(&vss->msg_empty); > } > diff --git a/sound/virtio/virtio_pcm_ops.c b/sound/virtio/virtio_pcm_ops.c > index f8bfb87624be..a208439dbff8 100644 > --- a/sound/virtio/virtio_pcm_ops.c > +++ b/sound/virtio/virtio_pcm_ops.c > @@ -238,6 +238,11 @@ static int virtsnd_pcm_hw_params(struct snd_pcm_substream *substream, > */ > virtsnd_pcm_msg_free(vss); > > + vss->buffer_sz = params_buffer_bytes(hw_params); > + vss->buffer = alloc_pages_exact(vss->buffer_sz, GFP_KERNEL); > + if (!vss->buffer) > + return -ENOMEM; > + > return virtsnd_pcm_msg_alloc(vss, params_periods(hw_params), > params_period_bytes(hw_params)); > } > @@ -257,6 +262,11 @@ static int virtsnd_pcm_hw_free(struct snd_pcm_substream *substream) > if (!virtsnd_pcm_msg_pending_num(vss)) > virtsnd_pcm_msg_free(vss); > > + if (vss->buffer) { > + free_pages_exact(vss->buffer, vss->buffer_sz); > + vss->buffer = NULL; > + } > + > return 0; > } > > @@ -331,15 +341,18 @@ static int virtsnd_pcm_trigger(struct snd_pcm_substream *substream, int command) > case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: > queue = virtsnd_pcm_queue(vss); > > - spin_lock_irqsave(&queue->lock, flags); > - spin_lock(&vss->lock); > - rc = virtsnd_pcm_msg_send(vss); > - if (!rc) > - vss->xfer_enabled = true; > - spin_unlock(&vss->lock); > - spin_unlock_irqrestore(&queue->lock, flags); > - if (rc) > - return rc; > + // The buffers should be exposed first during capturing so that > + // the device can consume them. Capturing cannot begin > + // otherwise. > + if (vss->direction == SNDRV_PCM_STREAM_CAPTURE) { > + rc = virtsnd_pcm_msg_send_locked(vss, false); > + if (rc) > + return rc; > + } > + > + spin_lock_irqsave(&vss->lock, flags); > + vss->xfer_enabled = true; > + spin_unlock_irqrestore(&vss->lock, flags); > > msg = virtsnd_pcm_ctl_msg_alloc(vss, VIRTIO_SND_R_PCM_START, > GFP_KERNEL); > @@ -450,8 +463,66 @@ virtsnd_pcm_pointer(struct snd_pcm_substream *substream) > return hw_ptr; > } > > -/* PCM substream operators map. */ > -const struct snd_pcm_ops virtsnd_pcm_ops = { > +static int virtsnd_pcm_pb_copy(struct snd_pcm_substream *substream, > + int channel, unsigned long pos, struct iov_iter > + *src, unsigned long count) > +{ > + struct virtio_pcm_substream *vss = snd_pcm_substream_chip(substream); > + > + if (unlikely(pos + count > vss->buffer_sz)) > + return -EINVAL; > + > + if (copy_from_iter(vss->buffer + pos, count, src) != count) > + return -EFAULT; > + > + return virtsnd_pcm_msg_send_locked(vss, true); > +} > + > +static int virtsnd_pcm_cap_copy(struct snd_pcm_substream *substream, > + int channel, unsigned long pos, struct iov_iter > + *dst, unsigned long count) > +{ > + struct virtio_pcm_substream *vss = snd_pcm_substream_chip(substream); > + > + if (unlikely(pos + count > vss->buffer_sz)) > + return -EINVAL; > + > + if (copy_to_iter(vss->buffer + pos, count, dst) != count) > + return -EFAULT; > + > + return virtsnd_pcm_msg_send_locked(vss, true); > +} > + > +static int virtsnd_pcm_pb_silence(struct snd_pcm_substream *substream, int channel, > + unsigned long pos, unsigned long count) > +{ > + struct virtio_pcm_substream *vss = snd_pcm_substream_chip(substream); > + > + if (unlikely(pos + count > vss->buffer_sz)) > + return -EINVAL; > + > + memset(vss->buffer + pos, 0, count); > + > + return virtsnd_pcm_msg_send_locked(vss, true); > +} > + > +/* PCM substream operators map for playback. */ > +const struct snd_pcm_ops virtsnd_pcm_playback_ops = { > + .open = virtsnd_pcm_open, > + .close = virtsnd_pcm_close, > + .ioctl = snd_pcm_lib_ioctl, > + .hw_params = virtsnd_pcm_hw_params, > + .hw_free = virtsnd_pcm_hw_free, > + .prepare = virtsnd_pcm_prepare, > + .trigger = virtsnd_pcm_trigger, > + .sync_stop = virtsnd_pcm_sync_stop, > + .pointer = virtsnd_pcm_pointer, > + .copy = virtsnd_pcm_pb_copy, > + .fill_silence = virtsnd_pcm_pb_silence, > +}; > + > +/* PCM substream operators map for capturing. */ > +const struct snd_pcm_ops virtsnd_pcm_capture_ops = { > .open = virtsnd_pcm_open, > .close = virtsnd_pcm_close, > .ioctl = snd_pcm_lib_ioctl, > @@ -461,4 +532,5 @@ const struct snd_pcm_ops virtsnd_pcm_ops = { > .trigger = virtsnd_pcm_trigger, > .sync_stop = virtsnd_pcm_sync_stop, > .pointer = virtsnd_pcm_pointer, > + .copy = virtsnd_pcm_cap_copy, > }; > > base-commit: 8a749fd1a8720d4619c91c8b6e7528c0a355c0aa -- Anton Yakovlev Senior Software Engineer OpenSynergy GmbH Rotherstr. 20, 10245 Berlin --------------5wSxwIAIFbg74K4UEUVVU5hV Content-Type: text/x-diff; charset=UTF-8; name="0001-ALSA-virtio-use-copy-and-fill_silence-callbacks.patch" Content-Disposition: attachment; filename*0="0001-ALSA-virtio-use-copy-and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