Subversion Repositories Kolibri OS

Rev

Rev 3496 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1.  
  2. ;; Compose a 32bit command word to be sent to the HD-audio controller
  3. proc make_codec_cmd stdcall, nid:dword, direct:dword, verb:dword, parm:dword
  4.     push   ebx
  5.  
  6.     and    dword [codec.addr], 0xF
  7.     and    dword [direct], 1
  8.     and    dword [nid], 0x7F
  9.     and    dword [verb], 0xFFF
  10.     and    dword [parm], 0xFFFF
  11.  
  12.     mov    eax, [codec.addr]
  13.     shl    eax, 28
  14.     mov    ebx, [direct]
  15.     shl    ebx, 27
  16.     or     eax, ebx
  17.     mov    ebx, [nid]
  18.     shl    ebx, 20
  19.     or     eax, ebx
  20.     mov    ebx, [verb]
  21.     shl    ebx, 8
  22.      or     eax, ebx
  23.     mov    ebx, [parm]
  24.     or     eax, ebx
  25.     pop    ebx
  26.     ret
  27.  .err:
  28.     pop    ebx
  29.     mov    eax, -1
  30.     ret
  31. endp
  32.  
  33. ;; Send and receive a verb
  34. proc  codec_exec_verb stdcall, cmd:dword;, res:dword <- returned in eax
  35.     push   ebx  edx
  36.     mov    ebx, [cmd]
  37.     cmp    ebx, -1
  38.     jne    @f
  39.     pop    edx  ebx
  40.     mov    eax, -1
  41.     ret
  42.   @@:
  43.   if  FDEBUG   ;YAHOO
  44.     push   eax esi
  45.     mov    esi, msgVerbQuery
  46.     call   SysMsgBoardStr
  47.     mov    eax, ebx
  48.     stdcall fdword2str, 2
  49.     call   SysMsgBoardStr
  50.     pop    esi eax
  51.   end if
  52.  
  53.     mov    edx, -1
  54.   .again:
  55.     ; call   snd_hda_power_up
  56.     stdcall  azx_send_cmd, ebx
  57.     mov    ebx, eax
  58.     test   ebx, ebx
  59.     jnz    @f
  60.     call  azx_get_response
  61.     mov    edx, eax
  62.   if  FDEBUG
  63.     test   edx, edx
  64.     jz     .end_debug
  65.     push   eax esi
  66.     mov    esi, msgVerbAnswer
  67.     call   SysMsgBoardStr
  68.     mov    eax, edx
  69.     stdcall fdword2str, 2
  70.     call   SysMsgBoardStr
  71.     pop    esi eax
  72.    .end_debug:
  73.   end if
  74.  
  75.   @@:
  76.  
  77.     ; call   snd_hda_power_down
  78.     cmp    edx, -1
  79.     jne    .l1
  80.  
  81.     mov    eax, [ctrl.rirb_error]
  82.     test   eax, eax
  83.     jz     .l1
  84.  
  85.     mov    eax, [ctrl.response_reset]
  86.     jz     @f
  87.  
  88.   if  DEBUG
  89.     push   esi
  90.     mov    esi, emsgBusResetFatalComm
  91.     call   SysMsgBoardStr
  92.     pop    esi
  93.   end if
  94.     call   azx_bus_reset
  95.   @@:
  96.   .l1:
  97.     ;; clear reset-flag when the communication gets recovered
  98.     test   ebx, ebx
  99.     jnz    @f
  100.     mov    [ctrl.response_reset], 0
  101.   @@:
  102.     mov    eax, edx
  103.  
  104.     pop    edx  ebx
  105.     ret
  106. endp
  107.  
  108.  
  109. ;;
  110. ;; snd_hda_codec_read - send a command and get the response
  111. ;; @nid: NID to send the command
  112. ;; @direct: direct flag
  113. ;; @verb: the verb to send
  114. ;; @parm: the parameter for the verb
  115. ;;
  116. ;; Send a single command and read the corresponding response.
  117. ;;
  118. ;; Returns the obtained response value, or -1 for an error.
  119. ;;
  120. proc  snd_hda_codec_read stdcall, nid:dword, direct:dword, verb:dword, parm:dword
  121.     stdcall  make_codec_cmd, [nid], [direct], [verb], [parm]
  122.     stdcall  codec_exec_verb, eax
  123.     ret
  124. endp
  125.  
  126.  
  127. ;;
  128. ;; snd_hda_codec_write - send a single command without waiting for response
  129. ;; @nid: NID to send the command
  130. ;; @direct: direct flag
  131. ;; @verb: the verb to send
  132. ;; @parm: the parameter for the verb
  133. ;;
  134. ;; Send a single command without waiting for response.
  135. ;;
  136. ;; Returns 0 if successful, or a negative error code.
  137. ;;
  138. proc  snd_hda_codec_write stdcall, nid:dword, direct:dword, verb:dword, parm:dword
  139.     ; Do we need to support a sync write?
  140.     stdcall  make_codec_cmd, [nid], [direct], [verb], [parm]
  141.     stdcall  codec_exec_verb, eax
  142.     ret
  143. endp
  144.  
  145.  
  146. ;;
  147. ;; snd_hda_sequence_write - sequence writes
  148. ;; @seq: VERB array to send
  149. ;;
  150. ;; Send the commands sequentially from the given array.
  151. ;; The array must be terminated with NID=0.
  152. ;;
  153. proc  snd_hda_sequence_write stdcall, seq:dword
  154.     push     eax  ebx  ecx  esi
  155.     mov      esi, [seq]
  156.   @@:
  157.     mov      ecx, [esi + hda_verb.nid]
  158.     mov      ebx, [esi + hda_verb.verb]
  159.     mov      eax, [esi + hda_verb.param]
  160.     stdcall  snd_hda_codec_write, ecx, 0, ebx, eax
  161.     add      esi, hda_verb.sizeof
  162.     test     ecx, ecx
  163.     jnz      @b
  164.     pop      esi  ecx  ebx  eax
  165.     ret
  166. endp
  167.  
  168.  
  169. macro  snd_hda_param_read  nid, param
  170. {
  171.     stdcall  snd_hda_codec_read, nid, 0, AC_VERB_PARAMETERS, param
  172. }
  173.  
  174. ;;
  175. ;; snd_hda_get_sub_nodes - get the range of sub nodes
  176. ;; @codec: the HDA codec
  177. ;; @nid: NID to parse
  178. ;; @start_id: the pointer to store the start NID
  179. ;;
  180. ;; Parse the NID and store the start NID of its sub-nodes.
  181. ;; Returns the number of sub-nodes.
  182. ;;
  183. proc  snd_hda_get_sub_nodes stdcall, nid:dword;, start_id:dword  <- returned in upper word of eax
  184.     snd_hda_param_read  [nid], AC_PAR_NODE_COUNT
  185.  
  186.     cmp      eax, -1
  187.     jne      @f
  188.     inc      eax
  189.   @@:
  190.     and      eax, 0x7FFF7FFF
  191.  
  192.     ret
  193. endp
  194.  
  195. ;;
  196. ;; snd_hda_get_connections - get connection list
  197. ;; @codec: the HDA codec
  198. ;; @nid: NID to parse
  199. ;; @conn_list: connection list array
  200. ;; @max_conns: max. number of connections to store
  201. ;;
  202. ;; Parses the connection list of the given widget and stores the list
  203. ;; of NIDs.
  204. ;;
  205. ;; Returns the number of connections, or a negative error code.
  206. ;;
  207. proc  snd_hda_get_connections stdcall, nid:dword, conn_list:dword, max_conns:dword   ;Asper: Complete translation!
  208.     locals
  209.        parm          dd ?
  210.        conn_len      dd ?
  211.        conns         dd 0
  212.        shift         db 8
  213.        num_elements  dd 4
  214.        mask          dd 0x7F
  215.        wcaps         dd ?
  216.        prev_nid      dw 1 ;Asper: Hmm.. Probably ALSA bug that it isn't initialized. I suppose to init it with 1.
  217.     endl
  218.  
  219.     push     ebx ecx edx edi esi
  220.     mov      edi, [conn_list]
  221.     test     edi, edi
  222.     jz       .err_out
  223.     mov      ecx, [max_conns]
  224.     cmp      ecx, 0
  225.     jle      .err_out
  226.  
  227.  
  228.     stdcall  get_wcaps, [nid]
  229.     mov      ebx, eax
  230.     mov      [wcaps], eax
  231.     stdcall  get_wcaps_type, ebx
  232.     cmp      eax, AC_WID_VOL_KNB
  233.     je       .conn_list_ok
  234.     test     ebx, AC_WCAP_CONN_LIST
  235.     jnz      .conn_list_ok
  236.   if DEBUG
  237.     mov      esi, emsgConnListNotAvailable
  238.     call     SysMsgBoardStr
  239.     mov      eax, [nid]
  240.     stdcall fdword2str, 3
  241.     call     SysMsgBoardStr
  242.   end if
  243.     xor      eax, eax
  244.     dec      eax
  245.     jmp      .out
  246.   .conn_list_ok:
  247.  
  248.     snd_hda_param_read  [nid], AC_PAR_CONNLIST_LEN
  249.     mov      [parm], eax
  250.  
  251.     test     eax, AC_CLIST_LONG
  252.     jz       @f
  253.     ; long form
  254.     mov      [shift], 16
  255.     mov      [num_elements], 2
  256.     mov      [mask], 0x7FFF ;Asper+
  257.   @@:
  258.     and      eax, AC_CLIST_LENGTH
  259.     test     eax, eax
  260.     jz       .out ; no connection
  261.  
  262.     mov      [conn_len], eax
  263.     cmp      eax, 1
  264.     jne      .multi_conns
  265.     ; single connection
  266.     stdcall  snd_hda_codec_read, [nid], 0, AC_VERB_GET_CONNECT_LIST, 0
  267.     mov      [parm], eax
  268.     cmp      [parm], -1
  269.     jne      @f
  270.     cmp      [ctrl.rirb_error], 0
  271.     jne      @f
  272.     xor      eax, eax
  273.     dec      eax
  274.     jmp      .out
  275.   @@:
  276.  
  277.     mov      eax, [parm]
  278.     and      eax, [mask]
  279.     stosd
  280.     xor      eax, eax
  281.     inc      eax
  282.     jmp      .out
  283.   .multi_conns:
  284.  
  285.     ; multi connection
  286.     xor      ecx, ecx
  287.     mov      edx, [num_elements]
  288.   .next_conn:
  289.     mov      eax, ecx
  290.   .mod:
  291.     cmp      eax, edx
  292.     jl       .mod_counted
  293.     sub      eax, edx
  294.     jmp      .mod
  295.   .mod_counted:
  296.  
  297.     test     eax, eax
  298.     jnz      .l1
  299.     stdcall  snd_hda_codec_read, [nid], 0, AC_VERB_GET_CONNECT_LIST, ecx
  300.     mov      [parm], eax
  301.  
  302.     cmp      eax, -1
  303.     jne      .l1
  304.     cmp      [ctrl.rirb_error], 0
  305.     jne      .err_out
  306.   .l1:
  307.  
  308.     mov      eax, 1
  309.     push     ecx
  310.     mov      cl, [shift]
  311.     dec      cl
  312.     shl      eax, cl
  313.     and      eax, [parm]
  314.     pop      ecx
  315.     mov      ebx, eax  ;ranges
  316.  
  317.     mov      eax, [parm]
  318.     and      eax, [mask] ;val
  319.  
  320.     test     eax, eax
  321.     jnz      @f
  322.  if DEBUG
  323.     push     eax esi
  324.     mov      esi, emsgInvConnList
  325.     call     SysMsgBoardStr
  326.     mov      eax, [nid]
  327.     stdcall  fdword2str, 1
  328.     call     SysMsgBoardStr
  329.  
  330.     mov      esi, strSemicolon
  331.     call     SysMsgBoardStr
  332.     mov      eax, ecx
  333.     stdcall  fdword2str, 0
  334.     call     SysMsgBoardStr
  335.  
  336.     mov      esi, strSemicolon
  337.     call     SysMsgBoardStr
  338.     mov      eax, [parm]
  339.     stdcall  fdword2str, 2
  340.     call     SysMsgBoardStr
  341.     pop      esi eax
  342.  end if
  343.     xor      eax, eax
  344.     jmp      .out
  345.   @@:
  346.     push     ecx
  347.     mov      cl, [shift]
  348.     shr      [parm], cl
  349.     pop      ecx
  350.  
  351.     test     ebx, ebx
  352.     jz       .range_zero
  353.     ; ranges between the previous and this one
  354.     movzx    esi, word [prev_nid]
  355.     test     esi, esi
  356.     jz       .l2
  357.     cmp      esi, eax
  358.     jl       @f
  359.   .l2:
  360.  if DEBUG
  361.     push     eax esi
  362.     push     esi
  363.     mov      esi, emsgInvDepRangeVal
  364.     call     SysMsgBoardStr
  365.     pop      esi
  366.     push     eax
  367.     mov      eax, esi
  368.     stdcall  fdword2str, 0
  369.     call     SysMsgBoardStr
  370.  
  371.     mov      esi, strSemicolon
  372.     call     SysMsgBoardStr
  373.     pop      eax
  374.     stdcall  fdword2str, 2
  375.     call     SysMsgBoardStr
  376.     pop      esi eax
  377.  end if
  378.     jmp      .continue
  379.   @@:
  380.     push     ecx
  381.     mov      ecx, esi
  382.     inc      ecx
  383.     mov      ebx, [conns]
  384.   .next_conn2:
  385.     cmp      ebx, [max_conns]
  386.     jl       @f
  387.  if DEBUG
  388.     push     esi
  389.     mov      esi, emsgTooManyConns
  390.     call     SysMsgBoardStr
  391.     pop      esi
  392.  end if
  393.     pop      ecx
  394.     jmp      .err_out
  395.   @@:
  396.     shl      ebx, 1
  397.     push     edi
  398.     add      edi, ebx
  399.     mov      word [edi], cx
  400.     pop      edi
  401.     shr      ebx, 1
  402.     inc      ebx
  403.     inc      ecx
  404.     cmp      ecx, eax
  405.     jle      .next_conn2
  406.  
  407.     mov      [conns], ebx
  408.     pop      ecx
  409.     jmp      .end_range_test
  410.   .range_zero:
  411.  
  412.     mov      ebx, [conns]
  413.     cmp      ebx, [max_conns]
  414.     jl       @f
  415.  if DEBUG
  416.     push     esi
  417.     mov      esi, emsgTooManyConns
  418.     call     SysMsgBoardStr
  419.     pop      esi
  420.  end if
  421.     jmp      .err_out
  422.   @@:
  423.     shl      ebx, 1
  424.     push     edi
  425.     add      edi, ebx
  426.     mov      word [edi], ax
  427.     pop      edi
  428.     shr      ebx, 1
  429.     inc      ebx
  430.     mov      [conns], ebx
  431.   .end_range_test:
  432.     mov      [prev_nid], ax
  433.   .continue:
  434.     inc      ecx
  435.     cmp      ecx, [conn_len]
  436.     jl       .next_conn
  437.  
  438.      mov     eax, [conns]
  439.   .out:
  440.      pop     esi edi edx ecx ebx
  441.      ret
  442.   .err_out:
  443.      pop     esi edi edx ecx ebx
  444.      mov     eax, -1
  445.      ret
  446. endp
  447.  
  448.  
  449. ; Asper: Have to be realized later, when we will work with such events, but not NOW!
  450. ;proc  snd_hda_queue_unsol_events stdcall, res:dword, res_ex:dword
  451. ;    push     ebx  edi  esi
  452. ;    ...
  453. ;    pop      esi  edi  ebx
  454. ;    ret
  455. ;endp
  456.  
  457. ; This functions also will be later realized.
  458. ;proc  process_unsol_events stdcall, work:dword
  459. ;proc  init_usol_queue stdcall, bus:dword
  460.  
  461. ;;
  462. ;; snd_hda_bus_new - create a HDA bus
  463. ;; @card: the card entry
  464. ;; @temp: the template for hda_bus information
  465. ;; @busp: the pointer to store the created bus instance
  466. ;;
  467. ;; Returns 0 if successful, or a negative error code.
  468. ;;
  469. ;proc  snd_hda_bus_new
  470.     ; if we want to support unsolicited events, we have to solve this
  471.     ;    bus->workq = create_singlethread_workqueue(bus->workq_name);
  472.     ; (...)
  473. ;    xor   eax, eax
  474. ;    ret
  475. ;endp
  476.  
  477. ;;
  478. ;; snd_hda_codec_init - initialize a HDA codec
  479. ;;
  480. ;; Returns 0 if successful, or a negative error code.
  481. ;;
  482. proc  snd_hda_codec_init    ; We use just one codec (the first found)
  483.      snd_hda_param_read  AC_NODE_ROOT, AC_PAR_VENDOR_ID
  484.      cmp     eax, -1
  485.      jne     @f
  486.      snd_hda_param_read  AC_NODE_ROOT, AC_PAR_VENDOR_ID
  487.   @@:
  488.      mov     [codec.chip_id], ax
  489.      shr     eax, 16
  490.      mov     [codec.vendor_id], ax
  491.  
  492.      snd_hda_param_read  AC_NODE_ROOT, AC_PAR_SUBSYSTEM_ID
  493.      mov     [codec.subsystem_id], eax
  494.  
  495.      snd_hda_param_read  AC_NODE_ROOT, AC_PAR_REV_ID
  496.      mov     [codec.revision_id], eax
  497.  
  498.      stdcall setup_fg_nodes
  499.  
  500.      mov     eax, [codec.afg]
  501.      test    eax, eax
  502.      jnz     @f
  503.  
  504.      mov     eax, [codec.mfg]
  505.      test    eax, eax
  506.      jnz     @f
  507.   if DEBUG
  508.      push    esi
  509.      mov     esi, emsgNoAFGorMFGFound
  510.      call    SysMsgBoardStr
  511.      pop     esi
  512.   end  if
  513.      mov     eax, -1
  514.      ret
  515.   @@:
  516.  
  517.      mov     ebx, eax
  518.      push    ebx
  519.      stdcall read_widget_caps, eax
  520.  
  521.      cmp     eax, 0
  522.      jge     @f
  523.   if DEBUG
  524.      push    esi
  525.      mov     esi, emsgNoMem
  526.      call    SysMsgBoardStr
  527.      pop     esi
  528.   end  if
  529.      pop     ebx
  530.      mov     eax, -1
  531.      ret
  532.   @@:
  533.  
  534.      call read_pin_defaults
  535.  
  536.      cmp     eax, 0
  537.      jge     @f
  538.      pop     ebx
  539.      mov     eax, -1
  540.      ret
  541.   @@:
  542.      mov     eax, [codec.subsystem_id]
  543.      test    eax, eax
  544.      jnz     @f
  545.      stdcall snd_hda_codec_read, ebx, 0, AC_VERB_GET_SUBSYSTEM_ID, 0
  546.  
  547.   @@:
  548.  
  549.      ; power up all before initialization
  550. ;     stdcall snd_hda_set_power_state, ebx, AC_PWRST_D0
  551.  
  552.      pop     ebx
  553.      ret
  554. endp
  555.  
  556.  
  557. ;;
  558. ;; snd_hda_codec_configure - (Re-)configure the HD-audio codec
  559. ;;
  560. ;; Start parsing of the given codec tree and (re-)initialize the whole
  561. ;; patch instance.
  562. ;;
  563. ;; Returns 0 if successful or a negative error code.
  564. ;;
  565. proc  snd_hda_codec_configure
  566.      call    get_codec_name
  567.   @@:
  568.      ; call the default parser
  569.      stdcall snd_hda_parse_generic_codec  ;entry point to generic tree parser!!!
  570.      ;Asper+:patch for HP Elitebook 8730w [
  571. ;     push    eax ebx
  572. ;     mov     ebx, [codec.afg]
  573. ;     stdcall snd_hda_codec_write, ebx, 0, AC_VERB_SET_GPIO_MASK, 0x02
  574. ;     stdcall snd_hda_codec_write, ebx, 0, AC_VERB_SET_GPIO_DIRECTION, 0x02
  575. ;     stdcall snd_hda_codec_write, ebx, 0, AC_VERB_SET_GPIO_DATA, 0x02 ; first muted
  576. ;     pop     ebx eax
  577.      ;Asper+ ]
  578.      test    eax, eax
  579.      jz      @f
  580.   if DEBUG
  581.      push    esi
  582.      mov     esi, emsgNoParserAvailable
  583.      call    SysMsgBoardStr
  584.      pop     esi
  585.   end if
  586.   @@:
  587.   .out:
  588.      ret
  589. endp
  590.  
  591.  
  592. ; get_codec_name - store the codec name
  593. proc  get_codec_name
  594.      push    eax  ebx  edi  esi
  595.      mov     eax, [codec.ac_vendor_ids]
  596.      test    eax, eax
  597.      jnz     .get_chip_name
  598.      mov     ax, [codec.vendor_id]
  599.      mov     edi, hda_vendor_ids
  600.  
  601.   @@:
  602.      mov     ebx, [edi]
  603.      test    ebx, ebx
  604.      jz      .unknown
  605.  
  606.      cmp     ax, bx
  607.      jne     .next
  608.      mov     eax, [edi+4]
  609.      mov     [codec.ac_vendor_ids], eax
  610.      mov     esi, eax
  611.      call    SysMsgBoardStr
  612.   .get_chip_name:
  613.      stdcall detect_chip, [edi+8]
  614.      pop     esi  edi  ebx  eax
  615.      ret
  616.   .next:
  617.      add     edi, 12
  618.      jmp     @b
  619.   .unknown:
  620.      mov     [codec.ac_vendor_ids], ac_unknown
  621.      mov     [codec.chip_ids], chip_unknown
  622.  
  623.      mov     esi, chip_unknown
  624.      call    SysMsgBoardStr
  625.      movzx   eax, [codec.chip_id]
  626.      stdcall fdword2str, 2
  627.      call    SysMsgBoardStr
  628.      pop     esi  edi  ebx  eax
  629.      ret
  630. endp
  631.  
  632.  
  633. align 4
  634. proc detect_chip stdcall, chip_tab:dword
  635.  
  636.      push    eax  ebx  edi  esi
  637.      mov     ax, [codec.chip_id]
  638.  
  639.      mov     edi, [chip_tab]
  640. @@:
  641.      mov     ebx, [edi]
  642.      cmp     ebx, 0xFF
  643.      je      .unknown
  644.  
  645.      cmp     ax, bx
  646.      jne     .next
  647.      mov     eax, [edi+4]
  648.      mov     [codec.chip_ids], eax
  649.      mov     esi, eax
  650.      call    SysMsgBoardStr
  651.      pop     esi  edi  ebx  eax
  652.      ret
  653. .next:
  654.      add     edi, 8
  655.      jmp     @b
  656. .unknown:
  657.      mov     [codec.chip_ids], chip_unknown
  658.      mov     esi, chip_unknown
  659.      call    SysMsgBoardStr
  660.      movzx   eax, [codec.chip_id]
  661.      stdcall fdword2str, 2
  662.      call    SysMsgBoardStr
  663.      pop     esi  edi  ebx  eax
  664.      ret
  665. endp
  666.  
  667.  
  668. ;; look for an AFG and MFG nodes
  669. proc setup_fg_nodes
  670.      push    eax  ebx  ecx
  671.      stdcall snd_hda_get_sub_nodes, AC_NODE_ROOT
  672.      mov     ecx, eax
  673.      and     ecx, 0x7FFF ; total_nodes
  674.      mov     ebx, eax
  675.      shr     ebx, 16
  676.      and     ebx, 0x7FFF ; nid
  677.  
  678. if DEBUG    ;YAHOO
  679.      push    eax esi
  680.      mov     esi, msgSETUP_FG_NODES
  681.      call    SysMsgBoardStr
  682.      mov     eax, ebx
  683.      stdcall fdword2str, 1
  684.      call    SysMsgBoardStr
  685.  
  686.      mov     esi, strSemicolon
  687.      call    SysMsgBoardStr
  688.      mov     eax, ecx
  689.      stdcall fdword2str, 3
  690.      call    SysMsgBoardStr
  691.      pop     esi eax
  692. end if
  693.  
  694.   .next:
  695.      test    ecx, ecx
  696.      jz      .l1
  697.      snd_hda_param_read  ebx, AC_PAR_FUNCTION_TYPE
  698.      and     eax, 0xFF
  699.  
  700. if DEBUG    ;YAHOO
  701.      push    eax esi
  702.      mov     esi, msgFG_TYPE
  703.      call    SysMsgBoardStr
  704.      stdcall fdword2str, 3
  705.      call    SysMsgBoardStr
  706.      pop     esi eax
  707. end if
  708.  
  709.      cmp     eax, AC_GRP_AUDIO_FUNCTION
  710.      jne     @f
  711.  
  712.      mov     [codec.afg], ebx
  713.      mov     [codec.function_id], eax
  714.      jmp     .continue
  715.   @@:
  716.      cmp     eax, AC_GRP_MODEM_FUNCTION
  717.      jne     @f
  718.  
  719.      mov     [codec.mfg], ebx
  720.      mov     [codec.function_id], eax
  721.      jmp     .continue
  722.   @@:
  723.   .continue:
  724.      inc     ebx
  725.      dec     ecx
  726.      jnz     .next
  727.   .l1:
  728.      pop     ecx  ebx  eax
  729.      ret
  730. endp
  731.  
  732.  
  733. ;======================================================================================
  734. ; read widget caps for each widget and store in cache
  735. proc  read_widget_caps stdcall, fg_node:dword
  736.      push    ebx ecx edx edi
  737.  
  738.      stdcall snd_hda_get_sub_nodes, [fg_node]
  739.      mov     ecx, eax
  740.      and     ecx, 0x7FFF ; total_nodes
  741.      mov     [codec.num_nodes], cx
  742.      mov     ebx, eax
  743.      shr     ebx, 16
  744.      and     ebx, 0x7FFF ; nid
  745.      mov     [codec.start_nid], bx
  746.  
  747. if DEBUG    ;YAHOO
  748.      push    eax esi
  749.      mov     esi, msgSETUP_FG_NODES
  750.      call    SysMsgBoardStr
  751.      mov     eax, ebx
  752.      stdcall fdword2str, 1
  753.      call    SysMsgBoardStr
  754.  
  755.      mov     esi, strSemicolon
  756.      call    SysMsgBoardStr
  757.      mov     eax, ecx
  758.      stdcall fdword2str, 3
  759.      call    SysMsgBoardStr
  760.      pop     esi eax
  761. end if
  762.  
  763. if FDEBUG    ;YAHOO
  764.      push    esi
  765.      mov     esi, msgWCaps
  766.      call    SysMsgBoardStr
  767.      pop     esi
  768. end if
  769.  
  770.      mov     eax, ecx
  771.      shl     eax, 2
  772.      push    ebx ecx
  773.      call    Kmalloc
  774.      pop     ecx ebx
  775.      test    eax, eax
  776.      jz      .err_out
  777.      mov     [codec.wcaps], eax
  778.  
  779.      mov     edi, eax
  780.   .next_node:
  781.  
  782.      snd_hda_param_read  ebx, AC_PAR_AUDIO_WIDGET_CAP
  783.      stosd
  784.      inc     ebx
  785.      dec     ecx
  786.      jnz     .next_node
  787.      pop     edi edx ecx ebx
  788.      xor     eax, eax
  789.      ret
  790.   .err_out:
  791.      pop     edi edx ecx ebx
  792.      xor     eax, eax
  793.      dec     eax
  794.      ret
  795. endp
  796.  
  797.  
  798. ; read all pin default configurations and save codec->init_pins
  799. proc  read_pin_defaults
  800.      push    ebx ecx edx edi
  801.  
  802.      movzx   ebx, [codec.start_nid]
  803.      movzx   ecx, [codec.num_nodes]
  804.  
  805.      ;Asper [
  806.      mov     eax, HDA_PINCFG.sizeof
  807.      mul     cl
  808.      push    ebx ecx
  809.      call    Kmalloc
  810.      pop     ecx ebx
  811.      test    eax, eax
  812.      jz      .err_out
  813.      mov     [codec.init_pins], eax
  814.      mov     edi, eax
  815.      ;Asper ]
  816.  
  817. if FDEBUG
  818.    push   eax esi
  819.    mov    esi, msgPinCfgs
  820.    call   SysMsgBoardStr
  821.    pop    esi eax
  822. end if
  823.  
  824.  
  825.   .next_node:
  826.      stdcall get_wcaps, ebx
  827.      and  eax, AC_WCAP_TYPE
  828.      shr  eax, AC_WCAP_TYPE_SHIFT
  829.  
  830.      cmp     eax, AC_WID_PIN
  831.      jne     .continue
  832.  
  833.      mov     [edi + HDA_PINCFG.nid], bx
  834.      stdcall snd_hda_codec_read, ebx, 0, AC_VERB_GET_CONFIG_DEFAULT, 0
  835.      mov     [edi + HDA_PINCFG.cfg], eax
  836.  
  837.   .continue:
  838.      add     edi, HDA_PINCFG.sizeof
  839.      inc     ebx
  840.      dec     ecx
  841.      jnz     .next_node
  842.  
  843. ;Asper [
  844.      and     ebx, 0xFFFF
  845.      sub     bx, [codec.start_nid]
  846.      mov     [codec.num_pins], ebx
  847. ;Asper ]
  848.  
  849.      pop     edi edx ecx ebx
  850.      xor     eax, eax
  851.      ret
  852.   .err_out:
  853.      pop     edi edx ecx ebx
  854.      xor     eax, eax
  855.      dec     eax
  856.      ret
  857. endp
  858.  
  859.  
  860.  
  861. ; look up the given pin config list and return the item matching with NID
  862. proc  look_up_pincfg stdcall, array:dword, nid:dword
  863.      push    ebx ecx edx
  864.      mov     ecx, [codec.num_pins]
  865.      mov     eax, [array]
  866.      mov     ebx, [nid]
  867.   .next_pin:
  868.      mov     dx,  [eax + HDA_PINCFG.nid]
  869.      cmp     dx,  bx
  870.      je      .out
  871.   .continue:
  872.      add     eax, HDA_PINCFG.sizeof
  873.      dec     ecx
  874.      jnz     .next_pin
  875.  
  876.      xor     eax, eax
  877.   .out:
  878.      pop     edx ecx ebx
  879.      ret
  880. endp
  881.  
  882. ; write a config value for the given NID
  883. proc  set_pincfg stdcall, nid:dword, cfg:dword
  884.      push    eax  ebx  ecx  edx
  885.      mov     eax, [cfg]
  886.      xor     ebx, ebx
  887.      mov     edx, AC_VERB_SET_CONFIG_DEFAULT_BYTES_0
  888.      mov     ecx, 4
  889.   @@:
  890.      mov     bl,  al
  891.      stdcall snd_hda_codec_write, [nid], 0, edx, ebx
  892.      shr     eax, 8
  893.      inc     edx
  894.      dec     ecx
  895.      jnz     @b
  896.   .l1:
  897.      pop     edx  ecx  ebx  eax
  898.      ret
  899. endp
  900.  
  901.  
  902. ;;
  903. ;; snd_hda_codec_get_pincfg - Obtain a pin-default configuration
  904. ;; @codec: the HDA codec
  905. ;; @nid: NID to get the pin config
  906. ;;
  907. ;; Get the current pin config value of the given pin NID.
  908. ;; If the pincfg value is cached or overridden via sysfs or driver,
  909. ;; returns the cached value.
  910. ;;
  911. proc  snd_hda_codec_get_pincfg stdcall, nid:dword
  912.      push    edi
  913.      stdcall look_up_pincfg, [codec.init_pins], [nid]
  914.      test    eax, eax
  915.      jz      @f
  916.      mov     edi, eax
  917.      mov     eax, [edi + HDA_PINCFG.cfg]
  918.   @@:
  919.      pop     edi
  920.      ret
  921. endp
  922.  
  923. ;======================================================================================
  924.  
  925. ;;
  926. ;; snd_hda_codec_setup_stream - set up the codec for streaming
  927. ;; @nid: the NID to set up
  928. ;; @stream_tag: stream tag to pass, it's between 0x1 and 0xf.
  929. ;; @channel_id: channel id to pass, zero based.
  930. ;; @format: stream format.
  931. ;;
  932. proc hda_codec_setup_stream stdcall, nid:dword, stream_tag:dword, channel_id:dword, format:dword
  933.      push    eax
  934.      mov     eax, [nid]
  935.      test    eax, eax
  936.      jnz     @f
  937.      pop     eax
  938.      ret
  939.   @@:
  940.   if DEBUG
  941.      push    esi
  942.      mov     esi, msgHDACodecSetupStream
  943.      call    SysMsgBoardStr
  944.      stdcall fdword2str, 3
  945.      call    SysMsgBoardStr
  946.  
  947.      mov     esi, msgStream
  948.      call    SysMsgBoardStr
  949.      mov     eax, [stream_tag]
  950.      stdcall fdword2str, 3
  951.      call    SysMsgBoardStr
  952.  
  953.      mov     esi, msgChannel
  954.      call    SysMsgBoardStr
  955.      mov     eax, [channel_id]
  956.      stdcall fdword2str, 3
  957.      call    SysMsgBoardStr
  958.  
  959.      mov     esi, msgFormat
  960.      call    SysMsgBoardStr
  961.      mov     eax, [format]
  962.      stdcall fdword2str, 3
  963.      call    SysMsgBoardStr
  964.      pop     esi
  965.   end if
  966.      mov     eax, [stream_tag]
  967.      shl     eax, 4
  968.      or      eax, [channel_id]
  969.      stdcall snd_hda_codec_write, [nid], 0, AC_VERB_SET_CHANNEL_STREAMID, eax
  970.  
  971.      mov     eax, 1000  ; wait 1 ms
  972.      call    StallExec
  973.  
  974.      stdcall snd_hda_codec_write, [nid], 0, AC_VERB_SET_STREAM_FORMAT, [format]
  975.      pop     eax
  976.      ret
  977. endp
  978.  
  979.  
  980. proc snd_hda_codec_cleanup_stream stdcall, nid:dword
  981.      push    eax
  982.      mov     eax, [nid]
  983.      test    eax, eax
  984.      jz      @f
  985.      pop     eax
  986.      ret
  987.   @@:
  988.   if DEBUG
  989.      push    esi
  990.      mov     esi, msgHDACodecCleanupStream
  991.      call    SysMsgBoardStr
  992.      stdcall fdword2str, 3
  993.      call    SysMsgBoardStr
  994.      pop     esi
  995.   end if
  996.      stdcall snd_hda_codec_write, [nid], 0, AC_VERB_SET_CHANNEL_STREAMID, 0
  997.   if 0  ; keep the format
  998.      mov     eax, 1000000  ; wait 100 ms
  999.      call    StallExec
  1000.      stdcall snd_hda_codec_write, [nid], 0, AC_VERB_SET_STREAM_FORMAT, 0
  1001.   end if
  1002.      pop     eax
  1003.      ret
  1004. endp
  1005.  
  1006.  
  1007. proc  read_pin_cap, nid:dword
  1008.      snd_hda_param_read  [nid], AC_PAR_PIN_CAP
  1009.      ret
  1010. endp
  1011.  
  1012.  
  1013. ;; read the current volume
  1014. proc get_volume_mute stdcall, nid:dword, ch:dword, direction:dword, index:dword
  1015.      push    ebx
  1016.      mov     ebx, AC_AMP_GET_LEFT
  1017.      mov     eax, [ch]
  1018.      test    eax, eax
  1019.      jz      @f
  1020.      mov     ebx, AC_AMP_GET_RIGHT
  1021.   @@:
  1022.      mov     eax, [direction]
  1023.      cmp     eax, HDA_OUTPUT
  1024.      jne     @f
  1025.      or      ebx, AC_AMP_GET_OUTPUT
  1026.      jmp     .l1
  1027.   @@:
  1028.      or      ebx, AC_AMP_GET_INPUT
  1029.   .l1:
  1030.      or      ebx, [index]
  1031.      stdcall snd_hda_codec_read, [nid], 0, AC_VERB_GET_AMP_GAIN_MUTE, ebx
  1032.      and     eax, 0xFF
  1033.      pop     ebx
  1034.      ret
  1035. endp
  1036.  
  1037.  
  1038. ;; write the current volume in info to the h/w
  1039. proc put_volume_mute stdcall, nid:dword, ch:dword, direction:dword, index:dword, val:dword
  1040.      push    eax  ebx
  1041.      mov     ebx, AC_AMP_SET_LEFT
  1042.      mov     eax, [ch]
  1043.      test    eax, eax
  1044.      jz      @f
  1045.      mov     ebx, AC_AMP_SET_RIGHT
  1046.   @@:
  1047.      mov     eax, [direction]
  1048.      cmp     eax, HDA_OUTPUT
  1049.      jne     @f
  1050.      or      ebx, AC_AMP_SET_OUTPUT
  1051.      jmp     .l1
  1052.   @@:
  1053.      or      ebx, AC_AMP_SET_INPUT
  1054.   .l1:
  1055.      mov     eax, [index]
  1056.      shl     eax, AC_AMP_SET_INDEX_SHIFT
  1057.      or      ebx, eax
  1058.      or      ebx, [val]
  1059.      stdcall snd_hda_codec_write, [nid], 0, AC_VERB_SET_AMP_GAIN_MUTE, ebx
  1060.      pop     ebx  eax
  1061.      ret
  1062. endp
  1063.  
  1064.  
  1065. ;;
  1066. ;; snd_hda_codec_amp_update - update the AMP value
  1067. ;; @nid: NID to read the AMP value
  1068. ;; @ch: channel (left=0 or right=1)
  1069. ;; @direction: #HDA_INPUT or #HDA_OUTPUT
  1070. ;; @idx: the index value (only for input direction)
  1071. ;; @mask: bit mask to set
  1072. ;; @val: the bits value to set
  1073. ;;
  1074. ;; Update the AMP value with a bit mask.
  1075. ;; Returns 0 if the value is unchanged, 1 if changed.
  1076. ;;
  1077. ;-proc snd_hda_codec_amp_update stdcall, nid:dword, ch:dword, direction:dword, idx:dword, mask:dword, val:dword
  1078. ;-     push    ebx  edx
  1079. ;-     mov     eax, [mask]
  1080. ;-     mov     ebx, [val]
  1081. ;-     and     ebx, eax
  1082. ;-     xor     eax, -1
  1083. ;-     mov     edx, eax
  1084. ;-     stdcall get_volume_mute, [nid], [ch], [direction], [idx]
  1085. ;-     and     eax, edx
  1086. ;-     or      ebx, eax
  1087. ;-
  1088. ;-     stdcall put_volume_mute, [nid], [ch], [direction], [idx], ebx
  1089. ;-     xor     eax, eax
  1090. ;-     inc     eax
  1091. ;-     pop     edx  ebx
  1092. ;-     ret
  1093. ;-endp
  1094.  
  1095.  
  1096. ;;
  1097. ;; snd_hda_codec_amp_stereo - update the AMP stereo values
  1098. ;; @nid: NID to read the AMP value
  1099. ;; @direction: #HDA_INPUT or #HDA_OUTPUT
  1100. ;; @idx: the index value (only for input direction)
  1101. ;; @mask: bit mask to set
  1102. ;; @val: the bits value to set
  1103. ;;
  1104. ;; Update the AMP values like snd_hda_codec_amp_update(), but for a
  1105. ;; stereo widget with the same mask and value.
  1106. ;;
  1107. proc snd_hda_codec_amp_stereo stdcall, nid:dword, direction:dword, idx:dword, mask:dword, val:dword
  1108.      push    ebx edx
  1109.      mov     ebx, [val]
  1110.      mov     edx, [mask]
  1111.      and     ebx, edx
  1112.      stdcall put_volume_mute, [nid], 0, [direction], [idx], ebx
  1113.      stdcall put_volume_mute, [nid], 1, [direction], [idx], ebx
  1114.      pop     edx  ebx
  1115.      ret
  1116. endp
  1117.  
  1118.  
  1119. ;; set power state of the codec
  1120. proc snd_hda_set_power_state stdcall, fg:dword, power_state:dword
  1121.      push    eax ebx ecx edx
  1122.      ; this delay seems necessary to avoid click noise at power down
  1123.      mov     ebx, [power_state]
  1124.      cmp     ebx, AC_PWRST_D3
  1125.      jne     @f
  1126.      mov     eax, 100000
  1127.      call    StallExec
  1128.   @@:
  1129.      stdcall snd_hda_codec_read, [fg], 0, AC_VERB_SET_POWER_STATE, ebx
  1130.      ;partial workaround for "azx_get_response timeout"
  1131.      cmp     ebx, AC_PWRST_D0
  1132.      jne     @f
  1133.  
  1134.      mov     dx, [codec.vendor_id]
  1135.      cmp     dx, 0x14F1
  1136.  
  1137.      jne     @f
  1138.      mov     eax, 10000
  1139.      call    StallExec
  1140.   @@:
  1141.      movzx   ecx, [codec.num_nodes]
  1142.      movzx   edx, [codec.start_nid]
  1143.   .next_nid:
  1144.      stdcall get_wcaps, edx
  1145.      test    eax, AC_WCAP_POWER
  1146.      jz      .skip_nid
  1147.  
  1148.      stdcall get_wcaps_type, eax
  1149.      cmp     ebx, AC_PWRST_D3
  1150.      jne     .l1
  1151.      cmp     eax, AC_WID_PIN
  1152.      jne     .l1
  1153.      ;don't power down the widget if it controls
  1154.      ;eapd and EAPD_BTLENABLE is set.
  1155.      stdcall  read_pin_cap, edx
  1156.      test    eax, AC_PINCAP_EAPD
  1157.      jz      .l2
  1158.  
  1159.      stdcall snd_hda_codec_read, edx, 0, AC_VERB_GET_EAPD_BTLENABLE, 0
  1160.      and     eax, 0x02
  1161.      test    eax, eax
  1162.      jnz     .skip_nid
  1163.   .l2:
  1164.   .l1:
  1165.      stdcall snd_hda_codec_write, edx, 0, AC_VERB_SET_POWER_STATE, ebx
  1166.   .skip_nid:
  1167.      inc     edx
  1168.      dec     ecx
  1169.      jnz     .next_nid
  1170.  
  1171.      cmp     ebx, AC_PWRST_D0
  1172.      jne     .out
  1173.      ;wait until codec reaches to D0
  1174.      mov     ecx, 500
  1175.   .wait_D0:
  1176.      stdcall snd_hda_codec_read, [fg], 0, AC_VERB_GET_POWER_STATE, 0
  1177.      cmp     eax, ebx
  1178.      je      .out
  1179.      mov     eax, 1000  ; msleep(1);
  1180.      call    StallExec
  1181.      dec     ecx
  1182.      jnz     .wait_D0
  1183.   .out:
  1184.      pop     edx ecx ebx eax
  1185.      ret
  1186. endp
  1187.  
  1188.  
  1189. ;data
  1190.  
  1191. ; codec vendors
  1192. align 16
  1193. msg_Cirrus           db 'Cirrus Logic ',0
  1194. msg_Motorola         db 'Motorola ',0
  1195. msg_SiliconImage     db 'Silicon Image ',0
  1196. msg_Realtek          db 'Realtek ',0
  1197. msg_Creative         db 'Creative ',0
  1198. msg_IDT              db 'IDT ',0
  1199. msg_LSI              db 'LSI ',0
  1200. msg_AnalogDevices    db 'Analog Devices ',0
  1201. msg_CMedia           db 'C-Media ',0
  1202. msg_Conexant         db 'Conexant ',0
  1203. msg_Chrontel         db 'Chrontel ',0
  1204. msg_LG               db 'LG ',0
  1205. msg_Wolfson          db 'Wolfson Microelectronics ',0
  1206. msg_Qumranet         db 'Qumranet ',0
  1207. msg_SigmaTel         db 'SigmaTel ',0
  1208. ac_unknown     db 'unknown manufacturer ',0
  1209.  
  1210. chip_unknown   db 'unknown codec id ', 0
  1211.  
  1212.  
  1213. ; codec vendor labels
  1214. align 4
  1215. hda_vendor_ids:
  1216.      dd    0x1002, msg_ATI, chips_ATI
  1217.      dd    0x1013, msg_Cirrus, chips_Cirrus
  1218.      dd    0x1057, msg_Motorola, chips_Motorola
  1219.      dd    0x1095, msg_SiliconImage, chips_SiliconImage
  1220.      dd    0x10de, msg_NVidia, chips_NVidia
  1221.      dd    0x10ec, msg_Realtek, chips_Realtek
  1222.      dd    0x1102, msg_Creative, chips_Creative
  1223.      dd    0x1106, msg_VIA, chips_VIA
  1224.      dd    0x111d, msg_IDT, chips_IDT
  1225.      dd    0x11c1, msg_LSI, chips_LSI
  1226.      dd    0x11d4, msg_AnalogDevices, chips_Analog
  1227.      dd    0x13f6, msg_CMedia, chips_CMedia
  1228.      dd    0x14f1, msg_Conexant, chips_Conexant
  1229.      dd    0x17e8, msg_Chrontel, chips_Chrontel
  1230.      dd    0x1854, msg_LG, chips_LG
  1231.      dd    0x1aec, msg_Wolfson, chips_Wolfson
  1232.      dd    0x1af4, msg_Qumranet, chips_Qumranet   ; Qemu 0.14
  1233.      dd    0x434d, msg_CMedia, chips_CMedia
  1234.      dd    0x8086, msg_Intel, chips_Intel
  1235.      dd    0x8384, msg_SigmaTel, chips_SigmaTel
  1236.      dd    0 ; terminator
  1237.  
  1238. align 16             ;known codecs
  1239. chips_ATI            dd 0xAA01, chip_ATIR6XX
  1240.                      dd 0xFF
  1241.  
  1242. chips_Cirrus         dd 0xFF
  1243. chips_Motorola       dd 0xFF
  1244.  
  1245. chips_SiliconImage   dd 0x1392, chip_SI1392
  1246.                      dd 0xFF
  1247.  
  1248. chips_NVidia         dd 0x0002, chip_MCP78
  1249.                      dd 0xFF
  1250.  
  1251. chips_Realtek        dd 0x0262, chip_ALC262
  1252.                      dd 0x0268, chip_ALC268
  1253.                      dd 0x0269, chip_ALC269
  1254.                      dd 0x0272, chip_ALC272
  1255.                      dd 0x0662, chip_ALC662
  1256.                      dd 0x0663, chip_ALC663
  1257.                      dd 0x0883, chip_ALC883
  1258.                      dd 0x0887, chip_ALC887
  1259.                      dd 0x0888, chip_ALC888
  1260.                      dd 0x0889, chip_ALC889
  1261.                      dd 0xFF
  1262.  
  1263. chips_Creative       dd 0xFF
  1264.  
  1265. chips_VIA            dd 0xE721, chip_VT1708B_1
  1266.                      dd 0x0397, chip_VT17085_0
  1267.                      dd 0xFF
  1268.  
  1269. chips_IDT            dd 0xFF
  1270. chips_LSI            dd 0xFF
  1271.  
  1272. chips_Analog         dd 0x1986, chip_AD1986A
  1273.                      dd 0x198B, chip_AD198B
  1274.                      dd 0xFF
  1275.  
  1276. chips_CMedia         dd 0xFF
  1277.  
  1278. chips_Conexant       dd 0x5045, chip_CX20549
  1279.                      dd 0x5051, chip_CX20561
  1280.                      dd 0xFF
  1281.  
  1282. chips_Chrontel       dd 0xFF
  1283. chips_LG             dd 0xFF
  1284. chips_Wolfson        dd 0xFF
  1285. chips_Intel          dd 0xFF
  1286.  
  1287. chips_Qumranet       dd 0x0010, chip_HDA_OUTPUT
  1288.                      dd 0x0020, chip_HDA_DUPLEX
  1289.                      dd 0xFF
  1290.  
  1291. chips_SigmaTel       dd 0x7680, chip_STAC9221
  1292.                      dd 0x7682, chip_STAC9221_A2
  1293.                      dd 0xFF
  1294.  
  1295. align 16
  1296. ;AnalogDevices
  1297. chip_AD1986A         db 'AD1986A',13,10,0
  1298. chip_AD198B          db 'AD198B',13,10,0
  1299.  
  1300. ;ATI
  1301. chip_ATIR6XX         db 'ATIR6XX',13,10,0
  1302.  
  1303. ;Silicon Image
  1304. chip_SI1392          db 'SI1392',13,10,0
  1305.  
  1306. ;NVidia
  1307. chip_MCP78           db 'MCP78',13,10,0
  1308.  
  1309. ;Realtek
  1310. chip_ALC262          db 'ALC262',13,10,0
  1311. chip_ALC268          db 'ALC268',13,10,0
  1312. chip_ALC269          db 'ALC269',13,10,0
  1313. chip_ALC272          db 'ALC272',13,10,0
  1314. chip_ALC662          db 'ALC662',13,10,0
  1315. chip_ALC663          db 'ALC663',13,10,0
  1316. chip_ALC883          db 'ALC883',13,10,0
  1317. chip_ALC887          db 'ALC887',13,10,0
  1318. chip_ALC888          db 'ALC888',13,10,0
  1319. chip_ALC889          db 'ALC889',13,10,0
  1320.  
  1321. ;Sigmatel
  1322. chip_STAC9221        db 'STAC9221',13,10,0
  1323. chip_STAC9221_A2     db 'STAC9221_A2',13,10,0
  1324.  
  1325. ;VIA
  1326. chip_VT1708B_1       db 'VT1708B_1',13,10,0
  1327. chip_VT17085_0       db 'VT17085_0',13,10,0
  1328.  
  1329. ;Conexant
  1330. chip_CX20549         db 'CX20549',13,10,0
  1331. chip_CX20561         db 'CX20561',13,10,0
  1332.  
  1333. ;Qumranet
  1334. chip_HDA_OUTPUT      db 'HDA-OUTPUT',13,10,0
  1335. chip_HDA_DUPLEX      db 'HDA-DUPLEX',13,10,0
  1336.  
  1337.