Received: by 10.223.164.221 with SMTP id h29csp2224156wrb; Sun, 29 Oct 2017 23:34:47 -0700 (PDT) X-Google-Smtp-Source: ABhQp+S0uw9nrLc+nM3ncznY1oN+Egfkj9wsRpUAlwdUEV5e9VHYXUoq1NtgRLzCcOt5ZdySYz7Z X-Received: by 10.98.139.132 with SMTP id e4mr7832866pfl.172.1509345287820; Sun, 29 Oct 2017 23:34:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509345287; cv=none; d=google.com; s=arc-20160816; b=ghXRFTSTWiJ+8To0JNatvQ2xZSezgezf5z0X693bf1+nNfS27y21viHx+6JulvzXC1 UNl1Q0G24Z3uacrmJ/FgL3Dgc+HZbcIky30b4luj+TAtz8EoAPcryp0AQwBXIVq6klEN WIWo5vxztTXIHaAIWEhn6REnMyz2VDmsIeo3OjJQvk/uT0GFayB6EkoXanzdt0stMs57 OCp3sZUcvEEhETVnDK3MSqNP252nBB4mOcuqZNjM9bW5Zpd7FJsVPDwOh04kUCwsB0tL aamBNGW0nZNuAZcCHBZ15Ps9cbmlahnXi2FrMBuH0wvCDYCKYLqliJl8HH49trpLIndN Vp1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:arc-authentication-results; bh=0bpz0/6sQgU5gOO7NDbJ+2jd1NxY8RgQkmlp0mAUDGE=; b=YUyC1OLT8yk4qtx7mwp2sdrON6kf3TwljooG9hw+gKiTH9nFvUP/LxDHPrBe6wognW wxRuiERDHDRyxY59IJUpTAln946C4W+sZFKMYF4iQ4WgeDI+6YLUMP0e2or6vIFZJARZ kQoQoSYTFGX4mLDxywGi0RSc/TkanzzTnW1/qnZaNVd/dfBj0IEWA3jN0XgbTf0yf8gp SjFK0d5pc0CU1zaZqn4yntOJms3Z+GS7aR/QeVzDlBpd/yLbR8q9s8jOgPJQoctdxXKn e6zzKJsmhB54zPhHGQgfxNr6NoW1rpVwXzNNSgVMSch5bZN+BAlWm8INJMzP8bg/IpVY Jy5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@EPAM.onmicrosoft.com header.s=selector1-epam-com header.b=kgf0M8Ub; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j5si9332028pgt.437.2017.10.29.23.34.33; Sun, 29 Oct 2017 23:34:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@EPAM.onmicrosoft.com header.s=selector1-epam-com header.b=kgf0M8Ub; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752308AbdJ3Gd5 (ORCPT + 99 others); Mon, 30 Oct 2017 02:33:57 -0400 Received: from mail-db5eur01on0089.outbound.protection.outlook.com ([104.47.2.89]:60128 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751540AbdJ3Gdz (ORCPT ); Mon, 30 Oct 2017 02:33:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=EPAM.onmicrosoft.com; s=selector1-epam-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=0bpz0/6sQgU5gOO7NDbJ+2jd1NxY8RgQkmlp0mAUDGE=; b=kgf0M8Ubcgl5VQJlMwTjC0o7r6gpzj1HqNZ2Ai39DT+8MbQmRsFGz2Opd6WDSD8Bp3AW8SkVx/XdEcHerqk8O0FIc3fnwJs/uwd1INUaRgmCF3LUXWosVEmQvvYAaQPj2T56CTPJCHdqzCOWoMeFeMPdlBPZZyWgNhRPl3mnX/U= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Oleksandr_Andrushchenko@epam.com; Received: from [10.17.182.9] (85.223.209.54) by AM4PR0301MB1937.eurprd03.prod.outlook.com (2603:10a6:200:38::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.178.6; Mon, 30 Oct 2017 06:33:50 +0000 Subject: [RFC] ALSA: vsnd: Add Xen para-virtualized frontend driver To: tiwai@suse.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, xen-devel@lists.xen.org, Konrad Rzeszutek Wilk Cc: Oleksandr Andrushchenko , Oleksandr Grytsov , Clemens Ladisch , Takashi Sakamoto References: <1502108577-8099-1-git-send-email-andr2000@gmail.com> <7e62a406-7dcd-b5c9-b2de-ea52e1d2afd0@sakamocchi.jp> <2a2fd222-fc54-1709-bfc8-a530efc3f307@gmail.com> <3f8e535b-8607-6b15-6e17-da755a06cc1e@sakamocchi.jp> <3fde10f8-4727-e37b-8001-ce2356fffb2b@sakamocchi.jp> <162b7251-4040-c61f-1fcd-c32f65bd3c67@gmail.com> <8542f293-f2d0-9ba3-7082-967b32fcec17@ladisch.de> <5421f97e-cd7a-dd22-7557-b0fc25899c1b@gmail.com> <232329e2-893f-d40a-3543-062098338bc2@gmail.com> From: Oleksandr Andrushchenko Message-ID: <77dc886e-f3e6-ecef-ed73-c92e966d02f9@epam.com> Date: Mon, 30 Oct 2017 08:33:46 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [85.223.209.54] X-ClientProxiedBy: HE1PR0402CA0036.eurprd04.prod.outlook.com (2603:10a6:7:7c::25) To AM4PR0301MB1937.eurprd03.prod.outlook.com (2603:10a6:200:38::13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9c40caea-424f-4d45-1aa1-08d51f602f6b X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(4534020)(4602075)(2017052603238);SRVR:AM4PR0301MB1937; X-Microsoft-Exchange-Diagnostics: 1;AM4PR0301MB1937;3:QrecDQnVFFR7UBMS3QYKbm15SmtxOQj90DW8DKn76fMJi2tvFgxPXah2ig5tR0qWDXx2i+AUM+2MX5oytQCMzxdrvMYjKRSO8ibRDUOauCCHZZW5C3GXlrjvQGvhoS357VxFYoqzBooDlR+mQ45IciDB96X3p7Cp3VN5LXm07ROGeVXqx9asCztw03mwpLL4kcPPU9HZkOkhEd1lkKg+vMHL4dY6/xJPVHExTI2OKm/9AgIuQzZlHYXDcs/Pi4DY;25:EMEtWLgpAiMoxAAssbFDBMUVeysR9NYK9fPX3Rt9Z+NAgyZ1nswwsv47gcYKYB05VupU9EdnpqrMYFGE0EB4AeWvq7PZdnA+9IUeH7uLfOhU1dfJbMx5wcNUfvAbykFg8eD7i0wKrmRITO6EBG4LGYGJpgdtqOZ0+bQRxRjZZ49fEW3x1EQfYcOk335nPwb85UhOvTLjjwMSiE8CNfceyhG2TJJLuzotKvqrPfA5MxMMJLzTdaS+n9INstHKwyVcEX068fdU8TW+zL0cTPbp7Gr314ln4+wlo7xOdvegCPZYmAhaH0c08YnRqYNeaTqzpiax0inKdkxEppaLnO0Qcw==;31:hjlJHVbDfm3KggtLuWWQ5VAS0tZsUCrBJfRpwN8ldD/E/l2eqrd81u+VNES71cu2gwqg2mLiKdM+h88961lsAQEBNQxs8b4IFWXirNnp3JIA3rmRmzwsn/GB7oiCVYZ0YOP0RXRuxzDdx1ygiyOHrmviP+uLYZw7ZzfqSj2dOog52T3AjCtnJfRdxRk0HK4E2qcUcwoGiLRrsoKaPZdDNx/nW7V2F9Hs+2Oid18EaqI= X-MS-TrafficTypeDiagnostic: AM4PR0301MB1937: X-Microsoft-Exchange-Diagnostics: 1;AM4PR0301MB1937;20:u8AIU+OGruefJP/BG3nSaZkcokVKe4JA+2oOwtdZsIDt60jFBQ7i8piwqyXb6XXZ462PiNlVowjNO3Na3ec7HcbbPezRw6z4ltRZ2cpNZU32XtRvM8v/lSeeEYoHFG+a1OjtSW+RkmdLFXT1S0L8eTay7a6KtRvWuGGH1hyRqruMIemwrpf1TEt2PQJbXsBOyBQ15Mk0SADykR/gY8P2sf3dVFPjCJk3e0Jb6J9Ibd217Klm2mpFrdKbT73TLS78rSud00pxJuszsFzBHprE2I4e/D7A7hzUrVvIfjDXZZTlSz9w9UR3qH1b52D8zzahb2Kg1A1A9RtvfhuH4imCKrLeFUczU4mDslDkRm15vYj70EuVyjMYK/wYjkcQO4zi05JEVAilbUY3F4iNukdGmYQ/bh4Jr3czqSZbswOoSEDJ7C/sIV8XdsgFfHJCZHF9f9SP+vE9JIhbgq95V8wXGuuXxQ8EX+XgPl8Owg0xPGVi8qnCjVgdaw/9QPeluE+g;4:P7AafcPjXtsc2IFoSE9hoB/ohdjrMGjM+51gKipHnn1lhF3nJjyFM6bjU1H6SpPEujTPTX0Ts8qKzmZx5cpDEArswlPc9Qw1KmKriYpk7njB7fay1ijZ6chzL1vRYFGI0CoHuCQlw8hSCtkvFcwhT9Q9iP5VmpjUGiIARfK5lY5LF+wv33FYDDX+KcfrFsJdL9dN4JzE7EPQfaqtyFxXd9nEsiDCWEvOmEK4zgD7o/BCer2ggrJDofhLVA56rWxjo2vFHBccalYIQ4affDSBmxbprX43kNYHBEpUQ00Fs5rE5yQdBkowp7xN6zMhqVU000oHYQAUJfw1pb10Vm5/3PjHEUQ38ccJRK1POJRrm+0= X-Exchange-Antispam-Report-Test: UriScan:(166708455590820)(84791874153150); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231020)(10201501046)(3002001)(100000703101)(100105400095)(6041248)(20161123562025)(20161123564025)(20161123555025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:AM4PR0301MB1937;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:AM4PR0301MB1937; X-Forefront-PRVS: 0476D4AB88 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6009001)(6049001)(39830400002)(346002)(376002)(199003)(189002)(33646002)(83506002)(77096006)(6306002)(6486002)(53936002)(36756003)(2906002)(5660300001)(65826007)(8936002)(93886005)(8676002)(54906003)(16576012)(81156014)(81166006)(58126008)(316002)(6116002)(64126003)(3846002)(16526018)(65806001)(2950100002)(65956001)(66066001)(6916009)(47776003)(6666003)(50466002)(478600001)(39060400002)(7736002)(966005)(72206003)(80792005)(23676002)(31696002)(101416001)(189998001)(50986999)(54356999)(76176999)(105586002)(106356001)(31686004)(230700001)(86362001)(97736004)(305945005)(68736007)(4326008)(25786009);DIR:OUT;SFP:1101;SCL:1;SRVR:AM4PR0301MB1937;H:[10.17.182.9];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Received-SPF: None (protection.outlook.com: epam.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtBTTRQUjAzMDFNQjE5Mzc7MjM6U0RDczA1cy9KcUtBVWFSbkhkS1hiWi9Q?= =?utf-8?B?Vi80Tno5bXE4S0hUVUc4T0s2SnBCNllacFlQOWtoZVJmMktTeUV5bkUybDdP?= =?utf-8?B?dm52NFcyc3NLS1BEaDJyQmJwbDYySjZqci9nOGhFRmRNZ2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UpW0bSl0YgzBG6kNiE7/ZX3KcaW/xFIgre1nfohJu928x3zDAw3asWeXuhJL2gz2s+lKC7MzTjgf5FzTT24FFS8UG8wVoe0E36sizspt78ohP1gRkYvGxKS4QPpIhRV/MsjF14w5bqYj/9fkQpIABPQjqy3hx7xFR6ivdz0NwiuM+2l/HiO0KsSWN+Sv4LJY/LwLzdn5eCZgQQKElAH/5zXZ2/SCaBnGWrUU5VfgRxf3ctlJGfNzUN4MdRgCwm1enD4Skwge1BiqxolTnm27c2N3CdlSiQpxdqZbwQ/Uv0uoGBbQBlp2R9xp82neSNkTp2Y3LaCkA0Jte1P6/OFd6j1ijudlKoD2+Sk=;5:40RIWW5JIRIkir5oK/n/9VyCf+T3Ytr/AaTomV9vEQhFIgMevffThwU5aAZxhiPlIaRD3FwyfcwZz8vm6eo7kqF8SG2O3zaj+Fp/AbIRU/k0VSJHGtt3GVVC54VKzjkg+RsEs0kgjYWnvMM1gMvC+rkp4o4+8SG1KHG/ZJezJu8=;24:yQAcidVFpbudtj2SsGyggx+Xd50N1XtIbhli7OgBdh0cd2J/plZrXVVeTG68cba35O52DlB6wZFSQ8XQ+Vk3jO/PPVHw2CyLqk6EgemNXvM=;7:LOj/1D8HvMID1k/V2AGRvUYN+CYUbDiCvymYUXCXGVSPeIsNi9RA7Y9W32IuwbPdVj1OV8z+LbXo6e7zTxFPITL8waex/e9AfcIt2XT0Fnw9W3zJapUTRvxp/TsN9p2YFnz2Xc8pXAkqbq7UxDV3dI7wtlyvYe3mJ5rBoJBraJOymzFq7otPooteU3rMOhW9KudFy9trlEf4d3kid6y8/othSo3Q0TdPy55vhMMnfI7e/H4TUmWJVexO8lK8vJA2 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: epam.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2017 06:33:50.5350 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9c40caea-424f-4d45-1aa1-08d51f602f6b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b41b72d0-4e9f-4c26-8a69-f949f367c91d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR0301MB1937 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, all! This is an attempt to summarize previous discussions on Xen para-virtual sound driver. A first attempt has been made to upstream the driver [1] which brought number of fundamental questions, one of the biggest ones was that the frontend driver has no means to synchronize its period elapsed event with the host driver, but uses software emulation on the guest side [2] with a timer. In order to address this a change to the existing Xen para-virtual sound protocol [3] was proposed to fill this gap [4] and remove emulation: 1. Introduced a new event channel from back to front 2. New event with number of bytes played/captured (XENSND_EVT_CUR_POS, to be used for sending snd_pcm_period_elapsed at frontend (in Linux implementation, sent in bytes, not frames to make the protocol generic and consistent) 3. New request for playback/capture control (XENSND_OP_TRIGGER) with start/pause/stop/resume sub-ops. Along with these changes other comments on the driver were addressed, e.g. split into smaller chunks, moved the driver from misc to xen etc. [5]. Hope, this helps to get the full picture of what was discussed and makes it possible to move forward: if the approach seems ok, then I'll start upstreaming the changes to the sndif protocol and then will send the updated version of the driver for the further review. Thank you, Oleksandr [1] https://lkml.org/lkml/2017/8/7/363 [2] https://lkml.org/lkml/2017/8/9/1167 [3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/xen/interface/io/sndif.h [4] https://lkml.org/lkml/2017/9/19/121 [5] https://github.com/andr2000/linux/tree/snd_upstream_v1/sound/xen From 1581121906025491165@xxx Fri Oct 13 06:15:52 +0000 2017 X-GM-THRID: 1575057680710293570 X-Gmail-Labels: Inbox,Category Forums