Changeset e941bf8 in mainline


Ignore:
Timestamp:
2012-07-05T21:01:11Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4bbfb93
Parents:
124f9bd
Message:

audio/sb16: Remove optical separators.

Location:
uspace/drv/audio/sb16
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/audio/sb16/dma.h

    r124f9bd re941bf8  
    5959        return (result | ((uintptr_t)addr & 0xfff));
    6060}
    61 /*----------------------------------------------------------------------------*/
     61
    6262/** DMA mallocator simulator
    6363 *
     
    7272        return address;
    7373}
    74 /*----------------------------------------------------------------------------*/
     74
    7575/** DMA mallocator simulator
    7676 *
  • uspace/drv/audio/sb16/dsp.c

    r124f9bd re941bf8  
    7373        return EOK;
    7474}
    75 /*----------------------------------------------------------------------------*/
     75
    7676static inline int sb_dsp_write(sb_dsp_t *dsp, uint8_t data)
    7777{
     
    8989        return EOK;
    9090}
    91 /*----------------------------------------------------------------------------*/
     91
    9292static inline void sb_dsp_reset(sb_dsp_t *dsp)
    9393{
     
    9898        pio_write_8(&dsp->regs->dsp_reset, 0);
    9999}
    100 /*----------------------------------------------------------------------------*/
     100
    101101static inline int sb_setup_dma(sb_dsp_t *dsp, uintptr_t pa, size_t size)
    102102{
     
    112112        return ret;
    113113}
    114 /*----------------------------------------------------------------------------*/
     114
    115115static inline int sb_setup_buffer(sb_dsp_t *dsp, size_t size)
    116116{
     
    139139        return ret;
    140140}
    141 /*----------------------------------------------------------------------------*/
     141
    142142static inline void sb_clear_buffer(sb_dsp_t *dsp)
    143143{
     
    146146        dsp->buffer.size = 0;
    147147}
    148 /*----------------------------------------------------------------------------*/
     148
    149149static inline size_t sample_count(unsigned sample_size, size_t byte_count)
    150150{
     
    154154        return byte_count;
    155155}
    156 /*----------------------------------------------------------------------------*/
     156
    157157int sb_dsp_init(sb_dsp_t *dsp, sb16_regs_t *regs, ddf_dev_t *dev,
    158158    int dma8, int dma16)
     
    186186        return ret;
    187187}
    188 /*----------------------------------------------------------------------------*/
     188
    189189void sb_dsp_interrupt(sb_dsp_t *dsp)
    190190{
     
    203203#endif
    204204}
    205 /*----------------------------------------------------------------------------*/
     205
    206206int sb_dsp_get_buffer(sb_dsp_t *dsp, void **buffer, size_t *size, unsigned *id)
    207207{
     
    241241        return EOK;
    242242}
    243 /*----------------------------------------------------------------------------*/
     243
    244244int sb_dsp_release_buffer(sb_dsp_t *dsp, unsigned id)
    245245{
     
    257257        return EOK;
    258258}
    259 /*----------------------------------------------------------------------------*/
     259
    260260int sb_dsp_start_playback(sb_dsp_t *dsp, unsigned id, unsigned parts,
    261261    unsigned sampling_rate, unsigned sample_size, unsigned channels, bool sign)
     
    312312        return EOK;
    313313}
    314 /*----------------------------------------------------------------------------*/
     314
    315315int sb_dsp_stop_playback(sb_dsp_t *dsp, unsigned id)
    316316{
     
    322322        return EOK;
    323323}
    324 /*----------------------------------------------------------------------------*/
     324
    325325int sb_dsp_start_record(sb_dsp_t *dsp, unsigned id, unsigned sample_rate,
    326326    unsigned sample_size, unsigned channels, bool sign)
     
    328328        return ENOTSUP;
    329329}
    330 /*----------------------------------------------------------------------------*/
     330
    331331int sb_dsp_stop_record(sb_dsp_t *dsp, unsigned id)
    332332{
  • uspace/drv/audio/sb16/dsp_commands.h

    r124f9bd re941bf8  
    162162        DMA_16B_EXIT = 0xd9, /* Ends DMA transfer and terminates I/O process */
    163163} dsp_command_t;
    164 /*----------------------------------------------------------------------------*/
     164
    165165#define DSP_MODE_SIGNED 0x10
    166166#define DSP_MODE_STEREO 0x20
  • uspace/drv/audio/sb16/main.c

    r124f9bd re941bf8  
    7878        return ddf_driver_main(&sb_driver);
    7979}
    80 /*----------------------------------------------------------------------------*/
     80
    8181static void irq_handler(ddf_dev_t *dev, ipc_callid_t iid, ipc_call_t *call)
    8282{
     
    8585        sb16_interrupt(dev->driver_data);
    8686}
    87 /*----------------------------------------------------------------------------*/
     87
    8888/** Initializes a new ddf driver instance of SB16.
    8989 *
     
    165165        return EOK;
    166166}
    167 /*----------------------------------------------------------------------------*/
     167
    168168static int sb_get_res(const ddf_dev_t *device, uintptr_t *sb_regs,
    169169    size_t *sb_regs_size, uintptr_t *mpu_regs, size_t *mpu_regs_size,
     
    242242        return EOK;
    243243}
    244 /*----------------------------------------------------------------------------*/
     244
    245245int sb_enable_interrupts(ddf_dev_t *device)
    246246{
  • uspace/drv/audio/sb16/mixer.c

    r124f9bd re941bf8  
    140140            sizeof(volume_ct1745) / sizeof(volume_item_t), volume_ct1745 },
    141141};
    142 /*----------------------------------------------------------------------------*/
     142
    143143const char * sb_mixer_type_str(sb_mixer_type_t type)
    144144{
     
    151151        return names[type];
    152152}
    153 /*----------------------------------------------------------------------------*/
     153
    154154int sb_mixer_init(sb_mixer_t *mixer, sb16_regs_t *regs, sb_mixer_type_t type)
    155155{
     
    171171        return EOK;
    172172}
    173 /*----------------------------------------------------------------------------*/
     173
    174174int sb_mixer_get_control_item_count(const sb_mixer_t *mixer)
    175175{
     
    177177        return volume_table[mixer->type].count;
    178178}
    179 /*----------------------------------------------------------------------------*/
     179
    180180int sb_mixer_get_control_item_info(const sb_mixer_t *mixer, unsigned index,
    181181    const char** name, unsigned *channels)
     
    192192        return EOK;
    193193}
    194 /*----------------------------------------------------------------------------*/
     194
    195195int sb_mixer_get_channel_info(const sb_mixer_t *mixer, unsigned index,
    196196    unsigned channel, const char **name, unsigned *levels)
     
    211211        return EOK;
    212212}
    213 /*----------------------------------------------------------------------------*/
     213
    214214int sb_mixer_set_volume_level(const sb_mixer_t *mixer,
    215215    unsigned index, unsigned channel, unsigned level)
     
    243243        return EOK;
    244244}
    245 /*----------------------------------------------------------------------------*/
     245
    246246unsigned sb_mixer_get_volume_level(const sb_mixer_t *mixer, unsigned index,
    247247    unsigned channel)
  • uspace/drv/audio/sb16/pcm_iface.c

    r124f9bd re941bf8  
    4545        return EOK;
    4646}
    47 /*----------------------------------------------------------------------------*/
     47
    4848static int sb_get_buffer(ddf_fun_t *fun,
    4949    void **buffer, size_t *size, unsigned *id)
     
    6161        return sb_dsp_set_event_session(dsp, id, sess);
    6262}
    63 /*----------------------------------------------------------------------------*/
     63
    6464static int sb_release_buffer(ddf_fun_t *fun, unsigned id)
    6565{
     
    6969        return sb_dsp_release_buffer(dsp, id);
    7070}
    71 /*----------------------------------------------------------------------------*/
     71
    7272static int sb_start_playback(ddf_fun_t *fun, unsigned id, unsigned parts,
    7373    unsigned sample_rate, unsigned sample_size, unsigned channels, bool sign)
     
    7979            dsp, id, parts, sample_rate, sample_size, channels, sign);
    8080}
    81 /*----------------------------------------------------------------------------*/
     81
    8282static int sb_stop_playback(ddf_fun_t *fun, unsigned id)
    8383{
     
    8787        return sb_dsp_stop_playback(dsp, id);
    8888}
    89 /*----------------------------------------------------------------------------*/
     89
    9090static int sb_start_record(ddf_fun_t *fun, unsigned id,
    9191    unsigned sample_rate, unsigned sample_size, unsigned channels, bool sign)
     
    9797            dsp, id, sample_rate, sample_size, channels, sign);
    9898}
    99 /*----------------------------------------------------------------------------*/
     99
    100100static int sb_stop_record(ddf_fun_t *fun, unsigned id)
    101101{
     
    105105        return sb_dsp_stop_record(dsp, id);
    106106}
    107 /*----------------------------------------------------------------------------*/
    108107
    109108audio_pcm_buffer_iface_t sb_pcm_iface = {
  • uspace/drv/audio/sb16/sb16.c

    r124f9bd re941bf8  
    6868        }
    6969}
    70 /*----------------------------------------------------------------------------*/
     70
    7171size_t sb16_irq_code_size(void)
    7272{
    7373        return sizeof(irq_cmds) / sizeof(irq_cmds[0]);
    7474}
    75 /*----------------------------------------------------------------------------*/
     75
    7676void sb16_irq_code(void *regs, int dma8, int dma16, irq_cmd_t cmds[], irq_pio_range_t ranges[])
    7777{
     
    9090        }
    9191}
    92 /*----------------------------------------------------------------------------*/
     92
    9393int sb16_init_sb16(sb16_t *sb, void *regs, size_t size,
    9494    ddf_dev_t *dev, int dma8, int dma16)
     
    171171        return EOK;
    172172}
    173 /*----------------------------------------------------------------------------*/
     173
    174174int sb16_init_mpu(sb16_t *sb, void *regs, size_t size)
    175175{
     
    177177        return ENOTSUP;
    178178}
    179 /*----------------------------------------------------------------------------*/
     179
    180180void sb16_interrupt(sb16_t *sb)
    181181{
Note: See TracChangeset for help on using the changeset viewer.