Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 157544
b: refs/heads/master
c: 096e49d
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed Jul 5, 2009
1 parent 8af19a8 commit b31b421
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: af0adf3e81dbcf782388b8a7d0d7094ef5e70f50
refs/heads/master: 096e49d5e6f7bd93395e7ddf7e0239e1644d0505
2 changes: 2 additions & 0 deletions trunk/include/sound/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ int snd_soc_register_platform(struct snd_soc_platform *platform);
void snd_soc_unregister_platform(struct snd_soc_platform *platform);
int snd_soc_register_codec(struct snd_soc_codec *codec);
void snd_soc_unregister_codec(struct snd_soc_codec *codec);
int snd_soc_codec_volatile_register(struct snd_soc_codec *codec, int reg);

#ifdef CONFIG_PM
int snd_soc_suspend_device(struct device *dev);
Expand Down Expand Up @@ -361,6 +362,7 @@ struct snd_soc_codec {
int (*write)(struct snd_soc_codec *, unsigned int, unsigned int);
int (*display_register)(struct snd_soc_codec *, char *,
size_t, unsigned int);
int (*volatile_register)(unsigned int);
hw_write_t hw_write;
hw_read_t hw_read;
void *reg_cache;
Expand Down
17 changes: 17 additions & 0 deletions trunk/sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1125,6 +1125,23 @@ static int soc_new_pcm(struct snd_soc_device *socdev,
return ret;
}

/**
* snd_soc_codec_volatile_register: Report if a register is volatile.
*
* @codec: CODEC to query.
* @reg: Register to query.
*
* Boolean function indiciating if a CODEC register is volatile.
*/
int snd_soc_codec_volatile_register(struct snd_soc_codec *codec, int reg)
{
if (codec->volatile_register)
return codec->volatile_register(reg);
else
return 0;
}
EXPORT_SYMBOL_GPL(snd_soc_codec_volatile_register);

/* codec register dump */
static ssize_t soc_codec_reg_show(struct snd_soc_codec *codec, char *buf)
{
Expand Down

0 comments on commit b31b421

Please sign in to comment.