arcofivar.h revision 1.2 1 1.2 isaki /* $NetBSD: arcofivar.h,v 1.2 2019/05/08 13:40:18 isaki Exp $ */
2 1.1 tsutsui /* $OpenBSD: arcofivar.h,v 1.2 2011/12/25 00:07:27 miod Exp $ */
3 1.1 tsutsui
4 1.1 tsutsui /*
5 1.1 tsutsui * Copyright (c) 2011 Miodrag Vallat.
6 1.1 tsutsui *
7 1.1 tsutsui * Permission to use, copy, modify, and distribute this software for any
8 1.1 tsutsui * purpose with or without fee is hereby granted, provided that the above
9 1.1 tsutsui * copyright notice and this permission notice appear in all copies.
10 1.1 tsutsui *
11 1.1 tsutsui * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12 1.1 tsutsui * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13 1.1 tsutsui * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14 1.1 tsutsui * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15 1.1 tsutsui * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16 1.1 tsutsui * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17 1.1 tsutsui * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 1.1 tsutsui */
19 1.1 tsutsui
20 1.1 tsutsui #define ARCOFI_NREGS 6
21 1.1 tsutsui
22 1.1 tsutsui struct arcofi_softc {
23 1.1 tsutsui device_t sc_dev;
24 1.1 tsutsui bus_addr_t sc_reg[ARCOFI_NREGS];
25 1.1 tsutsui bus_space_tag_t sc_iot;
26 1.1 tsutsui bus_space_handle_t sc_ioh;
27 1.1 tsutsui
28 1.1 tsutsui struct audio_device sc_audio_device;
29 1.1 tsutsui
30 1.1 tsutsui int sc_mode;
31 1.1 tsutsui
32 1.1 tsutsui struct {
33 1.1 tsutsui uint8_t cr3, cr4;
34 1.1 tsutsui uint gr_idx, gx_idx;
35 1.1 tsutsui int output_mute;
36 1.1 tsutsui } sc_active,
37 1.1 tsutsui sc_shadow;
38 1.1 tsutsui
39 1.1 tsutsui struct {
40 1.1 tsutsui uint8_t *buf;
41 1.1 tsutsui uint8_t *past;
42 1.1 tsutsui void (*cb)(void *);
43 1.1 tsutsui void *cbarg;
44 1.1 tsutsui } sc_recv,
45 1.1 tsutsui sc_xmit;
46 1.1 tsutsui kmutex_t sc_lock;
47 1.1 tsutsui kmutex_t sc_intr_lock;
48 1.1 tsutsui };
49 1.1 tsutsui
50 1.1 tsutsui void arcofi_attach(struct arcofi_softc *, const char *);
51 1.1 tsutsui int arcofi_hwintr(void *);
52