diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-07-01 05:23:13 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-07-01 05:23:13 -0400 |
commit | ef866ac0c29223d01ce751bb342d8f4fa1b2580a (patch) | |
tree | f6e006b369f08f379fa0c164ff34783daf02215a /sound | |
parent | bc32134c0523c60989d2f2439e176601668a62a5 (diff) | |
parent | 370887f105025ed52acc9cbb0a15b6567d1550ff (diff) |
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.
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/adau1701.c | 21 | ||||
-rw-r--r-- | sound/soc/pxa/pxa2xx-ac97.c | 2 | ||||
-rw-r--r-- | sound/soc/pxa/pxa2xx-ac97.h | 3 | ||||
-rw-r--r-- | sound/soc/soc-core.c | 1 | ||||
-rw-r--r-- | sound/soc/tegra/tegra20_ac97.c | 3 |
5 files changed, 16 insertions, 14 deletions
diff --git a/sound/soc/codecs/adau1701.c b/sound/soc/codecs/adau1701.c index 0e250f118c0e..d1124a5b3471 100644 --- a/sound/soc/codecs/adau1701.c +++ b/sound/soc/codecs/adau1701.c | |||
@@ -334,7 +334,7 @@ static int adau1701_set_capture_pcm_format(struct snd_soc_codec *codec, | |||
334 | mask |= ADAU1701_SEROCTL_MSB_DEALY_MASK; | 334 | mask |= ADAU1701_SEROCTL_MSB_DEALY_MASK; |
335 | } | 335 | } |
336 | 336 | ||
337 | snd_soc_update_bits(codec, ADAU1701_SEROCTL, mask, val); | 337 | regmap_update_bits(adau1701->regmap, ADAU1701_SEROCTL, mask, val); |
338 | 338 | ||
339 | return 0; | 339 | return 0; |
340 | } | 340 | } |
@@ -362,7 +362,7 @@ static int adau1701_set_playback_pcm_format(struct snd_soc_codec *codec, | |||
362 | return -EINVAL; | 362 | return -EINVAL; |
363 | } | 363 | } |
364 | 364 | ||
365 | snd_soc_update_bits(codec, ADAU1701_SERICTL, | 365 | regmap_update_bits(adau1701->regmap, ADAU1701_SERICTL, |
366 | ADAU1701_SERICTL_MODE_MASK, val); | 366 | ADAU1701_SERICTL_MODE_MASK, val); |
367 | 367 | ||
368 | return 0; | 368 | return 0; |
@@ -403,7 +403,7 @@ static int adau1701_hw_params(struct snd_pcm_substream *substream, | |||
403 | return -EINVAL; | 403 | return -EINVAL; |
404 | } | 404 | } |
405 | 405 | ||
406 | snd_soc_update_bits(codec, ADAU1701_DSPCTRL, | 406 | regmap_update_bits(adau1701->regmap, ADAU1701_DSPCTRL, |
407 | ADAU1701_DSPCTRL_SR_MASK, val); | 407 | ADAU1701_DSPCTRL_SR_MASK, val); |
408 | 408 | ||
409 | format = params_format(params); | 409 | format = params_format(params); |
@@ -490,6 +490,7 @@ static int adau1701_set_bias_level(struct snd_soc_codec *codec, | |||
490 | enum snd_soc_bias_level level) | 490 | enum snd_soc_bias_level level) |
491 | { | 491 | { |
492 | unsigned int mask = ADAU1701_AUXNPOW_VBPD | ADAU1701_AUXNPOW_VRPD; | 492 | unsigned int mask = ADAU1701_AUXNPOW_VBPD | ADAU1701_AUXNPOW_VRPD; |
493 | struct adau1701 *adau1701 = snd_soc_codec_get_drvdata(codec); | ||
493 | 494 | ||
494 | switch (level) { | 495 | switch (level) { |
495 | case SND_SOC_BIAS_ON: | 496 | case SND_SOC_BIAS_ON: |
@@ -498,11 +499,13 @@ static int adau1701_set_bias_level(struct snd_soc_codec *codec, | |||
498 | break; | 499 | break; |
499 | case SND_SOC_BIAS_STANDBY: | 500 | case SND_SOC_BIAS_STANDBY: |
500 | /* Enable VREF and VREF buffer */ | 501 | /* Enable VREF and VREF buffer */ |
501 | snd_soc_update_bits(codec, ADAU1701_AUXNPOW, mask, 0x00); | 502 | regmap_update_bits(adau1701->regmap, |
503 | ADAU1701_AUXNPOW, mask, 0x00); | ||
502 | break; | 504 | break; |
503 | case SND_SOC_BIAS_OFF: | 505 | case SND_SOC_BIAS_OFF: |
504 | /* Disable VREF and VREF buffer */ | 506 | /* Disable VREF and VREF buffer */ |
505 | snd_soc_update_bits(codec, ADAU1701_AUXNPOW, mask, mask); | 507 | regmap_update_bits(adau1701->regmap, |
508 | ADAU1701_AUXNPOW, mask, mask); | ||
506 | break; | 509 | break; |
507 | } | 510 | } |
508 | 511 | ||
@@ -514,6 +517,7 @@ static int adau1701_digital_mute(struct snd_soc_dai *dai, int mute) | |||
514 | { | 517 | { |
515 | struct snd_soc_codec *codec = dai->codec; | 518 | struct snd_soc_codec *codec = dai->codec; |
516 | unsigned int mask = ADAU1701_DSPCTRL_DAM; | 519 | unsigned int mask = ADAU1701_DSPCTRL_DAM; |
520 | struct adau1701 *adau1701 = snd_soc_codec_get_drvdata(codec); | ||
517 | unsigned int val; | 521 | unsigned int val; |
518 | 522 | ||
519 | if (mute) | 523 | if (mute) |
@@ -521,7 +525,7 @@ static int adau1701_digital_mute(struct snd_soc_dai *dai, int mute) | |||
521 | else | 525 | else |
522 | val = mask; | 526 | val = mask; |
523 | 527 | ||
524 | snd_soc_update_bits(codec, ADAU1701_DSPCTRL, mask, val); | 528 | regmap_update_bits(adau1701->regmap, ADAU1701_DSPCTRL, mask, val); |
525 | 529 | ||
526 | return 0; | 530 | return 0; |
527 | } | 531 | } |
@@ -543,7 +547,8 @@ static int adau1701_set_sysclk(struct snd_soc_codec *codec, int clk_id, | |||
543 | return -EINVAL; | 547 | return -EINVAL; |
544 | } | 548 | } |
545 | 549 | ||
546 | snd_soc_update_bits(codec, ADAU1701_OSCIPOW, ADAU1701_OSCIPOW_OPD, val); | 550 | regmap_update_bits(adau1701->regmap, ADAU1701_OSCIPOW, |
551 | ADAU1701_OSCIPOW_OPD, val); | ||
547 | adau1701->sysclk = freq; | 552 | adau1701->sysclk = freq; |
548 | 553 | ||
549 | return 0; | 554 | return 0; |
@@ -595,8 +600,6 @@ static int adau1701_probe(struct snd_soc_codec *codec) | |||
595 | unsigned int val; | 600 | unsigned int val; |
596 | struct adau1701 *adau1701 = snd_soc_codec_get_drvdata(codec); | 601 | struct adau1701 *adau1701 = snd_soc_codec_get_drvdata(codec); |
597 | 602 | ||
598 | codec->control_data = to_i2c_client(codec->dev); | ||
599 | |||
600 | /* | 603 | /* |
601 | * Let the pll_clkdiv variable default to something that won't happen | 604 | * Let the pll_clkdiv variable default to something that won't happen |
602 | * at runtime. That way, we can postpone the firmware download from | 605 | * at runtime. That way, we can postpone the firmware download from |
diff --git a/sound/soc/pxa/pxa2xx-ac97.c b/sound/soc/pxa/pxa2xx-ac97.c index a3c22ba25f08..1475515712e6 100644 --- a/sound/soc/pxa/pxa2xx-ac97.c +++ b/sound/soc/pxa/pxa2xx-ac97.c | |||
@@ -238,6 +238,8 @@ static const struct snd_soc_component_driver pxa_ac97_component = { | |||
238 | 238 | ||
239 | static int pxa2xx_ac97_dev_probe(struct platform_device *pdev) | 239 | static int pxa2xx_ac97_dev_probe(struct platform_device *pdev) |
240 | { | 240 | { |
241 | int ret; | ||
242 | |||
241 | if (pdev->id != -1) { | 243 | if (pdev->id != -1) { |
242 | dev_err(&pdev->dev, "PXA2xx has only one AC97 port.\n"); | 244 | dev_err(&pdev->dev, "PXA2xx has only one AC97 port.\n"); |
243 | return -ENXIO; | 245 | return -ENXIO; |
diff --git a/sound/soc/pxa/pxa2xx-ac97.h b/sound/soc/pxa/pxa2xx-ac97.h index eda891e6f31b..a49c21ba3842 100644 --- a/sound/soc/pxa/pxa2xx-ac97.h +++ b/sound/soc/pxa/pxa2xx-ac97.h | |||
@@ -14,7 +14,4 @@ | |||
14 | #define PXA2XX_DAI_AC97_AUX 1 | 14 | #define PXA2XX_DAI_AC97_AUX 1 |
15 | #define PXA2XX_DAI_AC97_MIC 2 | 15 | #define PXA2XX_DAI_AC97_MIC 2 |
16 | 16 | ||
17 | /* platform data */ | ||
18 | extern struct snd_ac97_bus_ops pxa2xx_ac97_ops; | ||
19 | |||
20 | #endif | 17 | #endif |
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 309e5c91167b..0ec070cf7231 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -2081,6 +2081,7 @@ int snd_soc_new_ac97_codec(struct snd_soc_codec *codec, | |||
2081 | EXPORT_SYMBOL_GPL(snd_soc_new_ac97_codec); | 2081 | EXPORT_SYMBOL_GPL(snd_soc_new_ac97_codec); |
2082 | 2082 | ||
2083 | struct snd_ac97_bus_ops *soc_ac97_ops; | 2083 | struct snd_ac97_bus_ops *soc_ac97_ops; |
2084 | EXPORT_SYMBOL_GPL(soc_ac97_ops); | ||
2084 | 2085 | ||
2085 | int snd_soc_set_ac97_ops(struct snd_ac97_bus_ops *ops) | 2086 | int snd_soc_set_ac97_ops(struct snd_ac97_bus_ops *ops) |
2086 | { | 2087 | { |
diff --git a/sound/soc/tegra/tegra20_ac97.c b/sound/soc/tegra/tegra20_ac97.c index f52eab6d2231..e58233f7df61 100644 --- a/sound/soc/tegra/tegra20_ac97.c +++ b/sound/soc/tegra/tegra20_ac97.c | |||
@@ -312,7 +312,7 @@ static const struct regmap_config tegra20_ac97_regmap_config = { | |||
312 | static int tegra20_ac97_platform_probe(struct platform_device *pdev) | 312 | static int tegra20_ac97_platform_probe(struct platform_device *pdev) |
313 | { | 313 | { |
314 | struct tegra20_ac97 *ac97; | 314 | struct tegra20_ac97 *ac97; |
315 | struct resource *mem, *memregion; | 315 | struct resource *mem; |
316 | u32 of_dma[2]; | 316 | u32 of_dma[2]; |
317 | void __iomem *regs; | 317 | void __iomem *regs; |
318 | int ret = 0; | 318 | int ret = 0; |
@@ -343,7 +343,6 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev) | |||
343 | regs = devm_ioremap_resource(&pdev->dev, mem); | 343 | regs = devm_ioremap_resource(&pdev->dev, mem); |
344 | if (IS_ERR(regs)) { | 344 | if (IS_ERR(regs)) { |
345 | ret = PTR_ERR(regs); | 345 | ret = PTR_ERR(regs); |
346 | dev_err(&pdev->dev, "ioremap failed: %d\n", ret); | ||
347 | goto err_clk_put; | 346 | goto err_clk_put; |
348 | } | 347 | } |
349 | 348 | ||