40,13 → 40,13 |
mov eax, -1 |
ret |
@@: |
if FDEBUG ;YAHOO |
if FDEBUG |
push eax esi |
mov esi, msgVerbQuery |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
mov eax, ebx |
stdcall fdword2str, 2 |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
pop esi eax |
end if |
|
64,16 → 64,15 |
jz .end_debug |
push eax esi |
mov esi, msgVerbAnswer |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
mov eax, edx |
stdcall fdword2str, 2 |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
pop esi eax |
.end_debug: |
end if |
|
@@: |
|
;call snd_hda_power_down |
cmp edx, -1 |
jne .l1 |
88,7 → 87,7 |
if DEBUG |
push esi |
mov esi, emsgBusResetFatalComm |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
pop esi |
end if |
call azx_bus_reset |
199,7 → 198,6 |
inc eax |
@@: |
and eax, 0x7FFF7FFF |
|
ret |
endp |
|
246,10 → 244,10 |
jnz .conn_list_ok |
if DEBUG |
mov esi, emsgConnListNotAvailable |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
mov eax, [nid] |
stdcall fdword2str, 3 |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
end if |
xor eax, eax |
dec eax |
333,22 → 331,22 |
if DEBUG |
push eax esi |
mov esi, emsgInvConnList |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
mov eax, [nid] |
stdcall fdword2str, 1 |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
|
mov esi, strSemicolon |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
mov eax, ecx |
stdcall fdword2str, 0 |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
|
mov esi, strSemicolon |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
mov eax, [parm] |
stdcall fdword2str, 2 |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
pop esi eax |
end if |
xor eax, eax |
372,18 → 370,18 |
push eax esi |
push esi |
mov esi, emsgInvDepRangeVal |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
pop esi |
push eax |
mov eax, esi |
stdcall fdword2str, 0 |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
|
mov esi, strSemicolon |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
pop eax |
stdcall fdword2str, 2 |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
pop esi eax |
end if |
jmp .continue |
398,7 → 396,7 |
if DEBUG |
push esi |
mov esi, emsgTooManyConns |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
pop esi |
end if |
pop ecx |
426,7 → 424,7 |
if DEBUG |
push esi |
mov esi, emsgTooManyConns |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
pop esi |
end if |
jmp .err_out |
511,12 → 509,11 |
mov eax, [codec.afg] |
test eax, eax |
jnz @f |
|
;Asper+: try to use another codec if possible [ |
if DEBUG |
push esi |
mov esi, msgNoAFGFound |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
pop esi |
end if |
push ecx |
534,7 → 531,7 |
if DEBUG |
push esi |
mov esi, emsgNoAFGorMFGFound |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
pop esi |
end if |
.skip_codec: |
551,7 → 548,7 |
if DEBUG |
push esi |
mov esi, emsgNoMem |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
pop esi |
end if |
pop ebx |
571,9 → 568,7 |
test eax, eax |
jnz @f |
stdcall snd_hda_codec_read, ebx, 0, AC_VERB_GET_SUBSYSTEM_ID, 0 |
|
@@: |
|
; power up all before initialization |
stdcall snd_hda_set_power_state, ebx, AC_PWRST_D0 |
|
602,7 → 597,7 |
if DEBUG |
push esi |
mov esi, emsgNoParserAvailable |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
pop esi |
end if |
@@: |
630,7 → 625,7 |
mov eax, [edi+4] |
mov [codec.ac_vendor_ids], eax |
mov esi, eax |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
.get_chip_name: |
stdcall detect_chip, [edi+8] |
pop esi edi ebx eax |
643,10 → 638,10 |
mov [codec.chip_ids], chip_unknown |
|
mov esi, chip_unknown |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
movzx eax, [codec.chip_id] |
stdcall fdword2str, 2 |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
pop esi edi ebx eax |
ret |
endp |
654,7 → 649,6 |
|
align 4 |
proc detect_chip stdcall, chip_tab:dword |
|
push eax ebx edi esi |
mov ax, [codec.chip_id] |
|
669,7 → 663,7 |
mov eax, [edi+4] |
mov [codec.chip_ids], eax |
mov esi, eax |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
pop esi edi ebx eax |
ret |
.next: |
678,10 → 672,10 |
.unknown: |
mov [codec.chip_ids], chip_unknown |
mov esi, chip_unknown |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
movzx eax, [codec.chip_id] |
stdcall fdword2str, 2 |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
pop esi edi ebx eax |
ret |
endp |
697,19 → 691,19 |
shr ebx, 16 |
and ebx, 0x7FFF ; nid |
|
if DEBUG ;YAHOO |
if DEBUG |
push eax esi |
mov esi, msgSETUP_FG_NODES |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
mov eax, ebx |
stdcall fdword2str, 1 |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
|
mov esi, strSemicolon |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
mov eax, ecx |
stdcall fdword2str, 3 |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
pop esi eax |
end if |
|
719,12 → 713,12 |
snd_hda_param_read ebx, AC_PAR_FUNCTION_TYPE |
and eax, 0xFF |
|
if DEBUG ;YAHOO |
if DEBUG |
push eax esi |
mov esi, msgFG_TYPE |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
stdcall fdword2str, 3 |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
pop esi eax |
end if |
|
766,26 → 760,26 |
and ebx, 0x7FFF ; nid |
mov [codec.start_nid], bx |
|
if DEBUG ;YAHOO |
if DEBUG |
push eax esi |
mov esi, msgSETUP_FG_NODES |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
mov eax, ebx |
stdcall fdword2str, 1 |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
|
mov esi, strSemicolon |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
mov eax, ecx |
stdcall fdword2str, 3 |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
pop esi eax |
end if |
|
if FDEBUG ;YAHOO |
if FDEBUG |
push esi |
mov esi, msgWCaps |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
pop esi |
end if |
|
792,7 → 786,7 |
mov eax, ecx |
shl eax, 2 |
push ebx ecx |
call Kmalloc |
invoke Kmalloc |
pop ecx ebx |
test eax, eax |
jz .err_out |
828,7 → 822,7 |
mov eax, HDA_PINCFG.sizeof |
mul cl |
push ebx ecx |
call Kmalloc |
invoke Kmalloc |
pop ecx ebx |
test eax, eax |
jz .err_out |
840,7 → 834,7 |
if FDEBUG |
push eax esi |
mov esi, msgPinCfgs |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
pop esi eax |
end if |
|
958,27 → 952,27 |
if DEBUG |
push esi |
mov esi, msgHDACodecSetupStream |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
stdcall fdword2str, 3 |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
|
mov esi, msgStream |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
mov eax, [stream_tag] |
stdcall fdword2str, 3 |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
|
mov esi, msgChannel |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
mov eax, [channel_id] |
stdcall fdword2str, 3 |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
|
mov esi, msgFormat |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
mov eax, [format] |
stdcall fdword2str, 3 |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
pop esi |
end if |
mov eax, [stream_tag] |
1006,9 → 1000,9 |
if DEBUG |
push esi |
mov esi, msgHDACodecCleanupStream |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
stdcall fdword2str, 3 |
call SysMsgBoardStr |
invoke SysMsgBoardStr |
pop esi |
end if |
stdcall snd_hda_codec_write, [nid], 0, AC_VERB_SET_CHANNEL_STREAMID, 0 |
1133,7 → 1127,52 |
ret |
endp |
|
; execute pin sense measurement |
proc snd_hda_read_pin_sense stdcall, nid:dword, trigger_sense:dword |
mov eax, [trigger_sense] |
test eax, eax |
jz .no_trigger_sense |
|
stdcall read_pin_cap, [nid] |
test eax, AC_PINCAP_TRIG_REQ ;need trigger? |
jz .no_trigger_sense |
|
stdcall snd_hda_codec_read, [nid], 0, AC_VERB_SET_PIN_SENSE, 0 |
.no_trigger_sense: |
stdcall snd_hda_codec_read, [nid], 0, AC_VERB_GET_PIN_SENSE, 0 |
ret |
endp |
|
proc is_jack_detectable stdcall, nid:dword |
stdcall read_pin_cap, [nid] |
test eax, AC_PINCAP_PRES_DETECT |
jz .no |
|
stdcall get_wcaps, [nid] |
test eax, AC_WCAP_UNSOL_CAP |
jz .no |
.yes: |
xor eax, eax |
inc eax |
ret |
.no: |
xor eax, eax |
ret |
endp |
|
proc snd_hda_enable_pin_sense stdcall nid:dword, jacktag:dword |
push eax |
stdcall is_jack_detectable, [nid] |
test eax, eax |
jz @f |
mov eax, [jacktag] |
or eax, AC_USRSP_EN |
stdcall snd_hda_codec_write, [nid], 0, AC_VERB_SET_UNSOLICITED_ENABLE, eax |
@@: |
pop eax |
ret |
endp |
|
;; set power state of the codec |
proc snd_hda_set_power_state stdcall, fg:dword, power_state:dword |
push eax ebx ecx edx |
1151,7 → 1190,6 |
|
mov dx, [codec.vendor_id] |
cmp dx, 0x14F1 |
|
jne @f |
mov eax, 10000 |
call StallExec |
1285,7 → 1323,6 |
dd 0xFF |
|
chips_IDT dd 0xFF |
|
chips_LSI dd 0x1039, chip_LSI1039 |
dd 0x1040, chip_LSI1040 |
dd 0x3026, chip_LSI3026 |
1362,3 → 1399,4 |
chip_LSI1040 db '1040 (Agere Systems HDA Modem)',13,10,0 |
chip_LSI3026 db '3026 (Agere Systems HDA Modem)',13,10,0 |
chip_LSI3055 db '3055 (Agere Systems HDA Modem)',13,10,0 |
|