Changeset cf78637 in mainline


Ignore:
Timestamp:
2019-12-15T11:57:25Z (4 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9e45a41
Parents:
894afff
Message:

Fix logging level of HD Audio driver messages

Location:
uspace/drv/audio/hdaudio
Files:
5 edited

Legend:

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

    r894afff rcf78637  
    7070#if 0
    7171        if (resp != NULL) {
    72                 ddf_msg(LVL_NOTE, "verb 0x%" PRIx32 " -> 0x%" PRIx32, verb,
     72                ddf_msg(LVL_DEBUG, "verb 0x%" PRIx32 " -> 0x%" PRIx32, verb,
    7373                    *resp);
    7474        } else {
    75                 ddf_msg(LVL_NOTE, "verb 0x%" PRIx32, verb);
     75                ddf_msg(LVL_DEBUG, "verb 0x%" PRIx32, verb);
    7676        }
    7777#endif
     
    273273
    274274        offset = ampcaps & 0x7f;
    275         ddf_msg(LVL_NOTE, "out amp caps 0x%x (offset=0x%x)",
     275        ddf_msg(LVL_DEBUG, "out amp caps 0x%x (offset=0x%x)",
    276276            ampcaps, offset);
    277277
     
    288288                goto error;
    289289
    290         ddf_msg(LVL_NOTE, "gain/mute: L:0x%x R:0x%x", gmleft, gmright);
     290        ddf_msg(LVL_DEBUG, "gain/mute: L:0x%x R:0x%x", gmleft, gmright);
    291291
    292292        return EOK;
     
    309309
    310310        offset = ampcaps & 0x7f;
    311         ddf_msg(LVL_NOTE, "in amp caps 0x%x (offset=0x%x)", ampcaps, offset);
     311        ddf_msg(LVL_DEBUG, "in amp caps 0x%x (offset=0x%x)", ampcaps, offset);
    312312
    313313        for (i = 0; i < 15; i++) {
     
    324324                        goto error;
    325325
    326                 ddf_msg(LVL_NOTE, "in:%d gain/mute: L:0x%x R:0x%x",
     326                ddf_msg(LVL_DEBUG, "in:%d gain/mute: L:0x%x R:0x%x",
    327327                    i, gmleft, gmright);
    328328        }
     
    345345        int i, j;
    346346
    347         ddf_msg(LVL_NOTE, "Connections for widget %d:", aw);
     347        ddf_msg(LVL_DEBUG, "Connections for widget %d:", aw);
    348348
    349349        rc = hda_get_clist_len(codec, aw, &longform, &len);
     
    384384
    385385                for (j = 0; j < epresp && i < len; j++) {
    386                         ddf_msg(LVL_NOTE, "<- %d%s", resp & mask,
     386                        ddf_msg(LVL_DEBUG, "<- %d%s", resp & mask,
    387387                            (int)cidx == i ? " *** current *** " : "");
    388388                        resp = resp >> shift;
     
    406406        if (rc != EOK)
    407407                goto error;
    408         ddf_msg(LVL_NOTE, "aw %d: PIN cdfgef=0x%x",
     408        ddf_msg(LVL_DEBUG, "aw %d: PIN cdfgef=0x%x",
    409409            aw, cfgdef);
    410410
     
    412412        if (rc != EOK)
    413413                goto error;
    414         ddf_msg(LVL_NOTE, "aw %d : PIN caps=0x%x",
     414        ddf_msg(LVL_DEBUG, "aw %d : PIN caps=0x%x",
    415415            aw, pcaps);
    416416
     
    420420                        goto error;
    421421
    422                 ddf_msg(LVL_NOTE, "PIN %d had EAPD value=0x%x", aw, eapd);
     422                ddf_msg(LVL_DEBUG, "PIN %d had EAPD value=0x%x", aw, eapd);
    423423
    424424                rc = hda_set_eapd_btl_enable(codec, aw, eapd | 2);
     
    430430                        goto error;
    431431
    432                 ddf_msg(LVL_NOTE, "PIN %d now has EAPD value=0x%x", aw, eapd);
     432                ddf_msg(LVL_DEBUG, "PIN %d now has EAPD value=0x%x", aw, eapd);
    433433        }
    434434
    435435        pctl = 0;
    436436        if ((pcaps & BIT_V(uint32_t, pwc_output)) != 0) {
    437                 ddf_msg(LVL_NOTE, "PIN %d will enable output", aw);
     437                ddf_msg(LVL_DEBUG, "PIN %d will enable output", aw);
    438438                pctl = pctl | BIT_V(uint8_t, pctl_out_enable);
    439439        }
    440440
    441441        if ((pcaps & BIT_V(uint32_t, pwc_input)) != 0) {
    442                 ddf_msg(LVL_NOTE, "PIN %d will enable input", aw);
     442                ddf_msg(LVL_DEBUG, "PIN %d will enable input", aw);
    443443                pctl = pctl | BIT_V(uint8_t, pctl_in_enable);
    444444        }
    445445
    446446        if ((pcaps & BIT_V(uint32_t, pwc_hpd)) != 0) {
    447                 ddf_msg(LVL_NOTE, "PIN %d will enable headphone drive", aw);
     447                ddf_msg(LVL_DEBUG, "PIN %d will enable headphone drive", aw);
    448448                pctl = pctl | BIT_V(uint8_t, pctl_hpd_enable);
    449449        }
     
    451451#if 0
    452452        if ((pcaps & BIT_V(uint32_t, pwc_input)) != 0) {
    453                 ddf_msg(LVL_NOTE, "PIN %d will enable input");
     453                ddf_msg(LVL_DEBUG, "PIN %d will enable input");
    454454                pctl = pctl | BIT_V(uint8_t, pctl_input_enable);
    455455        }
    456456#endif
    457         ddf_msg(LVL_NOTE, "Setting PIN %d ctl to 0x%x", aw, pctl);
     457        ddf_msg(LVL_DEBUG, "Setting PIN %d ctl to 0x%x", aw, pctl);
    458458        rc = hda_set_pin_ctl(codec, aw, pctl);
    459459        if (rc != EOK)
     
    465465                goto error;
    466466
    467         ddf_msg(LVL_NOTE, "PIN %d ctl reads as 0x%x", aw, pctl);
     467        ddf_msg(LVL_DEBUG, "PIN %d ctl reads as 0x%x", aw, pctl);
    468468
    469469        return EOK;
     
    478478        uint32_t pwrstate;
    479479
    480         ddf_msg(LVL_NOTE, "aw %d is power control-capable", aw);
     480        ddf_msg(LVL_DEBUG, "aw %d is power control-capable", aw);
    481481
    482482        rc = hda_get_power_state(codec, aw, &pwrstate);
    483483        if (rc != EOK)
    484484                goto error;
    485         ddf_msg(LVL_NOTE, "aw %d: power state = 0x%x", aw, pwrstate);
     485        ddf_msg(LVL_DEBUG, "aw %d: power state = 0x%x", aw, pwrstate);
    486486
    487487        return EOK;
     
    517517                goto error;
    518518
    519         ddf_msg(LVL_NOTE, "hda_get_subnc -> %s", str_error_name(rc));
    520         ddf_msg(LVL_NOTE, "sfg=%d nfg=%d", sfg, nfg);
     519        ddf_msg(LVL_DEBUG, "hda_get_subnc -> %s", str_error_name(rc));
     520        ddf_msg(LVL_DEBUG, "sfg=%d nfg=%d", sfg, nfg);
    521521
    522522        for (fg = sfg; fg < sfg + nfg; fg++) {
    523                 ddf_msg(LVL_NOTE, "Enumerate FG %d", fg);
     523                ddf_msg(LVL_DEBUG, "Enumerate FG %d", fg);
    524524
    525525                rc = hda_get_fgrp_type(codec, fg, &unsol, &grptype);
     
    527527                        goto error;
    528528
    529                 ddf_msg(LVL_NOTE, "hda_get_fgrp_type -> %s", str_error_name(rc));
    530                 ddf_msg(LVL_NOTE, "unsol: %d, grptype: %d", unsol, grptype);
     529                ddf_msg(LVL_DEBUG, "hda_get_fgrp_type -> %s", str_error_name(rc));
     530                ddf_msg(LVL_DEBUG, "unsol: %d, grptype: %d", unsol, grptype);
    531531
    532532                rc = hda_get_gpio_cnt(codec, fg, &gpio);
     
    534534                        goto error;
    535535
    536                 ddf_msg(LVL_NOTE, "GPIO: wake=%d unsol=%d gpis=%d gpos=%d gpios=%d",
     536                ddf_msg(LVL_DEBUG, "GPIO: wake=%d unsol=%d gpis=%d gpos=%d gpios=%d",
    537537                    (gpio & BIT_V(uint32_t, 31)) != 0,
    538538                    (gpio & BIT_V(uint32_t, 30)) != 0,
     
    549549                        goto error;
    550550
    551                 ddf_msg(LVL_NOTE, "hda_get_subnc -> %s", str_error_name(rc));
    552                 ddf_msg(LVL_NOTE, "saw=%d baw=%d", saw, naw);
     551                ddf_msg(LVL_DEBUG, "hda_get_subnc -> %s", str_error_name(rc));
     552                ddf_msg(LVL_DEBUG, "saw=%d baw=%d", saw, naw);
    553553
    554554                for (aw = saw; aw < saw + naw; aw++) {
     
    556556                        if (rc != EOK)
    557557                                goto error;
    558                         ddf_msg(LVL_NOTE, "aw %d: type=0x%x caps=0x%x",
     558                        ddf_msg(LVL_DEBUG, "aw %d: type=0x%x caps=0x%x",
    559559                            aw, awtype, awcaps);
    560560
     
    594594                                        goto error;
    595595
    596                                 ddf_msg(LVL_NOTE, "Output widget %d: rates=0x%x formats=0x%x",
     596                                ddf_msg(LVL_DEBUG, "Output widget %d: rates=0x%x formats=0x%x",
    597597                                    aw, rates, formats);
    598598                        } else if (awtype == awt_audio_input) {
    599599                                if (codec->in_aw < 0) {
    600                                         ddf_msg(LVL_NOTE, "Selected input "
     600                                        ddf_msg(LVL_DEBUG, "Selected input "
    601601                                            "widget %d\n", aw);
    602602                                        codec->in_aw = aw;
    603603                                } else {
    604                                         ddf_msg(LVL_NOTE, "Ignoring input "
     604                                        ddf_msg(LVL_DEBUG, "Ignoring input "
    605605                                            "widget %d\n", aw);
    606606                                }
     
    614614                                        goto error;
    615615
    616                                 ddf_msg(LVL_NOTE, "Input widget %d: rates=0x%x formats=0x%x",
     616                                ddf_msg(LVL_DEBUG, "Input widget %d: rates=0x%x formats=0x%x",
    617617                                    aw, rates, formats);
    618618                        }
     
    628628        hda_ctl_dump_info(hda->ctl);
    629629
    630         ddf_msg(LVL_NOTE, "Codec OK");
     630        ddf_msg(LVL_DEBUG, "Codec OK");
    631631        return codec;
    632632error:
     
    637637void hda_codec_fini(hda_codec_t *codec)
    638638{
    639         ddf_msg(LVL_NOTE, "hda_codec_fini()");
     639        ddf_msg(LVL_DEBUG, "hda_codec_fini()");
    640640        free(codec);
    641641}
     
    652652                /* Configure converter */
    653653
    654                 ddf_msg(LVL_NOTE, "Configure output converter format");
     654                ddf_msg(LVL_DEBUG, "Configure output converter format");
    655655                rc = hda_set_converter_fmt(codec, out_aw, stream->fmt);
    656656                if (rc != EOK)
    657657                        goto error;
    658658
    659                 ddf_msg(LVL_NOTE, "Configure output converter stream, channel");
     659                ddf_msg(LVL_DEBUG, "Configure output converter stream, channel");
    660660                rc = hda_set_converter_ctl(codec, out_aw, stream->sid, 0);
    661661                if (rc != EOK)
     
    674674        /* Configure converter */
    675675
    676         ddf_msg(LVL_NOTE, "Configure input converter format");
     676        ddf_msg(LVL_DEBUG, "Configure input converter format");
    677677        rc = hda_set_converter_fmt(codec, codec->in_aw, stream->fmt);
    678678        if (rc != EOK)
    679679                goto error;
    680680
    681         ddf_msg(LVL_NOTE, "Configure input converter stream, channel");
     681        ddf_msg(LVL_DEBUG, "Configure input converter stream, channel");
    682682        rc = hda_set_converter_ctl(codec, codec->in_aw, stream->sid, 0);
    683683        if (rc != EOK)
  • uspace/drv/audio/hdaudio/hdactl.c

    r894afff rcf78637  
    154154        errno_t rc;
    155155
    156         ddf_msg(LVL_NOTE, "hda_corb_init()");
     156        ddf_msg(LVL_DEBUG, "hda_corb_init()");
    157157
    158158        /* Stop CORB if not stopped */
    159159        ctl = hda_reg8_read(&hda->regs->corbctl);
    160160        if ((ctl & BIT_V(uint8_t, corbctl_run)) != 0) {
    161                 ddf_msg(LVL_NOTE, "CORB is enabled, disabling first.");
     161                ddf_msg(LVL_DEBUG, "CORB is enabled, disabling first.");
    162162                hda_reg8_write(&hda->regs->corbctl, ctl & ~BIT_V(uint8_t,
    163163                    corbctl_run));
     
    176176        corbsz = corbsz | selsz;
    177177
    178         ddf_msg(LVL_NOTE, "Setting CORB Size register to 0x%x", corbsz);
     178        ddf_msg(LVL_DEBUG, "Setting CORB Size register to 0x%x", corbsz);
    179179        hda_reg8_write(&hda->regs->corbsize, corbsz);
    180180        hda->ctl->corb_entries = hda_rb_entries(selsz);
     
    190190        if (rc != EOK) {
    191191                hda->ctl->corb_virt = NULL;
    192                 ddf_msg(LVL_NOTE, "Failed allocating DMA memory for CORB");
    193                 goto error;
    194         }
    195 
    196         ddf_msg(LVL_NOTE, "Set CORB base registers");
     192                ddf_msg(LVL_ERROR, "Failed allocating DMA memory for CORB");
     193                goto error;
     194        }
     195
     196        ddf_msg(LVL_DEBUG, "Set CORB base registers");
    197197
    198198        /* Update CORB base registers */
     
    200200        hda_reg32_write(&hda->regs->corbubase, UPPER32(hda->ctl->corb_phys));
    201201
    202         ddf_msg(LVL_NOTE, "Reset CORB Read/Write pointers");
     202        ddf_msg(LVL_DEBUG, "Reset CORB Read/Write pointers");
    203203
    204204        /* Reset CORB Read Pointer */
     
    206206            BIT_V(uint16_t, corbrp_rst));
    207207        if (rc != EOK) {
    208                 ddf_msg(LVL_NOTE, "Failed resetting CORBRP");
     208                ddf_msg(LVL_ERROR, "Failed resetting CORBRP");
    209209                goto error;
    210210        }
     
    215215        /* Start CORB */
    216216        ctl = hda_reg8_read(&hda->regs->corbctl);
    217         ddf_msg(LVL_NOTE, "CORBctl (0x%x) = 0x%x",
     217        ddf_msg(LVL_DEBUG, "CORBctl (0x%x) = 0x%x",
    218218            (unsigned)((void *)&hda->regs->corbctl - (void *)hda->regs), ctl | BIT_V(uint8_t, corbctl_run));
    219219        hda_reg8_write(&hda->regs->corbctl, ctl | BIT_V(uint8_t, corbctl_run));
    220220
    221         ddf_msg(LVL_NOTE, "CORB initialized");
     221        ddf_msg(LVL_DEBUG, "CORB initialized");
    222222        return EOK;
    223223error:
     
    251251        errno_t rc;
    252252
    253         ddf_msg(LVL_NOTE, "hda_rirb_init()");
     253        ddf_msg(LVL_DEBUG, "hda_rirb_init()");
    254254
    255255        /* Stop RIRB if not stopped */
    256256        ctl = hda_reg8_read(&hda->regs->rirbctl);
    257257        if ((ctl & BIT_V(uint8_t, rirbctl_run)) != 0) {
    258                 ddf_msg(LVL_NOTE, "RIRB is enabled, disabling first.");
     258                ddf_msg(LVL_DEBUG, "RIRB is enabled, disabling first.");
    259259                hda_reg8_write(&hda->regs->corbctl, ctl & ~BIT_V(uint8_t,
    260260                    rirbctl_run));
     
    273273        rirbsz = rirbsz | (selsz << rirbsize_size_l);
    274274
    275         ddf_msg(LVL_NOTE, "Setting RIRB Size register to 0x%x", rirbsz);
     275        ddf_msg(LVL_DEBUG, "Setting RIRB Size register to 0x%x", rirbsz);
    276276        hda_reg8_write(&hda->regs->rirbsize, rirbsz);
    277277        hda->ctl->rirb_entries = hda_rb_entries(selsz);
     
    287287        if (rc != EOK) {
    288288                hda->ctl->rirb_virt = NULL;
    289                 ddf_msg(LVL_NOTE, "Failed allocating DMA memory for RIRB");
    290                 goto error;
    291         }
    292 
    293         ddf_msg(LVL_NOTE, "Set RIRB base registers");
     289                ddf_msg(LVL_ERROR, "Failed allocating DMA memory for RIRB");
     290                goto error;
     291        }
     292
     293        ddf_msg(LVL_DEBUG, "Set RIRB base registers");
    294294
    295295        /* Update RIRB base registers */
     
    297297        hda_reg32_write(&hda->regs->rirbubase, UPPER32(hda->ctl->rirb_phys));
    298298
    299         ddf_msg(LVL_NOTE, "Reset RIRB Write pointer");
     299        ddf_msg(LVL_DEBUG, "Reset RIRB Write pointer");
    300300
    301301        /* Reset RIRB Write Pointer */
     
    309309        /* Start RIRB and enable RIRB interrupt */
    310310        ctl = hda_reg8_read(&hda->regs->rirbctl);
    311         ddf_msg(LVL_NOTE, "RIRBctl (0x%x) = 0x%x",
     311        ddf_msg(LVL_DEBUG, "RIRBctl (0x%x) = 0x%x",
    312312            (unsigned)((void *)&hda->regs->rirbctl - (void *)hda->regs), ctl | BIT_V(uint8_t, rirbctl_run));
    313313        hda_reg8_write(&hda->regs->rirbctl, ctl | BIT_V(uint8_t, rirbctl_run) |
    314314            BIT_V(uint8_t, rirbctl_int));
    315315
    316         ddf_msg(LVL_NOTE, "RIRB initialized");
     316        ddf_msg(LVL_DEBUG, "RIRB initialized");
    317317        return EOK;
    318318error:
     
    479479
    480480                        if (hda->ctl->solrb_wp == hda->ctl->solrb_rp) {
    481                                 ddf_msg(LVL_NOTE, "hda_solrb_read() - last ditch effort process RIRB");
     481                                ddf_msg(LVL_DEBUG, "hda_solrb_read() - last ditch effort process RIRB");
    482482                                fibril_mutex_unlock(&hda->ctl->solrb_lock);
    483483                                hda_ctl_process_rirb(hda->ctl);
     
    486486
    487487                        if (hda->ctl->solrb_wp == hda->ctl->solrb_rp) {
    488                                 ddf_msg(LVL_NOTE, "hda_solrb_read() time out");
     488                                ddf_msg(LVL_DEBUG, "hda_solrb_read() time out");
    489489                                fibril_mutex_unlock(&hda->ctl->solrb_lock);
    490490                                return ETIMEOUT;
     
    525525        }
    526526
    527         ddf_msg(LVL_NOTE, "reg 0x%zx STATESTS = 0x%x",
     527        ddf_msg(LVL_DEBUG, "reg 0x%zx STATESTS = 0x%x",
    528528            (void *)&hda->regs->statests - (void *)hda->regs,
    529529            hda_reg16_read(&hda->regs->statests));
     
    534534        hda_reg16_write(&hda->regs->statests, 0x7f);
    535535
    536         ddf_msg(LVL_NOTE, "after clearing reg 0x%zx STATESTS = 0x%x",
     536        ddf_msg(LVL_DEBUG, "after clearing reg 0x%zx STATESTS = 0x%x",
    537537            (void *)&hda->regs->statests - (void *)hda->regs,
    538538            hda_reg16_read(&hda->regs->statests));
     
    540540        gctl = hda_reg32_read(&hda->regs->gctl);
    541541        if ((gctl & BIT_V(uint32_t, gctl_crst)) != 0) {
    542                 ddf_msg(LVL_NOTE, "Controller not in reset. Resetting.");
     542                ddf_msg(LVL_DEBUG, "Controller not in reset. Resetting.");
    543543                hda_reg32_write(&hda->regs->gctl, gctl & ~BIT_V(uint32_t, gctl_crst));
    544544        }
    545545
    546         ddf_msg(LVL_NOTE, "Taking controller out of reset.");
     546        ddf_msg(LVL_DEBUG, "Taking controller out of reset.");
    547547        hda_reg32_write(&hda->regs->gctl, gctl | BIT_V(uint32_t, gctl_crst));
    548548
     
    552552                gctl = hda_reg32_read(&hda->regs->gctl);
    553553                if ((gctl & BIT_V(uint32_t, gctl_crst)) != 0) {
    554                         ddf_msg(LVL_NOTE, "gctl=0x%x", gctl);
     554                        ddf_msg(LVL_DEBUG, "gctl=0x%x", gctl);
    555555                        break;
    556556                }
    557557
    558                 ddf_msg(LVL_NOTE, "Waiting for controller to initialize.");
     558                ddf_msg(LVL_DEBUG, "Waiting for controller to initialize.");
    559559                fibril_usleep(100 * 1000);
    560560                --cnt;
     
    566566        }
    567567
    568         ddf_msg(LVL_NOTE, "Controller is out of reset.");
    569 
    570         ddf_msg(LVL_NOTE, "Read GCAP");
     568        ddf_msg(LVL_DEBUG, "Controller is out of reset.");
     569
     570        ddf_msg(LVL_DEBUG, "Read GCAP");
    571571        uint16_t gcap = hda_reg16_read(&hda->regs->gcap);
    572572        ctl->ok64bit = (gcap & BIT_V(uint16_t, gcap_64ok)) != 0;
     
    574574        ctl->iss = BIT_RANGE_EXTRACT(uint16_t, gcap_iss_h, gcap_iss_l, gcap);
    575575        ctl->bss = BIT_RANGE_EXTRACT(uint16_t, gcap_bss_h, gcap_bss_l, gcap);
    576         ddf_msg(LVL_NOTE, "GCAP: 0x%x (64OK=%d)", gcap, ctl->ok64bit);
    577         ddf_msg(LVL_NOTE, "iss: %d, oss: %d, bss: %d\n",
     576        ddf_msg(LVL_DEBUG, "GCAP: 0x%x (64OK=%d)", gcap, ctl->ok64bit);
     577        ddf_msg(LVL_DEBUG, "iss: %d, oss: %d, bss: %d\n",
    578578            ctl->iss, ctl->oss, ctl->bss);
    579579        /* Give codecs enough time to enumerate themselves */
    580580        fibril_usleep(codec_enum_wait_us);
    581581
    582         ddf_msg(LVL_NOTE, "STATESTS = 0x%x",
     582        ddf_msg(LVL_DEBUG, "STATESTS = 0x%x",
    583583            hda_reg16_read(&hda->regs->statests));
    584584
    585585        /* Enable interrupts */
    586586        intctl = hda_reg32_read(&hda->regs->intctl);
    587         ddf_msg(LVL_NOTE, "intctl (0x%x) := 0x%x",
     587        ddf_msg(LVL_DEBUG, "intctl (0x%x) := 0x%x",
    588588            (unsigned)((void *)&hda->regs->intctl - (void *)hda->regs),
    589589            intctl | BIT_V(uint32_t, intctl_gie) | BIT_V(uint32_t, intctl_cie));
     
    600600                goto error;
    601601
    602         ddf_msg(LVL_NOTE, "call hda_codec_init()");
     602        ddf_msg(LVL_DEBUG, "call hda_codec_init()");
    603603        hda->ctl->codec = hda_codec_init(hda, 0);
    604604        if (hda->ctl->codec == NULL) {
    605                 ddf_msg(LVL_NOTE, "hda_codec_init() failed");
    606                 goto error;
    607         }
    608 
    609         ddf_msg(LVL_NOTE, "intsts=0x%x", hda_reg32_read(&hda->regs->intsts));
    610         ddf_msg(LVL_NOTE, "sdesc[%d].sts=0x%x",
     605                ddf_msg(LVL_DEBUG, "hda_codec_init() failed");
     606                goto error;
     607        }
     608
     609        ddf_msg(LVL_DEBUG, "intsts=0x%x", hda_reg32_read(&hda->regs->intsts));
     610        ddf_msg(LVL_DEBUG, "sdesc[%d].sts=0x%x",
    611611            hda->ctl->iss, hda_reg8_read(&hda->regs->sdesc[hda->ctl->iss].sts));
    612612
     
    622622void hda_ctl_fini(hda_ctl_t *ctl)
    623623{
    624         ddf_msg(LVL_NOTE, "hda_ctl_fini()");
     624        ddf_msg(LVL_DEBUG, "hda_ctl_fini()");
    625625        hda_rirb_fini(ctl->hda);
    626626        hda_corb_fini(ctl->hda);
     
    677677void hda_ctl_dump_info(hda_ctl_t *ctl)
    678678{
    679         ddf_msg(LVL_NOTE, "corbwp=%d, corbrp=%d",
     679        ddf_msg(LVL_DEBUG, "corbwp=%d, corbrp=%d",
    680680            hda_reg16_read(&ctl->hda->regs->corbwp),
    681681            hda_reg16_read(&ctl->hda->regs->corbrp));
    682         ddf_msg(LVL_NOTE, "corbctl=0x%x, corbsts=0x%x",
     682        ddf_msg(LVL_DEBUG, "corbctl=0x%x, corbsts=0x%x",
    683683            hda_reg8_read(&ctl->hda->regs->corbctl),
    684684            hda_reg8_read(&ctl->hda->regs->corbsts));
    685         ddf_msg(LVL_NOTE, "rirbwp=0x%x, soft-rirbrp=0x%zx",
     685        ddf_msg(LVL_DEBUG, "rirbwp=0x%x, soft-rirbrp=0x%zx",
    686686            hda_reg16_read(&ctl->hda->regs->rirbwp),
    687687            ctl->rirb_rp);
    688         ddf_msg(LVL_NOTE, "solrb_wp=0x%zx, solrb_rp=0x%zx",
     688        ddf_msg(LVL_DEBUG, "solrb_wp=0x%zx, solrb_rp=0x%zx",
    689689            ctl->solrb_wp, ctl->solrb_wp);
    690690}
  • uspace/drv/audio/hdaudio/hdaudio.c

    r894afff rcf78637  
    163163        errno_t rc;
    164164
    165         ddf_msg(LVL_NOTE, "hda_dev_add()");
     165        ddf_msg(LVL_DEBUG, "hda_dev_add()");
    166166        hw_res_list_parsed_init(&res);
    167167
     
    175175        fibril_mutex_initialize(&hda->lock);
    176176
    177         ddf_msg(LVL_NOTE, "create parent sess");
     177        ddf_msg(LVL_DEBUG, "create parent sess");
    178178        hda->parent_sess = ddf_dev_parent_sess_get(dev);
    179179        if (hda->parent_sess == NULL) {
     
    183183        }
    184184
    185         ddf_msg(LVL_NOTE, "get HW res list");
     185        ddf_msg(LVL_DEBUG, "get HW res list");
    186186        rc = hw_res_get_list_parsed(hda->parent_sess, &res, 0);
    187187        if (rc != EOK) {
     
    199199        hda->rwsize = RNGSZ(res.mem_ranges.ranges[0]);
    200200
    201         ddf_msg(LVL_NOTE, "hda reg base: %" PRIx64,
     201        ddf_msg(LVL_DEBUG, "hda reg base: %" PRIx64,
    202202            RNGABS(res.mem_ranges.ranges[0]));
    203203
     
    208208        }
    209209
    210         ddf_msg(LVL_NOTE, "enable PIO");
     210        ddf_msg(LVL_DEBUG, "enable PIO");
    211211        rc = pio_enable((void *)(uintptr_t)hda->rwbase, hda->rwsize, &regs);
    212212        if (rc != EOK) {
     
    217217        hda->regs = (hda_regs_t *)regs;
    218218
    219         ddf_msg(LVL_NOTE, "IRQs: %zu", res.irqs.count);
     219        ddf_msg(LVL_DEBUG, "IRQs: %zu", res.irqs.count);
    220220        if (res.irqs.count != 1) {
    221221                ddf_msg(LVL_ERROR, "Unexpected IRQ count %zu (!= 1)",
     
    223223                goto error;
    224224        }
    225         ddf_msg(LVL_NOTE, "interrupt no: %d", res.irqs.irqs[0]);
     225        ddf_msg(LVL_DEBUG, "interrupt no: %d", res.irqs.irqs[0]);
    226226
    227227        ncmds_base = sizeof(hdaudio_irq_commands) / sizeof(irq_cmd_t);
     
    256256        }
    257257
    258         ddf_msg(LVL_NOTE, "range0.base=%zu", hdaudio_irq_pio_ranges[0].base);
     258        ddf_msg(LVL_DEBUG, "range0.base=%zu", hdaudio_irq_pio_ranges[0].base);
    259259
    260260        rc = hw_res_enable_interrupt(hda->parent_sess, res.irqs.irqs[0]);
     
    281281        }
    282282
    283         ddf_msg(LVL_NOTE, "create function");
     283        ddf_msg(LVL_DEBUG, "create function");
    284284        fun_pcm = ddf_fun_create(dev, fun_exposed, "pcm");
    285285        if (fun_pcm == NULL) {
     
    323323        hw_res_list_parsed_clean(&res);
    324324
    325         ddf_msg(LVL_NOTE, "Failing hda_dev_add() -> %s", str_error_name(rc));
     325        ddf_msg(LVL_DEBUG, "Failing hda_dev_add() -> %s", str_error_name(rc));
    326326        return rc;
    327327}
  • uspace/drv/audio/hdaudio/pcm_iface.c

    r894afff rcf78637  
    9292static errno_t hda_get_info_str(ddf_fun_t *fun, const char **name)
    9393{
    94         ddf_msg(LVL_NOTE, "hda_get_info_str()");
     94        ddf_msg(LVL_DEBUG, "hda_get_info_str()");
    9595        if (name)
    9696                *name = "High Definition Audio";
     
    102102        hda_t *hda = fun_to_hda(fun);
    103103
    104         ddf_msg(LVL_NOTE, "hda_query_cap(%d)", cap);
     104        ddf_msg(LVL_DEBUG, "hda_query_cap(%d)", cap);
    105105        switch (cap) {
    106106        case AUDIO_CAP_PLAYBACK:
     
    129129        errno_t rc = EOK;
    130130
    131         ddf_msg(LVL_NOTE, "hda_test_format(%u, %u, %d)\n",
     131        ddf_msg(LVL_DEBUG, "hda_test_format(%u, %u, %d)\n",
    132132            *channels, *rate, *format);
    133133
     
    157157        hda_lock(hda);
    158158
    159         ddf_msg(LVL_NOTE, "hda_get_buffer(): hda=%p", hda);
     159        ddf_msg(LVL_DEBUG, "hda_get_buffer(): hda=%p", hda);
    160160        if (hda->pcm_buffers != NULL) {
    161161                hda_unlock(hda);
     
    163163        }
    164164
    165         ddf_msg(LVL_NOTE, "hda_get_buffer() - allocate stream buffers");
     165        ddf_msg(LVL_DEBUG, "hda_get_buffer() - allocate stream buffers");
    166166        rc = hda_stream_buffers_alloc(hda, &hda->pcm_buffers);
    167167        if (rc != EOK) {
     
    171171        }
    172172
    173         ddf_msg(LVL_NOTE, "hda_get_buffer() - fill info");
     173        ddf_msg(LVL_DEBUG, "hda_get_buffer() - fill info");
    174174        /* XXX This is only one buffer */
    175175        *buffer = hda->pcm_buffers->buf[0];
    176176        *size = hda->pcm_buffers->bufsize * hda->pcm_buffers->nbuffers;
    177177
    178         ddf_msg(LVL_NOTE, "hda_get_buffer() returing EOK, buffer=%p, size=%zu",
     178        ddf_msg(LVL_DEBUG, "hda_get_buffer() returing EOK, buffer=%p, size=%zu",
    179179            *buffer, *size);
    180180
     
    185185static errno_t hda_get_buffer_position(ddf_fun_t *fun, size_t *pos)
    186186{
    187         ddf_msg(LVL_NOTE, "hda_get_buffer_position()");
     187        ddf_msg(LVL_DEBUG, "hda_get_buffer_position()");
    188188        return ENOTSUP;
    189189}
     
    193193        hda_t *hda = fun_to_hda(fun);
    194194
    195         ddf_msg(LVL_NOTE, "hda_set_event_session()");
     195        ddf_msg(LVL_DEBUG, "hda_set_event_session()");
    196196        hda_lock(hda);
    197197        hda->ev_sess = sess;
     
    206206        async_sess_t *sess;
    207207
    208         ddf_msg(LVL_NOTE, "hda_get_event_session()");
     208        ddf_msg(LVL_DEBUG, "hda_get_event_session()");
    209209
    210210        hda_lock(hda);
     
    221221        hda_lock(hda);
    222222
    223         ddf_msg(LVL_NOTE, "hda_release_buffer()");
     223        ddf_msg(LVL_DEBUG, "hda_release_buffer()");
    224224        if (hda->pcm_buffers == NULL) {
    225225                hda_unlock(hda);
     
    240240        errno_t rc;
    241241
    242         ddf_msg(LVL_NOTE, "hda_start_playback()");
     242        ddf_msg(LVL_DEBUG, "hda_start_playback()");
    243243        hda_lock(hda);
    244244
     
    279279        hda_t *hda = fun_to_hda(fun);
    280280
    281         ddf_msg(LVL_NOTE, "hda_stop_playback()");
     281        ddf_msg(LVL_DEBUG, "hda_stop_playback()");
    282282        hda_lock(hda);
    283283        hda_stream_stop(hda->pcm_stream);
     
    299299        errno_t rc;
    300300
    301         ddf_msg(LVL_NOTE, "hda_start_capture()");
     301        ddf_msg(LVL_DEBUG, "hda_start_capture()");
    302302        hda_lock(hda);
    303303
     
    312312        fmt = (fmt_base_44khz << fmt_base) | (fmt_bits_16 << fmt_bits_l) | 1;
    313313
    314         ddf_msg(LVL_NOTE, "hda_start_capture() - create input stream");
     314        ddf_msg(LVL_DEBUG, "hda_start_capture() - create input stream");
    315315        hda->pcm_stream = hda_stream_create(hda, sdir_input, hda->pcm_buffers,
    316316            fmt);
     
    338338        hda_t *hda = fun_to_hda(fun);
    339339
    340         ddf_msg(LVL_NOTE, "hda_stop_capture()");
     340        ddf_msg(LVL_DEBUG, "hda_stop_capture()");
    341341        hda_lock(hda);
    342342        hda_stream_stop(hda->pcm_stream);
  • uspace/drv/audio/hdaudio/stream.c

    r894afff rcf78637  
    101101                        goto error;
    102102
    103                 ddf_msg(LVL_NOTE, "Stream buf phys=0x%llx virt=%p",
     103                ddf_msg(LVL_DEBUG, "Stream buf phys=0x%llx virt=%p",
    104104                    (unsigned long long)buffer_phys, buffer);
    105105
     
    123123            0, &buffer_phys, &buffer);
    124124        if (rc != EOK) {
    125                 ddf_msg(LVL_NOTE, "dmamem_map_anon -> %s", str_error_name(rc));
     125                ddf_msg(LVL_DEBUG, "dmamem_map_anon -> %s", str_error_name(rc));
    126126                goto error;
    127127        }
     
    131131                bufs->buf_phys[i] = buffer_phys + i * bufs->bufsize;
    132132
    133                 ddf_msg(LVL_NOTE, "Stream buf phys=0x%llx virt=%p",
     133                ddf_msg(LVL_DEBUG, "Stream buf phys=0x%llx virt=%p",
    134134                    (long long unsigned)(uintptr_t)bufs->buf[i],
    135135                    (void *)bufs->buf_phys[i]);
     
    246246        stream->buffers = bufs;
    247247
    248         ddf_msg(LVL_NOTE, "snum=%d sdidx=%d", stream->sid, stream->sdid);
    249 
    250         ddf_msg(LVL_NOTE, "Configure stream descriptor");
     248        ddf_msg(LVL_DEBUG, "snum=%d sdidx=%d", stream->sid, stream->sdid);
     249
     250        ddf_msg(LVL_DEBUG, "Configure stream descriptor");
    251251        hda_stream_desc_configure(stream);
    252252        return stream;
     
    255255void hda_stream_destroy(hda_stream_t *stream)
    256256{
    257         ddf_msg(LVL_NOTE, "hda_stream_destroy()");
     257        ddf_msg(LVL_DEBUG, "hda_stream_destroy()");
    258258        hda_stream_reset_noinit(stream);
    259259        free(stream);
     
    262262void hda_stream_start(hda_stream_t *stream)
    263263{
    264         ddf_msg(LVL_NOTE, "hda_stream_start()");
     264        ddf_msg(LVL_DEBUG, "hda_stream_start()");
    265265        hda_stream_set_run(stream, true);
    266266}
     
    268268void hda_stream_stop(hda_stream_t *stream)
    269269{
    270         ddf_msg(LVL_NOTE, "hda_stream_stop()");
     270        ddf_msg(LVL_DEBUG, "hda_stream_stop()");
    271271        hda_stream_set_run(stream, false);
    272272}
     
    274274void hda_stream_reset(hda_stream_t *stream)
    275275{
    276         ddf_msg(LVL_NOTE, "hda_stream_reset()");
     276        ddf_msg(LVL_DEBUG, "hda_stream_reset()");
    277277        hda_stream_reset_noinit(stream);
    278278        hda_stream_desc_configure(stream);
Note: See TracChangeset for help on using the changeset viewer.