1fb4d8502Sjsg /* 2fb4d8502Sjsg * Copyright 2012-15 Advanced Micro Devices, Inc. 3fb4d8502Sjsg * 4fb4d8502Sjsg * Permission is hereby granted, free of charge, to any person obtaining a 5fb4d8502Sjsg * copy of this software and associated documentation files (the "Software"), 6fb4d8502Sjsg * to deal in the Software without restriction, including without limitation 7fb4d8502Sjsg * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8fb4d8502Sjsg * and/or sell copies of the Software, and to permit persons to whom the 9fb4d8502Sjsg * Software is furnished to do so, subject to the following conditions: 10fb4d8502Sjsg * 11fb4d8502Sjsg * The above copyright notice and this permission notice shall be included in 12fb4d8502Sjsg * all copies or substantial portions of the Software. 13fb4d8502Sjsg * 14fb4d8502Sjsg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15fb4d8502Sjsg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16fb4d8502Sjsg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17fb4d8502Sjsg * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 18fb4d8502Sjsg * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19fb4d8502Sjsg * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20fb4d8502Sjsg * OTHER DEALINGS IN THE SOFTWARE. 21fb4d8502Sjsg * 22fb4d8502Sjsg * Authors: AMD 23fb4d8502Sjsg * 24fb4d8502Sjsg */ 25fb4d8502Sjsg 26fb4d8502Sjsg #ifndef __DAL_AUDIO_H__ 27fb4d8502Sjsg #define __DAL_AUDIO_H__ 28fb4d8502Sjsg 29fb4d8502Sjsg #include "audio_types.h" 30fb4d8502Sjsg 31fb4d8502Sjsg struct audio; 32fb4d8502Sjsg 33fb4d8502Sjsg struct audio_funcs { 34fb4d8502Sjsg 35fb4d8502Sjsg bool (*endpoint_valid)(struct audio *audio); 36fb4d8502Sjsg 37fb4d8502Sjsg void (*hw_init)(struct audio *audio); 38fb4d8502Sjsg 39fb4d8502Sjsg void (*az_enable)(struct audio *audio); 40fb4d8502Sjsg 41fb4d8502Sjsg void (*az_disable)(struct audio *audio); 42fb4d8502Sjsg 43fb4d8502Sjsg void (*az_configure)(struct audio *audio, 44fb4d8502Sjsg enum amd_signal_type signal, 45fb4d8502Sjsg const struct audio_crtc_info *crtc_info, 46fb4d8502Sjsg const struct audio_info *audio_info); 47fb4d8502Sjsg 48fb4d8502Sjsg void (*wall_dto_setup)(struct audio *audio, 49fb4d8502Sjsg enum amd_signal_type signal, 50fb4d8502Sjsg const struct audio_crtc_info *crtc_info, 51fb4d8502Sjsg const struct audio_pll_info *pll_info); 52fb4d8502Sjsg 53fb4d8502Sjsg void (*destroy)(struct audio **audio); 54fb4d8502Sjsg }; 55fb4d8502Sjsg 56fb4d8502Sjsg struct audio { 57fb4d8502Sjsg const struct audio_funcs *funcs; 58fb4d8502Sjsg struct dc_context *ctx; 59fb4d8502Sjsg unsigned int inst; 60*c349dbc7Sjsg bool enabled; 61fb4d8502Sjsg }; 62fb4d8502Sjsg 63fb4d8502Sjsg #endif /* __DAL_AUDIO__ */ 64