1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
9 #include <linux/platform_device.h>
12 #include "dp_catalog.h"
13 #include <sound/hdmi-codec.h>
17 * @lane_count: number of lanes configured in current session
18 * @bw_code: link rate's bandwidth code for current session
28 * Creates and instance of dp audio.
30 * @pdev: caller's platform device instance.
31 * @panel: an instance of dp_panel module.
32 * @catalog: an instance of dp_catalog module.
34 * Returns the error code in case of failure, otherwize
35 * an instance of newly created dp_module.
37 struct dp_audio *dp_audio_get(struct platform_device *pdev,
38 struct dp_panel *panel,
39 struct dp_catalog *catalog);
42 * dp_register_audio_driver()
44 * Registers DP device with hdmi_codec interface.
46 * @dev: DP device instance.
47 * @dp_audio: an instance of dp_audio module.
50 * Returns the error code in case of failure, otherwise
53 int dp_register_audio_driver(struct device *dev,
54 struct dp_audio *dp_audio);
59 * Cleans the dp_audio instance.
61 * @dp_audio: an instance of dp_audio.
63 void dp_audio_put(struct dp_audio *dp_audio);
65 int dp_audio_hw_params(struct device *dev,
67 struct hdmi_codec_daifmt *daifmt,
68 struct hdmi_codec_params *params);
70 #endif /* _DP_AUDIO_H_ */