]> Git Repo - J-linux.git/blob - drivers/gpu/drm/msm/dp/dp_audio.h
Merge tag 'vfs-6.13-rc7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
[J-linux.git] / drivers / gpu / drm / msm / dp / dp_audio.h
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
4  */
5
6 #ifndef _DP_AUDIO_H_
7 #define _DP_AUDIO_H_
8
9 #include <linux/platform_device.h>
10
11 #include "dp_panel.h"
12 #include "dp_catalog.h"
13 #include <sound/hdmi-codec.h>
14
15 /**
16  * struct msm_dp_audio
17  * @lane_count: number of lanes configured in current session
18  * @bw_code: link rate's bandwidth code for current session
19  */
20 struct msm_dp_audio {
21         u32 lane_count;
22         u32 bw_code;
23 };
24
25 /**
26  * msm_dp_audio_get()
27  *
28  * Creates and instance of dp audio.
29  *
30  * @pdev: caller's platform device instance.
31  * @panel: an instance of msm_dp_panel module.
32  * @catalog: an instance of msm_dp_catalog module.
33  *
34  * Returns the error code in case of failure, otherwize
35  * an instance of newly created msm_dp_module.
36  */
37 struct msm_dp_audio *msm_dp_audio_get(struct platform_device *pdev,
38                         struct msm_dp_panel *panel,
39                         struct msm_dp_catalog *catalog);
40
41 /**
42  * msm_dp_register_audio_driver()
43  *
44  * Registers DP device with hdmi_codec interface.
45  *
46  * @dev: DP device instance.
47  * @msm_dp_audio: an instance of msm_dp_audio module.
48  *
49  *
50  * Returns the error code in case of failure, otherwise
51  * zero on success.
52  */
53 int msm_dp_register_audio_driver(struct device *dev,
54                 struct msm_dp_audio *msm_dp_audio);
55
56 void msm_dp_unregister_audio_driver(struct device *dev, struct msm_dp_audio *msm_dp_audio);
57
58 /**
59  * msm_dp_audio_put()
60  *
61  * Cleans the msm_dp_audio instance.
62  *
63  * @msm_dp_audio: an instance of msm_dp_audio.
64  */
65 void msm_dp_audio_put(struct msm_dp_audio *msm_dp_audio);
66
67 int msm_dp_audio_hw_params(struct device *dev,
68         void *data,
69         struct hdmi_codec_daifmt *daifmt,
70         struct hdmi_codec_params *params);
71
72 #endif /* _DP_AUDIO_H_ */
73
74
This page took 0.030677 seconds and 4 git commands to generate.