/* codec private data */
struct wm8510_priv {
enum snd_soc_control_type control_type;
- void *control_data;
};
static const char *wm8510_companding[] = { "Off", "NC", "u-law", "A-law" };
struct wm8510_priv *wm8510 = snd_soc_codec_get_drvdata(codec);
int ret;
- codec->control_data = wm8510->control_data;
ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8510->control_type);
if (ret < 0) {
printk(KERN_ERR "wm8510: failed to set cache I/O: %d\n", ret);
if (wm8510 == NULL)
return -ENOMEM;
- wm8510->control_data = spi;
wm8510->control_type = SND_SOC_SPI;
spi_set_drvdata(spi, wm8510);
return -ENOMEM;
i2c_set_clientdata(i2c, wm8510);
- wm8510->control_data = i2c;
wm8510->control_type = SND_SOC_I2C;
ret = snd_soc_register_codec(&i2c->dev,
/* codec private data */
struct wm8523_priv {
enum snd_soc_control_type control_type;
- void *control_data;
u16 reg_cache[WM8523_REGISTER_COUNT];
struct regulator_bulk_data supplies[WM8523_NUM_SUPPLIES];
unsigned int sysclk;
int ret, i;
codec->hw_write = (hw_write_t)i2c_master_send;
- codec->control_data = wm8523->control_data;
wm8523->rate_constraint.list = &wm8523->rate_constraint_list[0];
wm8523->rate_constraint.count =
ARRAY_SIZE(wm8523->rate_constraint_list);
return -ENOMEM;
i2c_set_clientdata(i2c, wm8523);
- wm8523->control_data = i2c;
wm8523->control_type = SND_SOC_I2C;
ret = snd_soc_register_codec(&i2c->dev,
/* codec private data */
struct wm8580_priv {
enum snd_soc_control_type control_type;
- void *control_data;
struct regulator_bulk_data supplies[WM8580_NUM_SUPPLIES];
u16 reg_cache[WM8580_MAX_REGISTER + 1];
struct pll_state a;
struct wm8580_priv *wm8580 = snd_soc_codec_get_drvdata(codec);
int ret = 0,i;
- codec->control_data = wm8580->control_data;
ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8580->control_type);
if (ret < 0) {
dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
return -ENOMEM;
i2c_set_clientdata(i2c, wm8580);
- wm8580->control_data = i2c;
wm8580->control_type = SND_SOC_I2C;
ret = snd_soc_register_codec(&i2c->dev,
/* codec private data */
struct wm8711_priv {
enum snd_soc_control_type bus_type;
- void *control_data;
u16 reg_cache[WM8711_CACHEREGNUM];
unsigned int sysclk;
};
struct wm8711_priv *wm8711 = snd_soc_codec_get_drvdata(codec);
int ret, reg;
- codec->control_data = wm8711->control_data;
ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8711->bus_type);
if (ret < 0) {
dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
return -ENOMEM;
spi_set_drvdata(spi, wm8711);
- wm8711->control_data = spi;
wm8711->bus_type = SND_SOC_SPI;
ret = snd_soc_register_codec(&spi->dev,
return -ENOMEM;
i2c_set_clientdata(client, wm8711);
- wm8711->control_data = client;
wm8711->bus_type = SND_SOC_I2C;
ret = snd_soc_register_codec(&client->dev,
/* codec private data */
struct wm8728_priv {
enum snd_soc_control_type control_type;
- void *control_data;
};
static const DECLARE_TLV_DB_SCALE(wm8728_tlv, -12750, 50, 1);
struct wm8728_priv *wm8728 = snd_soc_codec_get_drvdata(codec);
int ret;
- codec->control_data = wm8728->control_data;
ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8728->control_type);
if (ret < 0) {
printk(KERN_ERR "wm8728: failed to configure cache I/O: %d\n",
if (wm8728 == NULL)
return -ENOMEM;
- wm8728->control_data = spi;
wm8728->control_type = SND_SOC_SPI;
spi_set_drvdata(spi, wm8728);
return -ENOMEM;
i2c_set_clientdata(i2c, wm8728);
- wm8728->control_data = i2c;
wm8728->control_type = SND_SOC_I2C;
ret = snd_soc_register_codec(&i2c->dev,
/* codec private data */
struct wm8731_priv {
enum snd_soc_control_type control_type;
- void *control_data;
struct regulator_bulk_data supplies[WM8731_NUM_SUPPLIES];
u16 reg_cache[WM8731_CACHEREGNUM];
unsigned int sysclk;
int ret = 0, i;
codec->bias_level = SND_SOC_BIAS_OFF,
- codec->control_data = wm8731->control_data;
ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8731->control_type);
if (ret < 0) {
if (wm8731 == NULL)
return -ENOMEM;
- wm8731->control_data = spi;
wm8731->control_type = SND_SOC_SPI;
spi_set_drvdata(spi, wm8731);
return -ENOMEM;
i2c_set_clientdata(i2c, wm8731);
- wm8731->control_data = i2c;
wm8731->control_type = SND_SOC_I2C;
ret = snd_soc_register_codec(&i2c->dev,
/* codec private data */
struct wm8741_priv {
enum snd_soc_control_type control_type;
- void *control_data;
u16 reg_cache[WM8741_REGISTER_COUNT];
struct regulator_bulk_data supplies[WM8741_NUM_SUPPLIES];
unsigned int sysclk;
struct wm8741_priv *wm8741 = snd_soc_codec_get_drvdata(codec);
int ret = 0;
- codec->control_data = wm8741->control_data;
ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8741->control_type);
if (ret != 0) {
dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
}
i2c_set_clientdata(i2c, wm8741);
- wm8741->control_data = i2c;
wm8741->control_type = SND_SOC_I2C;
ret = snd_soc_register_codec(&i2c->dev,
struct wm8750_priv {
unsigned int sysclk;
enum snd_soc_control_type control_type;
- void *control_data;
u16 reg_cache[ARRAY_SIZE(wm8750_reg)];
};
struct wm8750_priv *wm8750 = snd_soc_codec_get_drvdata(codec);
int reg, ret;
- codec->control_data = wm8750->control_data;
ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8750->control_type);
if (ret < 0) {
printk(KERN_ERR "wm8750: failed to set cache I/O: %d\n", ret);
if (wm8750 == NULL)
return -ENOMEM;
- wm8750->control_data = spi;
wm8750->control_type = SND_SOC_SPI;
spi_set_drvdata(spi, wm8750);
return -ENOMEM;
i2c_set_clientdata(i2c, wm8750);
- wm8750->control_data = i2c;
wm8750->control_type = SND_SOC_I2C;
ret = snd_soc_register_codec(&i2c->dev,
/* codec private data */
struct wm8753_priv {
enum snd_soc_control_type control_type;
- void *control_data;
unsigned int sysclk;
unsigned int pcmclk;
u16 reg_cache[ARRAY_SIZE(wm8753_reg)];
struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec);
int ret = 0, reg;
- codec->bias_level = SND_SOC_BIAS_OFF,
- codec->control_data = wm8753->control_data;
+ codec->bias_level = SND_SOC_BIAS_OFF;
INIT_DELAYED_WORK(&codec->delayed_work, wm8753_work);
ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8753->control_type);
if (wm8753 == NULL)
return -ENOMEM;
- wm8753->control_data = spi;
wm8753->control_type = SND_SOC_SPI;
spi_set_drvdata(spi, wm8753);
return -ENOMEM;
i2c_set_clientdata(i2c, wm8753);
- wm8753->control_data = i2c;
wm8753->control_type = SND_SOC_I2C;
ret = snd_soc_register_codec(&i2c->dev,
/* codec private data */
struct wm8776_priv {
enum snd_soc_control_type control_type;
- void *control_data;
u16 reg_cache[WM8776_CACHEREGNUM];
int sysclk[2];
};
struct wm8776_priv *wm8776 = snd_soc_codec_get_drvdata(codec);
int ret = 0;
- codec->control_data = wm8776->control_data;
ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8776->control_type);
if (ret < 0) {
dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
if (wm8776 == NULL)
return -ENOMEM;
- wm8776->control_data = spi;
wm8776->control_type = SND_SOC_SPI;
spi_set_drvdata(spi, wm8776);
return -ENOMEM;
i2c_set_clientdata(i2c, wm8776);
- wm8776->control_data = i2c;
wm8776->control_type = SND_SOC_I2C;
ret = snd_soc_register_codec(&i2c->dev,
struct wm8900_priv {
enum snd_soc_control_type control_type;
- void *control_data;
u16 reg_cache[WM8900_MAXREG];
u32 fll_in; /* FLL input frequency */
struct wm8900_priv *wm8900 = snd_soc_codec_get_drvdata(codec);
int ret = 0, reg;
- codec->control_data = wm8900->control_data;
ret = snd_soc_codec_set_cache_io(codec, 8, 16, wm8900->control_type);
if (ret != 0) {
dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
if (wm8900 == NULL)
return -ENOMEM;
- wm8900->control_data = spi;
wm8900->control_type = SND_SOC_SPI;
spi_set_drvdata(spi, wm8900);
return -ENOMEM;
i2c_set_clientdata(i2c, wm8900);
- wm8900->control_data = i2c;
wm8900->control_type = SND_SOC_I2C;
ret = snd_soc_register_codec(&i2c->dev,
u16 reg_cache[ARRAY_SIZE(wm8903_reg_defaults)];
int sysclk;
- struct i2c_client *control_data;
int irq;
/* Reference counts */
u16 val;
init_completion(&wm8903->wseq);
- codec->control_data = wm8903->control_data;
ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_I2C);
if (ret != 0) {
return -ENOMEM;
i2c_set_clientdata(i2c, wm8903);
- wm8903->control_data = i2c;
wm8903->irq = i2c->irq;
ret = snd_soc_register_codec(&i2c->dev,
/* codec private data */
struct wm8955_priv {
enum snd_soc_control_type control_type;
- void *control_data;
u16 reg_cache[WM8955_MAX_REGISTER + 1];
struct wm8955_pdata *pdata = dev_get_platdata(codec->dev);
int ret, i;
- codec->control_data = wm8955->control_data;
ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8955->control_type);
if (ret != 0) {
dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
return -ENOMEM;
i2c_set_clientdata(i2c, wm8955);
- wm8955->control_data = i2c;
ret = snd_soc_register_codec(&i2c->dev,
&soc_codec_dev_wm8955, &wm8955_dai, 1);
struct wm8961_priv {
enum snd_soc_control_type control_type;
- void *control_data;
int sysclk;
u16 reg_cache[WM8961_MAX_REGISTER];
};
int ret = 0;
u16 reg;
- codec->control_data = wm8961->control_data;
ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_I2C);
if (ret != 0) {
dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
return -ENOMEM;
i2c_set_clientdata(i2c, wm8961);
- wm8961->control_data = i2c;
ret = snd_soc_register_codec(&i2c->dev,
&soc_codec_dev_wm8961, &wm8961_dai, 1);
/* codec private data */
struct wm8971_priv {
enum snd_soc_control_type control_type;
- void *control_data;
unsigned int sysclk;
};
pr_info("WM8971 Audio Codec %s", WM8971_VERSION);
- codec->control_data = wm8971->control_data;
ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8971->control_type);
if (ret < 0) {
printk(KERN_ERR "wm8971: failed to set cache I/O: %d\n", ret);
return -ENOMEM;
i2c_set_clientdata(i2c, wm8971);
- wm8971->control_data = i2c;
ret = snd_soc_register_codec(&i2c->dev,
&soc_codec_dev_wm8971, &wm8971_dai, 1);
struct wm8974_priv {
enum snd_soc_control_type control_type;
- void *control_data;
u16 reg_cache[WM8974_CACHEREGNUM];
};
struct wm8974_priv *wm8974 = snd_soc_codec_get_drvdata(codec);
int ret = 0;
- codec->control_data = wm8974->control_data;
ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_I2C);
if (ret < 0) {
dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
return -ENOMEM;
i2c_set_clientdata(i2c, wm8974);
- wm8974->control_data = i2c;
ret = snd_soc_register_codec(&i2c->dev,
&soc_codec_dev_wm8974, &wm8974_dai, 1);
struct wm8988_priv {
unsigned int sysclk;
enum snd_soc_control_type control_type;
- void *control_data;
struct snd_pcm_hw_constraint_list *sysclk_constraints;
u16 reg_cache[WM8988_NUM_REG];
};
int ret = 0;
u16 reg;
- codec->control_data = wm8988->control_data;
ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8988->control_type);
if (ret < 0) {
dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
if (wm8988 == NULL)
return -ENOMEM;
- wm8988->control_data = spi;
wm8988->control_type = SND_SOC_SPI;
spi_set_drvdata(spi, wm8988);
return -ENOMEM;
i2c_set_clientdata(i2c, wm8988);
- wm8988->control_data = i2c;
wm8988->control_type = SND_SOC_I2C;
ret = snd_soc_register_codec(&i2c->dev,
/* codec private data */
struct wm8990_priv {
enum snd_soc_control_type control_type;
- void *control_data;
unsigned int sysclk;
unsigned int pcmclk;
};
*/
static int wm8990_probe(struct snd_soc_codec *codec)
{
- struct wm8990_priv *wm8990 = snd_soc_codec_get_drvdata(codec);
int ret;
u16 reg;
- codec->control_data = wm8990->control_data;
ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_I2C);
if (ret < 0) {
printk(KERN_ERR "wm8990: failed to set cache I/O: %d\n", ret);
return -ENOMEM;
i2c_set_clientdata(i2c, wm8990);
- wm8990->control_data = i2c;
ret = snd_soc_register_codec(&i2c->dev,
&soc_codec_dev_wm8990, &wm8990_dai, 1);
struct regulator_bulk_data supplies[WM8993_NUM_SUPPLIES];
struct wm8993_platform_data pdata;
enum snd_soc_control_type control_type;
- void *control_data;
int master;
int sysclk_source;
int tdm_slots;
struct wm8993_priv *wm8993 = snd_soc_codec_get_drvdata(codec);
int ret, i, val;
- codec->control_data = wm8993->control_data;
wm8993->hubs_data.hp_startup_mode = 1;
wm8993->hubs_data.dcs_codes = -2;
return -ENOMEM;
i2c_set_clientdata(i2c, wm8993);
- wm8993->control_data = i2c;
ret = snd_soc_register_codec(&i2c->dev,
&soc_codec_dev_wm8993, &wm8993_dai, 1);