linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jean-Francois Moine <moinejf@free.fr>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Mark Brown <broonie@kernel.org>, Jyri Sarha <jsarha@ti.com>,
	peter.ujfalusi@ti.com, liam.r.girdwood@linux.intel.com,
	alsa-devel@alsa-project.org, linux-omap@vger.kernel.org,
	linux-fbdev@vger.kernel.org
Subject: Re: [alsa-devel] [PATCH v7.1 00/19] Rework OMAP4+ HDMI audio support
Date: Thu, 13 Nov 2014 14:57:06 +0000	[thread overview]
Message-ID: <20141113160002.7a1157a5@armhf> (raw)
In-Reply-To: <54648149.9070104@ti.com>

On Thu, 13 Nov 2014 12:00:41 +0200
Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:

	[snip]
> Jyri or Peter knows this better, but I think one difference with OMAP
> HDMI case and tda998x is that tda998x is an external encoder, and you
> transfer audio data to it via i2s or spdif, whereas OMAP HDMI is inside
> the SoC, and the HDMI IP gets the audio data via system DMA.
> 
> The system DMA transfers are triggered by the HDMI IP, and the HDMI IP
> has to be enabled and properly configured for the DMA ports to function.
> 
> So, correct me if I'm wrong, but I think this is the fundamental difference:
> 
> In your case, the actual audio playback happens with the i2s or spdif
> side. You can enable the playback at any time, no matter what is the
> status of tda998x. If tda998x is not operational, the audio data will
> just go to /dev/null.
> 
> In our case, the actual audio playback happens inside the HDMI block. We
> need the whole HDMI block to be operational and correctly configured for
> (fake or real) playback to be possible.

When the tda998x is not operational, the CODEC knows it and reports an
error to the audio subsystem on device open. But, once the tda998x has
been started, it always stays operational, even without HDMI connection.

> > and I saw only a few dependencies between the 2 subsystems:
> > 
> > - the CODEC must know the transmitter parameters (DAIs - static -,
> >   audio constraints - dynamic -),
> 
> The video mode (i.e. availability of audio) or the EDID (i.e. the
> supported audio parameters) may change at any time, so I presume in your
> series the video side will inform the codec of these changes at any point?

Such changes occur only when the HDMI output device (TV) is replaced by
an other one (manual cable exchange or HDMI switcher). I wonder if
these changes are correctly treated in the HDMI transmitters, DRM core,
DRM drivers, X11/wayland...

So, no, actually, once streaming is started, no information go from the
HDMI transmitter to the CODEC.

> > - the CODEC must alert the transmitter on audio start and stop.
> > 
> > I don't think that stopping audio streaming on HDMI disconnection is
> 
> And you allow audio playback also if the monitor does not support audio,
> or the video mode does not supprot audio?

Bug in my patch: audio playback will be rejected if there will be no
audio support.

> > useful. I even let audio streaming start when the HDMI cable is
> > disconnected.
> 
> Ah, this is actually unclear thing to me: what should the audio side
> behavior be when the HDMI cable is disconnected or the video is blanked?
> I believe the options are:
> 
> a) Always keep the audio device operational, no matter what is the
> status of the video side. How should this work if the HDMI videomode or
> the HDMI monitor does not support audio? Is it desirable that the
> userspace has no idea that the audio is not actually going anywhere?
> 
> b) Remove the audio device when audio support is not available. This
> kind of makes sense, as, well, there's no possibility for audio output.
> But maybe this is not how linux sound devices are supposed to behave?
> 
> c) Return errors when playback is attempted when audio support is not
> available. Again, this kind of makes sense, as audio playback is not
> possible. But maybe this is also not how audio devices generally work.
> 
> Jyri, were there some other options we discussed?
> 
> Currently, the OMAP HDMI version does c). It's the easiest solution for us.

Same for me, but checking the audio capability is done on audio streaming
start only.

When the HDMI output device is disconnected, the video and audio outputs
don't need to be changed. I often switch off my TV set when I will not
use my computer for a while, letting the computer itself running. When
I get back and switch on back the TV set, video and audio are still
there.

> Option a) is a bit problematic for us, as it requires the HDMI IP side
> to be fully operational, with the video output configured and enabled,
> as that is what drives the audio DMA. If we stop the video, I believe
> the audio DMA will freeze, and it'll lead to timeouts on the audio side.
> 
> I haven't tried, but I believe we could program the HDMI IP to some safe
> default video mode if the cable is disconnected, and turn off the actual
> HDMI PHY, so that the audio side could work even if the HDMI stream is
> not going anywhere. I think it would be quite big change to how the HDMI
> driver works at the moment.
> 
> But then, if the cable _is_ connected and the video mode is such that it
> cannot not support audio, I wonder if we can still fake the audio
> playback or will the HDMI IP get confused...

AFAIK, the HDMI transmitters don't know if the video or audio is
displayed/played by the external device(s). Only the user knows.

BTW, you are talking about video modes without audio support. What are
you thinking about?

-- 
Ken ar c'hentañ	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/

  parent reply	other threads:[~2014-11-13 14:57 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-12 14:40 [PATCH v7.1 00/19] Rework OMAP4+ HDMI audio support Jyri Sarha
2014-11-12 14:40 ` [PATCH v7.1 01/19] OMAPDSS: hdmi_wp: Protect reserved bits in hdmi_wp_audio_config_format() Jyri Sarha
2014-11-12 14:40 ` [PATCH v7.1 02/19] OMAPDSS: hdmi5_core: Initialize mandatory sample_order parameter Jyri Sarha
2014-11-12 14:40 ` [PATCH v7.1 03/19] OMAPDSS: hdmi.h: Add HDMI_AUDIO_LAYOUT_6CH enum value Jyri Sarha
2014-11-12 14:40 ` [PATCH v7.1 04/19] OMAPDSS: hdmi: Remove most of OMAP[45]_DSS_HDMI_AUDIO ifdefs Jyri Sarha
2014-11-12 14:40 ` [PATCH v7.1 05/19] OMAPDSS: hdmi4_core: Remove unused hdmi4_audio_get_dma_port() Jyri Sarha
2014-11-12 14:40 ` [PATCH v7.1 06/19] OMAPDSS: hdmi_wp: Add function for getting audio dma address Jyri Sarha
2014-11-12 14:40 ` [PATCH v7.1 07/19] OMAPDSS: hdmi: Make hdmi structure public Jyri Sarha
2014-11-12 14:40 ` [PATCH v7.1 08/19] OMAPDSS: hdmi: Add pdev pointer for audio_pdev in HDMI DRV data Jyri Sarha
2014-11-12 14:41 ` [PATCH v7.1 09/19] ASoC: omap-hdmi-audio: Add platform device for OMAP HDMI audio support Jyri Sarha
2014-11-29 11:32   ` Mark Brown
2014-12-01  7:15     ` Jyri Sarha
2014-12-01 19:21       ` Mark Brown
2014-11-12 14:41 ` [PATCH v7.1 10/19] OMAPDSS: Kconfig: Remove HDMI audio booleans from Kconfig Jyri Sarha
2014-11-12 14:41 ` [PATCH v7.1 11/19] OMAPDSS: hdmi: Make hdmi_mode_has_audio() more user friedly Jyri Sarha
2014-11-14 14:37   ` Vladimir Zapolskiy
2014-11-14 15:05     ` Jyri Sarha
2014-11-17 15:12       ` Vladimir Zapolskiy
2014-11-15 15:52     ` Vladimir Zapolskiy
2014-11-12 14:41 ` [PATCH v7.1 12/19] OMAPDSS: hdmi.h: Add members to hdmi drvdata for audio implementation Jyri Sarha
2014-11-12 14:41 ` [PATCH v7.1 13/19] OMAPDSS: hdmi4: Remove callbacks for the old ASoC DAI driver Jyri Sarha
2014-11-12 14:41 ` [PATCH v7.1 14/19] OMAPDSS: hdmi4: Register ASoC platform device for omap hdmi audio Jyri Sarha
2014-11-12 14:41 ` [PATCH v7.1 15/19] OMAPDSS: hdmi5: Remove callbacks for the old ASoC DAI driver Jyri Sarha
2014-11-12 14:41 ` [PATCH v7.1 16/19] OMAPDSS: hdmi5: Register ASoC platform device for omap hdmi audio Jyri Sarha
2014-11-12 14:41 ` [PATCH v7.1 17/19] ASoC: omap: Remove obsolete HDMI audio code and Kconfig options Jyri Sarha
2014-11-12 14:41 ` [PATCH v7.1 18/19] OMAPDSS: Remove all references to obsolete HDMI audio callbacks Jyri Sarha
2014-11-12 14:41 ` [PATCH v7.1 19/19] OMAPDSS: hdmi5: Change hdmi_wp idlemode to to no_idle for audio playback Jyri Sarha
2014-11-12 22:23 ` [PATCH v7.1 00/19] Rework OMAP4+ HDMI audio support Mark Brown
2014-11-13  8:05   ` Tomi Valkeinen
2014-11-13  9:17     ` [alsa-devel] " Jean-Francois Moine
2014-11-13 10:00       ` Tomi Valkeinen
2014-11-13 14:54         ` Jyri Sarha
2014-11-13 14:57         ` Jean-Francois Moine [this message]
2014-11-13 15:44           ` Tomi Valkeinen
2014-11-14 10:59             ` Jean-Francois Moine
2014-11-20 10:59     ` Tomi Valkeinen
2014-11-21 11:23       ` Mark Brown
2014-11-21 12:10         ` Jyri Sarha
2014-11-21 16:38           ` Mark Brown
2014-11-24  8:48             ` Tomi Valkeinen
2014-11-24 14:55             ` Jyri Sarha
2014-11-21 12:35         ` Jyri Sarha
2014-11-21 16:14           ` Mark Brown
2014-11-24  8:18             ` Tomi Valkeinen
2014-11-24 17:39               ` Mark Brown
2014-11-25  9:26                 ` Tomi Valkeinen
2014-11-25 18:10                   ` Mark Brown
2014-11-26 11:02                     ` Tomi Valkeinen
2014-11-29 11:59 ` Mark Brown
2014-12-01  9:07   ` Tomi Valkeinen
2014-12-01 19:31     ` Mark Brown
2014-12-02  8:52       ` Jyri Sarha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141113160002.7a1157a5@armhf \
    --to=moinejf@free.fr \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=jsarha@ti.com \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=peter.ujfalusi@ti.com \
    --cc=tomi.valkeinen@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).