]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - sys/dev/sound/pci/hda/hdac_if.m
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / sys / dev / sound / pci / hda / hdac_if.m
1 # Copyright (c) 2012 Alexander Motin <mav@FreeBSD.org>
2 # All rights reserved.
3 #
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions
6 # are met:
7 # 1. Redistributions of source code must retain the above copyright
8 #    notice, this list of conditions and the following disclaimer,
9 #    without modification, immediately at the beginning of the file.
10 # 2. Redistributions in binary form must reproduce the above copyright
11 #    notice, this list of conditions and the following disclaimer in the
12 #    documentation and/or other materials provided with the distribution.
13 #
14 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15 # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17 # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 #
25 # $FreeBSD$
26
27 #include <sys/rman.h>
28
29 INTERFACE hdac;
30
31 METHOD struct mtx * get_mtx {
32     device_t    dev;
33     device_t    child;
34 };
35
36 METHOD uint32_t codec_command {
37     device_t    dev;
38     device_t    child;
39     uint32_t    verb;
40 };
41
42 METHOD int stream_alloc {
43     device_t    dev;
44     device_t    child;
45     int         dir;
46     int         format;
47     int         stripe;
48     uint32_t    **dmapos;
49 };
50
51 METHOD void stream_free {
52     device_t    dev;
53     device_t    child;
54     int         dir;
55     int         stream;
56 };
57
58 METHOD int stream_start {
59     device_t    dev;
60     device_t    child;
61     int         dir;
62     int         stream;
63     bus_addr_t  buf;
64     int         blksz;
65     int         blkcnt;
66 };
67
68 METHOD void stream_stop {
69     device_t    dev;
70     device_t    child;
71     int         dir;
72     int         stream;
73 };
74
75 METHOD void stream_reset {
76     device_t    dev;
77     device_t    child;
78     int         dir;
79     int         stream;
80 };
81
82 METHOD uint32_t stream_getptr {
83     device_t    dev;
84     device_t    child;
85     int         dir;
86     int         stream;
87 };
88
89 METHOD void stream_intr {
90     device_t    dev;
91     int         dir;
92     int         stream;
93 };
94
95 METHOD int unsol_alloc {
96     device_t    dev;
97     device_t    child;
98     int         wanted;
99 };
100
101 METHOD void unsol_free {
102     device_t    dev;
103     device_t    child;
104     int         tag;
105 };
106
107 METHOD void unsol_intr {
108     device_t    dev;
109     uint32_t    resp;
110 };
111
112 METHOD void pindump {
113     device_t    dev;
114 };
115