17c6b05d2SAlexander Motin# Copyright (c) 2012 Alexander Motin <mav@FreeBSD.org> 27c6b05d2SAlexander Motin# All rights reserved. 37c6b05d2SAlexander Motin# 47c6b05d2SAlexander Motin# Redistribution and use in source and binary forms, with or without 57c6b05d2SAlexander Motin# modification, are permitted provided that the following conditions 67c6b05d2SAlexander Motin# are met: 77c6b05d2SAlexander Motin# 1. Redistributions of source code must retain the above copyright 87c6b05d2SAlexander Motin# notice, this list of conditions and the following disclaimer, 97c6b05d2SAlexander Motin# without modification, immediately at the beginning of the file. 107c6b05d2SAlexander Motin# 2. Redistributions in binary form must reproduce the above copyright 117c6b05d2SAlexander Motin# notice, this list of conditions and the following disclaimer in the 127c6b05d2SAlexander Motin# documentation and/or other materials provided with the distribution. 137c6b05d2SAlexander Motin# 147c6b05d2SAlexander Motin# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 157c6b05d2SAlexander Motin# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 167c6b05d2SAlexander Motin# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 177c6b05d2SAlexander Motin# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 187c6b05d2SAlexander Motin# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 197c6b05d2SAlexander Motin# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 207c6b05d2SAlexander Motin# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 217c6b05d2SAlexander Motin# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 227c6b05d2SAlexander Motin# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 237c6b05d2SAlexander Motin# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 247c6b05d2SAlexander Motin# 257c6b05d2SAlexander Motin 267c6b05d2SAlexander Motin#include <sys/rman.h> 277c6b05d2SAlexander Motin 287c6b05d2SAlexander MotinINTERFACE hdac; 297c6b05d2SAlexander Motin 307c6b05d2SAlexander MotinMETHOD struct mtx * get_mtx { 317c6b05d2SAlexander Motin device_t dev; 327c6b05d2SAlexander Motin device_t child; 337c6b05d2SAlexander Motin}; 347c6b05d2SAlexander Motin 357c6b05d2SAlexander MotinMETHOD uint32_t codec_command { 367c6b05d2SAlexander Motin device_t dev; 377c6b05d2SAlexander Motin device_t child; 387c6b05d2SAlexander Motin uint32_t verb; 397c6b05d2SAlexander Motin}; 407c6b05d2SAlexander Motin 417c6b05d2SAlexander MotinMETHOD int stream_alloc { 427c6b05d2SAlexander Motin device_t dev; 437c6b05d2SAlexander Motin device_t child; 447c6b05d2SAlexander Motin int dir; 457c6b05d2SAlexander Motin int format; 46*6fa8e691SAlexander Motin int stripe; 477c6b05d2SAlexander Motin uint32_t **dmapos; 487c6b05d2SAlexander Motin}; 497c6b05d2SAlexander Motin 507c6b05d2SAlexander MotinMETHOD void stream_free { 517c6b05d2SAlexander Motin device_t dev; 527c6b05d2SAlexander Motin device_t child; 537c6b05d2SAlexander Motin int dir; 547c6b05d2SAlexander Motin int stream; 557c6b05d2SAlexander Motin}; 567c6b05d2SAlexander Motin 577c6b05d2SAlexander MotinMETHOD int stream_start { 587c6b05d2SAlexander Motin device_t dev; 597c6b05d2SAlexander Motin device_t child; 607c6b05d2SAlexander Motin int dir; 617c6b05d2SAlexander Motin int stream; 627c6b05d2SAlexander Motin bus_addr_t buf; 637c6b05d2SAlexander Motin int blksz; 647c6b05d2SAlexander Motin int blkcnt; 657c6b05d2SAlexander Motin}; 667c6b05d2SAlexander Motin 677c6b05d2SAlexander MotinMETHOD void stream_stop { 687c6b05d2SAlexander Motin device_t dev; 697c6b05d2SAlexander Motin device_t child; 707c6b05d2SAlexander Motin int dir; 717c6b05d2SAlexander Motin int stream; 727c6b05d2SAlexander Motin}; 737c6b05d2SAlexander Motin 747c6b05d2SAlexander MotinMETHOD void stream_reset { 757c6b05d2SAlexander Motin device_t dev; 767c6b05d2SAlexander Motin device_t child; 777c6b05d2SAlexander Motin int dir; 787c6b05d2SAlexander Motin int stream; 797c6b05d2SAlexander Motin}; 807c6b05d2SAlexander Motin 817c6b05d2SAlexander MotinMETHOD uint32_t stream_getptr { 827c6b05d2SAlexander Motin device_t dev; 837c6b05d2SAlexander Motin device_t child; 847c6b05d2SAlexander Motin int dir; 857c6b05d2SAlexander Motin int stream; 867c6b05d2SAlexander Motin}; 877c6b05d2SAlexander Motin 887c6b05d2SAlexander MotinMETHOD void stream_intr { 897c6b05d2SAlexander Motin device_t dev; 907c6b05d2SAlexander Motin int dir; 917c6b05d2SAlexander Motin int stream; 927c6b05d2SAlexander Motin}; 937c6b05d2SAlexander Motin 947c6b05d2SAlexander MotinMETHOD int unsol_alloc { 957c6b05d2SAlexander Motin device_t dev; 967c6b05d2SAlexander Motin device_t child; 977c6b05d2SAlexander Motin int wanted; 987c6b05d2SAlexander Motin}; 997c6b05d2SAlexander Motin 1007c6b05d2SAlexander MotinMETHOD void unsol_free { 1017c6b05d2SAlexander Motin device_t dev; 1027c6b05d2SAlexander Motin device_t child; 1037c6b05d2SAlexander Motin int tag; 1047c6b05d2SAlexander Motin}; 1057c6b05d2SAlexander Motin 1067c6b05d2SAlexander MotinMETHOD void unsol_intr { 1077c6b05d2SAlexander Motin device_t dev; 1087c6b05d2SAlexander Motin uint32_t resp; 1097c6b05d2SAlexander Motin}; 1107c6b05d2SAlexander Motin 1117c6b05d2SAlexander MotinMETHOD void pindump { 1127c6b05d2SAlexander Motin device_t dev; 1137c6b05d2SAlexander Motin}; 1147c6b05d2SAlexander Motin 115