[alsa-devel] [PATCH v2 14/14] OMAPDSS: HDMI: Implement DSS driver interface for audio
tomi.valkeinen at ti.com
Mon May 7 13:43:06 CEST 2012
On Thu, 2012-05-03 at 20:44 -0500, Ricardo Neri wrote:
> Implement the DSS device driver audio support interface in the HDMI
> panel driver and generic driver. The implementation relies on the
> IP-specific functions that are defined at DSS probe time.
> At the moment, a hardirq-safe spinlock is used to protect the audio
> functions. This is because such functions might be called while
> holding a lock (this especially true for audio_start/stop). For the
> rest of the audio functions, a mutex could be used in the future as
> the enablement of resources might take too much time.
The series looks good, except locking. Granted, the locking in omapdss
is a bit bad generally also, but here I think it's a bit more broken.
For example, hdmi_panel.c:hdmi_panel_audio_supported() takes the audio
lock, and then uses variables like dssdev->state, and the hdmi video
mode. However, the video functions do not use audio lock, so effectively
the lock doesn't protect at all.
I'm not sure how to fix it, though. I think this shows the shortcomings
of the current locking strategy (or lack of =). What if the audio
functions that can sleep would take the hdmi panel's mutex, and also the
audio spinlock? That would at least fix some of the cases.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 836 bytes
Desc: This is a digitally signed message part
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20120507/b08bf4f7/attachment-0001.sig
More information about the Alsa-devel