Changeset f0241bda in mainline
- Timestamp:
- 2012-08-17T16:57:29Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 82e4005
- Parents:
- 2e01b3f
- Location:
- uspace/drv/audio/sb16
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/audio/sb16/dsp.c
r2e01b3f rf0241bda 227 227 } 228 228 229 unsigned sb_dsp_query_cap(sb_dsp_t *dsp, audio_cap_t cap) 230 { 231 switch(cap) { 232 case AUDIO_CAP_RECORD: 233 case AUDIO_CAP_PLAYBACK: 234 case AUDIO_CAP_INTERRUPT: 235 return 1; 236 case AUDIO_CAP_MAX_BUFFER: 237 return MAX_BUFFER_SIZE; 238 case AUDIO_CAP_INTERRUPT_MIN_FRAMES: 239 return 1; 240 case AUDIO_CAP_INTERRUPT_MAX_FRAMES: 241 return 16535; 242 case AUDIO_CAP_BUFFER_POS: 243 default: 244 return 0; 245 } 246 } 247 229 248 int sb_dsp_test_format(sb_dsp_t *dsp, unsigned *channels, unsigned *rate, 230 249 pcm_sample_format_t *format) -
uspace/drv/audio/sb16/dsp.h
r2e01b3f rf0241bda 39 39 #include <errno.h> 40 40 #include <pcm/sample_format.h> 41 #include <audio_pcm_iface.h> 41 42 42 43 #include "registers.h" … … 72 73 int dma8, int dma16); 73 74 void sb_dsp_interrupt(sb_dsp_t *dsp); 74 75 unsigned sb_dsp_query_cap(sb_dsp_t *dsp, audio_cap_t cap); 75 76 int sb_dsp_test_format(sb_dsp_t *dsp, unsigned *channels, unsigned *rate, 76 77 pcm_sample_format_t *format); -
uspace/drv/audio/sb16/pcm_iface.c
r2e01b3f rf0241bda 46 46 return EOK; 47 47 } 48 49 static unsigned sb_query_cap(ddf_fun_t *fun, audio_cap_t cap) 50 { 51 assert(fun); 52 assert(fun->driver_data); 53 sb_dsp_t *dsp = fun->driver_data; 54 return sb_dsp_query_cap(dsp, cap); 55 } 56 48 57 static int sb_test_format(ddf_fun_t *fun, unsigned *channels, unsigned *rate, 49 58 pcm_sample_format_t *format) … … 116 125 .get_info_str = sb_get_info_str, 117 126 .test_format = sb_test_format, 127 .query_cap = sb_query_cap, 118 128 119 129 .get_buffer = sb_get_buffer,
Note:
See TracChangeset
for help on using the changeset viewer.