Changes in uspace/drv/audio/hdaudio/hdaudio.c [a64970e1:cf78637] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/audio/hdaudio/hdaudio.c
ra64970e1 rcf78637 1 1 /* 2 * Copyright (c) 20 25Jiri Svoboda2 * Copyright (c) 2014 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 55 55 static errno_t hda_dev_remove(ddf_dev_t *dev); 56 56 static errno_t hda_dev_gone(ddf_dev_t *dev); 57 static errno_t hda_dev_quiesce(ddf_dev_t *dev);58 57 static errno_t hda_fun_online(ddf_fun_t *fun); 59 58 static errno_t hda_fun_offline(ddf_fun_t *fun); 60 59 61 static void hdaudio_interrupt(ipc_call_t *, void*);60 static void hdaudio_interrupt(ipc_call_t *, ddf_dev_t *); 62 61 63 62 static driver_ops_t driver_ops = { 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 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 70 68 }; 71 69 … … 142 140 .cmd = CMD_PIO_WRITE_8, 143 141 .addr = NULL, /* sdesc[x].sts */ 144 .value = BIT_V(uint8_t, sdsts_bcis)142 .value = 0x4 /* XXX sdesc.sts.BCIS */ 145 143 }, 146 144 /* 4 */ … … 268 266 cap_irq_handle_t irq_cap; 269 267 rc = register_interrupt_handler(dev, res.irqs.irqs[0], 270 hdaudio_interrupt, (void *)hda,&irq_code, &irq_cap);268 hdaudio_interrupt, &irq_code, &irq_cap); 271 269 if (rc != EOK) { 272 270 ddf_msg(LVL_ERROR, "Failed registering interrupt handler: %s", … … 367 365 } 368 366 369 static 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 379 367 static errno_t hda_fun_online(ddf_fun_t *fun) 380 368 { … … 389 377 } 390 378 391 /** HD Audio interrupt handler. 392 * 393 * @param icall IRQ event notification 394 * @param arg Argument (hda_t *) 395 */ 396 static void hdaudio_interrupt(ipc_call_t *icall, void *arg) 397 { 398 hda_t *hda = (hda_t *)arg; 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); 399 382 400 383 if (0)
Note:
See TracChangeset
for help on using the changeset viewer.