Author Topic: Updated Uniaud32 build  (Read 676808 times)

Sigurd Fastenrath

  • Hero Member
  • *****
  • Posts: 649
  • Karma: +36/-0
  • OS/2 Versus Hardware - Maximum Warp!
    • View Profile
Re: Updated Uniaud32 build
« Reply #1125 on: April 16, 2025, 11:41:50 am »
Thanks Sigurd, I'll have a look at these a bit later. I've just been thinking about this part of your testlog:
Code: [Select]
Period size min=2f0 max=2f0
Error -22 second time.. Bailing

I see this exct errorcode in alll of the three logs (alsa.log and 2lsa.log and the 3rd one) as well.

And there is another line multiple times before this saying:

ALC285: Invalid fixup type 0
« Last Edit: April 16, 2025, 11:45:37 am by Sigurd Fastenrath »

Lars

  • Hero Member
  • *****
  • Posts: 1426
  • Karma: +72/-0
    • View Profile
Re: Updated Uniaud32 build
« Reply #1126 on: April 16, 2025, 02:36:50 pm »

@Lars - I think about it once again, regarding differences in hardware - the only thing I did during testing was switching form 16 to 1 CPU (/MAXCPU=1 Switch in config.sys). Do not know, if that effect things in any way


The kernel will create one management structure per CPU. If you have 1 CPU instead of 16 (known to OS/2, I mean), that will likely make a difference.

Lars

  • Hero Member
  • *****
  • Posts: 1426
  • Karma: +72/-0
    • View Profile
Re: Updated Uniaud32 build
« Reply #1127 on: April 16, 2025, 03:40:33 pm »
Thanks Sigurd, I'll have a look at these a bit later. I've just been thinking about this part of your testlog:
Code: [Select]
Period size min=2f0 max=2f0
Error -22 second time.. Bailing

This comes from:
https://trac.netlabs.org/uniaud/browser/GPL/branches/uniaud32-exp/lib32/sound.c#L1015
& https://trac.netlabs.org/uniaud/browser/GPL/branches/uniaud32-exp/lib32/sound.c#L1025

Error -22 is EINVAL or Invalid Parameter. This suggests that one of the parameters set between https://trac.netlabs.org/uniaud/browser/GPL/branches/uniaud32-exp/lib32/sound.c#L965 & https://trac.netlabs.org/uniaud/browser/GPL/branches/uniaud32-exp/lib32/sound.c#L995 are causing the problem. The trick is know which one.

What I might do is create a specific build which writes each parameter one by one so we can see which one causes the issue.

The logic is really twisted. Without any evidence, I would think that it is possible that:
"periodbytes*nrperiods"
might exceed
"bufsize = hw_param_interval((&params), SNDRV_PCM_HW_PARAM_BUFFER_BYTES)->max;"
which of course is forbidden.

Maybe you can print out these values to begin with.

Mark Szkolnicki

  • Sr. Member
  • ****
  • Posts: 462
  • Karma: +18/-0
    • View Profile
Re: Updated Uniaud32 build
« Reply #1128 on: April 16, 2025, 04:12:58 pm »
Hi Mark,

glad to hear you are OK and writing a Novel - great! My 5th part is going well, I think I can finish it in time (Release Date 25/9/25) because I have to have a knee surgery (new knee) in May, I will be 4 weeks of work then and have fortunately and hopefully enough time for the book.

I will test automute later, but I guess, from what I understand so far - the problem with my hardware is somewhere in the communication between uniaud32.sys and uniaud16.sys

Paul is doing a tremendous job, so I hope to get sound to run on this really marvelous Laptop.

All the best and thanks for your help!

Sigurd

Good Morning Sigurd (my time)

Yep, decided when I had free time (which is almost none at the moment), to write a Sci-Fi novel based on a character Andre Norton abandoned after two novels 65 years ago. Being a writer in other genres (including professional technical writing) thought it would be an interesting exercise, to keep the grey cells in tune.

I'm currently slowed although still mobile - fractured my right ankle and foot beginning of March so 5 weeks into recovery, wearing an Air-Cast, which is now off, and getting back to walking somewhat normally again

It sounds like Paul has got your sound working, from a couple of other posts you made, so the disabling of auto-mute may be moot in your case, and may not need to be tested - for you and others, if you do try it, I tested Pauls Build 6.12.21 dated 2025/4/15 and it solved the lock-up problem which appeared in build 2025/04/14 when trying to disable auto-mute.

I agree that Paul is and has for years done a tremendous job in all of this, as have many of the other extremely talented people who continue to try to keep this OS alive and working decades after it was first created, and with all the obstacles of time and technology being light years beyond what was new and fresh in the 80's to 90"s - some days its tough to fathom that I started my professional career then, and am close to retiring now, still using a version of that same operating system ...........

But good talking to you, a fine rest of the week . and glad your problems with sound with UniAud are finally being resolved.

Best!

M

« Last Edit: April 16, 2025, 09:59:48 pm by Martin Iturbide »
Vincit Que Se Vincit - "He Who Conquers Self Succeeds"

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2513
  • Karma: +190/-0
    • View Profile
Re: Updated Uniaud32 build
« Reply #1129 on: April 16, 2025, 10:38:21 pm »
And there is another line multiple times before this saying:

ALC285: Invalid fixup type 0

OK, I can explain this one. I doubt it's the cause of the lack of mmpm...

Basically - due to the fact that we're using OpenWatcom (which is OLD) and the linux kernel is built with gcc/clang - some of the code uses features that OW doesn't support.

For example at line 3082 of https://trac.netlabs.org/uniaud/browser/GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/patch_realtek.c (Unfortunately the file is too large to view online, you'll have to download a copy)
Code: [Select]
[ALC1220_FIXUP_CLEVO_PB51ED_PINS] = {
.type = HDA_FIXUP_PINS,
.v.pins = (const struct hda_pintbl[]) {
{ 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
{0}
},
.chained = true,
.chain_id = ALC1220_FIXUP_CLEVO_PB51ED,
},

Watcom can't handle the nested struct .v.pins

It can be worked around - see example at lines 1294 & 1514 but there are a lot of cases of this and it's a PITA

I'll look to add the workarounds for the ALC285 - for you, it's probably the one a tline 11176 (ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC) (See reference to your pci id at line 11744)

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2513
  • Karma: +190/-0
    • View Profile
Re: Updated Uniaud32 build
« Reply #1130 on: April 16, 2025, 10:52:41 pm »
Thanks Sigurd, I'll have a look at these a bit later. I've just been thinking about this part of your testlog:
Code: [Select]
Period size min=2f0 max=2f0
Error -22 second time.. Bailing

This comes from:
https://trac.netlabs.org/uniaud/browser/GPL/branches/uniaud32-exp/lib32/sound.c#L1015
& https://trac.netlabs.org/uniaud/browser/GPL/branches/uniaud32-exp/lib32/sound.c#L1025

Error -22 is EINVAL or Invalid Parameter. This suggests that one of the parameters set between https://trac.netlabs.org/uniaud/browser/GPL/branches/uniaud32-exp/lib32/sound.c#L965 & https://trac.netlabs.org/uniaud/browser/GPL/branches/uniaud32-exp/lib32/sound.c#L995 are causing the problem. The trick is know which one.

What I might do is create a specific build which writes each parameter one by one so we can see which one causes the issue.

The logic is really twisted. Without any evidence, I would think that it is possible that:
"periodbytes*nrperiods"
might exceed
"bufsize = hw_param_interval((&params), SNDRV_PCM_HW_PARAM_BUFFER_BYTES)->max;"
which of course is forbidden.

Maybe you can print out these values to begin with.

Done - https://smedley.id.au/tmp/uniaud32.sys contains:
Code: [Select]
dprintf(("Period size min=%lx max=%lx", minperiodsize, maxperiodsize));
dprintf(("bufsize =%lx, nrperiods=%lx, periodbytes=%lx", bufsize, nrperiods, periodbytes));

@Klipp can you install this one? and post the 'copy alsahlp$ alsa.log' output? It should also fix your invalid fixup error.
« Last Edit: April 16, 2025, 11:10:01 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 #1131 on: April 17, 2025, 06:29:20 am »
Another BIG Step forward!!

First time boot with the new driver there are the System Sounds playing!!

I can select an Audio wav.file in MMOS2/SOUNDS and it does play!

GREAT! No crashes when using this! -> I attach alsa.log

What is still there is the Crash with VLC, but this may be a problem with VLC (?) -> I attach vlcalsa.log und POPUPLOG.OS2 (renamed)

No complaining, just to let you know: The quality of the sound is quite poor, compared to Windows or Linux. I would say the Bass tones are missing. I will create a video this evening and post it at youtube, so that you can hear it yourself.

It is very promising, would be great to have "full sound", I will play a little bit more with PMUNIMIX etc. later this day, as soon as I have some time!

Thanks again Paul and all the others, you almost did it!!

Sigurd


« Last Edit: April 17, 2025, 06:38:05 am by Sigurd Fastenrath »

Sigurd Fastenrath

  • Hero Member
  • *****
  • Posts: 649
  • Karma: +36/-0
  • OS/2 Versus Hardware - Maximum Warp!
    • View Profile
Re: Updated Uniaud32 build
« Reply #1132 on: April 17, 2025, 06:34:50 am »
Regarding poor sound quality:

I just remember having almost the same feeling/experience with Linux, and that changed, when MONO was changed to STEREO. I found a line in alsa.log

autoconfig for ALC285: line_outs=2 (0x14/0x17/0x0/0x0/0x0) type:speaker

   speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)

   hp_outs=1 (0x21/0x0/0x0/0x0/0x0)

   mono: mono_out=0x0

   inputs:


Is this a possible reason? Can it somehow be changed to play in STEREO mode?

Just a shot in the Dark....

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2513
  • Karma: +190/-0
    • View Profile
Re: Updated Uniaud32 build
« Reply #1133 on: April 17, 2025, 06:43:07 am »
Wow! I did not expect that fixup to help!! But that is the only material change in this drop!.

In terms of the stereo output, I suspect there may be a mixer control for this. None of the mixer controls in your last testlog look obvious, perhaps generate a new 'testlog uniaud' to see if any new controls show up now the fixups are in place?

Sigurd Fastenrath

  • Hero Member
  • *****
  • Posts: 649
  • Karma: +36/-0
  • OS/2 Versus Hardware - Maximum Warp!
    • View Profile
Re: Updated Uniaud32 build
« Reply #1134 on: April 17, 2025, 07:13:36 am »
Here we got with the new unmix.list and testlog.uniaud.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2513
  • Karma: +190/-0
    • View Profile
Re: Updated Uniaud32 build
« Reply #1135 on: April 17, 2025, 07:30:27 am »
As expected, no new mixer controls. I would be having a play with pmunimix - perhaps that makes it easier to see what may be wrong. https://www.os2site.com/sw/drivers/sound/uniaud/pmunimix-bin-0_82.zip (in case you don't already have it)

Sigurd Fastenrath

  • Hero Member
  • *****
  • Posts: 649
  • Karma: +36/-0
  • OS/2 Versus Hardware - Maximum Warp!
    • View Profile
Re: Updated Uniaud32 build
« Reply #1136 on: April 17, 2025, 08:04:46 am »
I have PMUnimix installed, you can see it on my screenshots  ;) :D

What I remember now:

As I wrote in my comments before, for Linux Mint Cinnamon 22.1. the 6.11.xxx OEM kernel solved the problem with the Sound, there was exactly the same problem: sound poor, because of MONO. OEM Kernel changed it to STEREO.

I guess it is much to much work to forge an UNIAUD from that OEM Kernel version, and in addition that MAY only help for this specific hardware, I have.

I will try PMUnimix settings this evening.

Thanks again and all the best!!

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2513
  • Karma: +190/-0
    • View Profile
Re: Updated Uniaud32 build
« Reply #1137 on: April 17, 2025, 10:04:35 am »
Interesting, I'm still not sure exactly HOW https://launchpad.net/ubuntu/+source/linux-meta-oem-6.11/6.11.0-1020.20 differs from a standard kernel. I'm struggling to find source patches for it :(

Mark Szkolnicki

  • Sr. Member
  • ****
  • Posts: 462
  • Karma: +18/-0
    • View Profile
Re: Updated Uniaud32 build
« Reply #1138 on: April 17, 2025, 04:32:12 pm »
Heh Paul!

Hi Mark, I suspect you won't see lockups with the 20250415 build :)

Doesn't have anything to do with Realtek this time, but can confirm today your UniAud 6.12.21 Build 2025/04/15 also works with the NVidia AD1988b audio chipset.

Best!

M
Vincit Que Se Vincit - "He Who Conquers Self Succeeds"

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2513
  • Karma: +190/-0
    • View Profile
Re: Updated Uniaud32 build
« Reply #1139 on: April 18, 2025, 10:43:28 am »
Heh Paul!

Hi Mark, I suspect you won't see lockups with the 20250415 build :)

Doesn't have anything to do with Realtek this time, but can confirm today your UniAud 6.12.21 Build 2025/04/15 also works with the NVidia AD1988b audio chipset.

Thanks Mark - for the Realtek system, are you able to send me an alsa.log from 'copy alsahlp$ alsa.log' using the debug driver on a freshly booted system? I'll see if there is a 'fixup' that's missing.