Changeset 6747b929 in mainline for uspace/drv/audio/hdaudio/stream.c
- Timestamp:
- 2014-08-26T11:35:23Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c67195c
- Parents:
- 159c722d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/audio/hdaudio/stream.c
r159c722d r6747b929 177 177 178 178 ctl = hda_reg8_read(&sdregs->ctl1); 179 ctl = ctl | 2 /* XXX Run */; 179 if (run) 180 ctl = ctl | BIT_V(uint8_t, sdctl1_run); 181 else 182 ctl = ctl & ~BIT_V(uint8_t, sdctl1_run); 183 180 184 hda_reg8_write(&sdregs->ctl1, ctl); 185 } 186 187 static void hda_stream_reset_noinit(hda_stream_t *stream) 188 { 189 uint32_t ctl; 190 hda_sdesc_regs_t *sdregs; 191 192 sdregs = &stream->hda->regs->sdesc[stream->sdid]; 193 194 ctl = hda_reg8_read(&sdregs->ctl1); 195 ctl = ctl | BIT_V(uint8_t, sdctl1_srst); 196 hda_reg8_write(&sdregs->ctl1, ctl); 197 198 async_usleep(100 * 1000); 199 200 // ctl = hda_reg8_read(&sdregs->ctl1); 201 // ctl = ctl & ~BIT_V(uint8_t, sdctl1_srst); 202 // hda_reg8_write(&sdregs->ctl1, ctl); 203 204 // async_usleep(100 * 1000); 181 205 } 182 206 … … 214 238 { 215 239 ddf_msg(LVL_NOTE, "hda_stream_destroy()"); 240 hda_stream_reset_noinit(stream); 216 241 free(stream); 217 242 } … … 223 248 } 224 249 250 void hda_stream_stop(hda_stream_t *stream) 251 { 252 ddf_msg(LVL_NOTE, "hda_stream_stop()"); 253 hda_stream_set_run(stream, false); 254 } 255 256 void hda_stream_reset(hda_stream_t *stream) 257 { 258 ddf_msg(LVL_NOTE, "hda_stream_reset()"); 259 hda_stream_reset_noinit(stream); 260 hda_stream_desc_configure(stream); 261 } 262 225 263 /** @} 226 264 */
Note:
See TracChangeset
for help on using the changeset viewer.