Commit 67850a89 authored by Dimitris Papastamos's avatar Dimitris Papastamos Committed by Mark Brown

ASoC: Add control_type in snd_soc_codec

This is mainly used by the soc-cache code to easily determine the
currently used underlying serial bus.  Set SND_SOC_CUSTOM to 1 so we
can distinguish it if it is not initialized or set.
Signed-off-by: default avatarDimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: default avatarLiam Girdwood <lrg@ti.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 5fb609d4
...@@ -248,7 +248,7 @@ typedef int (*hw_write_t)(void *,const char* ,int); ...@@ -248,7 +248,7 @@ typedef int (*hw_write_t)(void *,const char* ,int);
extern struct snd_ac97_bus_ops soc_ac97_ops; extern struct snd_ac97_bus_ops soc_ac97_ops;
enum snd_soc_control_type { enum snd_soc_control_type {
SND_SOC_CUSTOM, SND_SOC_CUSTOM = 1,
SND_SOC_I2C, SND_SOC_I2C,
SND_SOC_SPI, SND_SOC_SPI,
}; };
...@@ -539,6 +539,7 @@ struct snd_soc_codec { ...@@ -539,6 +539,7 @@ struct snd_soc_codec {
/* codec IO */ /* codec IO */
void *control_data; /* codec control (i2c/3wire) data */ void *control_data; /* codec control (i2c/3wire) data */
enum snd_soc_control_type control_type;
hw_write_t hw_write; hw_write_t hw_write;
unsigned int (*hw_read)(struct snd_soc_codec *, unsigned int); unsigned int (*hw_read)(struct snd_soc_codec *, unsigned int);
unsigned int (*read)(struct snd_soc_codec *, unsigned int); unsigned int (*read)(struct snd_soc_codec *, unsigned int);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment