drivers/audio: add es1371, fix hang in infinity #571

Merged
Burer merged 4 commits from es1371-driver-upload into main 2026-07-14 04:53:20 +00:00
Owner
  • add es1371 sound driver
  • fix hang in infinity
  • remove garbage ensoniq.asm
  • add "Multimedia audio controller detected with PciId=VEN:DEV", same as vidintel does

Tested with 3 cards.

- add es1371 sound driver - fix hang in infinity - remove garbage ensoniq.asm - add "Multimedia audio controller detected with PciId=VEN:DEV", same as vidintel does Tested with 3 cards.
Leency requested review from Ghost 2026-07-11 23:17:17 +00:00
Leency requested review from Ghost 2026-07-11 23:17:17 +00:00
dunkaist requested changes 2026-07-12 02:30:24 +00:00
Dismissed
@@ -0,0 +1,1192 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Owner

Should we add es1371.sys to kolibri.img or kolibri.raw?

Should we add es1371.sys to kolibri.img or kolibri.raw?
dunkaist marked this conversation as resolved
@@ -0,0 +1034,4 @@
; the codec for true silence instead of intelac97's "quiet but audible"
cmp eax, -VOL_MIN
jne .scale
mov ebx, 0x8000 + (63 shl 8) + 63 ; mute bit + max attenuation
Owner

Maybe use constants instead of these magic numbers?

Maybe use constants instead of these magic numbers?
dunkaist marked this conversation as resolved
@@ -0,0 +1100,4 @@
endp
align 4
proc StallExec
Owner

The four pushes below (and the corresponding pops at the end of the function) can be written as follows:
proc StallExec uses ecx edx ebx eax

The four pushes below (and the corresponding pops at the end of the function) can be written as follows: proc StallExec uses ecx edx ebx eax
dunkaist marked this conversation as resolved
@@ -222,2 +227,4 @@
.loop:
mov ecx, [eax + PCIDEV.vendor_device_id]
if DEBUG
; report every multimedia-class function, supported or not, so unknown
Owner

Maybe we should report not 'every multimedia-class function' but only audio devices. This is sound.asm, after all.

Maybe we should report not 'every multimedia-class function' but only audio devices. This is sound.asm, after all.
dunkaist marked this conversation as resolved
@@ -224,0 +231,4 @@
; sound hardware always shows its PCI ids in the debug board
mov ebx, [eax + PCIDEV.class]
shr ebx, 16 ; base class (kernel stores class:sub:if)
cmp ebx, 0x04 ; 04h = multimedia controllers
Owner

PCI class 0x04 (multimedia) is checked, but device subclass isn't. The current code of sound.asm will report video devices (subclass 0x00) and other subclasses too.

PCI class 0x04 (multimedia) is checked, but device _subclass_ isn't. The current code of sound.asm will report video devices (subclass 0x00) and other subclasses too.
dunkaist marked this conversation as resolved
@@ -285,6 +300,49 @@ proc detect_controller
endp
; eax = vendor_device_id (low16=VID, high16=DID); prints 'VEN: xxxx DEV: xxxx'
Owner

I think it doesn't print "VEN: xxxx DEV: xxxx", it prints in a different format.

I think it doesn't print "VEN: xxxx DEV: xxxx", it prints in a different format.
dunkaist marked this conversation as resolved
@@ -288,0 +324,4 @@
; prints eax's TOP 16 bits as 4 hex chars, no newline; trashes eax/ebx/ecx/esi
align 4
print_hex16:
Owner

This function is used only if DEBUG = 1, but it is always compiled in.

This function is used only if DEBUG = 1, but it is always compiled in.
dunkaist marked this conversation as resolved
@@ -288,0 +338,4 @@
invoke SysMsgBoardStr
ret
hexletters db '0123456789ABCDEF'
Owner

These messages should probably go closer to other messages (msgInit, msgFail) at the end of the file.

These messages should probably go closer to other messages (msgInit, msgFail) at the end of the file.
dunkaist marked this conversation as resolved
Author
Owner

@dunkaist all points should be fixed, please check.

@dunkaist all points should be fixed, please check.
Leency requested review from dunkaist 2026-07-12 10:08:09 +00:00
dunkaist approved these changes 2026-07-12 11:30:25 +00:00
Doczom approved these changes 2026-07-13 22:32:05 +00:00
Burer added 4 commits 2026-07-14 04:42:38 +00:00
- add es1371 sound driver
- fix hang in infinity
- remove garbage ensoniq.asm
- add "Multimedia audio controller detected with PciId=VEN:DEV", same as vidintel does
fixes for dunkaist request
Test PR / Build (es_ES) (pull_request) Successful in 4m45s
Test PR / Build (ru_RU) (pull_request) Successful in 4m48s
Test PR / Build (en_US) (pull_request) Successful in 4m51s
1ae39c50f5
Burer force-pushed es1371-driver-upload from 81ccea4892 to 1ae39c50f5 2026-07-14 04:42:38 +00:00 Compare
Burer merged commit e641f6c400 into main 2026-07-14 04:53:20 +00:00
Burer deleted branch es1371-driver-upload 2026-07-14 04:53:20 +00:00
Sign in to join this conversation.
No Reviewers
KolibriOS/Developers
No labels
4 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KolibriOS/kolibrios#571