Changeset 8e7c9fe in mainline for uspace/drv/audio/hdaudio/hdactl.h
- Timestamp:
- 2014-09-12T03:45:25Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c53b58e
- Parents:
- 3eb0c85 (diff), 105d8d6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/audio/hdaudio/hdactl.h
r3eb0c85 r8e7c9fe 1 1 /* 2 * Copyright (c) 20 03-2004 Jakub Jermar2 * Copyright (c) 2014 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup mips6429 /** @addtogroup hdaudio 30 30 * @{ 31 31 */ 32 /** @file 32 /** @file High Definition Audio controller 33 33 */ 34 34 35 #ifndef KERN_mips64_CONTEXT_H_36 #define KERN_mips64_CONTEXT_H_35 #ifndef HDACTL_H 36 #define HDACTL_H 37 37 38 #include <align.h> 39 #include <arch/stack.h> 38 #include <fibril_synch.h> 39 #include <stdbool.h> 40 #include "hdaudio.h" 41 #include "spec/regs.h" 40 42 41 /* 42 * Put one item onto the stack to support get_stack_base() and align it up. 43 */ 44 #define SP_DELTA (ABI_STACK_FRAME + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT)) 43 enum { 44 /** Software response buffer size in entries */ 45 softrb_entries = 128 46 }; 45 47 46 #ifndef __ASM__ 48 typedef struct hda_ctl { 49 bool ok64bit; 50 int iss; 51 int oss; 52 int bss; 47 53 48 #include <typedefs.h> 54 uintptr_t corb_phys; 55 void *corb_virt; 56 size_t corb_entries; 49 57 50 #define context_set(ctx, pc, stack, size) \ 51 context_set_generic(ctx, pc, stack, size) 58 uintptr_t rirb_phys; 59 void *rirb_virt; 60 size_t rirb_entries; 61 size_t rirb_rp; 52 62 53 /* 54 * Only save registers that must be preserved across 55 * function calls. 56 */ 57 typedef struct { 58 uintptr_t sp; 59 uintptr_t pc; 60 61 uint64_t s0; 62 uint64_t s1; 63 uint64_t s2; 64 uint64_t s3; 65 uint64_t s4; 66 uint64_t s5; 67 uint64_t s6; 68 uint64_t s7; 69 uint64_t s8; 70 uint64_t gp; 71 72 ipl_t ipl; 73 } context_t; 63 fibril_mutex_t solrb_lock; 64 fibril_condvar_t solrb_cv; 65 hda_rirb_entry_t solrb[softrb_entries]; 66 size_t solrb_rp; 67 size_t solrb_wp; 74 68 75 #endif /* __ASM__ */ 69 hda_rirb_entry_t unsolrb[softrb_entries]; 70 size_t unsolrb_rp; 71 size_t unsolrb_wp; 72 73 struct hda_codec *codec; 74 struct hda *hda; 75 } hda_ctl_t; 76 77 extern hda_ctl_t *hda_ctl_init(hda_t *); 78 extern void hda_ctl_fini(hda_ctl_t *); 79 extern void hda_ctl_interrupt(hda_ctl_t *); 80 extern int hda_cmd(hda_t *, uint32_t, uint32_t *); 81 extern void hda_ctl_dump_info(hda_ctl_t *); 76 82 77 83 #endif
Note:
See TracChangeset
for help on using the changeset viewer.