Changeset 65b09c1 in mainline
- Timestamp:
- 2014-08-14T18:37:31Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1412a184
- Parents:
- d2d5329
- Location:
- uspace/drv/audio/hdaudio
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/audio/hdaudio/codec.c
rd2d5329 r65b09c1 48 48 uint32_t verb; 49 49 50 verb = (codec->address << 28) | (node << 20) | ((hda_ get_param) << 8) | param;50 verb = (codec->address << 28) | (node << 20) | ((hda_param_get) << 8) | param; 51 51 return hda_cmd(codec->hda, verb, resp); 52 52 } … … 104 104 } 105 105 106 /** Get Configuration Default */ 107 static int hda_get_cfg_def(hda_codec_t *codec, int node, uint32_t *cfgdef) 108 { 109 uint32_t verb; 110 111 verb = (codec->address << 28) | (node << 20) | ((hda_cfg_def_get) << 8) | 0; 112 return hda_cmd(codec->hda, verb, cfgdef); 113 } 114 106 115 hda_codec_t *hda_codec_init(hda_t *hda, uint8_t address) 107 116 { … … 115 124 hda_awidget_type_t awtype; 116 125 uint32_t awcaps; 126 uint32_t cfgdef; 117 127 118 128 codec = calloc(1, sizeof(hda_codec_t)); … … 153 163 ddf_msg(LVL_NOTE, "aw %d: type=0x%x caps=0x%x", 154 164 aw, awtype, awcaps); 165 166 if (awtype == awt_pin_complex) { 167 rc = hda_get_cfg_def(codec, aw, &cfgdef); 168 if (rc != EOK) 169 goto error; 170 ddf_msg(LVL_NOTE, "aw %d: PIN cdfgef=0x%x", 171 aw, cfgdef); 172 173 } 155 174 } 156 175 } -
uspace/drv/audio/hdaudio/hdactl.c
rd2d5329 r65b09c1 267 267 static void hda_set_corbwp(hda_t *hda, size_t wp) 268 268 { 269 ddf_msg(LVL_ NOTE, "Set CORBWP = %d", wp);269 ddf_msg(LVL_DEBUG2, "Set CORBWP = %d", wp); 270 270 hda_reg16_write(&hda->regs->corbwp, wp); 271 271 } … … 349 349 while (count > 0) { 350 350 wp = hda_get_rirbwp(hda); 351 ddf_msg(LVL_ NOTE, "hda_rirb_read: wp=%d", wp);351 ddf_msg(LVL_DEBUG2, "hda_rirb_read: wp=%d", wp); 352 352 while (count > 0 && hda->ctl->rirb_rp != wp) { 353 353 ++hda->ctl->rirb_rp; 354 354 resp = rirb[hda->ctl->rirb_rp]; 355 355 356 ddf_msg(LVL_ NOTE, "RESPONSE resp=0x%x respex=0x%x",356 ddf_msg(LVL_DEBUG2, "RESPONSE resp=0x%x respex=0x%x", 357 357 resp.resp, resp.respex); 358 358 if ((resp.respex & BIT_V(uint32_t, respex_unsol)) == 0) { -
uspace/drv/audio/hdaudio/spec/codec.h
rd2d5329 r65b09c1 38 38 typedef enum { 39 39 /** Get Parameter */ 40 hda_ get_param= 0xf00,40 hda_param_get = 0xf00, 41 41 /** Connection Select Control / Get */ 42 42 hda_conn_sel_get = 0xf01, … … 94 94 hda_unsol_resp_get = 0xf08, 95 95 /** Unsolicied Response Control / Set */ 96 hda_unsol_resp_set = 0x708 96 hda_unsol_resp_set = 0x708, 97 /** Pin Sense / Get */ 98 hda_pin_sense_get = 0xf09, 99 /** Pin Sense / Execute */ 100 hda_pin_sense_exec = 0x709, 101 /** EAPD/BTL Enable / Get */ 102 hda_eapd_btl_enable_get = 0xf0c, 103 /** EAPD/BTL Enable / Set */ 104 hda_eapd_btl_enable_set = 0x70c, 105 /** GPI Data / Get */ 106 hda_gpi_data_get = 0xf10, 107 /** GPI Data / Set */ 108 hda_gpi_data_set = 0x710, 109 /** GPI Wake Enable / Get */ 110 hda_gpi_wakeen_get = 0xf11, 111 /** GPI Wake Enable / Set */ 112 hda_gpi_wakeen_set = 0x711, 113 /** GPI Unsolicited Enable / Get */ 114 hda_gpi_unsol_get = 0xf12, 115 /** GPI Unsolicited Enable / Set */ 116 hda_gpi_unsol_set = 0x712, 117 /** GPI Sticky / Get */ 118 hda_gpi_sticky_get = 0xf13, 119 /** GPI Sticky / Set */ 120 hda_gpi_sticky_set = 0x713, 121 /** GPO Data / Get */ 122 hda_gpo_data_get = 0xf14, 123 /** GPO Data / Set */ 124 hda_gpo_data_set = 0x714, 125 /** GPIO Data / Get */ 126 hda_gpio_data_get = 0xf15, 127 /** GPIO Data / Set */ 128 hda_gpio_data_set = 0x715, 129 /** GPIO Enable / Get */ 130 hda_gpio_enable_get = 0xf16, 131 /** GPIO Enable / Set */ 132 hda_gpio_enable_set = 0x716, 133 /** GPIO Direction / Get */ 134 hda_gpio_dir_get = 0xf17, 135 /** GPIO Direction / Set */ 136 hda_gpio_dir_set = 0x717, 137 /** GPIO Wake Enable / Get */ 138 hda_gpio_wakeen_get = 0xf18, 139 /** GPIO Wake Enable / Set */ 140 hda_gpio_wakeen_set = 0x718, 141 /** GPIO Unsolicited Enable / Get */ 142 hda_gpio_unsol_get = 0xf19, 143 /** GPIO Unsolicited Enable / Set */ 144 hda_gpio_unsol_set = 0x719, 145 /** GPIO Sticky Mask / Get */ 146 hda_gpio_sticky_get = 0xf1a, 147 /** GPIO Sticky Mask / Set */ 148 hda_hpio_sticky_set = 0x71a, 149 /** Beep Generation / Get */ 150 hda_beep_gen_get = 0xf0a, 151 /** Beep Generation / Set */ 152 hda_beep_gen_set = 0x70a, 153 /** Volume Knob / Get */ 154 hda_vol_knob_get = 0xf0f, 155 /** Volume Knob / Set */ 156 hda_vol_knob_set = 0x70f, 157 /** Implementation Identification / Get */ 158 hda_impl_ident_get = 0xf20, 159 /** Implementation Identification / Set 1 */ 160 hda_impl_ident_set1 = 0x720, 161 /** Implementation Identification / Set 2 */ 162 hda_impl_ident_set2 = 0x721, 163 /** Implementation Identification / Set 3 */ 164 hda_impl_ident_set3 = 0x722, 165 /** Implementation Identification / Set 4 */ 166 hda_impl_ident_set4 = 0x723, 167 /** Configuration Default / Get */ 168 hda_cfg_def_get = 0xf1c, 169 /** Configuration Default / Set 1 */ 170 hda_cfg_def_set1 = 0x71c, 171 /** Configuration Default / Set 2 */ 172 hda_cfg_def_set2 = 0x71d, 173 /** Configuration Default / Set 3 */ 174 hda_cfg_def_set3 = 0x71e, 175 /** Configuration Default / Set 4 */ 176 hda_cfg_def_set4 = 0x71f, 177 /** Stripe Control / Get */ 178 hda_stripe_ctl_get = 0xf24, 179 /** Stripe Control / Set */ 180 hda_stripe_ctl_set = 0x724, 181 /** Function Reset / Execute */ 182 hda_fun_rst_exec = 0x7ff, 183 /** ELD Data / Get */ 184 hda_eld_data_get = 0xf2f, 185 /** Converter Channel Count / Get */ 186 hda_cvt_chan_cnt_get = 0xf2d, 187 /** Converter Channel Count / Set */ 188 hda_cvt_chan_cnt_set = 0x72d, 189 /** DIP-Size / Get */ 190 hda_dip_size_get = 0xf2e, 191 /** DIP-Index / Get */ 192 hda_dip_index_get = 0xf30, 193 /** DIP-Index / Set */ 194 hda_dip_index_set = 0x730, 195 /** DIP-Data / Get */ 196 hda_dip_data_get = 0xf31, 197 /** DIP-Data / Set */ 198 hda_dip_data_set = 0x731, 199 /** DIP-XmitCtrl / Get */ 200 hda_dip_xmitctrl_get = 0xf32, 201 /** DIP-XmitCtrl / Set */ 202 hda_dip_xmitctrl_set = 0x732, 203 /** Protection Control / Get */ 204 hda_prot_ctl_get = 0xf33, 205 /** Protection Control / Set */ 206 hda_prot_ctl_set = 0x733, 207 /** ASP Channel Mapping / Get */ 208 hda_asp_chanmap_get = 0xf34, 209 /** ASP Channel Mapping / Set */ 210 hda_asp_chanmap_set = 0x734 97 211 } hda_verb_t; 98 212
Note:
See TracChangeset
for help on using the changeset viewer.