Changeset 8e7c9fe in mainline for uspace/drv/audio/hdaudio/hdactl.h


Ignore:
Timestamp:
2014-09-12T03:45:25Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
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.
Message:

merge mainline changes

most usb changes were reverted. blink and usbmass were fixed
known problems:
ehci won't initialize
usbmast asserts on unmount (happens on mainline too)

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/drv/audio/hdaudio/hdactl.h

    r3eb0c85 r8e7c9fe  
    11/*
    2  * Copyright (c) 2003-2004 Jakub Jermar
     2 * Copyright (c) 2014 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup mips64
     29/** @addtogroup hdaudio
    3030 * @{
    3131 */
    32 /** @file
     32/** @file High Definition Audio controller
    3333 */
    3434
    35 #ifndef KERN_mips64_CONTEXT_H_
    36 #define KERN_mips64_CONTEXT_H_
     35#ifndef HDACTL_H
     36#define HDACTL_H
    3737
    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"
    4042
    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))
     43enum {
     44        /** Software response buffer size in entries */
     45        softrb_entries = 128
     46};
    4547
    46 #ifndef __ASM__
     48typedef struct hda_ctl {
     49        bool ok64bit;
     50        int iss;
     51        int oss;
     52        int bss;
    4753
    48 #include <typedefs.h>
     54        uintptr_t corb_phys;
     55        void *corb_virt;
     56        size_t corb_entries;
    4957
    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;
    5262
    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;
    7468
    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
     77extern hda_ctl_t *hda_ctl_init(hda_t *);
     78extern void hda_ctl_fini(hda_ctl_t *);
     79extern void hda_ctl_interrupt(hda_ctl_t *);
     80extern int hda_cmd(hda_t *, uint32_t, uint32_t *);
     81extern void hda_ctl_dump_info(hda_ctl_t *);
    7682
    7783#endif
Note: See TracChangeset for help on using the changeset viewer.