Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with SiS SI7012 #2

Open
VOC-LINK opened this issue Oct 9, 2020 · 10 comments
Open

Problem with SiS SI7012 #2

VOC-LINK opened this issue Oct 9, 2020 · 10 comments

Comments

@VOC-LINK
Copy link

VOC-LINK commented Oct 9, 2020

I tried a binary of your player found at https://www.vogons.org/viewtopic.php?p=860136#p860136 unfortunately it refused to play anything complaining: "Error: Unable to find any supported AC'97 audio device!".
Well I tested that audio device under Linux control (using MP3blaster and ALSA drivers) and everything went just fine.
I'm using motherboard ASRock K7S8XE R3.0. Using "Craig Hart's PCI+AGP bus sniffer 0.48vk" I've found following information about my sound device:

Vendor 1039h Silicon Integrated Systems (SiS)
Device 7012h SiS7012 Sound Codec
Command 0105h (I/O Access, BusMaster, System Errors)
Status 0290h (Has Capabilities List, Supports Back-To-Back Trans., Medium Timings)
Revision A0h, Header Type 00h, Bus Latency 20h
Self test 00h (Self test not supported)
PCI Class Multimedia, Type Audio
Subsystem ID 70121849h Unknown
Subsystem Vendor 1849h ASRock Inc
Address 0 is an I/O Port : 0000D400h
Address 1 is an I/O Port : 0000D000h
System IRQ 10, INT# C
New Capabilities List Present:
Power Management Capability
Supports power state D1
Curent Power State : D0 (Device operational, no power saving)

Any chance to make player cooperate with my sound device?

@volkertb
Copy link
Owner

volkertb commented Oct 10, 2020

Hi. first of all, thanks for the detailed report. 🙂

Well, taking a brief gander at the Linux intel8x0 driver, the SiS7012 should indeed be (mostly?) hardware-compatible with the Intel ICHx AC'97 audio devices, so it might be trivial to add support for it. I hadn't added the vendor and device IDs for it to the detection routines yet.

It's late where I live right now and I'm about to go to bed. Would you be available to help me test this some time this weekend?

@VOC-LINK
Copy link
Author

Yes, sure - no problem.

@volkertb
Copy link
Owner

@ZbigniewB You may have noticed I just published a build on the Releases page. Feel free to try it out, but keep in mind that there might possibly still be issues, since I saw a few SiS7012-specific workarounds being performed in the FreeBSD driver that I haven't implemented in ich2player yet. I did however added detection support for this specific chipset, as well as unmute code specifically for this hardware, based on what I saw being done in the Linux ALSA driver.

But if you can, please test it anyway, to see what works and what doesn't. Be sure to turn down your speakers first when you specify the /v option though, since it will set the output volume to 100% before it tries to play anything.

Thanks again for helping me test this. 🙂

@VOC-LINK
Copy link
Author

All pleasure is mine. :) Thanks a lot for your prompt answer.

So just tested "release" EXE and it didn't produce any sound yet, causing my computer to hang instead. ;)
It said at its startup time:
SiS7012 AC'97 Sound Controller detected.
(Untested model... etc.)
PCI Vendor ID: 1039h
PCI Device ID: 7012h
Device Subsystem Vendor ID: 1849h
Device Subsystem ID: 7012h

I tested it both within my "usual" environment, where I use JEMMEX for EMS/XMS, and "no drivers" option to make sure there wasn't any collision. Well, "partial success", it seems to have recognized sound device, at least. ;)
However When I ran it with no WAV filename as its parameter it didn't hang my machine up instead complaining "Error: file not found". So most probably the problem started when it attempted to play that WAV file.

@volkertb
Copy link
Owner

volkertb commented Oct 10, 2020

Thanks for testing. 😅

Yeah, I figured it would probably need a bit more work, notably those workaronds I saw in sources I saw elsewhere, notably the ones in the FreeBSD drivers.

I'll look into it further, but it won't be done today, I'm afraid. If you click on the "Watch" button and then selecd "Releases only", you'll automatically get a notification whenever I publish a new release or mention you in an issue thread.

I really appreciate your willingness in helping me out with testing this. 🙂

@VOC-LINK
Copy link
Author

I haven't tested it under FreeBSD's control, but it works just fine with ALSA in Linux. Plenty of devices shown by alsamixer, no problems with playback (recording not tested yet). No idea whether ALSA uses such kind of workarounds for SiS7012, unfortunately. Maybe it's something very FreeBSD-specific?

@volkertb
Copy link
Owner

I doubt it. It actually swaps PCI registers for the SiS7012 as a workaround. That is not an OS-specific workaround.

@thp
Copy link

thp commented Oct 3, 2023

Not exactly related to ich2player, but SIS7012 support for SBEMU is here, possibly useful as a reference or as alternative tool to check if it's working: crazii/SBEMU#29 (feedback in that PR greatly appreciated, at the moment It Works On My Machine, getting anyone with SIS7012 to test-drive it and report back if it works would be great).

For ich2player, the missing parts are likely:

  • Swap PCM OUT status register and PCM OUT PICB register (0x16 and 0x18)
  • Treat sample count in PICB and Buffer Descriptor List as bytes quantities, not samples
  • The different channel mask for 4 and 6 channel operation in the global control register (0x2C)

@volkertb
Copy link
Owner

volkertb commented Oct 8, 2023

@thp Thanks for this! By the way, I also noticed your PR in the SBEMU project. It's closely related to my PR in that same project to implement a CI/CD pipeline for it using a GitHub Actions workflow. Let's team up, also with @4nd3r50ncr. That way, we won't have to reinvent the wheel on various stuff, and get more done.

I understood from @crazii that he is currently on hiatus from SBEMU, working on other stuff, but hopefully he'll pop back up on the radar, so he can merge our improvements. If he has a lack of time working on that project going forward, maybe he can hand it over to a team that we could form to pick up development from there.

About my ich2player project here: I've been dabbling with DOS driver development, because my longer term objective is to give SBEMU some kind of pluggable or modular architecture, so it would become much easier to add support for more hardware backends to SBEMU. (Also I have concerns about the license of the Mpxplay drivers that SBEMU currently makes use of.)

I've been trying to repurpose the AIL/32 drivers by John Miles for this, since those are usable with protected mode (DPMI) software, but first, I'm trying to figure out how to implement AIL/32 drivers in C instead of assembly, so we could implement drivers for a lot more hardware, by porting over Linux and xBSD sound drivers.

Curious about your thoughts.

@crazii
Copy link

crazii commented Nov 17, 2023

Not exactly related to ich2player, but SIS7012 support for SBEMU is here, possibly useful as a reference or as alternative tool to check if it's working: crazii/SBEMU#29 (feedback in that PR greatly appreciated, at the moment It Works On My Machine, getting anyone with SIS7012 to test-drive it and report back if it works would be great).

For ich2player, the missing parts are likely:

  • Swap PCM OUT status register and PCM OUT PICB register (0x16 and 0x18)
  • Treat sample count in PICB and Buffer Descriptor List as bytes quantities, not samples
  • The different channel mask for 4 and 6 channel operation in the global control register (0x2C)

Sorry to keep you wait so long, I merge it in a few days. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants