summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_local.h
diff options
context:
space:
mode:
authorDavid Henningsson <david.henningsson@canonical.com>2013-02-19 16:11:25 +0100
committerTakashi Iwai <tiwai@suse.de>2013-02-19 18:28:30 +0100
commit4bd038f9d80216a6e95c5c36fae5054a83ea75d7 (patch)
treea2347fc3bb5bdbb84527858956667b9d9882ba0c /sound/pci/hda/hda_local.h
parent1613d6b46b433f07f1d2703e4bd102802dcd75a4 (diff)
ALSA: hda - hdmi: Protect ELD buffer
Because the eld buffer can be simultaneously accessed from both workqueue context (updating) and process context (kcontrol read), we need to protect it with a mutex to guarantee consistency. To avoid holding the mutex while reading the ELD info from the codec, we introduce a temporary eld buffer. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_local.h')
-rw-r--r--sound/pci/hda/hda_local.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h
index 363cd487266b..83b7486c8eff 100644
--- a/sound/pci/hda/hda_local.h
+++ b/sound/pci/hda/hda_local.h
@@ -739,6 +739,7 @@ struct hdmi_eld {
int eld_size;
char eld_buffer[ELD_MAX_SIZE];
struct parsed_hdmi_eld info;
+ struct mutex lock;
#ifdef CONFIG_PROC_FS
struct snd_info_entry *proc_entry;
#endif