SBEMU icon indicating copy to clipboard operation
SBEMU copied to clipboard

Some HDA chips need forcing the output amplifier bit 7 to zero

Open vanfanel opened this issue 1 year ago • 12 comments

Hello there,

Based on this partially fixed bug on VSBHDA (https://github.com/Baron-von-Riedesel/VSBHDA/issues/8) it seems that some HDA chips need forcing the output amplifier bit 7 to zero, so it's no longer possible for the program to mute the amplifier "accidentally".

Can it please be done in SBEMU or added as an option? My DOS notebook (Compaq Mini CQ10-500) was working great with SBEMU initial version, and now it is totally silent with current SBEMU versions...

vanfanel avatar Apr 22 '24 12:04 vanfanel

Yes of course, I'll check it. Thanks for the feedback.

crazii avatar Apr 25 '24 00:04 crazii

I checked the code, there's no accidental muting happens (the muting might be caused by changes in VSBHDA), but the init code seems having problem after using a double reset, so the initial unmute doesn't work.

can you test if this build works? I'm not sure it will work, but there're problems definitely and I will get it fixed. sbemu.zip

crazii avatar Apr 27 '24 09:04 crazii

Here's another experimental fix for O2 and LTO: sbemu_mmio_volatile.zip

crazii avatar Apr 27 '24 12:04 crazii

@crazii I tested those two builds but they are silent on my computer.

vanfanel avatar Apr 27 '24 15:04 vanfanel

Thanks for your fast reply (and sorry I can't reply in time). I'll investigate more. please wait. I'll upload a build with HDA init log so that it can be checked.

crazii avatar Apr 27 '24 15:04 crazii

Please run SBEMU > log.txt and paste/upload the log file, thanks. sbemu_HDALOG.zip

crazii avatar Apr 27 '24 15:04 crazii

@crazii Of course! Here's the log:

LOGG.TXT

vanfanel avatar Apr 27 '24 15:04 vanfanel

The log seems OK, and Sorry it took a while, as I'm not really familiar with all the codes and its log. the DAC node is parsed and unmuted, I doubt there are other problems, but to make sure it DOES have muted problem, I changed the code to force unmute when setting volumes: sbemu_FORCE_UNMUTE.zip

And if it doesn't work, I guess there's some other problems, I can give you some release builds that is working/notworking after code changes. The code changes in HDA is little, only 1) CORB/PIO related, and 2) interrupt related, and 3) power states. I think it's easy to find the cause.

crazii avatar Apr 27 '24 16:04 crazii

Sorry, use this one instead, just mask all the cases of amplifiers bit 7 to make sure every sets of volume is not muted. sbemu_FORCE_UNMUTE.zip

crazii avatar Apr 27 '24 17:04 crazii

@crazii That version works! It sounds as good as it used to sound! :) Mask all the cases of amplifiers bit 7 was the solution!!! Thanks!!!!

vanfanel avatar Apr 28 '24 13:04 vanfanel

@crazii That version works! It sounds as good as it used to sound! :) Mask all the cases of amplifiers bit 7 was the solution!!! Thanks!!!!

Good, but really strange, as I checked code, none of them mutes the amplifier, but it's possible that it got muted itself somehow. and because the mixer will read the original before setting new volume, so all volume sets afterwards will have the bit 7 set.

crazii avatar Apr 28 '24 14:04 crazii

@crazii Please merge this into new releases. I tried the new 1.1BETA and it's silent again :(

vanfanel avatar Jul 04 '24 14:07 vanfanel