qemu-devel
[Top][All Lists]
Advanced

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

Re: Audio playback speed issue on sam460ex and pegasos2


From: Volker Rümelin
Subject: Re: Audio playback speed issue on sam460ex and pegasos2
Date: Sun, 12 Mar 2023 10:46:15 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0

Am 11.03.23 um 23:54 schrieb BALATON Zoltan:
Hello,

I've noticed before that since commit a806f95904cdb audio plays slower (like half speed) under AmigaOS on sam460ex with ES1370 but I did not have any other guests to reproduce it and verify this with so I did not report that yet. Now that we can also test with pegasos2 and via-ac97 it does not play slower on that machine neither with ES1370 not via-ac97 but still can reproduce it with sam460ex.

But on another host it seems to play faster with pegasos2. Here is a video taken by Rene demonstrating the problem: https://youtu.be/Rg5buzDqGuk So there seems to be a problem with playback speed here but I'm not sure if this is related to AmigaOS or something else.

At least we have some issue with AmigaOS on sam460ex and ES1370 playing too slow since commit a806f95904cdb on Linux with alsa backend and may also have an issue with sound being too fast on pegasos2 with coreaudio. However Rene said that recording it with a screen recorder did not show the problem, only when playing it normally, that's why the video is taken with a camera. I can't understand how that's possible but maybe you have some idea to at least how to test this further to find out more what's happening here or if you can see anything that can cause playback speed issues with these machines.

So far I've reproduced obviously slow speed with AmigaOS on sam460ex with ES1370 on Linux with alsa. The MorphOS and AmigaOS on pegasos2 with via-ac97 or ES1370 (latter only works with AmigaOS) seems to be OK to me on my machine but is playing too fast in Rene's video.

Could this be related to some differentce in host's sampling rate or some other settings somewhere? I have defaults.pcm.dmix.rate 44100 in /etc/asound.conf while Rene is using whatever macOS does with coreaudio.
Any ideas what to check further?

Hi,

perhaps this issue is similar to the Linux guest driver issue with an AC97 device. The Linux driver tries to measure the AC97 clock frequency. It starts playback with a certain amount of audio frames and measures the time needed for playback. Since QEMU is not a cycle exact simulation the result is always wrong. Before my latency reducing patches the result was always way off and the Linux driver rejected the measurement and used a clock frequency of 48000Hz. Now the driver sometimes believes the measurement is correct and adjusts the clock frequency. This can be fixed with the kernel command-line argument snd_intel8x0.ac97_clock=48000.

If AmigaOS also tries to measure the audio clock frequency, it may help to increase the playback latency to make the measurement worse. I would start with -audiodev coreaudio,id=audio0,out.buffer-count=12. The default buffer count is 4.

With best regards,
Volker


Regards,
BALATON Zoltan




reply via email to

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