aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-04-15 11:48:35 -0400
committerTakashi Iwai <tiwai@suse.de>2009-04-15 11:51:56 -0400
commitfcad94a4c71c36a05f4d5c6dcb174534b4e0b136 (patch)
treeb37bea214d8159123c0b7e398e635a4b8aa9a2a6 /sound
parent83b2086ce2a1458168dc8b9d624060b2d7a82d4c (diff)
ALSA: hda - Fix the cmd cache keys for amp verbs
Fix the key value generation for get/set amp verbs. The upper bits of the parameter have to be combined with the verb value to be unique for each direction/index of amp access. This fixes the resume problem on some hardwares like Macbook after the channel mode is changed. Tested-by: Johannes Berg <johannes@sipsolutions.net> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/hda_codec.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index a4e5e5952115..fd6e6f337d10 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -2250,7 +2250,11 @@ int snd_hda_codec_write_cache(struct hda_codec *codec, hda_nid_t nid,
2250 err = bus->ops.command(bus, res); 2250 err = bus->ops.command(bus, res);
2251 if (!err) { 2251 if (!err) {
2252 struct hda_cache_head *c; 2252 struct hda_cache_head *c;
2253 u32 key = build_cmd_cache_key(nid, verb); 2253 u32 key;
2254 /* parm may contain the verb stuff for get/set amp */
2255 verb = verb | (parm >> 8);
2256 parm &= 0xff;
2257 key = build_cmd_cache_key(nid, verb);
2254 c = get_alloc_hash(&codec->cmd_cache, key); 2258 c = get_alloc_hash(&codec->cmd_cache, key);
2255 if (c) 2259 if (c)
2256 c->val = parm; 2260 c->val = parm;