[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "Fix" for screamer patch on -current qemu
From: |
Andrew Randrianasulu |
Subject: |
Re: "Fix" for screamer patch on -current qemu |
Date: |
Mon, 17 Mar 2025 18:09:13 +0300 |
On Sun, Mar 16, 2025 at 10:19 PM Andrew Randrianasulu
<randrianasulu@gmail.com> wrote:
>
>
>
> вс, 16 мар. 2025 г., 19:26 BALATON Zoltan <balaton@eik.bme.hu>:
>>
>> On Sun, 16 Mar 2025, Andrew Randrianasulu wrote:
>> > On Sun, Mar 16, 2025 at 5:59 PM BALATON Zoltan <balaton@eik.bme.hu> wrote:
>> >> On Sun, 16 Mar 2025, Andrew Randrianasulu wrote:
>> >>> Ah, code churn!
>> >>>
>> >>> So far device detected on 10.4.11 and tries to play .. sloooowly.
>> >>>
>> >>> Now building mpg123 from tigerbrew to see if it will perform better
>> >>> (so far Debian Trixie/sid was just barely playing test mp3 via es1370
>> >>> device and all those layers of pulseaudio etc ...)
>> >>
>> >> This patch is probably not based on QEMU master but on Mark's screamer
>> >> branch. You don't need the empty { } value at end of properties array any
>> >> more, it now uses ARRAY_SIZE to find the number of elements so the
>> >> terminator can be removed completely. There are more problems with
>> >> screamer than code churn though. I've found here:
>> >> https://patchew.org/QEMU/cover.1593456926.git.balaton@eik.bme.hu/
>> >> that I had to increase SCREAMER_BUFFER_SIZE define to 0x8000 for the Mac
>> >> ROM to work otherwise it crashed somewhere so there's some issue with the
>> >> emulation. This was also reported with other guests and may be the reason
>> >> why it's not yet upstream. The ROM may be an easy reproducer as it runs
>> >> early but not exactly easy to debug as it has no source available and I'm
>> >> not sure it's in assembly or may run Forth code which is hard to trace at
>> >> that point. But just getting a trace of screamer register writes
>> >
>> >
>> > with 10.4.11 and -M mac99,via=pmu I got:
>> >
>> > netbsd10$ ~/src/qemu/build/qemu-system-ppc64 -bios
>> > ~/obj-ppc/openbios-qemu.elf
>> > -M mac99,via=pmu -hda ~/QEMU/osx-tiger_10.4.11_installed-compressed.qcow
>> > -L /usr/pkg/share/qemu/ -d guest_errors,unimp -accel tcg,thread=multi
>> > -cpu
>> > g4 -smp 2 -display sdl -boot c -m 1024
>> > cpus[0] = 0x6fd49c21f5c0 0x6fd49c222140
>> > cpus[1] = 0x6fd49be9e540 0x6fd49bea10c0
>>
>> Maybe it's a good idea to debug screamer on QEMU master instead with the
>> SMP patches that may add their own problems. Just so you have less issues
>> to debug at once.
>
>
> yes, I just wanted to see if it works at all ....
after reverting commit mentioned in
https://gitlab.com/qemu-project/qemu/-/issues/2741
I can boot netBSD/macpp 10.0 and listen to Silent_spring.mp3 (from
samples.mplayerhq.hu) via mpg321 set to 4x downsample (44100 -> 11025)
strangely, sometimes output STILL distorts ... but not for long and
launching Ksnapshot (err, Spectacle!) on host does not make it worse
...
netbsd10$ ~/src/qemu/build/qemu-system-ppc64 -bios ~/obj-ppc/openbios-qemu.elf
-M mac99,via=pmu -hda ~/QEMU/Mac-netbsd-2gb.qcow2 -L
/usr/pkg/share/qemu/ -d guest_errors,unimp -accel tcg,thread=multi
-cpu g4 -smp 1 -display sdl
-boot c -prom-env 'boot-device=hd:,ofwboot.xcf;1'
so, nice to see it work on netBSD/macppc 10.0 too (while setup looks fragile)
>
>
>
>> The problem with these devices is that there isn't much
>> documentation for them so most of the time you may have to try to find out
>> how it supposed to work from kernel and driver sources that are avaialable
>> if there are any. Usually these can be in Linux, Darwin or other open
>> source OSes that run on the real machine or maybe other emulators
>> emulating this or similar machine.
>
>
> so far I found few notes in this file
>
> https://github.com/aosm/AppleOnboardAudio/blob/master/AppleLegacyAudio/AppleScreamerAudio/awacs_hw.h
>
> not sure how useful they are (one mention clipping but I only hear distorted
> sound in OSX, not 9 ...)
>
> I thought Screamer and OWScreamer were different but at least reg files just
> formatted differently as far as I can see.
>
>
>>
>> Regards,
>> BALATON Zoltan
>>
>> > dbdma_unassigned_flush: use of unassigned channel 0
>> > dbdma_unassigned_flush: use of unassigned channel 0
>> > PMU: Unsupported READ_PMU_RAM, args: 80 02 03
>> > PMU: Unsupported READ_PMU_RAM, args: 80 02 03
>> > PMU: POWER EVENTS unknown subcommand 0x07
>> > PMU: POWER EVENTS unknown subcommand 0x08
>> > screamer: Unimplemented register write reg 0x5 size 0x4 value 0x0
>> > screamer: Unimplemented register write reg 0x5 size 0x4 value 0x0
>> > screamer: Unimplemented register write reg 0x5 size 0x4 value 0x0
>> > screamer: Unimplemented register write reg 0x5 size 0x4 value 0x0
>> > screamer: Unimplemented register write reg 0x5 size 0x4 value 0x0
>> > screamer: Unimplemented register write reg 0x5 size 0x4 value 0x0
>> > screamer: Unimplemented register write reg 0x5 size 0x4 value 0x0
>> > screamer: Unimplemented register write reg 0x5 size 0x4 value 0x0
>> > screamer: Unimplemented register write reg 0x5 size 0x4 value 0x0
>> > screamer: Unimplemented register write reg 0x5 size 0x4 value 0x0
>> > screamer: Unimplemented register write reg 0x5 size 0x4 value 0x0
>> >
>> > something to look into, because from git log it seems only OSX
>> > versions up to 10.2 were tested?
>> >
>> >
>> > and
>> >> trying to make sense of those could get you somewhere with this. You may
>> >> get the same result with other guests but I don't know a reproducer of a
>> >> screamer issue with those. (I'm also not sure real machine had screamer
>> >> apart from G3 so it may be another case of our mac99 Franken-Mac but it
>> >> may work as long as the driver is still there and works but probably never
>> >> tested on real machine with this combination.)
>> >>
>> >> Regards,
>> >> BALATON Zoltan
>> >
>> >