Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751215AbdHXEi1 (ORCPT ); Thu, 24 Aug 2017 00:38:27 -0400 Received: from smtp-proxy004.phy.lolipop.jp ([157.7.104.45]:55075 "EHLO smtp-proxy004.phy.lolipop.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751076AbdHXEi0 (ORCPT ); Thu, 24 Aug 2017 00:38:26 -0400 Subject: Re: [PATCH RESEND1 00/12] ALSA: vsnd: Add Xen para-virtualized frontend driver To: Oleksandr Grytsov Cc: Oleksandr Andrushchenko , clemens@ladisch.de, alsa-devel@alsa-project.org, xen-devel@lists.xen.org, linux-kernel@vger.kernel.org, tiwai@suse.com, Oleksandr Andrushchenko 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> From: Takashi Sakamoto Message-ID: <3fde10f8-4727-e37b-8001-ce2356fffb2b@sakamocchi.jp> Date: Thu, 24 Aug 2017 13:38:24 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1664 Lines: 38 On Aug 23 2017 23:51, Oleksandr Grytsov wrote: > Hi, > > Thank you for detailed explanation. > > We understand that emulated interrupt on the frontend side is completely not > acceptable and definitely we need to provide some feedback mechanism from > Dom0 to DomU. > > In our case it is technically impossible to provide precise period interrupt > (mostly because our backend is a user space application). > The best we can implement it is provide number of frames (time, bytes etc.) > consumed by real HW. This info will be outdated due to different delays but > we can provide precise timestamps when this info was acquired. Stuffs of ALSA PCM in kernel land is an abstraction layer for actual hardware for data transmission. The stuffs get affects from a design of actual hardware. Furthermore, sound subsystems on the other operating systems such as Microsoft Windows are also designed with a consideration about actual hardware. When you design any interfaces as an abstraction for such software layer, it's better to understand actual hardware and design of low-level software layer somehow. Actually the 'sndif' has no good abstraction for actual hardware, therefore an idea to implement frontend driver as an ALSA driver is not reasonable at all. It's better to implement it as an application in the other software layer, e.g. sinks/sources of PulseAudio in DomU via Xenbus. This idea is nearer an original concept of Xen framework, I guess. But I don't know we can write any applications of Xenbus in user land of DomU or not. Anyway, it's not a good idea to have an ALSA driver for the present 'sndif', in my opinion. Regards Takashi Sakamoto