1230130Smav# Copyright (c) 2012 Alexander Motin <mav@FreeBSD.org>
2230130Smav# All rights reserved.
3230130Smav#
4230130Smav# Redistribution and use in source and binary forms, with or without
5230130Smav# modification, are permitted provided that the following conditions
6230130Smav# are met:
7230130Smav# 1. Redistributions of source code must retain the above copyright
8230130Smav#    notice, this list of conditions and the following disclaimer,
9230130Smav#    without modification, immediately at the beginning of the file.
10230130Smav# 2. Redistributions in binary form must reproduce the above copyright
11230130Smav#    notice, this list of conditions and the following disclaimer in the
12230130Smav#    documentation and/or other materials provided with the distribution.
13230130Smav#
14230130Smav# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15230130Smav# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16230130Smav# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17230130Smav# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18230130Smav# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19230130Smav# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20230130Smav# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21230130Smav# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22230130Smav# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23230130Smav# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24230130Smav#
25230130Smav# $FreeBSD$
26230130Smav
27230130Smav#include <sys/rman.h>
28230130Smav
29230130SmavINTERFACE hdac;
30230130Smav
31230130SmavMETHOD struct mtx * get_mtx {
32230130Smav    device_t    dev;
33230130Smav    device_t    child;
34230130Smav};
35230130Smav
36230130SmavMETHOD uint32_t codec_command {
37230130Smav    device_t    dev;
38230130Smav    device_t    child;
39230130Smav    uint32_t    verb;
40230130Smav};
41230130Smav
42230130SmavMETHOD int stream_alloc {
43230130Smav    device_t    dev;
44230130Smav    device_t    child;
45230130Smav    int         dir;
46230130Smav    int         format;
47230326Smav    int         stripe;
48230130Smav    uint32_t    **dmapos;
49230130Smav};
50230130Smav
51230130SmavMETHOD void stream_free {
52230130Smav    device_t    dev;
53230130Smav    device_t    child;
54230130Smav    int         dir;
55230130Smav    int         stream;
56230130Smav};
57230130Smav
58230130SmavMETHOD int stream_start {
59230130Smav    device_t    dev;
60230130Smav    device_t    child;
61230130Smav    int         dir;
62230130Smav    int         stream;
63230130Smav    bus_addr_t  buf;
64230130Smav    int         blksz;
65230130Smav    int         blkcnt;
66230130Smav};
67230130Smav
68230130SmavMETHOD void stream_stop {
69230130Smav    device_t    dev;
70230130Smav    device_t    child;
71230130Smav    int         dir;
72230130Smav    int         stream;
73230130Smav};
74230130Smav
75230130SmavMETHOD void stream_reset {
76230130Smav    device_t    dev;
77230130Smav    device_t    child;
78230130Smav    int         dir;
79230130Smav    int         stream;
80230130Smav};
81230130Smav
82230130SmavMETHOD uint32_t stream_getptr {
83230130Smav    device_t    dev;
84230130Smav    device_t    child;
85230130Smav    int         dir;
86230130Smav    int         stream;
87230130Smav};
88230130Smav
89230130SmavMETHOD void stream_intr {
90230130Smav    device_t    dev;
91230130Smav    int         dir;
92230130Smav    int         stream;
93230130Smav};
94230130Smav
95230130SmavMETHOD int unsol_alloc {
96230130Smav    device_t    dev;
97230130Smav    device_t    child;
98230130Smav    int         wanted;
99230130Smav};
100230130Smav
101230130SmavMETHOD void unsol_free {
102230130Smav    device_t    dev;
103230130Smav    device_t    child;
104230130Smav    int         tag;
105230130Smav};
106230130Smav
107230130SmavMETHOD void unsol_intr {
108230130Smav    device_t    dev;
109230130Smav    uint32_t    resp;
110230130Smav};
111230130Smav
112230130SmavMETHOD void pindump {
113230130Smav    device_t    dev;
114230130Smav};
115230130Smav
116