Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/audio/hdaudio/codec.c

    rb7fd2a0 rdd8ab1c  
    4646#include "stream.h"
    4747
    48 static errno_t hda_ccmd(hda_codec_t *codec, int node, uint32_t vid, uint32_t payload,
     48static int hda_ccmd(hda_codec_t *codec, int node, uint32_t vid, uint32_t payload,
    4949    uint32_t *resp)
    5050{
     
    6666                    (payload & 0xffff);
    6767        }
    68         errno_t rc = hda_cmd(codec->hda, verb, resp);
     68        int rc = hda_cmd(codec->hda, verb, resp);
    6969/*
    7070        if (resp != NULL) {
     
    7878}
    7979
    80 static errno_t hda_get_parameter(hda_codec_t *codec, int node, hda_param_id_t param,
     80static int hda_get_parameter(hda_codec_t *codec, int node, hda_param_id_t param,
    8181    uint32_t *resp)
    8282{
     
    8484}
    8585
    86 static errno_t hda_get_subnc(hda_codec_t *codec, int node, int *startnode,
     86static int hda_get_subnc(hda_codec_t *codec, int node, int *startnode,
    8787    int *nodecount)
    8888{
    89         errno_t rc;
     89        int rc;
    9090        uint32_t resp;
    9191
     
    103103
    104104/** Get Function Group Type */
    105 static errno_t hda_get_fgrp_type(hda_codec_t *codec, int node, bool *unsol,
     105static int hda_get_fgrp_type(hda_codec_t *codec, int node, bool *unsol,
    106106    hda_fgrp_type_t *type)
    107107{
    108         errno_t rc;
     108        int rc;
    109109        uint32_t resp;
    110110
     
    119119}
    120120
    121 static errno_t hda_get_clist_len(hda_codec_t *codec, int node, bool *longform,
     121static int hda_get_clist_len(hda_codec_t *codec, int node, bool *longform,
    122122    int *items)
    123123{
    124         errno_t rc;
     124        int rc;
    125125        uint32_t resp;
    126126
     
    135135}
    136136
    137 static errno_t hda_get_clist_entry(hda_codec_t *codec, int node, int n, uint32_t *resp)
     137static int hda_get_clist_entry(hda_codec_t *codec, int node, int n, uint32_t *resp)
    138138{
    139139        return hda_ccmd(codec, node, hda_clist_entry_get, n, resp);
    140140}
    141141
    142 static errno_t hda_get_eapd_btl_enable(hda_codec_t *codec, int node, uint32_t *resp)
     142static int hda_get_eapd_btl_enable(hda_codec_t *codec, int node, uint32_t *resp)
    143143{
    144144        return hda_ccmd(codec, node, hda_eapd_btl_enable_get, 0, resp);
    145145}
    146146
    147 static errno_t hda_set_eapd_btl_enable(hda_codec_t *codec, int node, uint8_t payload)
     147static int hda_set_eapd_btl_enable(hda_codec_t *codec, int node, uint8_t payload)
    148148{
    149149        return hda_ccmd(codec, node, hda_eapd_btl_enable_set, payload, NULL);
     
    151151
    152152/** Get Suppported PCM Size, Rates */
    153 static errno_t hda_get_supp_rates(hda_codec_t *codec, int node, uint32_t *rates)
     153static int hda_get_supp_rates(hda_codec_t *codec, int node, uint32_t *rates)
    154154{
    155155        return hda_get_parameter(codec, node, hda_supp_rates, rates);
     
    157157
    158158/** Get Suppported Stream Formats */
    159 static errno_t hda_get_supp_formats(hda_codec_t *codec, int node, uint32_t *fmts)
     159static int hda_get_supp_formats(hda_codec_t *codec, int node, uint32_t *fmts)
    160160{
    161161        return hda_get_parameter(codec, node, hda_supp_formats, fmts);
    162162}
    163163
    164 static errno_t hda_set_converter_fmt(hda_codec_t *codec, int node, uint16_t fmt)
     164static int hda_set_converter_fmt(hda_codec_t *codec, int node, uint16_t fmt)
    165165{
    166166        return hda_ccmd(codec, node, hda_converter_fmt_set, fmt, NULL);
    167167}
    168168
    169 static errno_t hda_set_converter_ctl(hda_codec_t *codec, int node, uint8_t stream,
     169static int hda_set_converter_ctl(hda_codec_t *codec, int node, uint8_t stream,
    170170    uint8_t channel)
    171171{
     
    176176}
    177177
    178 static errno_t hda_set_pin_ctl(hda_codec_t *codec, int node, uint8_t pctl)
     178static int hda_set_pin_ctl(hda_codec_t *codec, int node, uint8_t pctl)
    179179{
    180180        return hda_ccmd(codec, node, hda_pin_ctl_set, pctl, NULL);
    181181}
    182182
    183 static errno_t hda_get_pin_ctl(hda_codec_t *codec, int node, uint8_t *pctl)
    184 {
    185         errno_t rc;
     183static int hda_get_pin_ctl(hda_codec_t *codec, int node, uint8_t *pctl)
     184{
     185        int rc;
    186186        uint32_t resp;
    187187
     
    195195
    196196/** Get Audio Widget Capabilities */
    197 static errno_t hda_get_aw_caps(hda_codec_t *codec, int node,
     197static int hda_get_aw_caps(hda_codec_t *codec, int node,
    198198    hda_awidget_type_t *type, uint32_t *caps)
    199199{
    200         errno_t rc;
     200        int rc;
    201201        uint32_t resp;
    202202
     
    212212
    213213/** Get Pin Capabilities */
    214 static errno_t hda_get_pin_caps(hda_codec_t *codec, int node, uint32_t *caps)
     214static int hda_get_pin_caps(hda_codec_t *codec, int node, uint32_t *caps)
    215215{
    216216        return hda_get_parameter(codec, node, hda_pin_caps, caps);
     
    218218
    219219/** Get Power State */
    220 static errno_t hda_get_power_state(hda_codec_t *codec, int node, uint32_t *pstate)
     220static int hda_get_power_state(hda_codec_t *codec, int node, uint32_t *pstate)
    221221{
    222222        return hda_ccmd(codec, node, hda_power_state_get, 0, pstate);
     
    224224
    225225/** Get Configuration Default */
    226 static errno_t hda_get_cfg_def(hda_codec_t *codec, int node, uint32_t *cfgdef)
     226static int hda_get_cfg_def(hda_codec_t *codec, int node, uint32_t *cfgdef)
    227227{
    228228        return hda_ccmd(codec, node, hda_cfg_def_get, 0, cfgdef);
    229229}
    230230
    231 static errno_t hda_get_conn_sel(hda_codec_t *codec, int node, uint32_t *conn)
     231static int hda_get_conn_sel(hda_codec_t *codec, int node, uint32_t *conn)
    232232{
    233233        return hda_ccmd(codec, node, hda_conn_sel_get, 0, conn);
     
    235235
    236236/** Get Amplifier Gain / Mute  */
    237 static errno_t hda_get_amp_gain_mute(hda_codec_t *codec, int node, uint16_t payload,
     237static int hda_get_amp_gain_mute(hda_codec_t *codec, int node, uint16_t payload,
    238238    uint32_t *resp)
    239239{
    240240//      ddf_msg(LVL_NOTE, "hda_get_amp_gain_mute(codec, %d, %x)",
    241241//          node, payload);
    242         errno_t rc = hda_ccmd(codec, node, hda_amp_gain_mute_get, payload, resp);
     242        int rc = hda_ccmd(codec, node, hda_amp_gain_mute_get, payload, resp);
    243243//      ddf_msg(LVL_NOTE, "hda_get_amp_gain_mute(codec, %d, %x, resp=%x)",
    244244//          node, payload, *resp);
     
    247247
    248248/** Get GP I/O Count */
    249 static errno_t hda_get_gpio_cnt(hda_codec_t *codec, int node, uint32_t *resp)
     249static int hda_get_gpio_cnt(hda_codec_t *codec, int node, uint32_t *resp)
    250250{
    251251        return hda_get_parameter(codec, node, hda_gpio_cnt, resp);
    252252}
    253253
    254 static errno_t hda_set_amp_gain_mute(hda_codec_t *codec, int node, uint16_t payload)
     254static int hda_set_amp_gain_mute(hda_codec_t *codec, int node, uint16_t payload)
    255255{
    256256//      ddf_msg(LVL_NOTE, "hda_set_amp_gain_mute(codec, %d, %x)",
     
    259259}
    260260
    261 static errno_t hda_set_out_amp_max(hda_codec_t *codec, uint8_t aw)
     261static int hda_set_out_amp_max(hda_codec_t *codec, uint8_t aw)
    262262{
    263263        uint32_t ampcaps;
    264264        uint32_t gmleft, gmright;
    265265        uint32_t offset;
    266         errno_t rc;
     266        int rc;
    267267
    268268        rc = hda_get_parameter(codec, aw,
     
    294294}
    295295
    296 static errno_t hda_set_in_amp_max(hda_codec_t *codec, uint8_t aw)
     296static int hda_set_in_amp_max(hda_codec_t *codec, uint8_t aw)
    297297{
    298298        uint32_t ampcaps;
     
    300300        uint32_t offset;
    301301        int i;
    302         errno_t rc;
     302        int rc;
    303303
    304304        rc = hda_get_parameter(codec, aw,
     
    332332}
    333333
    334 static errno_t hda_clist_dump(hda_codec_t *codec, uint8_t aw)
    335 {
    336         errno_t rc;
     334static int hda_clist_dump(hda_codec_t *codec, uint8_t aw)
     335{
     336        int rc;
    337337        bool longform;
    338338        int len;
     
    394394}
    395395
    396 static errno_t hda_pin_init(hda_codec_t *codec, uint8_t aw)
    397 {
    398         errno_t rc;
     396static int hda_pin_init(hda_codec_t *codec, uint8_t aw)
     397{
     398        int rc;
    399399        uint32_t cfgdef;
    400400        uint32_t pcaps;
     
    471471
    472472/** Init power-control in wiget capable of doing so. */
    473 static errno_t hda_power_ctl_init(hda_codec_t *codec, uint8_t aw)
    474 {
    475         errno_t rc;
     473static int hda_power_ctl_init(hda_codec_t *codec, uint8_t aw)
     474{
     475        int rc;
    476476        uint32_t pwrstate;
    477477
     
    491491{
    492492        hda_codec_t *codec;
    493         errno_t rc;
     493        int rc;
    494494        int sfg, nfg;
    495495        int saw, naw;
     
    639639}
    640640
    641 errno_t hda_out_converter_setup(hda_codec_t *codec, hda_stream_t *stream)
    642 {
    643         errno_t rc;
     641int hda_out_converter_setup(hda_codec_t *codec, hda_stream_t *stream)
     642{
     643        int rc;
    644644        int out_aw;
    645645        int i;
     
    666666}
    667667
    668 errno_t hda_in_converter_setup(hda_codec_t *codec, hda_stream_t *stream)
    669 {
    670         errno_t rc;
     668int hda_in_converter_setup(hda_codec_t *codec, hda_stream_t *stream)
     669{
     670        int rc;
    671671
    672672        /* Configure converter */
Note: See TracChangeset for help on using the changeset viewer.