aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJyri Sarha <jsarha@ti.com>2014-06-25 13:20:57 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2014-12-01 04:09:59 -0500
commit84a845de578a6d46e13307edc2fb27b423213eff (patch)
tree23903be1a02870b5052d0bfba5e5c8f50e4aeb76
parentab387c1e51d7920a6a5860c010372b73ec173a5c (diff)
OMAPDSS: Remove all references to obsolete HDMI audio callbacks
In new model these callbacks are obsolete since the ASoC component drivers are integrated into the HDMI drivers and no callbacks are needed anymore. Signed-off-by: Jyri Sarha <jsarha@ti.com> Reviewed-by: Mark Brown <broonie@kernel.org> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r--drivers/video/fbdev/omap2/displays-new/connector-hdmi.c99
-rw-r--r--drivers/video/fbdev/omap2/displays-new/encoder-tpd12s015.c56
-rw-r--r--include/video/omapdss.h40
3 files changed, 0 insertions, 195 deletions
diff --git a/drivers/video/fbdev/omap2/displays-new/connector-hdmi.c b/drivers/video/fbdev/omap2/displays-new/connector-hdmi.c
index 7b25967a91eb..219f14f59672 100644
--- a/drivers/video/fbdev/omap2/displays-new/connector-hdmi.c
+++ b/drivers/video/fbdev/omap2/displays-new/connector-hdmi.c
@@ -170,98 +170,6 @@ static bool hdmic_detect(struct omap_dss_device *dssdev)
170 return in->ops.hdmi->detect(in); 170 return in->ops.hdmi->detect(in);
171} 171}
172 172
173static int hdmic_audio_enable(struct omap_dss_device *dssdev)
174{
175 struct panel_drv_data *ddata = to_panel_data(dssdev);
176 struct omap_dss_device *in = ddata->in;
177 int r;
178
179 /* enable audio only if the display is active */
180 if (!omapdss_device_is_enabled(dssdev))
181 return -EPERM;
182
183 r = in->ops.hdmi->audio_enable(in);
184 if (r)
185 return r;
186
187 dssdev->audio_state = OMAP_DSS_AUDIO_ENABLED;
188
189 return 0;
190}
191
192static void hdmic_audio_disable(struct omap_dss_device *dssdev)
193{
194 struct panel_drv_data *ddata = to_panel_data(dssdev);
195 struct omap_dss_device *in = ddata->in;
196
197 in->ops.hdmi->audio_disable(in);
198
199 dssdev->audio_state = OMAP_DSS_AUDIO_DISABLED;
200}
201
202static int hdmic_audio_start(struct omap_dss_device *dssdev)
203{
204 struct panel_drv_data *ddata = to_panel_data(dssdev);
205 struct omap_dss_device *in = ddata->in;
206 int r;
207
208 /*
209 * No need to check the panel state. It was checked when trasitioning
210 * to AUDIO_ENABLED.
211 */
212 if (dssdev->audio_state != OMAP_DSS_AUDIO_ENABLED)
213 return -EPERM;
214
215 r = in->ops.hdmi->audio_start(in);
216 if (r)
217 return r;
218
219 dssdev->audio_state = OMAP_DSS_AUDIO_PLAYING;
220
221 return 0;
222}
223
224static void hdmic_audio_stop(struct omap_dss_device *dssdev)
225{
226 struct panel_drv_data *ddata = to_panel_data(dssdev);
227 struct omap_dss_device *in = ddata->in;
228
229 in->ops.hdmi->audio_stop(in);
230
231 dssdev->audio_state = OMAP_DSS_AUDIO_ENABLED;
232}
233
234static bool hdmic_audio_supported(struct omap_dss_device *dssdev)
235{
236 struct panel_drv_data *ddata = to_panel_data(dssdev);
237 struct omap_dss_device *in = ddata->in;
238
239 if (!omapdss_device_is_enabled(dssdev))
240 return false;
241
242 return in->ops.hdmi->audio_supported(in);
243}
244
245static int hdmic_audio_config(struct omap_dss_device *dssdev,
246 struct omap_dss_audio *audio)
247{
248 struct panel_drv_data *ddata = to_panel_data(dssdev);
249 struct omap_dss_device *in = ddata->in;
250 int r;
251
252 /* config audio only if the display is active */
253 if (!omapdss_device_is_enabled(dssdev))
254 return -EPERM;
255
256 r = in->ops.hdmi->audio_config(in, audio);
257 if (r)
258 return r;
259
260 dssdev->audio_state = OMAP_DSS_AUDIO_CONFIGURED;
261
262 return 0;
263}
264
265static int hdmic_set_hdmi_mode(struct omap_dss_device *dssdev, bool hdmi_mode) 173static int hdmic_set_hdmi_mode(struct omap_dss_device *dssdev, bool hdmi_mode)
266{ 174{
267 struct panel_drv_data *ddata = to_panel_data(dssdev); 175 struct panel_drv_data *ddata = to_panel_data(dssdev);
@@ -296,13 +204,6 @@ static struct omap_dss_driver hdmic_driver = {
296 .detect = hdmic_detect, 204 .detect = hdmic_detect,
297 .set_hdmi_mode = hdmic_set_hdmi_mode, 205 .set_hdmi_mode = hdmic_set_hdmi_mode,
298 .set_hdmi_infoframe = hdmic_set_infoframe, 206 .set_hdmi_infoframe = hdmic_set_infoframe,
299
300 .audio_enable = hdmic_audio_enable,
301 .audio_disable = hdmic_audio_disable,
302 .audio_start = hdmic_audio_start,
303 .audio_stop = hdmic_audio_stop,
304 .audio_supported = hdmic_audio_supported,
305 .audio_config = hdmic_audio_config,
306}; 207};
307 208
308static int hdmic_probe_pdata(struct platform_device *pdev) 209static int hdmic_probe_pdata(struct platform_device *pdev)
diff --git a/drivers/video/fbdev/omap2/displays-new/encoder-tpd12s015.c b/drivers/video/fbdev/omap2/displays-new/encoder-tpd12s015.c
index 1891967b650c..c7a3ce2c5120 100644
--- a/drivers/video/fbdev/omap2/displays-new/encoder-tpd12s015.c
+++ b/drivers/video/fbdev/omap2/displays-new/encoder-tpd12s015.c
@@ -193,55 +193,6 @@ static bool tpd_detect(struct omap_dss_device *dssdev)
193 return gpio_get_value_cansleep(ddata->hpd_gpio); 193 return gpio_get_value_cansleep(ddata->hpd_gpio);
194} 194}
195 195
196static int tpd_audio_enable(struct omap_dss_device *dssdev)
197{
198 struct panel_drv_data *ddata = to_panel_data(dssdev);
199 struct omap_dss_device *in = ddata->in;
200
201 return in->ops.hdmi->audio_enable(in);
202}
203
204static void tpd_audio_disable(struct omap_dss_device *dssdev)
205{
206 struct panel_drv_data *ddata = to_panel_data(dssdev);
207 struct omap_dss_device *in = ddata->in;
208
209 in->ops.hdmi->audio_disable(in);
210}
211
212static int tpd_audio_start(struct omap_dss_device *dssdev)
213{
214 struct panel_drv_data *ddata = to_panel_data(dssdev);
215 struct omap_dss_device *in = ddata->in;
216
217 return in->ops.hdmi->audio_start(in);
218}
219
220static void tpd_audio_stop(struct omap_dss_device *dssdev)
221{
222 struct panel_drv_data *ddata = to_panel_data(dssdev);
223 struct omap_dss_device *in = ddata->in;
224
225 in->ops.hdmi->audio_stop(in);
226}
227
228static bool tpd_audio_supported(struct omap_dss_device *dssdev)
229{
230 struct panel_drv_data *ddata = to_panel_data(dssdev);
231 struct omap_dss_device *in = ddata->in;
232
233 return in->ops.hdmi->audio_supported(in);
234}
235
236static int tpd_audio_config(struct omap_dss_device *dssdev,
237 struct omap_dss_audio *audio)
238{
239 struct panel_drv_data *ddata = to_panel_data(dssdev);
240 struct omap_dss_device *in = ddata->in;
241
242 return in->ops.hdmi->audio_config(in, audio);
243}
244
245static int tpd_set_infoframe(struct omap_dss_device *dssdev, 196static int tpd_set_infoframe(struct omap_dss_device *dssdev,
246 const struct hdmi_avi_infoframe *avi) 197 const struct hdmi_avi_infoframe *avi)
247{ 198{
@@ -275,13 +226,6 @@ static const struct omapdss_hdmi_ops tpd_hdmi_ops = {
275 .detect = tpd_detect, 226 .detect = tpd_detect,
276 .set_infoframe = tpd_set_infoframe, 227 .set_infoframe = tpd_set_infoframe,
277 .set_hdmi_mode = tpd_set_hdmi_mode, 228 .set_hdmi_mode = tpd_set_hdmi_mode,
278
279 .audio_enable = tpd_audio_enable,
280 .audio_disable = tpd_audio_disable,
281 .audio_start = tpd_audio_start,
282 .audio_stop = tpd_audio_stop,
283 .audio_supported = tpd_audio_supported,
284 .audio_config = tpd_audio_config,
285}; 229};
286 230
287static int tpd_probe_pdata(struct platform_device *pdev) 231static int tpd_probe_pdata(struct platform_device *pdev)
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index 1db32023396e..6a84498ea513 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -166,13 +166,6 @@ enum omap_dss_display_state {
166 OMAP_DSS_DISPLAY_ACTIVE, 166 OMAP_DSS_DISPLAY_ACTIVE,
167}; 167};
168 168
169enum omap_dss_audio_state {
170 OMAP_DSS_AUDIO_DISABLED = 0,
171 OMAP_DSS_AUDIO_ENABLED,
172 OMAP_DSS_AUDIO_CONFIGURED,
173 OMAP_DSS_AUDIO_PLAYING,
174};
175
176struct omap_dss_audio { 169struct omap_dss_audio {
177 struct snd_aes_iec958 *iec; 170 struct snd_aes_iec958 *iec;
178 struct snd_cea_861_aud_if *cea; 171 struct snd_cea_861_aud_if *cea;
@@ -635,19 +628,6 @@ struct omapdss_hdmi_ops {
635 int (*set_hdmi_mode)(struct omap_dss_device *dssdev, bool hdmi_mode); 628 int (*set_hdmi_mode)(struct omap_dss_device *dssdev, bool hdmi_mode);
636 int (*set_infoframe)(struct omap_dss_device *dssdev, 629 int (*set_infoframe)(struct omap_dss_device *dssdev,
637 const struct hdmi_avi_infoframe *avi); 630 const struct hdmi_avi_infoframe *avi);
638
639 /*
640 * Note: These functions might sleep. Do not call while
641 * holding a spinlock/readlock.
642 */
643 int (*audio_enable)(struct omap_dss_device *dssdev);
644 void (*audio_disable)(struct omap_dss_device *dssdev);
645 bool (*audio_supported)(struct omap_dss_device *dssdev);
646 int (*audio_config)(struct omap_dss_device *dssdev,
647 struct omap_dss_audio *audio);
648 /* Note: These functions may not sleep */
649 int (*audio_start)(struct omap_dss_device *dssdev);
650 void (*audio_stop)(struct omap_dss_device *dssdev);
651}; 631};
652 632
653struct omapdss_dsi_ops { 633struct omapdss_dsi_ops {
@@ -783,8 +763,6 @@ struct omap_dss_device {
783 763
784 enum omap_dss_display_state state; 764 enum omap_dss_display_state state;
785 765
786 enum omap_dss_audio_state audio_state;
787
788 /* OMAP DSS output specific fields */ 766 /* OMAP DSS output specific fields */
789 767
790 struct list_head list; 768 struct list_head list;
@@ -861,24 +839,6 @@ struct omap_dss_driver {
861 int (*set_hdmi_mode)(struct omap_dss_device *dssdev, bool hdmi_mode); 839 int (*set_hdmi_mode)(struct omap_dss_device *dssdev, bool hdmi_mode);
862 int (*set_hdmi_infoframe)(struct omap_dss_device *dssdev, 840 int (*set_hdmi_infoframe)(struct omap_dss_device *dssdev,
863 const struct hdmi_avi_infoframe *avi); 841 const struct hdmi_avi_infoframe *avi);
864
865 /*
866 * For display drivers that support audio. This encompasses
867 * HDMI and DisplayPort at the moment.
868 */
869 /*
870 * Note: These functions might sleep. Do not call while
871 * holding a spinlock/readlock.
872 */
873 int (*audio_enable)(struct omap_dss_device *dssdev);
874 void (*audio_disable)(struct omap_dss_device *dssdev);
875 bool (*audio_supported)(struct omap_dss_device *dssdev);
876 int (*audio_config)(struct omap_dss_device *dssdev,
877 struct omap_dss_audio *audio);
878 /* Note: These functions may not sleep */
879 int (*audio_start)(struct omap_dss_device *dssdev);
880 void (*audio_stop)(struct omap_dss_device *dssdev);
881
882}; 842};
883 843
884enum omapdss_version omapdss_get_version(void); 844enum omapdss_version omapdss_get_version(void);