FreeBSD kernel sound device code
hdac_if.m
Go to the documentation of this file.
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
29INTERFACE hdac;
30
31METHOD struct mtx * 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
METHOD void stream_stop
Definition: hdac_if.m:68
uint32_t resp
Definition: hdac_if.m:109
uint32_t verb
Definition: hdac_if.m:39
int format
Definition: hdac_if.m:46
int stream
Definition: hdac_if.m:55
device_t child
Definition: hdac_if.m:33
METHOD int stream_alloc
Definition: hdac_if.m:42
int blksz
Definition: hdac_if.m:64
METHOD uint32_t stream_getptr
Definition: hdac_if.m:82
int dir
Definition: hdac_if.m:45
METHOD void unsol_free
Definition: hdac_if.m:101
METHOD void stream_free
Definition: hdac_if.m:51
METHOD int stream_start
Definition: hdac_if.m:58
int tag
Definition: hdac_if.m:104
METHOD void stream_intr
Definition: hdac_if.m:89
bus_addr_t buf
Definition: hdac_if.m:63
int blkcnt
Definition: hdac_if.m:65
METHOD uint32_t codec_command
Definition: hdac_if.m:36
int stripe
Definition: hdac_if.m:47
METHOD void stream_reset
Definition: hdac_if.m:75
METHOD int unsol_alloc
Definition: hdac_if.m:95
int wanted
Definition: hdac_if.m:98
METHOD void pindump
Definition: hdac_if.m:112
uint32_t ** dmapos
Definition: hdac_if.m:48
METHOD void unsol_intr
Definition: hdac_if.m:107
INTERFACE hdac
Definition: hdac_if.m:29
METHOD struct mtx * get_mtx
Definition: hdac_if.m:31
unsigned dev
Definition: mixer_if.m:59