From 2c1aecff34327676545c6788052f994cdc15b783 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Sun, 5 Jan 2025 18:33:07 -0300 Subject: [PATCH] ac97: Make Linux port official --- .github/workflows/build.yml | 1 + ac97/Makefile.gcc | 2 +- ac97/README.md | 10 ++++++++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 96a5f98..76e8072 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,6 +46,7 @@ jobs: run: | cd ${{ github.workspace }}/ac97 wmake + make -f Makefile.gcc clean all CC=i686-linux-gnu-gcc CFLAGS=-I/usr/local/include LDFLAGS=-static - name: Build `acpi` run: | cd ${{ github.workspace }}/acpi diff --git a/ac97/Makefile.gcc b/ac97/Makefile.gcc index 0d0ea69..028af33 100644 --- a/ac97/Makefile.gcc +++ b/ac97/Makefile.gcc @@ -17,6 +17,6 @@ export OBJS = ac97.o clib_pci.o clib_sys.o clib_term.o export DEST = ac97 -export CFLAGS = -lpci +override LDFLAGS += -lpci include ../clib/gcc.mk diff --git a/ac97/README.md b/ac97/README.md index 644780d..2f8e574 100644 --- a/ac97/README.md +++ b/ac97/README.md @@ -1,14 +1,20 @@ ac97 ==== -DOS tool for probing AC'97 audio controllers and codecs. +DOS and Linux tool for probing AC'97 audio controllers and codecs. Usage ----- -Run `AC97.EXE` on a system with an Ensoniq AudioPCI (Creative Sound Blaster PCI), VIA or Intel AC'97 audio controller. On the first stage, audio controller information will be displayed on screen. On the second stage, AC'97 codec registers corresponding to optional features will be probed, and a register dump will be displayed and saved to `CODbbddf.BIN` where `bb`=bus, `dd`=device, `f`=function where the controller is located. +Run `ac97` on a system with an Ensoniq AudioPCI (Creative Sound Blaster PCI), VIA or Intel AC'97 audio controller. **On Linux, make sure all relevant `snd_*` modules are unloaded to avoid interference.** On the first stage, audio controller information will be displayed on screen. On the second stage, AC'97 codec registers corresponding to optional features will be probed, and a register dump will be displayed and saved to `CODbbddf.BIN` where `bb`=bus, `dd`=device, `f`=function where the controller is located. The optional `-s` parameter makes the second stage silent, only saving the codec register dump to file, which is useful if multiple audio controllers are being probed at once. Building -------- +### DOS target + * **Windows:** Run `wmake` from an OpenWatcom "Build Environment" command prompt. * **Linux:** Run `wmake` with OpenWatcom tools present in `$PATH`. + +### Linux target + +* **Linux:** Run `make -f Makefile.gcc` with a GCC toolchain and development files for `libpci` installed.