Ignore:
File:
1 edited

Legend:

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

    rcf78637 ra64970e1  
    11/*
    2  * Copyright (c) 2014 Jiri Svoboda
     2 * Copyright (c) 2025 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    5555static errno_t hda_dev_remove(ddf_dev_t *dev);
    5656static errno_t hda_dev_gone(ddf_dev_t *dev);
     57static errno_t hda_dev_quiesce(ddf_dev_t *dev);
    5758static errno_t hda_fun_online(ddf_fun_t *fun);
    5859static errno_t hda_fun_offline(ddf_fun_t *fun);
    5960
    60 static void hdaudio_interrupt(ipc_call_t *, ddf_dev_t *);
     61static void hdaudio_interrupt(ipc_call_t *, void *);
    6162
    6263static driver_ops_t driver_ops = {
    63         .dev_add = &hda_dev_add,
    64         .dev_remove = &hda_dev_remove,
    65         .dev_gone = &hda_dev_gone,
    66         .fun_online = &hda_fun_online,
    67         .fun_offline = &hda_fun_offline
     64        .dev_add = hda_dev_add,
     65        .dev_remove = hda_dev_remove,
     66        .dev_gone = hda_dev_gone,
     67        .dev_quiesce = hda_dev_quiesce,
     68        .fun_online = hda_fun_online,
     69        .fun_offline = hda_fun_offline
    6870};
    6971
     
    140142                .cmd = CMD_PIO_WRITE_8,
    141143                .addr = NULL, /* sdesc[x].sts */
    142                 .value = 0x4 /* XXX sdesc.sts.BCIS */
     144                .value = BIT_V(uint8_t, sdsts_bcis)
    143145        },
    144146        /* 4 */
     
    266268        cap_irq_handle_t irq_cap;
    267269        rc = register_interrupt_handler(dev, res.irqs.irqs[0],
    268             hdaudio_interrupt, &irq_code, &irq_cap);
     270            hdaudio_interrupt, (void *)hda, &irq_code, &irq_cap);
    269271        if (rc != EOK) {
    270272                ddf_msg(LVL_ERROR, "Failed registering interrupt handler: %s",
     
    365367}
    366368
     369static errno_t hda_dev_quiesce(ddf_dev_t *dev)
     370{
     371        hda_t *hda = (hda_t *)ddf_dev_data_get(dev);
     372
     373        ddf_msg(LVL_DEBUG, "hda_dev_quiesce(%p)", dev);
     374
     375        hda_ctl_quiesce(hda->ctl);
     376        return EOK;
     377}
     378
    367379static errno_t hda_fun_online(ddf_fun_t *fun)
    368380{
     
    377389}
    378390
    379 static void hdaudio_interrupt(ipc_call_t *icall, ddf_dev_t *dev)
    380 {
    381         hda_t *hda = (hda_t *)ddf_dev_data_get(dev);
     391/** HD Audio interrupt handler.
     392 *
     393 * @param icall IRQ event notification
     394 * @param arg Argument (hda_t *)
     395 */
     396static void hdaudio_interrupt(ipc_call_t *icall, void *arg)
     397{
     398        hda_t *hda = (hda_t *)arg;
    382399
    383400        if (0)
Note: See TracChangeset for help on using the changeset viewer.