xref: /dragonfly/sys/dev/sound/pci/hda/hdac_if.m (revision e5a92d33)
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: head/sys/dev/sound/pci/hda/hdac_if.m 230326 2012-01-19 01:55:48Z mav $
26
27#include <sys/rman.h>
28
29INTERFACE hdac;
30
31METHOD struct lock * get_mtx {
32    device_t    dev;
33    device_t    child;
34};
35
36METHOD uint32_t codec_command {
37    device_t    dev;
38    device_t    child;
39    uint32_t    verb;
40};
41
42METHOD 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
51METHOD void stream_free {
52    device_t    dev;
53    device_t    child;
54    int         dir;
55    int         stream;
56};
57
58METHOD 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
68METHOD void stream_stop {
69    device_t    dev;
70    device_t    child;
71    int         dir;
72    int         stream;
73};
74
75METHOD void stream_reset {
76    device_t    dev;
77    device_t    child;
78    int         dir;
79    int         stream;
80};
81
82METHOD uint32_t stream_getptr {
83    device_t    dev;
84    device_t    child;
85    int         dir;
86    int         stream;
87};
88
89METHOD void stream_intr {
90    device_t    dev;
91    int         dir;
92    int         stream;
93};
94
95METHOD int unsol_alloc {
96    device_t    dev;
97    device_t    child;
98    int         wanted;
99};
100
101METHOD void unsol_free {
102    device_t    dev;
103    device_t    child;
104    int         tag;
105};
106
107METHOD void unsol_intr {
108    device_t    dev;
109    uint32_t    resp;
110};
111
112METHOD void pindump {
113    device_t    dev;
114};
115
116