Page 1 of 2

Wyse SX0 GeodeGX500 Realtek ALC655

Posted: Wed Dec 22, 2021 8:12 am
by DreamZ80
I've been looking around in some Kolibri code. It looks like there is some geode cs5535/6 companion chip support in drivers/audio/a5536. And the alc655 chip is found in drivers/codec.inc.

What should I be looking at, if I want to get audio working on this?
I know it can't be as easy as adding the dev-id to sound.asm.

PCI DEVICE:
1022 2093 00 0F 03 01 04 01 00 05

I don't think this is the problem, but there is an issue with mfgpt running early and preventing mmio access; because of interrupt. I think the system would be non bootable if this was the problem.

What does work? Mostly everything else.

Vesa 1024x768x32 works great. Other modes work. Some good, some okay.
USB Works great (2.0).
Ethernet works great (10/100).
Hardisk works. <- There may be issue saving settings from kernel boot screen.

Initially I thought there was IDE issues, as other operating systems do have problems.
Harddisk works with bios mode on. Cannot go to kernel/home and boot again as IDE is disable in bios.
(If you boot Kolibri from DOS, after MSR edit, bios mode can be off; works correctly)

On this device the Harddisk might work (with bios mode off) if MSR is modified at boot, or by driver loading.
Someone has done this here -> https://www.parkytowers.me.uk/thin/wyse/s10/Linux.shtml
The cs5536 datasheet (pdf), is here -> https://www.amd.com/system/files/TechDo ... 536_db.pdf

In DOS I edit MSRs with these addresses and values (msred.com or cpuid.exe).
msr32 - val64
CFG:
0x51300010h < 0x00010002h
DTC:
0x51300012h < 0x20200000h
CAST:
0x51300013h < 0x20000000h
ETC:
0x51300014h < 0x00000000h

These values (and other modes) are found starting about page 336 of the cs5536 data sheet. The values above may not be the right ones for all situations.
It might be okay to provide an advanced option to add, save, and edit MSR during boot. But it isn't hard to just do it yourself. Maybe it could be configured after boot, and tested by kernel/home like the apic/acpi drivers.

This is not an urgent request for help. I have other machines that fully support Kolibri. The device is only 366Mhz, but very affordable and mostly supported.

Notes:
Very small thin client. Memory support up to 512Mb (PC2700/200pin). Can use IDE flash module, or there is room for a short 44 pin IDE cable and a IDE to SDHC card adapter. It is important to get the right part number. Mine is 902110-01L. The important part is the "L". Otherwise the device is more limited. No PS2 mouse/keyboard. Only USBx4. VGA out. RS232 out. Audio in and out.

Syslinux might not boot from USB, but it does boot from IDE. Some say GRUB with USB works. Dos boot from USB and IDE works. Booting from USB, is only USB 1.1, but after Kolibri boot should be (2.0).

There is/was a Coreboot bios replacement for this device. But I don't think it should be needed for Kolibri.

There is an issue where the mmio is not available after mfgpt runs early and causes an interrupt. But Kolibri seems to boot faster and reads the mmio, before the interrupt. Somehow in Linux they keep mmio available. But I haven't figured out how they do that yet. I am unsure if Kolibri ever needs to worry about this.

Thanks for reading!

Re: Wyse SX0 GeodeGX500 Realtek ALC655

Posted: Fri Dec 24, 2021 1:01 am
by DreamZ80
Hmm. Looks like the code in a5535 is not longer used as driver. Left over from Menuet?

Re: Wyse SX0 GeodeGX500 Realtek ALC655

Posted: Fri Dec 24, 2021 2:59 am
by Leency
Hi, DreamZ80
DreamZ80 wrote:Hmm. Looks like the code in a5535 is not longer used as driver. Left over from Menuet?
For sure not, it is much newer http://websvn.kolibrios.org/log.php?rep ... 2F&isdir=1&

And it must work... hm... could you please try a distro with driver from this period http://builds.kolibrios.org/eng/history/ from 2010 - 2012? Will it work for you?

----
I am an app developer so I can not help you some deep core-kernel issues.

Regards,
Kiril

Re: Wyse SX0 GeodeGX500 Realtek ALC655

Posted: Fri Dec 24, 2021 7:35 am
by DreamZ80
I tried a couple. But the oldest date is Feb, 4th 2013. Tried two "2012" from archive.org. The yellow speaker icon has a red X over it. USB mouse, for this device, does not work. I can run ac97snd, but nothing shows up in "debug board". Will try older ones from archive.org.

Re: Wyse SX0 GeodeGX500 Realtek ALC655

Posted: Fri Dec 24, 2021 9:46 am
by DreamZ80
Tried one from mid 2010 (archive.org). The speaker icon had a red X.

Does mean unavailable or mute?

Tested this with some linux to make sure audio actually worked, on the board I own. It does work.

Re: Wyse SX0 GeodeGX500 Realtek ALC655

Posted: Fri Dec 24, 2021 1:25 pm
by Leency
ac97snd won't run without any param.
What you need is to insert any mp3 file for example the file from attachement in the img and run:
/rd/1/media/ac97snd /rd/1/sine.mp3
If no sound then check the Board.

By default /srd/1/drivers/sound.obj is loaded. In what file Geode driver is located? You have to raname this driver into sound.obj and retry.

You can try it with your distros from archive or use these ones:
Lets try http://builds.kolibrios.org/eng/history/svn3224-img.7z
And http://board.kolibrios.org/download/file.php?id=3586 (Jul 2012, sorry it is in Russian)

Re: Wyse SX0 GeodeGX500 Realtek ALC655

Posted: Sat Dec 25, 2021 10:10 pm
by DreamZ80
Leency wrote:ac97snd won't run without any param.
What you need is to insert any mp3 file for example the file from attachement in the img and run:
/rd/1/media/ac97snd /rd/1/sine.mp3
If no sound then check the Board.
This is the output from kolibri_n8.zip (thank you for the upload).

Code: Select all

detect hardware
device not found
HDA test version 018 pci_dump + beeper
detect hardware
device not found
sound service is not loaded
sound service is not installed
By default /srd/1/drivers/sound.obj is loaded. In what file Geode driver is located? You have to raname this driver into sound.obj and retry.
Please forgive me, I have not described this very well. When I looked at code in a5536 folder, it looks like it would make it's own driver file. But I have not found one.

I did not build it myself, either.
sorry it is in Russian
No problem. It won't hurt to get more familiar. ;)

Re: Wyse SX0 GeodeGX500 Realtek ALC655

Posted: Sat Dec 25, 2021 10:26 pm
by DreamZ80
Am I wrong to think that a5536 folder is not used (anymore)?

Devid 0x2093 is in geode.c. But is is not in sound.asm.

I do not think sound.sys does anything with code from a5536 folder.

I did look at code in a5536 folder closer. The geode.c file does many things to initialize the codec.
Also there is a geode.bin file. It is an interesting file to have there.
If you examine it, it ends with:

Code: Select all

@sound^@/rd/1/drivers/geode.drv^@

Re: Wyse SX0 GeodeGX500 Realtek ALC655

Posted: Sat Dec 25, 2021 11:24 pm
by Leency
I also looked closer into drivers/audio/a5536
It looks like we have to build the driver using "geode.bat" and then load it using binary compiled from "geode.asm" (it has f68.21 - load driver PE).
What is super-weird I didn't find anywhere the binary of geode.drv/geode.dll on SVN/FTP/this forum...

So as I said we have to build it.

Re: Wyse SX0 GeodeGX500 Realtek ALC655

Posted: Sat Dec 25, 2021 11:44 pm
by Leency
OH SHIT! I HAVE FOUND IT!
https://code.google.com/archive/p/kolibri-pe/downloads => a5536-rc3.7z !

Please try it on the lastest distro. Put files into /sys/drivers folder.
It it won't work on the latest distro then try the older ones.

Re: Wyse SX0 GeodeGX500 Realtek ALC655

Posted: Sun Dec 26, 2021 1:44 am
by DreamZ80
:shock:

Well, Leency.... You solved it!

Put geode in /rd1/1, geode.drv in /rd1/1/drivers, and then add /SYS/GEODE "" to /rd1/1/settings/Autorun.dat; early enough to load the driver before /SYS/@VOLUME. I added it right after /SYS/SETUP.

Output from Board:

Code: Select all

AMD Geode CS3356 audio driver
codec id 0x7C 414C 0x7E 4760
Pixie plays sine.mp3

Code: Select all

Play file /rd/1/SINE.MP3
And there is sound!

Even sdlquake has working audio.

Volume is loaded, but it does not change or mute audio (better than no sound :) ).

This is tested on new Kolibri.
Good work Leency!

Re: Wyse SX0 GeodeGX500 Realtek ALC655

Posted: Sun Dec 26, 2021 4:25 am
by Leency
DreamZ80
Excellent news! I must add this driver into ISO and DRVINSTALL app (SYSPANEL => Driver Install).
Will do it tomorrow. Nice day. :D
Volume is loaded, but it does not change or mute audio (better than no sound :) ).
Hm... it must be investigated. Probably read forum old posts on this point, check driver source...

Re: Wyse SX0 GeodeGX500 Realtek ALC655

Posted: Sun Dec 26, 2021 7:55 am
by DreamZ80
Leency wrote:DreamZ80
Excellent news! I must add this driver into ISO and DRVINSTALL app (SYSPANEL => Driver Install).
Will do it tomorrow. Nice day. :D
That's fast 8)
Hm... it must be investigated. Probably read forum old posts on this point, check driver source...
Sound works! That is better than I was even asking. :D

I think geode.c uses the same controls as in ac97.asm. I could probably make a personal hack to control volume. I'm not sure, maybe with infinity.asm? One day, when I know what I am doing :oops:, I could write something to initialize the codec in asm. Then add to sound.asm, codec.inc, and maybe ac97.asm a little something to handle the chip like normal.

I have to say, things have turned out better than I expected.

At first I was hoping someone could give advice on what code I needed to play with, to get it working. Now, after looking around, I am more familiar with how this part of Kolibri works.

So I thought I would have to write, or modify, a driver for audio. I would have gotten around to it eventually. But now it is available to anyone! Much better than waiting on me, to wrap my head around things.

Re: Wyse SX0 GeodeGX500 Realtek ALC655

Posted: Sun Dec 26, 2021 1:01 pm
by Leency
Yep, it would be nice if AMD Geode driver:
- could be automatically loaded by sound.sys if appropriate device detected
- be recompiled for a smaller size. The source of Geode driver itself is VERY small so I don't understand why is its binary so big (5.5 KB packed, 10.5 unpacked). Probably because it was build with newlib. If we could make it smaller then we may add it into IMG.

P.S. There is an unfinished Internet radio you may interest into http://board.kolibrios.org/viewtopic.php?p=74708#p74708
Maybe I have to add flac/ogg/aac support in Pixie as well...

Re: Wyse SX0 GeodeGX500 Realtek ALC655

Posted: Sun Dec 26, 2021 9:20 pm
by Leency
DreamZ80

I've added driver into ISO. You can find it in SYSPANEL => DriverInstall.
Please check if the driver is working for you.

Also now it can be run from any place. Just the runner and driver must have the same name and put together.