| 1 |
|
| 2 | |
| 3 | * Copyright 2026 Advanced Micro Devices, Inc.
|
| 4 | *
|
| 5 | * Permission is hereby granted, free of charge, to any person obtaining a
|
| 6 | * copy of this software and associated documentation files (the "Software"),
|
| 7 | * to deal in the Software without restriction, including without limitation
|
| 8 | * the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
| 9 | * and/or sell copies of the Software, and to permit persons to whom the
|
| 10 | * Software is furnished to do so, subject to the following conditions:
|
| 11 | *
|
| 12 | * The above copyright notice and this permission notice shall be included in
|
| 13 | * all copies or substantial portions of the Software.
|
| 14 | *
|
| 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
| 18 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
| 19 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
| 20 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
| 21 | * OTHER DEALINGS IN THE SOFTWARE.
|
| 22 | *
|
| 23 | * Authors: AMD
|
| 24 |
|
| 25 |
|
| 26 | #ifndef __AMDGPU_DM_AUDIO_H__
|
| 27 | #define __AMDGPU_DM_AUDIO_H__
|
| 28 |
|
| 29 | struct amdgpu_device;
|
| 30 | struct drm_device;
|
| 31 | struct drm_atomic_commit;
|
| 32 | struct drm_connector;
|
| 33 | struct audio_info;
|
| 34 | struct dc_sink;
|
| 35 |
|
| 36 | int amdgpu_dm_audio_init(struct amdgpu_device *adev);
|
| 37 | void amdgpu_dm_audio_fini(struct amdgpu_device *adev);
|
| 38 | void amdgpu_dm_commit_audio(struct drm_device *dev,
|
| 39 | struct drm_atomic_commit *state);
|
| 40 | void amdgpu_dm_fill_audio_info(struct audio_info *audio_info,
|
| 41 | const struct drm_connector *drm_connector,
|
| 42 | const struct dc_sink *dc_sink);
|
| 43 | void amdgpu_dm_audio_eld_notify(struct amdgpu_device *adev, int pin);
|
| 44 |
|
| 45 | #if IS_ENABLED(CONFIG_DRM_AMD_DC_KUNIT_TEST)
|
| 46 | struct device;
|
| 47 |
|
| 48 | int amdgpu_dm_audio_component_bind(struct device *kdev,
|
| 49 | struct device *hda_kdev, void *data);
|
| 50 | void amdgpu_dm_audio_component_unbind(struct device *kdev,
|
| 51 | struct device *hda_kdev, void *data);
|
| 52 | int amdgpu_dm_audio_get_param(void);
|
| 53 | void amdgpu_dm_audio_set_param(int val);
|
| 54 | void amdgpu_dm_audio_init_pins(struct amdgpu_device *adev, int audio_count,
|
| 55 | const unsigned int *inst_array);
|
| 56 | #endif
|
| 57 |
|
| 58 | #endif
|