[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v5] sndif: add ABI for Para-virtual sound
On Thu, Jan 22, 2015 at 6:11 PM, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> wrote: > Oleksandr Dmytryshyn writes ("Re: [Xen-devel] [PATCH v5] sndif: add ABI for > Para-virtual sound"): >> On Thu, Jan 22, 2015 at 5:56 PM, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> >> wrote: >> > Oleksandr Dmytryshyn writes ("Re: [Xen-devel] [PATCH v5] sndif: add ABI >> > for Para-virtual sound"): >> >> In my case this is about 3 packets per second with size about 16 KBytes. >> > >> > That would put a floor on the latency of about 300ms. I suspect >> > that's quite undesirable. >> >> This latency doesn't affect us because frontend and backend driver have >> an separate thread for each virtualized stream. And when frontend driver >> waits answer from the backend it just sleeps (in case Linux kernel it waits >> for the completion). > > Your seem to be answering a different question to the one I intended > to ask. > > What I mean is this: > > Many people think it is important to reduce the latency of sound input > and output. So, they want to reduce (a) the time between a piece of > software deciding to make a sound and (b) the time when that sound > starts to appear. And the same for input. This is important for > games, video conversations, and so on. > > When sound output is occurring continuously, any piece of new sound > output needs to wait for the next packet to be sent. > > If you are sending only 3 packets per second then the latency might be > as much as 1/3 second which I think is probably too much. This latency is minimal. Frontend side: the application wants to play sound. It opens /dev/snd/pcmC0D0p file (for example) and issues some IOCTLs. 1. It sets the format and sound parameters (frontend sends request to the backend to open a stream with this parameters). 2. It starts to send an PCM data usinf IOCTLs i. e. it writes an PCM data to buffer which will be transfered from the frontend to the backend. (frontend sends request to the backend to play an PCM stream) So, the latency ((a) the time between a piece of software deciding to make a sound and (b) the time when that sound starts to appear) will be minimal - send 2 events to the backend and receive 2 responses from the backend plus time for opening stream on the real sound device in the backend side. This latency will be few milliseconds. > Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |