Changeset e941bf8 in mainline for uspace/drv/audio/sb16/dsp.c
- Timestamp:
- 2012-07-05T21:01:11Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4bbfb93
- Parents:
- 124f9bd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/audio/sb16/dsp.c
r124f9bd re941bf8 73 73 return EOK; 74 74 } 75 /*----------------------------------------------------------------------------*/ 75 76 76 static inline int sb_dsp_write(sb_dsp_t *dsp, uint8_t data) 77 77 { … … 89 89 return EOK; 90 90 } 91 /*----------------------------------------------------------------------------*/ 91 92 92 static inline void sb_dsp_reset(sb_dsp_t *dsp) 93 93 { … … 98 98 pio_write_8(&dsp->regs->dsp_reset, 0); 99 99 } 100 /*----------------------------------------------------------------------------*/ 100 101 101 static inline int sb_setup_dma(sb_dsp_t *dsp, uintptr_t pa, size_t size) 102 102 { … … 112 112 return ret; 113 113 } 114 /*----------------------------------------------------------------------------*/ 114 115 115 static inline int sb_setup_buffer(sb_dsp_t *dsp, size_t size) 116 116 { … … 139 139 return ret; 140 140 } 141 /*----------------------------------------------------------------------------*/ 141 142 142 static inline void sb_clear_buffer(sb_dsp_t *dsp) 143 143 { … … 146 146 dsp->buffer.size = 0; 147 147 } 148 /*----------------------------------------------------------------------------*/ 148 149 149 static inline size_t sample_count(unsigned sample_size, size_t byte_count) 150 150 { … … 154 154 return byte_count; 155 155 } 156 /*----------------------------------------------------------------------------*/ 156 157 157 int sb_dsp_init(sb_dsp_t *dsp, sb16_regs_t *regs, ddf_dev_t *dev, 158 158 int dma8, int dma16) … … 186 186 return ret; 187 187 } 188 /*----------------------------------------------------------------------------*/ 188 189 189 void sb_dsp_interrupt(sb_dsp_t *dsp) 190 190 { … … 203 203 #endif 204 204 } 205 /*----------------------------------------------------------------------------*/ 205 206 206 int sb_dsp_get_buffer(sb_dsp_t *dsp, void **buffer, size_t *size, unsigned *id) 207 207 { … … 241 241 return EOK; 242 242 } 243 /*----------------------------------------------------------------------------*/ 243 244 244 int sb_dsp_release_buffer(sb_dsp_t *dsp, unsigned id) 245 245 { … … 257 257 return EOK; 258 258 } 259 /*----------------------------------------------------------------------------*/ 259 260 260 int sb_dsp_start_playback(sb_dsp_t *dsp, unsigned id, unsigned parts, 261 261 unsigned sampling_rate, unsigned sample_size, unsigned channels, bool sign) … … 312 312 return EOK; 313 313 } 314 /*----------------------------------------------------------------------------*/ 314 315 315 int sb_dsp_stop_playback(sb_dsp_t *dsp, unsigned id) 316 316 { … … 322 322 return EOK; 323 323 } 324 /*----------------------------------------------------------------------------*/ 324 325 325 int sb_dsp_start_record(sb_dsp_t *dsp, unsigned id, unsigned sample_rate, 326 326 unsigned sample_size, unsigned channels, bool sign) … … 328 328 return ENOTSUP; 329 329 } 330 /*----------------------------------------------------------------------------*/ 330 331 331 int sb_dsp_stop_record(sb_dsp_t *dsp, unsigned id) 332 332 {
Note:
See TracChangeset
for help on using the changeset viewer.