Changeset 65b09c1 in mainline for uspace/drv/audio/hdaudio/codec.c
- 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
- File:
-
- 1 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 }
Note:
See TracChangeset
for help on using the changeset viewer.