Changeset 15d0046 in mainline for uspace/drv/audio/hdaudio/stream.h
- Timestamp:
- 2014-09-12T13:22:33Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9b20126
- Parents:
- 8db09e4 (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/stream.h
r8db09e4 r15d0046 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 mips64mm29 /** @addtogroup hdaudio 30 30 * @{ 31 31 */ 32 /** @file 32 /** @file High Definition Audio stream 33 33 */ 34 34 35 #ifndef KERN_mips64_PAGE_H_36 #define KERN_mips64_PAGE_H_35 #ifndef STREAM_H 36 #define STREAM_H 37 37 38 #include <arch/mm/frame.h>39 #include <trace.h>38 #include "hdaudio.h" 39 #include "spec/bdl.h" 40 40 41 #define PAGE_WIDTH FRAME_WIDTH 42 #define PAGE_SIZE FRAME_SIZE 41 typedef enum { 42 /** Input Stream */ 43 sdir_input, 44 /** Output Stream */ 45 sdir_output, 46 /** Bidirectional Stream */ 47 sdir_bidi 48 } hda_stream_dir_t; 43 49 44 #ifndef __ASM__ 45 #define KA2PA(addr) (((uintptr_t) (addr)) - 0xffffffff80000000) 46 #define PA2KA(addr) (((uintptr_t) (addr)) + 0xffffffff80000000) 47 #else 48 #define KA2PA(addr) ((addr) - 0xffffffff80000000) 49 #define PA2KA(addr) ((addr) + 0xffffffff80000000) 50 #endif 50 typedef struct hda_stream { 51 hda_t *hda; 52 /** Stream ID */ 53 uint8_t sid; 54 /** Stream descriptor index */ 55 uint8_t sdid; 56 /** Direction */ 57 hda_stream_dir_t dir; 58 /** Number of buffers */ 59 size_t nbuffers; 60 /** Buffer size */ 61 size_t bufsize; 62 /** Buffer Descriptor List */ 63 hda_buffer_desc_t *bdl; 64 /** Physical address of BDL */ 65 uintptr_t bdl_phys; 66 /** Buffers */ 67 void **buf; 68 /** Physical addresses of buffers */ 69 uintptr_t *buf_phys; 70 /** Stream format */ 71 uint32_t fmt; 72 } hda_stream_t; 51 73 52 #ifndef __ASM__ 53 54 extern void page_arch_init(void);55 56 #endif /* __ASM__ */ 74 extern hda_stream_t *hda_stream_create(hda_t *, hda_stream_dir_t, uint32_t); 75 extern void hda_stream_destroy(hda_stream_t *); 76 extern void hda_stream_start(hda_stream_t *); 77 extern void hda_stream_stop(hda_stream_t *); 78 extern void hda_stream_reset(hda_stream_t *); 57 79 58 80 #endif
Note:
See TracChangeset
for help on using the changeset viewer.