Changeset a64970e1 in mainline
- Timestamp:
- 2025-03-05T19:25:06Z (18 hours ago)
- Branches:
- master
- Children:
- 07039850
- Parents:
- 89b5a75
- Location:
- uspace/drv/audio
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/audio/hdaudio/hdactl.c
r89b5a75 ra64970e1 1 1 /* 2 * Copyright (c) 202 2Jiri Svoboda2 * Copyright (c) 2025 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 628 628 } 629 629 630 void hda_ctl_quiesce(hda_ctl_t *ctl) 631 { 632 uint32_t gctl; 633 634 ddf_msg(LVL_DEBUG, "hda_ctl_quiesce(): Resetting controller."); 635 gctl = hda_reg32_read(&ctl->hda->regs->gctl); 636 hda_reg32_write(&ctl->hda->regs->gctl, 637 gctl & ~BIT_V(uint32_t, gctl_crst)); 638 } 639 630 640 errno_t hda_cmd(hda_t *hda, uint32_t verb, uint32_t *resp) 631 641 { -
uspace/drv/audio/hdaudio/hdactl.h
r89b5a75 ra64970e1 1 1 /* 2 * Copyright (c) 20 14Jiri Svoboda2 * Copyright (c) 2025 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 77 77 extern hda_ctl_t *hda_ctl_init(hda_t *); 78 78 extern void hda_ctl_fini(hda_ctl_t *); 79 extern void hda_ctl_quiesce(hda_ctl_t *); 79 80 extern void hda_ctl_interrupt(hda_ctl_t *); 80 81 extern errno_t hda_cmd(hda_t *, uint32_t, uint32_t *); -
uspace/drv/audio/hdaudio/hdaudio.c
r89b5a75 ra64970e1 1 1 /* 2 * Copyright (c) 202 2Jiri Svoboda2 * Copyright (c) 2025 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); 57 58 static errno_t hda_fun_online(ddf_fun_t *fun); 58 59 static errno_t hda_fun_offline(ddf_fun_t *fun); … … 61 62 62 63 static 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 68 70 }; 69 71 … … 362 364 } 363 365 366 return EOK; 367 } 368 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); 364 376 return EOK; 365 377 } -
uspace/drv/audio/sb16/dsp.c
r89b5a75 ra64970e1 1 1 /* 2 * Copyright (c) 2025 Jiri Svoboda 2 3 * Copyright (c) 2011 Jan Vesely 3 4 * All rights reserved. … … 74 75 [DSP_READY] = "READY", 75 76 [DSP_NO_BUFFER] = "NO BUFFER", 77 [DSP_QUIESCED] = "QUIESCED" 76 78 }; 77 79 if ((size_t)state < ARRAY_SIZE(state_names)) … … 83 85 { 84 86 assert(dsp); 87 if (dsp->state == DSP_QUIESCED) 88 return; 89 85 90 ddf_log_verbose("Changing state from %s to %s", 86 91 dsp_state_to_str(dsp->state), dsp_state_to_str(state)); … … 230 235 231 236 return ret; 237 } 238 239 void sb_dsp_quiesce(sb_dsp_t *dsp) 240 { 241 dsp->state = DSP_QUIESCED; 242 dsp_reset(dsp); 232 243 } 233 244 -
uspace/drv/audio/sb16/dsp.h
r89b5a75 ra64970e1 1 1 /* 2 * Copyright (c) 2025 Jiri Svoboda 2 3 * Copyright (c) 2011 Jan Vesely 3 4 * All rights reserved. … … 51 52 DSP_READY, 52 53 DSP_NO_BUFFER, 54 DSP_QUIESCED 53 55 } dsp_state_t; 54 56 … … 78 80 errno_t sb_dsp_init(sb_dsp_t *dsp, sb16_regs_t *regs, ddf_dev_t *dev, 79 81 int dma8, int dma16); 82 void sb_dsp_quiesce(sb_dsp_t *dsp); 80 83 void sb_dsp_interrupt(sb_dsp_t *dsp); 81 84 unsigned sb_dsp_query_cap(sb_dsp_t *dsp, audio_cap_t cap); -
uspace/drv/audio/sb16/main.c
r89b5a75 ra64970e1 1 1 /* 2 * Copyright (c) 2025 Jiri Svoboda 2 3 * Copyright (c) 2011 Jan Vesely 3 4 * Copyright (c) 2011 Vojtech Horky … … 48 49 49 50 static errno_t sb_add_device(ddf_dev_t *device); 51 static errno_t sb_dev_quiesce(ddf_dev_t *device); 50 52 static errno_t sb_get_res(ddf_dev_t *device, addr_range_t **pp_sb_regs, 51 53 addr_range_t **pp_mpu_regs, int *irq, int *dma8, int *dma16); … … 54 56 static driver_ops_t sb_driver_ops = { 55 57 .dev_add = sb_add_device, 58 .dev_quiesce = sb_dev_quiesce 56 59 }; 57 60 … … 178 181 } 179 182 183 /** Initialize new SB16 driver instance. 184 * 185 * @param[in] device DDF instance of the device to initialize. 186 * @return Error code. 187 */ 188 static errno_t sb_dev_quiesce(ddf_dev_t *device) 189 { 190 sb16_t *soft_state = (sb16_t *)ddf_dev_data_get(device); 191 192 return sb16_quiesce(soft_state); 193 } 194 180 195 static errno_t sb_get_res(ddf_dev_t *device, addr_range_t **pp_sb_regs, 181 196 addr_range_t **pp_mpu_regs, int *irq, int *dma8, int *dma16) -
uspace/drv/audio/sb16/sb16.c
r89b5a75 ra64970e1 1 1 /* 2 * Copyright (c) 2025 Jiri Svoboda 2 3 * Copyright (c) 2011 Jan Vesely 3 4 * All rights reserved. … … 191 192 } 192 193 194 errno_t sb16_quiesce(sb16_t *sb) 195 { 196 sb_dsp_quiesce(&sb->dsp); 197 return EOK; 198 } 199 193 200 void sb16_interrupt(sb16_t *sb) 194 201 { -
uspace/drv/audio/sb16/sb16.h
r89b5a75 ra64970e1 1 1 /* 2 * Copyright (c) 2025 Jiri Svoboda 2 3 * Copyright (c) 2011 Jan Vesely 3 4 * All rights reserved. … … 55 56 errno_t sb16_init_sb16(sb16_t *sb, addr_range_t *regs, ddf_dev_t *dev, int dma8, int dma16); 56 57 errno_t sb16_init_mpu(sb16_t *sb, addr_range_t *regs); 58 errno_t sb16_quiesce(sb16_t *sb); 57 59 void sb16_interrupt(sb16_t *sb); 58 60
Note:
See TracChangeset
for help on using the changeset viewer.