[alsa-devel] [PATCH v4] OMAPDSS: hdmi: Reconfigure and restart audio when display is enabled

Tomi Valkeinen tomi.valkeinen at ti.com
Tue Sep 1 12:52:56 CEST 2015



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 at 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20150901/0d1b9244/attachment.sig>


More information about the Alsa-devel mailing list