Changeset 01282fc in mainline for uspace/drv/audio/sb16/sb16.c


Ignore:
Timestamp:
2011-09-25T12:10:59Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7a0a0f5
Parents:
cf083e8
Message:

sb16: Add mixer stubs. Add mixer initialization.

File:
1 edited

Legend:

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

    rcf083e8 r01282fc  
    2828
    2929#include <errno.h>
     30#include <str_error.h>
    3031#include <libarch/ddi.h>
    3132
     
    4142    { .cmdcount = 1, .cmds = (irq_cmd_t*)irq_cmds };
    4243
     44static mixer_type_t mixer_type_by_dsp_version(unsigned major, unsigned minor)
     45{
     46        return SB_MIXER_UNKNOWN;
     47}
    4348/*----------------------------------------------------------------------------*/
    4449irq_code_t * sb16_irq_code(void)
     
    7984            drv->dsp_version.major, drv->dsp_version.minor);
    8085
     86        /* Initialize mixer */
     87        drv->mixer = mixer_type_by_dsp_version(
     88            drv->dsp_version.major, drv->dsp_version.minor);
    8189
    82         // TODO Initialize mixer
     90        ret = mixer_init(drv->regs, drv->mixer);
     91        if (ret != EOK) {
     92                ddf_log_error("Failed to initialize SB mixer: %s.\n",
     93                    str_error(ret));
     94                return ret;
     95        }
     96        ddf_log_note("Initialized mixer: %s.\n", mixer_type_to_str(drv->mixer));
     97
    8398        return EOK;
    8499}
Note: See TracChangeset for help on using the changeset viewer.