Changeset 9dd79bc7 in mainline for uspace/drv/audio/sb16/main.c


Ignore:
Timestamp:
2011-09-24T16:32:12Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
61013bd
Parents:
b956810
Message:

sb16: Add hw DSP initialization.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/audio/sb16/main.c

    rb956810 r9dd79bc7  
    132132        CHECK_RET_UNREG_DEST_RETURN(ret, "Failed to create dsp function.");
    133133
     134
     135        mixer_fun = ddf_fun_create(device, fun_exposed, "mixer");
     136        ret = dsp_fun ? EOK : ENOMEM;
     137        CHECK_RET_UNREG_DEST_RETURN(ret, "Failed to create mixer function.");
     138
     139        ret = sb16_init_sb16(soft_state, (void*)sb_regs, sb_regs_size);
     140        CHECK_RET_UNREG_DEST_RETURN(ret,
     141            "Failed to init sb16 driver: %s.\n", str_error(ret));
     142
    134143        ret = ddf_fun_bind(dsp_fun);
    135144        CHECK_RET_UNREG_DEST_RETURN(ret,
     
    137146        dsp_fun->driver_data = soft_state;
    138147
    139         mixer_fun = ddf_fun_create(device, fun_exposed, "mixer");
    140         ret = dsp_fun ? EOK : ENOMEM;
    141         CHECK_RET_UNREG_DEST_RETURN(ret, "Failed to create mixer function.");
    142 
    143148        ret = ddf_fun_bind(mixer_fun);
    144149        CHECK_RET_UNREG_DEST_RETURN(ret,
     
    146151        mixer_fun->driver_data = soft_state;
    147152
    148         ret = sb16_init_sb16(soft_state, (void*)sb_regs, sb_regs_size);
    149         CHECK_RET_UNREG_DEST_RETURN(ret,
    150             "Failed to init sb16 driver: %s.\n", str_error(ret));
    151153
    152154        ret = sb16_init_mpu(soft_state, (void*)mpu_regs, mpu_regs_size);
Note: See TracChangeset for help on using the changeset viewer.