Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 182875
b: refs/heads/master
c: a3032b4
h: refs/heads/master
i:
  182873: d4b1eda
  182871: c23985f
v: v3
  • Loading branch information
Mark Brown committed Feb 4, 2010
1 parent a75f318 commit 1991d60
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 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: 8c961bcca1d10be4f2c06375eb561679167653a0
refs/heads/master: a3032b47c46920ed3f2fd58e64f484e3dab49f23
1 change: 1 addition & 0 deletions trunk/include/sound/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ struct snd_soc_codec {

unsigned int idle_bias_off:1; /* Use BIAS_OFF instead of STANDBY */
unsigned int cache_only:1; /* Suppress writes to hardware */
unsigned int cache_sync:1; /* Cache needs to be synced to hardware */

/* dapm */
u32 pop_time;
Expand Down
20 changes: 15 additions & 5 deletions trunk/sound/soc/soc-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ static int snd_soc_4_12_write(struct snd_soc_codec *codec, unsigned int reg,
if (reg < codec->reg_cache_size)
cache[reg] = value;

if (codec->cache_only)
if (codec->cache_only) {
codec->cache_sync = 1;
return 0;
}

ret = codec->hw_write(codec->control_data, data, 2);
if (ret == 2)
Expand Down Expand Up @@ -105,8 +107,10 @@ static int snd_soc_7_9_write(struct snd_soc_codec *codec, unsigned int reg,
if (reg < codec->reg_cache_size)
cache[reg] = value;

if (codec->cache_only)
if (codec->cache_only) {
codec->cache_sync = 1;
return 0;
}

ret = codec->hw_write(codec->control_data, data, 2);
if (ret == 2)
Expand Down Expand Up @@ -161,8 +165,10 @@ static int snd_soc_8_8_write(struct snd_soc_codec *codec, unsigned int reg,
if (reg < codec->reg_cache_size)
cache[reg] = value;

if (codec->cache_only)
if (codec->cache_only) {
codec->cache_sync = 1;
return 0;
}

if (codec->hw_write(codec->control_data, data, 2) == 2)
return 0;
Expand Down Expand Up @@ -192,8 +198,10 @@ static int snd_soc_8_16_write(struct snd_soc_codec *codec, unsigned int reg,
if (!snd_soc_codec_volatile_register(codec, reg))
reg_cache[reg] = value;

if (codec->cache_only)
if (codec->cache_only) {
codec->cache_sync = 1;
return 0;
}

if (codec->hw_write(codec->control_data, data, 3) == 3)
return 0;
Expand Down Expand Up @@ -313,8 +321,10 @@ static int snd_soc_16_8_write(struct snd_soc_codec *codec, unsigned int reg,
if (reg < codec->reg_cache_size)
cache[reg] = value;

if (codec->cache_only)
if (codec->cache_only) {
codec->cache_sync = 1;
return 0;
}

ret = codec->hw_write(codec->control_data, data, 3);
if (ret == 3)
Expand Down

0 comments on commit 1991d60

Please sign in to comment.