From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Ricardo Neri <ricardo.neri@ti.com>
Cc: mythripk@ti.com, s-chereau@ti.com, x0055901@ti.com, "Bedia,
Vaibhav" <vaibhav.bedia@ti.com>,
s-guiriec@ti.com, lrg@ti.com, peter.ujfalusi@ti.com,
agraf@suse.de, research@ottomaneng.com,
linux-omap@vger.kernel.org,
alsa-devel <alsa-devel@alsa-project.org>
Subject: Re: [PATCH 10/10] OMAPDSS: HDMI: Implement DSS driver interface for audio
Date: Thu, 26 Apr 2012 10:31:44 +0300 [thread overview]
Message-ID: <1335425504.1962.17.camel@deskari> (raw)
In-Reply-To: <4F988262.7000703@ti.com>
[-- Attachment #1: Type: text/plain, Size: 1383 bytes --]
On Wed, 2012-04-25 at 18:01 -0500, Ricardo Neri wrote:
> > If so, we need to make sure it's not currently called in an atomic
> > context, because it would break if the function will sleep in the
> > future. And with "make sure" I just mean that we check the code and keep
> > it in mind. Or perhaps adding a comment in the header, that says
> > "audio_enable may sleep, other audio functions do not sleep" or such.
>
> I revisited the ALSA code. Only the audio_start function is atomic.
> Although ALSA may not be the only user, it makes sense to me to think
> that they will follow a similar approach in terms of locks.
>
> Hence, based on that and on the reasons you describe (audio_enable
> potentially taking too long to return), Rephrasing what you stated, a
> mutex may be used for the enable/disable and config operations. Only
> start/stop would be protected by a spinlock. This should be described in
> comments in the header file. Does it make sense to you?
Yes. Well, you don't need to mention the locks, they are internal
implementation details. It should be enough to say that start/stop never
sleeps and the other functions may sleep.
And, this is obvious but just to be sure, note that you should use
spinlocks in all of the functions if possible. We just need to make sure
we can use mutex in the future if we need to.
Tomi
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
prev parent reply other threads:[~2012-04-26 7:31 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-28 22:38 [PATCH 00/10] OMAPDSS: HDMI: Prepare for OMAP5 and DSS dev driver audio support Ricardo Neri
2012-03-28 22:38 ` [PATCH 01/10] OMAPDSS: HDMI: Remove ASoC codec Ricardo Neri
2012-04-23 13:17 ` Tomi Valkeinen
2012-04-25 2:27 ` Ricardo Neri
2012-03-28 22:38 ` [PATCH 02/10] OMAPDSS: HDMI: OMAP4: Remove CEA-861 audio infoframe and IEC-60958 enums Ricardo Neri
2012-04-23 13:12 ` Tomi Valkeinen
2012-04-25 3:37 ` Ricardo Neri
2012-04-27 1:32 ` Ricardo Neri
2012-04-27 6:31 ` Tomi Valkeinen
2012-03-28 22:38 ` [PATCH 03/10] OMAPDSS: HDMI: OMAP4: Correcty typo in I2S definitions Ricardo Neri
2012-04-23 12:42 ` Tomi Valkeinen
2012-04-25 3:39 ` Ricardo Neri
2012-03-28 22:38 ` [PATCH 04/10] OMAPDSS: HDMI: OMAP4: Decouple wrapper enable and audio start Ricardo Neri
2012-03-28 22:38 ` [PATCH 05/10] OMAPDSS: HDMI: Decouple HDMI audio from ASoC Ricardo Neri
2012-04-23 13:25 ` Tomi Valkeinen
2012-04-25 3:44 ` Ricardo Neri
2012-03-28 22:38 ` [PATCH 06/10] OMAPDSS: HDMI: OMAP4: Expand configuration for IEC-60958 audio Ricardo Neri
2012-03-28 22:38 ` [PATCH 07/10] OMAPDSS: HDMI: Relocate N/CTS calculation Ricardo Neri
2012-03-28 22:38 ` [PATCH 08/10] OMAPDSS: HDMI: Add support for more audio sample rates in " Ricardo Neri
2012-03-28 22:38 ` [PATCH 09/10] OMAPDSS: HDMI: OMAP4: Add an audio configuration function Ricardo Neri
2012-03-28 22:38 ` [PATCH 10/10] OMAPDSS: HDMI: Implement DSS driver interface for audio Ricardo Neri
2012-04-23 13:01 ` Tomi Valkeinen
2012-04-25 4:48 ` Ricardo Neri
2012-04-25 6:19 ` Tomi Valkeinen
2012-04-25 23:01 ` Ricardo Neri
2012-04-26 7:31 ` 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=1335425504.1962.17.camel@deskari \
--to=tomi.valkeinen@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=ricardo.neri@ti.com \
--cc=s-chereau@ti.com \
--cc=s-guiriec@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox