aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/video/fbdev/omap2/dss/hdmi5.c113
1 files changed, 0 insertions, 113 deletions
diff --git a/drivers/video/fbdev/omap2/dss/hdmi5.c b/drivers/video/fbdev/omap2/dss/hdmi5.c
index 6e5894fb96ce..b482de33d440 100644
--- a/drivers/video/fbdev/omap2/dss/hdmi5.c
+++ b/drivers/video/fbdev/omap2/dss/hdmi5.c
@@ -485,112 +485,6 @@ static int hdmi_read_edid(struct omap_dss_device *dssdev,
485 return r; 485 return r;
486} 486}
487 487
488#if defined(CONFIG_OMAP5_DSS_HDMI_AUDIO)
489static int hdmi_audio_enable(struct omap_dss_device *dssdev)
490{
491 int r;
492
493 mutex_lock(&hdmi.lock);
494
495 if (!hdmi_mode_has_audio(hdmi.cfg.hdmi_dvi_mode)) {
496 r = -EPERM;
497 goto err;
498 }
499
500 r = hdmi_wp_audio_enable(&hdmi.wp, true);
501 if (r)
502 goto err;
503
504 mutex_unlock(&hdmi.lock);
505 return 0;
506
507err:
508 mutex_unlock(&hdmi.lock);
509 return r;
510}
511
512static void hdmi_audio_disable(struct omap_dss_device *dssdev)
513{
514 hdmi_wp_audio_enable(&hdmi.wp, false);
515}
516
517static int hdmi_audio_start(struct omap_dss_device *dssdev)
518{
519 return hdmi_wp_audio_core_req_enable(&hdmi.wp, true);
520}
521
522static void hdmi_audio_stop(struct omap_dss_device *dssdev)
523{
524 hdmi_wp_audio_core_req_enable(&hdmi.wp, false);
525}
526
527static bool hdmi_audio_supported(struct omap_dss_device *dssdev)
528{
529 bool r;
530
531 mutex_lock(&hdmi.lock);
532
533 r = hdmi_mode_has_audio(hdmi.cfg.hdmi_dvi_mode);
534
535 mutex_unlock(&hdmi.lock);
536 return r;
537}
538
539static int hdmi_audio_config(struct omap_dss_device *dssdev,
540 struct omap_dss_audio *audio)
541{
542 int r;
543 u32 pclk = hdmi.cfg.timings.pixelclock;
544
545 mutex_lock(&hdmi.lock);
546
547 if (!hdmi_mode_has_audio(hdmi.cfg.hdmi_dvi_mode)) {
548 r = -EPERM;
549 goto err;
550 }
551
552 r = hdmi5_audio_config(&hdmi.core, &hdmi.wp, audio, pclk);
553 if (r)
554 goto err;
555
556 mutex_unlock(&hdmi.lock);
557 return 0;
558
559err:
560 mutex_unlock(&hdmi.lock);
561 return r;
562}
563#else
564static int hdmi_audio_enable(struct omap_dss_device *dssdev)
565{
566 return -EPERM;
567}
568
569static void hdmi_audio_disable(struct omap_dss_device *dssdev)
570{
571}
572
573static int hdmi_audio_start(struct omap_dss_device *dssdev)
574{
575 return -EPERM;
576}
577
578static void hdmi_audio_stop(struct omap_dss_device *dssdev)
579{
580}
581
582static bool hdmi_audio_supported(struct omap_dss_device *dssdev)
583{
584 return false;
585}
586
587static int hdmi_audio_config(struct omap_dss_device *dssdev,
588 struct omap_dss_audio *audio)
589{
590 return -EPERM;
591}
592#endif
593
594static int hdmi_set_infoframe(struct omap_dss_device *dssdev, 488static int hdmi_set_infoframe(struct omap_dss_device *dssdev,
595 const struct hdmi_avi_infoframe *avi) 489 const struct hdmi_avi_infoframe *avi)
596{ 490{
@@ -619,13 +513,6 @@ static const struct omapdss_hdmi_ops hdmi_ops = {
619 .read_edid = hdmi_read_edid, 513 .read_edid = hdmi_read_edid,
620 .set_infoframe = hdmi_set_infoframe, 514 .set_infoframe = hdmi_set_infoframe,
621 .set_hdmi_mode = hdmi_set_hdmi_mode, 515 .set_hdmi_mode = hdmi_set_hdmi_mode,
622
623 .audio_enable = hdmi_audio_enable,
624 .audio_disable = hdmi_audio_disable,
625 .audio_start = hdmi_audio_start,
626 .audio_stop = hdmi_audio_stop,
627 .audio_supported = hdmi_audio_supported,
628 .audio_config = hdmi_audio_config,
629}; 516};
630 517
631static void hdmi_init_output(struct platform_device *pdev) 518static void hdmi_init_output(struct platform_device *pdev)