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: Frank Carmickle
Subject: Re: qemu modifies host audio sample rate with coreaudio backend to 44.1khz on startup
Date: Fri, 24 Mar 2023 15:38:25 -0400

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.

Thank you,
--FC

> On Mar 24, 2023, at 08:04, Christian Schoenebeck <qemu_oss@crudebyte.com> 
> wrote:
> 
> On Friday, March 24, 2023 8:54:35 AM CET Thomas Huth wrote:
>> On 23/03/2023 21.03, Frank Carmickle wrote:
>>> Greetings all,
>>> 
>>> Every time a qemu instance is run, the host systems audio hardware sample 
>>> rate is set to 44.1khz. Is it possible to change this behavior, and if so, 
>>> how?
>> 
>>  Hi,
>> 
>> not sure if I've got the question right, and I'm not an expert when it comes 
>> to QEMU audio, but I think you can set the playback frequency like this for 
>> example:
>> 
>>  qemu-system-x86_64 --audiodev alsa,id=a1,out.frequency=48000
>> 
>> ... but seems like the QEMU documentation is really lacking here, so I might 
>> be wrong. Maybe Christian, Gerd or Marc-André could correct me in that case 
>> (now on CC:).
> 
> By default host's audio backend is opened with audio parameters requested by
> guest. So if guest requests 44.1 kHz then host's audio system is opened with
> 44.1 kHz as well (if supported by host's audio system that is).
> 
> By supplying out.frequency=x you can override host's sample rate, but as guest
> apparently requested 44.1 kHz before, guest would probably still use 44.1 kHz
> and QEMU would resample the audio stream to the requested host's sample rate.
> 
> So the question is what you really want to achieve. Maybe it would be better
> to force guest using the desired sample rate instead.
> 
> Best regards,
> Christian Schoenebeck
> 
> 




reply via email to

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