Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 353050
b: refs/heads/master
c: de1e37b
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Jan 12, 2013
1 parent d4c7a6a commit bd3763f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5fdaecdb0d8fd8131d2adb9ca0ae2b77707b36ca
refs/heads/master: de1e37b7d0dc3f1b8d0f84f5ff64ef8eebdf1e9f
13 changes: 7 additions & 6 deletions trunk/sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1848,6 +1848,7 @@ static int codec_amp_update(struct hda_codec *codec, hda_nid_t nid, int ch,
bool init_only)
{
struct hda_amp_info *info;
unsigned int cache_only;

if (snd_BUG_ON(mask & ~0xff))
mask &= 0xff;
Expand All @@ -1865,10 +1866,9 @@ static int codec_amp_update(struct hda_codec *codec, hda_nid_t nid, int ch,
return 0;
}
info->vol[ch] = val;
if (codec->cached_write)
info->head.dirty = 1;
cache_only = info->head.dirty = codec->cached_write;
mutex_unlock(&codec->hash_mutex);
if (!codec->cached_write)
if (!cache_only)
put_vol_mute(codec, info, nid, ch, direction, idx, val);
return 1;
}
Expand Down Expand Up @@ -3450,8 +3450,10 @@ int snd_hda_codec_write_cache(struct hda_codec *codec, hda_nid_t nid,
int err;
struct hda_cache_head *c;
u32 key;
unsigned int cache_only;

if (!codec->cached_write) {
cache_only = codec->cached_write;
if (!cache_only) {
err = snd_hda_codec_write(codec, nid, direct, verb, parm);
if (err < 0)
return err;
Expand All @@ -3465,8 +3467,7 @@ int snd_hda_codec_write_cache(struct hda_codec *codec, hda_nid_t nid,
c = get_alloc_hash(&codec->cmd_cache, key);
if (c) {
c->val = parm;
if (codec->cached_write)
c->dirty = 1;
c->dirty = cache_only;
}
mutex_unlock(&codec->bus->cmd_mutex);
return 0;
Expand Down

0 comments on commit bd3763f

Please sign in to comment.