Changeset c19a5a59 in mainline
- Timestamp:
- 2017-12-08T21:03:35Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c8211849
- Parents:
- f77c1c9
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-07 21:23:47)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-08 21:03:35)
- Location:
- uspace
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/audio/sb16/dsp.c
rf77c1c9 rc19a5a59 303 303 304 304 // TODO: Assumes DMA 16 305 const int remain = hw_res_dma_channel_remain(sess, dsp->dma16_channel); 306 if (remain >= 0) { 305 size_t remain; 306 int rc = hw_res_dma_channel_remain(sess, dsp->dma16_channel, &remain); 307 if (rc == EOK) { 307 308 *pos = dsp->buffer.size - remain; 308 return EOK; 309 } 310 return remain; 309 } 310 return rc; 311 311 } 312 312 -
uspace/lib/c/generic/device/hw_res.c
rf77c1c9 rc19a5a59 140 140 * @param channel DMA channel. 141 141 * 142 * @return Number of bytes remaining in the buffer if positive. 143 * @return Error code if negative. 142 * @param[out] rem Number of bytes remaining in the buffer if positive. 143 * 144 * @return Error code. 144 145 * 145 146 */ 146 int hw_res_dma_channel_remain(async_sess_t *sess, unsigned channel )147 int hw_res_dma_channel_remain(async_sess_t *sess, unsigned channel, size_t *rem) 147 148 { 148 149 async_exch_t *exch = async_exchange_begin(sess); … … 155 156 156 157 if (ret == EOK) 157 returnremain;158 *rem = remain; 158 159 159 160 return ret; -
uspace/lib/c/include/device/hw_res.h
rf77c1c9 rc19a5a59 123 123 extern int hw_res_dma_channel_setup(async_sess_t *, unsigned int, uint32_t, 124 124 uint32_t, uint8_t); 125 extern int hw_res_dma_channel_remain(async_sess_t *, unsigned );125 extern int hw_res_dma_channel_remain(async_sess_t *, unsigned, size_t *); 126 126 127 127 #endif
Note:
See TracChangeset
for help on using the changeset viewer.