All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ricardo Neri <ricardo.neri@ti.com>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: x0055901@ti.com, alsa-devel@alsa-project.org,
	research@ottomaneng.com, agraf@suse.de, vaibhav.bedia@ti.com,
	s-chereau@ti.com, peter.ujfalusi@ti.com, mythripk@ti.com,
	s-guiriec@ti.com, linux-omap@vger.kernel.org, lrg@ti.com
Subject: Re: [PATCH v2 14/14] OMAPDSS: HDMI: Implement DSS driver interface for audio
Date: Thu, 10 May 2012 20:56:48 -0500	[thread overview]
Message-ID: <4FAC71E0.2060808@ti.com> (raw)
In-Reply-To: <1336636449.5182.26.camel@deskari>

On 05/10/2012 02:54 AM, Tomi Valkeinen wrote:
> On Wed, 2012-05-09 at 23:12 -0500, Ricardo Neri wrote:
>
>> Under the new strategy, in addition to not allowing the audio functions
>> to be called from multiple threads, audio functions will fail if the
>> sequence _CONFIGURED ->  _ENABLED ->  PLAYING ->  DISABLED is not followed.
>> This is aligned with the behavior that ALSA follows for the audio
>> codecs. Also, it checks the state of the panel to allow the audio
>> transitions.
>>>
>>> But the video and audio paths are probably always separate, and for
>>> those we need protection. As you said, using the mutex for the may-sleep
>>> audio functions solves the issue for those, leaving start/stop as the
>>> only problem case.
>>
>> Audio only needs to know if the display is active. Under the improved
>
> Audio also needs to know if the video mode is suitable for audio, right?
> So not only disabling the video has to stop audio, but also if the video
> mode changes to a non-supported one.

Yes. I overlooked the mode changes. Audio has to be stopped at any mode 
change or timings change because the audio regeneration clock params 
need to be recalculated. I think resuming audio, if possible, should be 
done by the user, which should be notified of the mode change.
>
>> strategy, audio_start indirectly checks the state of the panel because
>> the audio needs to be in AUDIO_ENABLED state to start and this state is
>> reached only if the panel is active. The mutex is held to check the
>> state of the panel and the audio lock is held to change the audio state.
>> Also, the audio transitions to AUDIO_DISABLED if the panel is disabled.
>
> Hmm, I can't see the code that does that. As far as I see, no video
> enable/disable/reconfig affects audio in any way. Am I missing a patch?
> Could you setup a public git branch so it's easier for me to get the
> whole series, instead of sending individual patches.

Sorry, some hunks where missing in the patch that I submitted yesterday.

I just pushed a branch containing the whole most up-to-date series here:

git://gitorious.org/omap-audio/linux-audio.git 
ricardon/topic/dss_audio-for-tomi

This includes the implementation of the DSS audio interface for HDMI 
covering the improved locking strategy [1][2], plus the missing hunks in 
my yesterday's patch, plus handling of mode changes you pointed out.

Please let me know if you want me to resubmit the whole patch series so 
that you can comment if you need to.

BR,

Ricardo

[1] http://www.spinics.net/lists/linux-omap/msg70059.html
[2] http://www.spinics.net/lists/linux-omap/msg70057.html

>
>   Tomi

  reply	other threads:[~2012-05-11  1:56 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-04  1:43 [PATCH v2 00/14] OMAPDSS: HDMI: Prepare for DSS dev driver audio support and OMAP5 Ricardo Neri
2012-05-04  1:43 ` [PATCH v2 01/14] OMAPDSS: HDMI: Split audio_enable into audio_enable/disable Ricardo Neri
2012-05-04  1:43 ` [PATCH v2 02/14] OMAPDSS: HDMI: Split video_enable into video_enable/disable Ricardo Neri
2012-05-04  1:43 ` [PATCH v2 03/14] OMAPDSS: HDMI: Remove ASoC codec Ricardo Neri
2012-05-04  1:43 ` [PATCH v2 04/14] OMAPDSS: HDMI: OMAP4: Remove CEA-861 audio infoframe and IEC-60958 enums Ricardo Neri
2012-05-04  1:43 ` [PATCH v2 05/14] OMAPDSS: HDMI: OMAP4: Remove invalid I2S settings Ricardo Neri
2012-05-04  1:44 ` [PATCH v2 06/14] OMAPDSS: HDMI: Decouple wrapper enable/disable and audio start/stop Ricardo Neri
2012-05-04  1:44 ` [PATCH v2 07/14] OMAPDSS: HDMI: Decouple HDMI audio from ASoC Ricardo Neri
2012-05-04  1:44 ` [PATCH v2 08/14] OMAPDSS: HDMI: OMAP4: Expand configuration for IEC-60958 audio Ricardo Neri
2012-05-04  1:44 ` [PATCH v2 09/14] OMAPDSS: HDMI: Relocate N/CTS calculation Ricardo Neri
2012-05-04  1:44 ` [PATCH v2 10/14] OMAPDSS: HDMI: Add support for more audio sample rates in " Ricardo Neri
2012-05-04  1:44 ` [PATCH v2 11/14] OMAPDSS: HDMI: Add an audio configuration function Ricardo Neri
2012-05-04  1:44 ` [PATCH v2 12/14] OMAPDSS: HDMI: OMAP4: Remap speaker order to match ALSA order Ricardo Neri
2012-05-04  1:44 ` [PATCH v2 13/14] OMAPDSS: HDMI: Panel: Simplify the name of the HDMI mutex Ricardo Neri
2012-05-04  1:44 ` [PATCH v2 14/14] OMAPDSS: HDMI: Implement DSS driver interface for audio Ricardo Neri
2012-05-07 11:43   ` Tomi Valkeinen
2012-05-08 23:55     ` Ricardo Neri
2012-05-09  8:28       ` Tomi Valkeinen
2012-05-10  4:12         ` Ricardo Neri
2012-05-10  7:54           ` Tomi Valkeinen
2012-05-11  1:56             ` Ricardo Neri [this message]
2012-05-11 12:51               ` Tomi Valkeinen
2012-05-12  0:18                 ` Ricardo Neri

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=4FAC71E0.2060808@ti.com \
    --to=ricardo.neri@ti.com \
    --cc=agraf@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=mythripk@ti.com \
    --cc=peter.ujfalusi@ti.com \
    --cc=research@ottomaneng.com \
    --cc=s-chereau@ti.com \
    --cc=s-guiriec@ti.com \
    --cc=tomi.valkeinen@ti.com \
    --cc=vaibhav.bedia@ti.com \
    --cc=x0055901@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.