Re: qemu modifies host audio sample rate with coreaudio backend to 44.1khz on startup
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 > 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 > >
Re: Cross compilation of QEMU source code for ARM64
On Thu, 23 Mar 2023 at 19:57, Pedro Miguel Veiga de Almeida e Silva wrote: > > Hello, > > I am trying to cross compile the source code to deploy it in a xilinx ZCU106. > But every time I execute the ./configure --target-list=aarch64-softmmu > --enable-kvm and then make. > > But the file that compiles is a X86. --target-list specifies the target architecture, which to QEMU means the architecture the guest code runs. The architecture of the host (the machine QEMU runs on) is determined by what compiler you are building it with. If you run configure on an x86 machine and do not tell it "hey, you should build this with this cross compiler" then configure will just use 'gcc' and you will get x86 binaries. Typically you want to pass configure something like --cross-prefix=aarch64-linux-gnu- but this will only work if your host has the complete aarch64 cross-build environment set up, including the toolchain, pkg-config and all the necessary dependent libraries. thanks -- PMM
Re: qemu modifies host audio sample rate with coreaudio backend to 44.1khz on startup
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:). HTH, Thomas
Re: Cross compilation of QEMU source code for ARM64
On 23/03/2023 19.30, Pedro Miguel Veiga de Almeida e Silva wrote: Hello, I am trying to cross compile the source code to deploy it in a xilinx ZCU106. But every time I execute the ./configure --target-list=aarch64-softmmu --enable-kvm and then make. But the file that compiles is a X86. Can you help me? With --target-list you select the target that QEMU emulates later, not the host environment. For cross-compiling, you need the --cross-prefix=... option of the configure script to set the prefix of your cross-compiler toolchain. For example, if your cross-compiler is called "arm-linux-gnueabi-gcc", you'd use: ./configure --cross-prefix=arm-linux-gnueabi- Hope that helps, Thomas
Re: qemu modifies host audio sample rate with coreaudio backend to 44.1khz on startup
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