forked from KolibriOS/kolibrios
HDA: Use another codec when no AFG found if possible
git-svn-id: svn://kolibrios.org@4324 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
d24c668030
commit
6b3f1e224c
@ -512,6 +512,22 @@ proc snd_hda_codec_init ; We use just one codec (the first found)
|
||||
test eax, eax
|
||||
jnz @f
|
||||
|
||||
;Asper+: try to use another codec if possible [
|
||||
if DEBUG
|
||||
push esi
|
||||
mov esi, msgNoAFGFound
|
||||
call SysMsgBoardStr
|
||||
pop esi
|
||||
end if
|
||||
push ecx
|
||||
inc eax
|
||||
mov ecx, [codec.addr]
|
||||
shl eax, cl
|
||||
pop ecx
|
||||
cmp eax, [ctrl.codec_mask]
|
||||
jl .skip_codec
|
||||
;Asper+]
|
||||
|
||||
mov eax, [codec.mfg]
|
||||
test eax, eax
|
||||
jnz @f
|
||||
@ -521,6 +537,7 @@ proc snd_hda_codec_init ; We use just one codec (the first found)
|
||||
call SysMsgBoardStr
|
||||
pop esi
|
||||
end if
|
||||
.skip_codec:
|
||||
mov eax, -1
|
||||
ret
|
||||
@@:
|
||||
@ -560,6 +577,7 @@ proc snd_hda_codec_init ; We use just one codec (the first found)
|
||||
; power up all before initialization
|
||||
stdcall snd_hda_set_power_state, ebx, AC_PWRST_D0
|
||||
|
||||
xor eax, eax
|
||||
pop ebx
|
||||
ret
|
||||
endp
|
||||
|
@ -13,7 +13,7 @@ DEBUG_IRQ equ 0
|
||||
|
||||
USE_SINGLE_MODE equ 0 ; 1 = Single mode; 0 = Normal mode.
|
||||
|
||||
TEST_VERSION_NUMBER equ '018d'
|
||||
TEST_VERSION_NUMBER equ '018e'
|
||||
|
||||
;Asper+ [
|
||||
SDO_TAG equ 1 ;Asper: Output stream tag id (any number except 0)
|
||||
@ -2338,14 +2338,17 @@ proc azx_codec_create
|
||||
; if USE_FIRST_CODEC
|
||||
; cmp ecx, 1
|
||||
; else
|
||||
cmp ecx, 3
|
||||
cmp ecx, 4
|
||||
; end if
|
||||
jl .next_slot
|
||||
mov eax, -1
|
||||
jmp .out
|
||||
.init:
|
||||
push ecx edx
|
||||
stdcall snd_hda_codec_init
|
||||
xor eax, eax
|
||||
pop edx ecx
|
||||
test eax, eax
|
||||
jnz @b
|
||||
.out:
|
||||
pop edx ecx ebx
|
||||
ret
|
||||
@ -2900,6 +2903,7 @@ if DEBUG
|
||||
msgCodecOK db 'codec probed OK',13,10,0
|
||||
msgCodecError db 'codec probe error disabling it...',13,10,0
|
||||
emsgNoAFGorMFGFound db 'no AFG or MFG node found',13,10,0
|
||||
msgNoAFGFound db 'no AFG node found, trying another codec',13,10,0
|
||||
emsgNoMem db 'hda_codec: cannot malloc',13,10,0
|
||||
msgConnect db 'CONNECT: NID=',0
|
||||
msgIdx db ' IDX=',0
|
||||
|
Loading…
Reference in New Issue
Block a user