Commit ef866ac0 authored by Takashi Iwai's avatar Takashi Iwai

Merge tag 'asoc-v3.11-3' of...

Merge tag 'asoc-v3.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Final updates for v3.11

A few final updates:

 - A couple of additional bug fixes for the AC'97 refactoring.
 - Some fixes for the ADAU1701 driver.
parents bc32134c 370887f1
...@@ -334,7 +334,7 @@ static int adau1701_set_capture_pcm_format(struct snd_soc_codec *codec, ...@@ -334,7 +334,7 @@ static int adau1701_set_capture_pcm_format(struct snd_soc_codec *codec,
mask |= ADAU1701_SEROCTL_MSB_DEALY_MASK; mask |= ADAU1701_SEROCTL_MSB_DEALY_MASK;
} }
snd_soc_update_bits(codec, ADAU1701_SEROCTL, mask, val); regmap_update_bits(adau1701->regmap, ADAU1701_SEROCTL, mask, val);
return 0; return 0;
} }
...@@ -362,7 +362,7 @@ static int adau1701_set_playback_pcm_format(struct snd_soc_codec *codec, ...@@ -362,7 +362,7 @@ static int adau1701_set_playback_pcm_format(struct snd_soc_codec *codec,
return -EINVAL; return -EINVAL;
} }
snd_soc_update_bits(codec, ADAU1701_SERICTL, regmap_update_bits(adau1701->regmap, ADAU1701_SERICTL,
ADAU1701_SERICTL_MODE_MASK, val); ADAU1701_SERICTL_MODE_MASK, val);
return 0; return 0;
...@@ -403,7 +403,7 @@ static int adau1701_hw_params(struct snd_pcm_substream *substream, ...@@ -403,7 +403,7 @@ static int adau1701_hw_params(struct snd_pcm_substream *substream,
return -EINVAL; return -EINVAL;
} }
snd_soc_update_bits(codec, ADAU1701_DSPCTRL, regmap_update_bits(adau1701->regmap, ADAU1701_DSPCTRL,
ADAU1701_DSPCTRL_SR_MASK, val); ADAU1701_DSPCTRL_SR_MASK, val);
format = params_format(params); format = params_format(params);
...@@ -490,6 +490,7 @@ static int adau1701_set_bias_level(struct snd_soc_codec *codec, ...@@ -490,6 +490,7 @@ static int adau1701_set_bias_level(struct snd_soc_codec *codec,
enum snd_soc_bias_level level) enum snd_soc_bias_level level)
{ {
unsigned int mask = ADAU1701_AUXNPOW_VBPD | ADAU1701_AUXNPOW_VRPD; unsigned int mask = ADAU1701_AUXNPOW_VBPD | ADAU1701_AUXNPOW_VRPD;
struct adau1701 *adau1701 = snd_soc_codec_get_drvdata(codec);
switch (level) { switch (level) {
case SND_SOC_BIAS_ON: case SND_SOC_BIAS_ON:
...@@ -498,11 +499,13 @@ static int adau1701_set_bias_level(struct snd_soc_codec *codec, ...@@ -498,11 +499,13 @@ static int adau1701_set_bias_level(struct snd_soc_codec *codec,
break; break;
case SND_SOC_BIAS_STANDBY: case SND_SOC_BIAS_STANDBY:
/* Enable VREF and VREF buffer */ /* Enable VREF and VREF buffer */
snd_soc_update_bits(codec, ADAU1701_AUXNPOW, mask, 0x00); regmap_update_bits(adau1701->regmap,
ADAU1701_AUXNPOW, mask, 0x00);
break; break;
case SND_SOC_BIAS_OFF: case SND_SOC_BIAS_OFF:
/* Disable VREF and VREF buffer */ /* Disable VREF and VREF buffer */
snd_soc_update_bits(codec, ADAU1701_AUXNPOW, mask, mask); regmap_update_bits(adau1701->regmap,
ADAU1701_AUXNPOW, mask, mask);
break; break;
} }
...@@ -514,6 +517,7 @@ static int adau1701_digital_mute(struct snd_soc_dai *dai, int mute) ...@@ -514,6 +517,7 @@ static int adau1701_digital_mute(struct snd_soc_dai *dai, int mute)
{ {
struct snd_soc_codec *codec = dai->codec; struct snd_soc_codec *codec = dai->codec;
unsigned int mask = ADAU1701_DSPCTRL_DAM; unsigned int mask = ADAU1701_DSPCTRL_DAM;
struct adau1701 *adau1701 = snd_soc_codec_get_drvdata(codec);
unsigned int val; unsigned int val;
if (mute) if (mute)
...@@ -521,7 +525,7 @@ static int adau1701_digital_mute(struct snd_soc_dai *dai, int mute) ...@@ -521,7 +525,7 @@ static int adau1701_digital_mute(struct snd_soc_dai *dai, int mute)
else else
val = mask; val = mask;
snd_soc_update_bits(codec, ADAU1701_DSPCTRL, mask, val); regmap_update_bits(adau1701->regmap, ADAU1701_DSPCTRL, mask, val);
return 0; return 0;
} }
...@@ -543,7 +547,8 @@ static int adau1701_set_sysclk(struct snd_soc_codec *codec, int clk_id, ...@@ -543,7 +547,8 @@ static int adau1701_set_sysclk(struct snd_soc_codec *codec, int clk_id,
return -EINVAL; return -EINVAL;
} }
snd_soc_update_bits(codec, ADAU1701_OSCIPOW, ADAU1701_OSCIPOW_OPD, val); regmap_update_bits(adau1701->regmap, ADAU1701_OSCIPOW,
ADAU1701_OSCIPOW_OPD, val);
adau1701->sysclk = freq; adau1701->sysclk = freq;
return 0; return 0;
...@@ -595,8 +600,6 @@ static int adau1701_probe(struct snd_soc_codec *codec) ...@@ -595,8 +600,6 @@ static int adau1701_probe(struct snd_soc_codec *codec)
unsigned int val; unsigned int val;
struct adau1701 *adau1701 = snd_soc_codec_get_drvdata(codec); struct adau1701 *adau1701 = snd_soc_codec_get_drvdata(codec);
codec->control_data = to_i2c_client(codec->dev);
/* /*
* Let the pll_clkdiv variable default to something that won't happen * Let the pll_clkdiv variable default to something that won't happen
* at runtime. That way, we can postpone the firmware download from * at runtime. That way, we can postpone the firmware download from
......
...@@ -238,6 +238,8 @@ static const struct snd_soc_component_driver pxa_ac97_component = { ...@@ -238,6 +238,8 @@ static const struct snd_soc_component_driver pxa_ac97_component = {
static int pxa2xx_ac97_dev_probe(struct platform_device *pdev) static int pxa2xx_ac97_dev_probe(struct platform_device *pdev)
{ {
int ret;
if (pdev->id != -1) { if (pdev->id != -1) {
dev_err(&pdev->dev, "PXA2xx has only one AC97 port.\n"); dev_err(&pdev->dev, "PXA2xx has only one AC97 port.\n");
return -ENXIO; return -ENXIO;
......
...@@ -14,7 +14,4 @@ ...@@ -14,7 +14,4 @@
#define PXA2XX_DAI_AC97_AUX 1 #define PXA2XX_DAI_AC97_AUX 1
#define PXA2XX_DAI_AC97_MIC 2 #define PXA2XX_DAI_AC97_MIC 2
/* platform data */
extern struct snd_ac97_bus_ops pxa2xx_ac97_ops;
#endif #endif
...@@ -2081,6 +2081,7 @@ int snd_soc_new_ac97_codec(struct snd_soc_codec *codec, ...@@ -2081,6 +2081,7 @@ int snd_soc_new_ac97_codec(struct snd_soc_codec *codec,
EXPORT_SYMBOL_GPL(snd_soc_new_ac97_codec); EXPORT_SYMBOL_GPL(snd_soc_new_ac97_codec);
struct snd_ac97_bus_ops *soc_ac97_ops; struct snd_ac97_bus_ops *soc_ac97_ops;
EXPORT_SYMBOL_GPL(soc_ac97_ops);
int snd_soc_set_ac97_ops(struct snd_ac97_bus_ops *ops) int snd_soc_set_ac97_ops(struct snd_ac97_bus_ops *ops)
{ {
......
...@@ -312,7 +312,7 @@ static const struct regmap_config tegra20_ac97_regmap_config = { ...@@ -312,7 +312,7 @@ static const struct regmap_config tegra20_ac97_regmap_config = {
static int tegra20_ac97_platform_probe(struct platform_device *pdev) static int tegra20_ac97_platform_probe(struct platform_device *pdev)
{ {
struct tegra20_ac97 *ac97; struct tegra20_ac97 *ac97;
struct resource *mem, *memregion; struct resource *mem;
u32 of_dma[2]; u32 of_dma[2];
void __iomem *regs; void __iomem *regs;
int ret = 0; int ret = 0;
...@@ -343,7 +343,6 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev) ...@@ -343,7 +343,6 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev)
regs = devm_ioremap_resource(&pdev->dev, mem); regs = devm_ioremap_resource(&pdev->dev, mem);
if (IS_ERR(regs)) { if (IS_ERR(regs)) {
ret = PTR_ERR(regs); ret = PTR_ERR(regs);
dev_err(&pdev->dev, "ioremap failed: %d\n", ret);
goto err_clk_put; goto err_clk_put;
} }
......
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