Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 248214
b: refs/heads/master
c: 239c970
h: refs/heads/master
v: v3
  • Loading branch information
Dimitris Papastamos authored and Mark Brown committed Mar 26, 2011
1 parent f4994bc commit 6c2386b
Show file tree
Hide file tree
Showing 3 changed files with 41 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: 8020454c9a1ec5ac5801805896b5f69d0c573e17
refs/heads/master: 239c970626b9d9c7449de751d91f9a9da1018b85
4 changes: 4 additions & 0 deletions trunk/include/sound/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,10 @@ int snd_soc_register_codec(struct device *dev,
void snd_soc_unregister_codec(struct device *dev);
int snd_soc_codec_volatile_register(struct snd_soc_codec *codec,
unsigned int reg);
int snd_soc_codec_readable_register(struct snd_soc_codec *codec,
unsigned int reg);
int snd_soc_codec_writable_register(struct snd_soc_codec *codec,
unsigned int reg);
int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec,
int addr_bits, int data_bits,
enum snd_soc_control_type control);
Expand Down
36 changes: 36 additions & 0 deletions trunk/sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2146,6 +2146,42 @@ int snd_soc_codec_volatile_register(struct snd_soc_codec *codec,
}
EXPORT_SYMBOL_GPL(snd_soc_codec_volatile_register);

/**
* snd_soc_codec_readable_register: Report if a register is readable.
*
* @codec: CODEC to query.
* @reg: Register to query.
*
* Boolean function indicating if a CODEC register is readable.
*/
int snd_soc_codec_readable_register(struct snd_soc_codec *codec,
unsigned int reg)
{
if (codec->readable_register)
return codec->readable_register(codec, reg);
else
return 0;
}
EXPORT_SYMBOL_GPL(snd_soc_codec_readable_register);

/**
* snd_soc_codec_writable_register: Report if a register is writable.
*
* @codec: CODEC to query.
* @reg: Register to query.
*
* Boolean function indicating if a CODEC register is writable.
*/
int snd_soc_codec_writable_register(struct snd_soc_codec *codec,
unsigned int reg)
{
if (codec->writable_register)
return codec->writable_register(codec, reg);
else
return 0;
}
EXPORT_SYMBOL_GPL(snd_soc_codec_writable_register);

/**
* snd_soc_new_ac97_codec - initailise AC97 device
* @codec: audio codec
Expand Down

0 comments on commit 6c2386b

Please sign in to comment.