Author Topic: Updated Uniaud32 build  (Read 689483 times)

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2530
  • Karma: +193/-0
    • View Profile
Re: Updated Uniaud32 build
« Reply #1095 on: April 14, 2025, 12:10:02 pm »
Interesting.... I'll have to try investigate that tomorrow. Changes are in https://trac.netlabs.org/uniaud/changeset/770 I reverted the hacks I'd made to lib32/soundmixer.c

I was just happy unimixpm loaded :)
« Last Edit: April 14, 2025, 12:12:10 pm by Paul Smedley »

Sigurd Fastenrath

  • Hero Member
  • *****
  • Posts: 649
  • Karma: +36/-0
  • OS/2 Versus Hardware - Maximum Warp!
    • View Profile
Re: Updated Uniaud32 build
« Reply #1096 on: April 14, 2025, 09:25:38 pm »
So,I hope this is of help.

- with the latest 20250414b the systems boot without problems.

- when using different /A: switches with unaud32.sys the results are:
- no switch, see picture ... a-n.png
- switch /A:0, see picture ... a-0.png
- switch /A:1, see picture ... a-1.png
- switch /A:2, see picture ... a-2.png

None of them produce sound.

When clicking on a sound file, only with a-2 switch the symbol of the file gets "hatched" (?), but it stays like this
When clicking on a sound file with all the other switches, while clicking nothing happens at all.

I do not know if I remember correctly, but here the switch /A:2 gives HDA-Intel, while with the ArcaOS 5.1.1Version of UNIAUD it gives Nvidia with switch /A:2. Came just to my mind

I tried Theseus 4 (with Switch /A:2 only) and attach the result as well. When trying to enter "eip", the error message appears.

What else can I provide to help?

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2530
  • Karma: +193/-0
    • View Profile
Re: Updated Uniaud32 build
« Reply #1097 on: April 14, 2025, 10:24:39 pm »
The output of 'testlog uniaud' would be interesting

Sigurd Fastenrath

  • Hero Member
  • *****
  • Posts: 649
  • Karma: +36/-0
  • OS/2 Versus Hardware - Maximum Warp!
    • View Profile
Re: Updated Uniaud32 build
« Reply #1098 on: April 14, 2025, 11:01:56 pm »
Only the A:2 switch produce a testlog, others fail.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2530
  • Karma: +193/-0
    • View Profile
Re: Updated Uniaud32 build
« Reply #1099 on: April 14, 2025, 11:31:01 pm »
This section probably explains the failure:
Code: [Select]
hda_codec_cleanup_stream: NID=0x6

hda_codec_cleanup_stream: NID=0x3

Period size min=2f0 max=2f0
Error -22 second time.. Bailing
U16: StartStream: ConfigDev failed!!

It would be interesting if others with realtek hardware could test, which would help determine if this issue is unique to your hardware or more generic. Worst case, I should be able to test on Thursday afternoon or Friday when I'm back at home.

Meanwhile I'll search the code to see where this is coming from.

Edit: it's from here - https://trac.netlabs.org/uniaud/browser/GPL/branches/uniaud32-next/lib32/sound.c#L1025

Edit2: the other interesting thing would be to try playing audio using an app that uses libkai (eg VLC). I think that error is from uniaud16 trying to configure MMPM audio.
« Last Edit: April 15, 2025, 06:12:06 am by Paul Smedley »

Lars

  • Hero Member
  • *****
  • Posts: 1429
  • Karma: +72/-0
    • View Profile
Re: Updated Uniaud32 build
« Reply #1100 on: April 15, 2025, 08:00:33 am »
So,I hope this is of help.

I tried Theseus 4 (with Switch /A:2 only) and attach the result as well. When trying to enter "eip", the error message appears.

What else can I provide to help?

Hi Sigurd,

do this in Theseus to get to the info that is needed to locate your traps:
1) in Theseus: System->General System->Modules
2) Search for string "UNIAUD32"
3) if the line is found, double click on the very left hex value that goes under "MTE @"
4) a screen will open, scroll down to the bottom of that screen
5) What you will see is the "Object Table", the "flags" will tell you for each object if it is data or code and if it is 16-bit or 32-bit
6) find the line where the "flags" say "readable executable shared 32-bit". If it is more than one line, pick the line where the value for "size" is the largest (that is very likely the main 32-bit code object where 99% of the functionality is implemented)
7) what is needed is the "address" value of that very same line. The "address" is the base adress of the code object. The offset of your trap into that code segment is then computed as:
offset = EIP - "address"
and the offset is necessary to locate the trapping routine in the MAP file (or SYM file) that Paul has provided

If you are lost: just take a screen shot of the lower half of the "MTE" window you opened in 4).

One important note: if you do not add/delete any device/filesystem/etc. drivers to config.sys or otherwise do fundamental changes  (VIRTUALADRESSLIMIT, other kernel, whatever), the "address" value will likely never change. However, if you add drivers that value might shift. To be on the safe side, you can always look at Theseus to make sure.


In the end, you would be able to do this yourself. We are too few developers so you will have to learn to become one :-)

Cheers, Lars
« Last Edit: April 15, 2025, 08:26:50 am by Lars »

Lars

  • Hero Member
  • *****
  • Posts: 1429
  • Karma: +72/-0
    • View Profile
Re: Updated Uniaud32 build
« Reply #1101 on: April 15, 2025, 08:13:56 am »
Until Sigurd can provide the missing info, here are the "closest" routine names in which Sigurds Traps occur (taking the "release" MAP file from Paul):
0x82E1   -> OSS32_QueryNames_
0x182E1 -> snd_timer_global_register_
0x282E1 -> pci_iounmap_
0x382E1 -> snd_ak4531_mixer_
0x482E1 -> snd_hda_gen_check_power_status_
0x582E1 -> snd_hda_gen_check_power_status_
0x682E1 -> hda_component_manager_free_
0x782E1 -> snd_emu10k1_audigy_midi_
0x882E1 -> snd_ymfpci_pcm_4ch_

If I would have to guess, I would think that "snd_ak4531_mixer_" is the routine to look at.

And for the other trap:
0x80A2   -> OSSToALSAVolume_
0x180A2 -> snd_timer_global_register_
0x280A2 -> pci_iounmap_
0x380A2 -> pci_iounmap_
0x480A2 -> snd_hda_gen_check_power_status_
0x580A2 -> snd_hda_gen_check_power_status_
0x680A2 -> hda_component_manager_playback_hook_
0x780A2 -> snd_emu10k1_audigy_midi_
0x880A2 -> snd_ymfpci_pcm_4ch_


So, maybe "snd_ymfpci_pcm_4ch_" is the more likely culprit (if we assume that the two traps occur in the very same routine). We will know more once Sigurd provides the info.
« Last Edit: April 15, 2025, 08:36:11 am by Lars »

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2530
  • Karma: +193/-0
    • View Profile
Re: Updated Uniaud32 build
« Reply #1102 on: April 15, 2025, 08:32:40 am »
It will be interesting to see Sigurd's base address. One of the changes in https://trac.netlabs.org/uniaud/changeset/770 fixes Sigurd's trap - if I was a betting man, it's the change in patch_realtek.c

There is no way it should be snd_ymfpci_pcm_4ch_ is that should only be involved for yamaha audio cards. Same with snd_emu10k1_audigy_midi_ and snd_ak4531_mixer_ which are for specific non-HDA hardware. The others are all possible :)

Lars

  • Hero Member
  • *****
  • Posts: 1429
  • Karma: +72/-0
    • View Profile
Re: Updated Uniaud32 build
« Reply #1103 on: April 15, 2025, 08:41:42 am »
Forgot to mention: C "static" routines will not show up in the map file. That is unfortunate but it is the way it is (every device driver writer should never use "static" on a routine ...). But you can find the closest (public) routine name preceding the trap location and then go forward from there to have a guess of what "static" routine has possibly failed.

@Paul: are you distributing test versions as "release" or as "debug" versions ? I am asking because of the MAP file to look at ...
« Last Edit: April 15, 2025, 08:47:08 am by Lars »

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2530
  • Karma: +193/-0
    • View Profile
Re: Updated Uniaud32 build
« Reply #1104 on: April 15, 2025, 08:57:48 am »
Hey Lars - the .zip builds contain debug and release map/sym/sys files. I'm assuming Sigurd is running the debug build.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2530
  • Karma: +193/-0
    • View Profile
Re: Updated Uniaud32 build
« Reply #1105 on: April 15, 2025, 09:21:14 am »
Thanks Paul - yep, this works on VBox using the hda driver. If I start PMUniMix though, I lose sound altogether. Next time I start PMUniMix, everything is set to zero. So as long as I don't start PMUniMix, sound works OK.

OK I see the same here. alsahlp$ shows a bunch of:
Code: [Select]
malloc(): out of memory

I have ideas on why this is happening.

In the newer kernel code, some variable are defined like:
Code: [Select]
struct snd_pcm_hw_params *save __free(kfree) = NULL;
The _free(kfree) is new. Somehow this automatically runs kfree when the function exits, so the specific kfree calls were removed. Will add them back in now.

https://smedley.id.au/tmp/uniaud32-linux-6.12.21-20250415.zip fixes the out of memory errors when manipulating mixer controls.
« Last Edit: April 15, 2025, 10:46:21 am by Paul Smedley »

David McKenna

  • Hero Member
  • *****
  • Posts: 889
  • Karma: +32/-0
    • View Profile
Re: Updated Uniaud32 build
« Reply #1106 on: April 15, 2025, 11:50:30 am »
Thanks Paul - this one works with PMUniMix. When I first ran it, all settings were on zero, so had to reset them, but once done they stuck and sound still works.

Regards,

Sigurd Fastenrath

  • Hero Member
  • *****
  • Posts: 649
  • Karma: +36/-0
  • OS/2 Versus Hardware - Maximum Warp!
    • View Profile
Re: Updated Uniaud32 build
« Reply #1107 on: April 15, 2025, 01:12:28 pm »
Hey Lars - the .zip builds contain debug and release map/sym/sys files. I'm assuming Sigurd is running the debug build.

I will get back to that machine in some hours in the evening and report.

Yes, 20250414b was the debug version.

Sigurd Fastenrath

  • Hero Member
  • *****
  • Posts: 649
  • Karma: +36/-0
  • OS/2 Versus Hardware - Maximum Warp!
    • View Profile
Re: Updated Uniaud32 build
« Reply #1108 on: April 15, 2025, 01:14:03 pm »

In the end, you would be able to do this yourself. We are too few developers so you will have to learn to become one :-)

Cheers, Lars

I doubt this will ever happen, a lack of time and skill. I do not even understand where this here is going to lead me.

I will follow your suggestions later this evening, thank you very much.

Sigurd Fastenrath

  • Hero Member
  • *****
  • Posts: 649
  • Karma: +36/-0
  • OS/2 Versus Hardware - Maximum Warp!
    • View Profile
Re: Updated Uniaud32 build
« Reply #1109 on: April 15, 2025, 05:55:58 pm »
7) what is needed is the "address" value of that very same line. The "address" is the base adress of the code object. The offset of your trap into that code segment is then computed as:
offset = EIP - "address"
and the offset is necessary to locate the trapping routine in the MAP file (or SYM file) that Paul has provided

If you are lost: just take a screen shot of the lower half of the "MTE" window you opened in 4).

Done, as far as I was able to.

Screenshot attached. The adress according to this should be:

E5CDB000

Well, what do i have / can I do next?

Thanks!