xref: /freebsd/sys/dev/sound/pci/hda/hdac_if.m (revision 2008043f386721d58158e37e0d7e50df8095942d)
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
26#include <sys/rman.h>
27
28INTERFACE hdac;
29
30METHOD struct mtx * get_mtx {
31    device_t    dev;
32    device_t    child;
33};
34
35METHOD uint32_t codec_command {
36    device_t    dev;
37    device_t    child;
38    uint32_t    verb;
39};
40
41METHOD int stream_alloc {
42    device_t    dev;
43    device_t    child;
44    int         dir;
45    int         format;
46    int         stripe;
47    uint32_t    **dmapos;
48};
49
50METHOD void stream_free {
51    device_t    dev;
52    device_t    child;
53    int         dir;
54    int         stream;
55};
56
57METHOD int stream_start {
58    device_t    dev;
59    device_t    child;
60    int         dir;
61    int         stream;
62    bus_addr_t  buf;
63    int         blksz;
64    int         blkcnt;
65};
66
67METHOD void stream_stop {
68    device_t    dev;
69    device_t    child;
70    int         dir;
71    int         stream;
72};
73
74METHOD void stream_reset {
75    device_t    dev;
76    device_t    child;
77    int         dir;
78    int         stream;
79};
80
81METHOD uint32_t stream_getptr {
82    device_t    dev;
83    device_t    child;
84    int         dir;
85    int         stream;
86};
87
88METHOD void stream_intr {
89    device_t    dev;
90    int         dir;
91    int         stream;
92};
93
94METHOD int unsol_alloc {
95    device_t    dev;
96    device_t    child;
97    int         wanted;
98};
99
100METHOD void unsol_free {
101    device_t    dev;
102    device_t    child;
103    int         tag;
104};
105
106METHOD void unsol_intr {
107    device_t    dev;
108    uint32_t    resp;
109};
110
111METHOD void pindump {
112    device_t    dev;
113};
114
115