![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0-only */ 0002 /* 0003 * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. 0004 */ 0005 0006 #ifndef _DP_AUDIO_H_ 0007 #define _DP_AUDIO_H_ 0008 0009 #include <linux/platform_device.h> 0010 0011 #include "dp_panel.h" 0012 #include "dp_catalog.h" 0013 #include <sound/hdmi-codec.h> 0014 0015 /** 0016 * struct dp_audio 0017 * @lane_count: number of lanes configured in current session 0018 * @bw_code: link rate's bandwidth code for current session 0019 */ 0020 struct dp_audio { 0021 u32 lane_count; 0022 u32 bw_code; 0023 }; 0024 0025 /** 0026 * dp_audio_get() 0027 * 0028 * Creates and instance of dp audio. 0029 * 0030 * @pdev: caller's platform device instance. 0031 * @panel: an instance of dp_panel module. 0032 * @catalog: an instance of dp_catalog module. 0033 * 0034 * Returns the error code in case of failure, otherwize 0035 * an instance of newly created dp_module. 0036 */ 0037 struct dp_audio *dp_audio_get(struct platform_device *pdev, 0038 struct dp_panel *panel, 0039 struct dp_catalog *catalog); 0040 0041 /** 0042 * dp_register_audio_driver() 0043 * 0044 * Registers DP device with hdmi_codec interface. 0045 * 0046 * @dev: DP device instance. 0047 * @dp_audio: an instance of dp_audio module. 0048 * 0049 * 0050 * Returns the error code in case of failure, otherwise 0051 * zero on success. 0052 */ 0053 int dp_register_audio_driver(struct device *dev, 0054 struct dp_audio *dp_audio); 0055 0056 /** 0057 * dp_audio_put() 0058 * 0059 * Cleans the dp_audio instance. 0060 * 0061 * @dp_audio: an instance of dp_audio. 0062 */ 0063 void dp_audio_put(struct dp_audio *dp_audio); 0064 0065 int dp_audio_hw_params(struct device *dev, 0066 void *data, 0067 struct hdmi_codec_daifmt *daifmt, 0068 struct hdmi_codec_params *params); 0069 0070 #endif /* _DP_AUDIO_H_ */ 0071 0072
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |