linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Jyri Sarha <jsarha@ti.com>,
	alsa-devel@alsa-project.org, linux-fbdev@vger.kernel.org,
	linux-omap@vger.kernel.org
Cc: peter.ujfalusi@ti.com
Subject: Re: [PATCH v4] OMAPDSS: hdmi: Reconfigure and restart audio when display is enabled
Date: Tue, 01 Sep 2015 10:52:56 +0000	[thread overview]
Message-ID: <55E58388.7030301@ti.com> (raw)
In-Reply-To: <1440771706-21388-1-git-send-email-jsarha@ti.com>

[-- Attachment #1: Type: text/plain, Size: 2029 bytes --]



On 28/08/15 17:21, Jyri Sarha wrote:
> Reconfigure and restart audio when display is enabled, if audio
> playback was active before. This is needed in a situation when an
> audio+video stream application opens the audio stream before the
> video. When video stream is opened the display mode may change and
> that aborts audio playback, because the display is momentarily
> turned off.
> 
> The audio configuration is stored when it is successfully applied and
> a boolean is set when the audio playback is started and unset when
> stopped. This data is used to reconfigure the audio when display is
> re-enabled. The audio playback is aborted if the reconfiguration fails.
> 
> A new spin lock is introduced in order to protect state variables
> related to audio playback status. This is needed for the transition
> from display enabled state (when audio start/stop commands can be
> written to HW) to display disabled state (when audio start/stop
> commands update only the hdmi.audio_playing variable) to always
> serialize correctly with the start/stop audio commands. The already
> existing mutex can not be used, because the audio start and stop
> commands are executed in atomic context.
> 
> For example: when display is turned back on we take the spinlock and
> we can be sure that the audio start/stop status will not change while
> we update the HW according to hdmi.audio_playing state and set
> hdmi.display_enabled to true. After releasing the lock
> hdmi.display_enabled is true and all audio_start and audio_stop
> commands write their stuff directly to HW.
> 
> Signed-off-by: Jyri Sarha <jsarha@ti.com>
> ---
> Fixed one bad sentece in the description.
> 
>  drivers/video/fbdev/omap2/dss/hdmi.h  |  9 ++++-
>  drivers/video/fbdev/omap2/dss/hdmi4.c | 66 +++++++++++++++++++++++++-----
>  drivers/video/fbdev/omap2/dss/hdmi5.c | 76 ++++++++++++++++++++++++++++-------
>  3 files changed, 124 insertions(+), 27 deletions(-)

Thanks, I've queued this for 4.4.

 Tomi


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      reply	other threads:[~2015-09-01 10:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-28 14:21 [PATCH v4] OMAPDSS: hdmi: Reconfigure and restart audio when display is enabled Jyri Sarha
2015-09-01 10:52 ` Tomi Valkeinen [this message]

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=55E58388.7030301@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=jsarha@ti.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=peter.ujfalusi@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).