Commit a7e82889 authored by Mark Brown's avatar Mark Brown

Merge branch 'for-3.1' into for-3.2

Remove the bodge for ad193x.

Conflicts:
	sound/soc/soc-io.c
parents b21a415d 0cc62e92
...@@ -56,7 +56,7 @@ static int bf5xx_ad193x_hw_params(struct snd_pcm_substream *substream, ...@@ -56,7 +56,7 @@ static int bf5xx_ad193x_hw_params(struct snd_pcm_substream *substream,
switch (params_rate(params)) { switch (params_rate(params)) {
case 48000: case 48000:
clk = 12288000; clk = 24576000;
break; break;
} }
......
...@@ -27,11 +27,6 @@ struct ad193x_priv { ...@@ -27,11 +27,6 @@ struct ad193x_priv {
int sysclk; int sysclk;
}; };
/* ad193x register cache & default register settings */
static const u8 ad193x_reg[AD193X_NUM_REGS] = {
0, 0, 0, 0, 0, 0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0, 0, 0,
};
/* /*
* AD193X volume/mute/de-emphasis etc. controls * AD193X volume/mute/de-emphasis etc. controls
*/ */
...@@ -307,7 +302,8 @@ static int ad193x_hw_params(struct snd_pcm_substream *substream, ...@@ -307,7 +302,8 @@ static int ad193x_hw_params(struct snd_pcm_substream *substream,
snd_soc_write(codec, AD193X_PLL_CLK_CTRL0, reg); snd_soc_write(codec, AD193X_PLL_CLK_CTRL0, reg);
reg = snd_soc_read(codec, AD193X_DAC_CTRL2); reg = snd_soc_read(codec, AD193X_DAC_CTRL2);
reg = (reg & (~AD193X_DAC_WORD_LEN_MASK)) | word_len; reg = (reg & (~AD193X_DAC_WORD_LEN_MASK))
| (word_len << AD193X_DAC_WORD_LEN_SHFT);
snd_soc_write(codec, AD193X_DAC_CTRL2, reg); snd_soc_write(codec, AD193X_DAC_CTRL2, reg);
reg = snd_soc_read(codec, AD193X_ADC_CTRL1); reg = snd_soc_read(codec, AD193X_ADC_CTRL1);
...@@ -389,9 +385,6 @@ static int ad193x_probe(struct snd_soc_codec *codec) ...@@ -389,9 +385,6 @@ static int ad193x_probe(struct snd_soc_codec *codec)
static struct snd_soc_codec_driver soc_codec_dev_ad193x = { static struct snd_soc_codec_driver soc_codec_dev_ad193x = {
.probe = ad193x_probe, .probe = ad193x_probe,
.reg_cache_default = ad193x_reg,
.reg_cache_size = AD193X_NUM_REGS,
.reg_word_size = sizeof(u16),
}; };
#if defined(CONFIG_SPI_MASTER) #if defined(CONFIG_SPI_MASTER)
......
...@@ -34,7 +34,8 @@ ...@@ -34,7 +34,8 @@
#define AD193X_DAC_LEFT_HIGH (1 << 3) #define AD193X_DAC_LEFT_HIGH (1 << 3)
#define AD193X_DAC_BCLK_INV (1 << 7) #define AD193X_DAC_BCLK_INV (1 << 7)
#define AD193X_DAC_CTRL2 0x804 #define AD193X_DAC_CTRL2 0x804
#define AD193X_DAC_WORD_LEN_MASK 0xC #define AD193X_DAC_WORD_LEN_SHFT 3
#define AD193X_DAC_WORD_LEN_MASK 0x18
#define AD193X_DAC_MASTER_MUTE 1 #define AD193X_DAC_MASTER_MUTE 1
#define AD193X_DAC_CHNL_MUTE 0x805 #define AD193X_DAC_CHNL_MUTE 0x805
#define AD193X_DACL1_MUTE 0 #define AD193X_DACL1_MUTE 0
...@@ -63,7 +64,7 @@ ...@@ -63,7 +64,7 @@
#define AD193X_ADC_CTRL1 0x80f #define AD193X_ADC_CTRL1 0x80f
#define AD193X_ADC_SERFMT_MASK 0x60 #define AD193X_ADC_SERFMT_MASK 0x60
#define AD193X_ADC_SERFMT_STEREO (0 << 5) #define AD193X_ADC_SERFMT_STEREO (0 << 5)
#define AD193X_ADC_SERFMT_TDM (1 << 2) #define AD193X_ADC_SERFMT_TDM (1 << 5)
#define AD193X_ADC_SERFMT_AUX (2 << 5) #define AD193X_ADC_SERFMT_AUX (2 << 5)
#define AD193X_ADC_WORD_LEN_MASK 0x3 #define AD193X_ADC_WORD_LEN_MASK 0x3
#define AD193X_ADC_CTRL2 0x810 #define AD193X_ADC_CTRL2 0x810
......
...@@ -857,6 +857,7 @@ static __devinit int sta32x_i2c_probe(struct i2c_client *i2c, ...@@ -857,6 +857,7 @@ static __devinit int sta32x_i2c_probe(struct i2c_client *i2c,
ret = snd_soc_register_codec(&i2c->dev, &sta32x_codec, &sta32x_dai, 1); ret = snd_soc_register_codec(&i2c->dev, &sta32x_codec, &sta32x_dai, 1);
if (ret != 0) { if (ret != 0) {
dev_err(&i2c->dev, "Failed to register codec (%d)\n", ret); dev_err(&i2c->dev, "Failed to register codec (%d)\n", ret);
kfree(sta32x);
return ret; return ret;
} }
......
...@@ -327,7 +327,7 @@ int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count, ...@@ -327,7 +327,7 @@ int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count,
IRQF_TRIGGER_FALLING, IRQF_TRIGGER_FALLING,
gpios[i].name, gpios[i].name,
&gpios[i]); &gpios[i]);
if (ret) if (ret < 0)
goto err; goto err;
if (gpios[i].wake) { if (gpios[i].wake) {
......
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