qemu-discuss
[Top][All Lists]
Advanced

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

Re: qemu modifies host audio sample rate with coreaudio backend to 44.1k


From: Thomas Huth
Subject: Re: qemu modifies host audio sample rate with coreaudio backend to 44.1khz on startup
Date: Mon, 27 Mar 2023 08:14:23 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0

On 25/03/2023 18.24, Christian Schoenebeck wrote:
On Friday, March 24, 2023 8:38:25 PM CET Frank Carmickle wrote:
Greetings all,

Thank you Thomas for bringing this to the attention of folks who are in the 
know.

Thank you, Christian for explaining.

What I am finding is that qemu sets the host to 44.1k even though alsa dmix in 
the guest is set to 48k. What I wanted was to set the host to 96k and the guest 
to 96k. When I do that, by using audio midi setup for the host, and changing 
alsa dmix rate to 96k, after starting the guest, audio midi setup shows that 
the host is set to 44.1k.

When using the parameter Thomas mentioned, the host sample rate is changed to 
the designated.

Seems like alsa has a problem. I'll use Thomas's suggestion as a workaround, 
for now.

DMIX in ALSA is like mixengine in QEMU: a layer that automatically converts
audio format on the fly between incompatible sides (sample rate, channels,
etc.). That's used if the audio hardware does not support the desired audio
format natively.

You did not mention which audio frontend (the virtual audio hardware emulated
by QEMU for guest) you are using. I just made a quick test with the AC97
frontend and `aplay` a wav file on guest, and it used 48 kHz like the wav file
content, not 44.1 kHz.

@Thomas: I just realized that QEMU's audio frontend selection parameters are
not documented at all?

Yes, as I said, the documentation is really lacking here - I had to look at the sources to come up with the out.frequency=48000. I think if someone who knows the audio stuff in QEMU comes up with a patch for the documentation, that would be really appreciated.

 Thomas




reply via email to

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