aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2016-07-04 19:43:02 -0400
committerDave Airlie <airlied@redhat.com>2016-07-04 19:57:23 -0400
commit5dd0775e502b26b44e5bcb5f504a977a565f2f3e (patch)
tree11d17e1e3e6f25ac84c9c9b165df21d6965d4b32 /include/sound
parentdac2c48ca5ac9bb2d6339aaa733c60d5b801ee86 (diff)
parentefc9194bcff84666832c6493bafa92029ac6634c (diff)
Merge tag 'asoc-hdmi-codec-pdata' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into drm-next
ASoC: Add private data for HDMI CODEC callbacks Allow the HDMI CODECs to get private data passed in in callbacks. [airlied: Add STI/mediatek patches from Arnd for drivers merged later in drm tree.] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Dave Airlie <airlied@redhat.com> * tag 'asoc-hdmi-codec-pdata' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound: ASoC: hdmi-codec: callback function will be called with private data
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/hdmi-codec.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/include/sound/hdmi-codec.h b/include/sound/hdmi-codec.h
index fc3a481ad91e..530c57bdefa0 100644
--- a/include/sound/hdmi-codec.h
+++ b/include/sound/hdmi-codec.h
@@ -53,18 +53,19 @@ struct hdmi_codec_params {
53 int channels; 53 int channels;
54}; 54};
55 55
56struct hdmi_codec_pdata;
56struct hdmi_codec_ops { 57struct hdmi_codec_ops {
57 /* 58 /*
58 * Called when ASoC starts an audio stream setup. 59 * Called when ASoC starts an audio stream setup.
59 * Optional 60 * Optional
60 */ 61 */
61 int (*audio_startup)(struct device *dev); 62 int (*audio_startup)(struct device *dev, void *data);
62 63
63 /* 64 /*
64 * Configures HDMI-encoder for audio stream. 65 * Configures HDMI-encoder for audio stream.
65 * Mandatory 66 * Mandatory
66 */ 67 */
67 int (*hw_params)(struct device *dev, 68 int (*hw_params)(struct device *dev, void *data,
68 struct hdmi_codec_daifmt *fmt, 69 struct hdmi_codec_daifmt *fmt,
69 struct hdmi_codec_params *hparms); 70 struct hdmi_codec_params *hparms);
70 71
@@ -72,19 +73,20 @@ struct hdmi_codec_ops {
72 * Shuts down the audio stream. 73 * Shuts down the audio stream.
73 * Mandatory 74 * Mandatory
74 */ 75 */
75 void (*audio_shutdown)(struct device *dev); 76 void (*audio_shutdown)(struct device *dev, void *data);
76 77
77 /* 78 /*
78 * Mute/unmute HDMI audio stream. 79 * Mute/unmute HDMI audio stream.
79 * Optional 80 * Optional
80 */ 81 */
81 int (*digital_mute)(struct device *dev, bool enable); 82 int (*digital_mute)(struct device *dev, void *data, bool enable);
82 83
83 /* 84 /*
84 * Provides EDID-Like-Data from connected HDMI device. 85 * Provides EDID-Like-Data from connected HDMI device.
85 * Optional 86 * Optional
86 */ 87 */
87 int (*get_eld)(struct device *dev, uint8_t *buf, size_t len); 88 int (*get_eld)(struct device *dev, void *data,
89 uint8_t *buf, size_t len);
88}; 90};
89 91
90/* HDMI codec initalization data */ 92/* HDMI codec initalization data */
@@ -93,6 +95,7 @@ struct hdmi_codec_pdata {
93 uint i2s:1; 95 uint i2s:1;
94 uint spdif:1; 96 uint spdif:1;
95 int max_i2s_channels; 97 int max_i2s_channels;
98 void *data;
96}; 99};
97 100
98#define HDMI_CODEC_DRV_NAME "hdmi-audio-codec" 101#define HDMI_CODEC_DRV_NAME "hdmi-audio-codec"