Merge branch 'for-3.1' into for-3.2
Remove the bodge for ad193x. Conflicts: sound/soc/soc-io.c
This commit is contained in:
commit
a7e828896d
@ -56,7 +56,7 @@ static int bf5xx_ad193x_hw_params(struct snd_pcm_substream *substream,
|
||||
|
||||
switch (params_rate(params)) {
|
||||
case 48000:
|
||||
clk = 12288000;
|
||||
clk = 24576000;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -27,11 +27,6 @@ struct ad193x_priv {
|
||||
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
|
||||
*/
|
||||
@ -307,7 +302,8 @@ static int ad193x_hw_params(struct snd_pcm_substream *substream,
|
||||
snd_soc_write(codec, AD193X_PLL_CLK_CTRL0, reg);
|
||||
|
||||
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);
|
||||
|
||||
reg = snd_soc_read(codec, AD193X_ADC_CTRL1);
|
||||
@ -389,9 +385,6 @@ static int ad193x_probe(struct snd_soc_codec *codec)
|
||||
|
||||
static struct snd_soc_codec_driver soc_codec_dev_ad193x = {
|
||||
.probe = ad193x_probe,
|
||||
.reg_cache_default = ad193x_reg,
|
||||
.reg_cache_size = AD193X_NUM_REGS,
|
||||
.reg_word_size = sizeof(u16),
|
||||
};
|
||||
|
||||
#if defined(CONFIG_SPI_MASTER)
|
||||
|
@ -34,7 +34,8 @@
|
||||
#define AD193X_DAC_LEFT_HIGH (1 << 3)
|
||||
#define AD193X_DAC_BCLK_INV (1 << 7)
|
||||
#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_CHNL_MUTE 0x805
|
||||
#define AD193X_DACL1_MUTE 0
|
||||
@ -63,7 +64,7 @@
|
||||
#define AD193X_ADC_CTRL1 0x80f
|
||||
#define AD193X_ADC_SERFMT_MASK 0x60
|
||||
#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_WORD_LEN_MASK 0x3
|
||||
#define AD193X_ADC_CTRL2 0x810
|
||||
|
@ -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);
|
||||
if (ret != 0) {
|
||||
dev_err(&i2c->dev, "Failed to register codec (%d)\n", ret);
|
||||
kfree(sta32x);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -327,7 +327,7 @@ int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count,
|
||||
IRQF_TRIGGER_FALLING,
|
||||
gpios[i].name,
|
||||
&gpios[i]);
|
||||
if (ret)
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
|
||||
if (gpios[i].wake) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user