qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] Understanding -audiodev and its id parameter


From: Peter Maydell
Subject: Re: [Qemu-discuss] Understanding -audiodev and its id parameter
Date: Tue, 23 Jul 2019 15:21:40 +0100

On Tue, 23 Jul 2019 at 11:26, Aaron Lauterer <address@hidden> wrote:
>
> Hi,
>
> I am trying to understand the new -audiodev option. In particular its
> "id" parameter.
>
> Is there anything to consider when choosing a name for it? Any other
> device or option that may reference it?
>
> What I mean is that for example when adding a sound device such as
> "intel-hda" with the -device option the "id" defined for it is used in
> the "bus" parameter for a connected "hda-duplex" device.

The general pattern here is that QEMU command line options
tend to come in pairs: one which creates some kind of object
and gives it a name using id=foo, and one which creates a
second object and connects it to the first using something=foo.

In this case -device intel-hda,id=foo creates an intel-hda device
and gives it the name (ID) 'foo'; then when you create the
hda-duplex device you tell QEMU where to connect it by giving
the name you specified earlier.

Another example is networking where you can configure a network
setup with something like
  -netdev whatever,...,id=mynet -device e1000,netdev=mynet
where we create and name a netdev with one argument, and
then create an e1000 device that uses the netdev with the other.

You can pick any random name you like, more or less (I think names
have to be unique across all of QEMU). I usually use names like
"mynet" or "mysounddev" for hand-written command lines. I think
libvirt usually chooses names like "hostnet0", "sound0", etc.
They're just arbitrary labels.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]