aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-05-10 10:11:15 -0400
committerTakashi Iwai <tiwai@suse.de>2012-05-10 10:12:13 -0400
commitc3b6bcc292da80ea08a979af177538ffdbbae36b (patch)
tree42202b40e340567e58feeeeeaf680c58c71d0196 /sound/pci/hda/hda_codec.h
parente3245cddcf56ccd810b73d0a2918e02560da93ab (diff)
ALSA: hda - Fix concurrent hash accesses
The amp and caps hashes aren't protected properly for concurrent accesses. Protect them via a new mutex now. But it can't be so simple as originally thought: since the update of a hash table entry itself might trigger the power-up sequence which again accesses the hash table, we can't cover the whole function simply via mutex. Thus the update part has to be split from the mutex and revalidated. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.h')
-rw-r--r--sound/pci/hda/hda_codec.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index fce30b42bc46..29a311b05f2d 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -827,6 +827,7 @@ struct hda_codec {
827 827
828 struct mutex spdif_mutex; 828 struct mutex spdif_mutex;
829 struct mutex control_mutex; 829 struct mutex control_mutex;
830 struct mutex hash_mutex;
830 struct snd_array spdif_out; 831 struct snd_array spdif_out;
831 unsigned int spdif_in_enable; /* SPDIF input enable? */ 832 unsigned int spdif_in_enable; /* SPDIF input enable? */
832 const hda_nid_t *slave_dig_outs; /* optional digital out slave widgets */ 833 const hda_nid_t *slave_dig_outs; /* optional digital out slave widgets */