Re: [LAU] KVM virtual machines and jack

From: torbenh <torbenh@email-addr-hidden>
Date: Sat Dec 12 2009 - 08:50:04 EET

On Fri, Dec 11, 2009 at 08:09:36PM -0600, Reuben Martin wrote:
> On Fri, Dec 11, 2009 at 9:18 AM, torbenh <torbenh@email-addr-hidden> wrote:
> > On Mon, Dec 07, 2009 at 01:48:04AM -0600, Reuben Martin wrote:
> >> On Sun, Dec 6, 2009 at 4:14 AM, Patrick Shirkey
> >> <pshirkey@email-addr-hidden> wrote:
> >> >
> >> > On 12/06/2009 03:20 PM, Reuben Martin wrote:
> >> >> On Sat, Dec 5, 2009 at 8:39 PM, Paul Davis<paul@email-addr-hiddenom>  wrote:
> >> >>
> >> >>> On Sat, Dec 5, 2009 at 2:51 PM, Reuben Martin<reuben.m@email-addr-hidden>  wrote:
> >> >>>
> >> >>>> Does anybody know if it is possible to run a guest OS under KVM and
> >> >>>> have the ins and outs of the virtual audio device presented to that
> >> >>>> OS, interface with JACK on the host linux system?
> >> >>>>
> >> >>>> I've done a little googling on this but couldn't find anything.
> >> >>>> (mostly because "jack" is ambiguous, and "KVM" can mean a lot of
> >> >>>> things)
> >> >>>>
> >> >>> unless the VM software that provides fake audio devices to the guest
> >> >>> OS knows about JACK internally or can be configured to use it, this is
> >> >>> not happening.
> >> >>> on the other hand, if the VM software can simply use the ALSA JACK
> >> >>> plugin, that could potentially work (lots and lots of latency though).
> >> >>>
> >> >>>
> >> >> In that case I guess my best bet would probably be to petition KVM
> >> >> development to add support for JACK. Currently I believe it supports
> >> >> ALSA, OSS, SDL and PulseAudio.
> >> >>
> >> >>
> >> >
> >> > If KVM already supports those api's then it can  be used with jack via
> >> > several different methods. What is the problem that you are having exactly?
> >> >
> >>
> >> No problems yet. I'm putting together a new system and had thought of
> >> using Windows and Mac as guest VM systems under KVM for running things
> >> that don't exist for Linux and/or don't work well with WINE. And I
> >> wanted to see if anybody had tried routing the VM audio ins / outs to
> >> JACK rather than directly to an audio sink.
> >>
> >> Wanted to see if anybody had seriously tried this before I gave it a go.
> >
> > using netjack and the master running at -p1024 seems to be working fine.
> > at least when i compress the audio, and there is not too much gfx memory
> > transfers.
> >
> > i have put a windows build of jacknone-0.4 on http://netjack.sf.net
> > this is basically jack-1.9.4 with qjackctl and a fixed audioadapter.
> > it includes netone with celt-0.7 and jack_trans2midi which generates
> > midi clock... so you can sync your windows apps to jack transport.
> >
> >
> > --
> > torben Hohn
> >
>
> Very nice. The part about having an ASIO based netjack interface is a
> key element that I was not aware existed. And the jack-midi virtual
> device solves the transport issue as well. I need to give this a try
> once I finish building my new system.
>
> I'll also be interested to see how well routing netjack connections
> between a windows guest and mac guest works out. Should be
> interesting.
>
> Perhaps in cases like this where more than one jack process is
> competing for processor time, Round Robin scheduling might work
> better...

only if you were using zero-latency mode.
but i dont think you can use that with a VM.

netjack lowers the scheduling requirements
of the slave a bit.

>
> I'm interested to see how KVM compares to VirtualBox. From what I
> understand it's a bit faster / lower latency because it "runs closer
> to the metal" compared to VirtualBox / Xen / VMware.

yup. me too. can it run win7 yet ?
i dont have a real choice, because win7 is the only OS, MS gave out for
free.

the basic problem with VMs is that they seem to have a single thread
emulating the hardware, so if a big gfx operation is in progress, the
network processing will get deferred.
(at least in VirtualBox)

maybe this doesnt happen with the VM audio.

-- 
torben Hohn
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user
Received on Sat Dec 12 12:15:01 2009

This archive was generated by hypermail 2.1.8 : Sat Dec 12 2009 - 12:15:01 EET