diff options
author | Dave Airlie <airlied@redhat.com> | 2016-07-04 19:43:02 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2016-07-04 19:57:23 -0400 |
commit | 5dd0775e502b26b44e5bcb5f504a977a565f2f3e (patch) | |
tree | 11d17e1e3e6f25ac84c9c9b165df21d6965d4b32 /sound | |
parent | dac2c48ca5ac9bb2d6339aaa733c60d5b801ee86 (diff) | |
parent | efc9194bcff84666832c6493bafa92029ac6634c (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 'sound')
-rw-r--r-- | sound/soc/codecs/hdmi-codec.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c index 8e36e883e453..f27d115626db 100644 --- a/sound/soc/codecs/hdmi-codec.c +++ b/sound/soc/codecs/hdmi-codec.c | |||
@@ -112,7 +112,7 @@ static int hdmi_codec_startup(struct snd_pcm_substream *substream, | |||
112 | return ret; | 112 | return ret; |
113 | 113 | ||
114 | if (hcp->hcd.ops->audio_startup) { | 114 | if (hcp->hcd.ops->audio_startup) { |
115 | ret = hcp->hcd.ops->audio_startup(dai->dev->parent); | 115 | ret = hcp->hcd.ops->audio_startup(dai->dev->parent, hcp->hcd.data); |
116 | if (ret) { | 116 | if (ret) { |
117 | mutex_lock(&hcp->current_stream_lock); | 117 | mutex_lock(&hcp->current_stream_lock); |
118 | hcp->current_stream = NULL; | 118 | hcp->current_stream = NULL; |
@@ -122,8 +122,8 @@ static int hdmi_codec_startup(struct snd_pcm_substream *substream, | |||
122 | } | 122 | } |
123 | 123 | ||
124 | if (hcp->hcd.ops->get_eld) { | 124 | if (hcp->hcd.ops->get_eld) { |
125 | ret = hcp->hcd.ops->get_eld(dai->dev->parent, hcp->eld, | 125 | ret = hcp->hcd.ops->get_eld(dai->dev->parent, hcp->hcd.data, |
126 | sizeof(hcp->eld)); | 126 | hcp->eld, sizeof(hcp->eld)); |
127 | 127 | ||
128 | if (!ret) { | 128 | if (!ret) { |
129 | ret = snd_pcm_hw_constraint_eld(substream->runtime, | 129 | ret = snd_pcm_hw_constraint_eld(substream->runtime, |
@@ -144,7 +144,7 @@ static void hdmi_codec_shutdown(struct snd_pcm_substream *substream, | |||
144 | 144 | ||
145 | WARN_ON(hcp->current_stream != substream); | 145 | WARN_ON(hcp->current_stream != substream); |
146 | 146 | ||
147 | hcp->hcd.ops->audio_shutdown(dai->dev->parent); | 147 | hcp->hcd.ops->audio_shutdown(dai->dev->parent, hcp->hcd.data); |
148 | 148 | ||
149 | mutex_lock(&hcp->current_stream_lock); | 149 | mutex_lock(&hcp->current_stream_lock); |
150 | hcp->current_stream = NULL; | 150 | hcp->current_stream = NULL; |
@@ -195,8 +195,8 @@ static int hdmi_codec_hw_params(struct snd_pcm_substream *substream, | |||
195 | hp.sample_rate = params_rate(params); | 195 | hp.sample_rate = params_rate(params); |
196 | hp.channels = params_channels(params); | 196 | hp.channels = params_channels(params); |
197 | 197 | ||
198 | return hcp->hcd.ops->hw_params(dai->dev->parent, &hcp->daifmt[dai->id], | 198 | return hcp->hcd.ops->hw_params(dai->dev->parent, hcp->hcd.data, |
199 | &hp); | 199 | &hcp->daifmt[dai->id], &hp); |
200 | } | 200 | } |
201 | 201 | ||
202 | static int hdmi_codec_set_fmt(struct snd_soc_dai *dai, | 202 | static int hdmi_codec_set_fmt(struct snd_soc_dai *dai, |
@@ -280,7 +280,8 @@ static int hdmi_codec_digital_mute(struct snd_soc_dai *dai, int mute) | |||
280 | dev_dbg(dai->dev, "%s()\n", __func__); | 280 | dev_dbg(dai->dev, "%s()\n", __func__); |
281 | 281 | ||
282 | if (hcp->hcd.ops->digital_mute) | 282 | if (hcp->hcd.ops->digital_mute) |
283 | return hcp->hcd.ops->digital_mute(dai->dev->parent, mute); | 283 | return hcp->hcd.ops->digital_mute(dai->dev->parent, |
284 | hcp->hcd.data, mute); | ||
284 | 285 | ||
285 | return 0; | 286 | return 0; |
286 | } | 287 | } |