diff options
| -rw-r--r-- | MAINTAINERS | 10 | ||||
| -rw-r--r-- | arch/arm/boot/dts/exynos4.dtsi | 4 | ||||
| -rw-r--r-- | include/sound/soc.h | 1 | ||||
| -rw-r--r-- | sound/soc/atmel/atmel_ssc_dai.c | 24 | ||||
| -rw-r--r-- | sound/soc/codecs/rt286.c | 40 | ||||
| -rw-r--r-- | sound/soc/codecs/rt5640.c | 1 | ||||
| -rw-r--r-- | sound/soc/codecs/sgtl5000.c | 13 | ||||
| -rw-r--r-- | sound/soc/codecs/sta32x.h | 2 | ||||
| -rw-r--r-- | sound/soc/codecs/tlv320aic3x.c | 2 | ||||
| -rw-r--r-- | sound/soc/codecs/wm8731.c | 2 | ||||
| -rw-r--r-- | sound/soc/codecs/wm9705.c | 16 | ||||
| -rw-r--r-- | sound/soc/codecs/wm9712.c | 12 | ||||
| -rw-r--r-- | sound/soc/codecs/wm9713.c | 12 | ||||
| -rw-r--r-- | sound/soc/intel/sst-haswell-ipc.c | 4 | ||||
| -rw-r--r-- | sound/soc/intel/sst/sst.h | 3 | ||||
| -rw-r--r-- | sound/soc/intel/sst/sst_acpi.c | 4 | ||||
| -rw-r--r-- | sound/soc/soc-ac97.c | 36 |
17 files changed, 103 insertions, 83 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index aaa039dee999..4871639b939f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -4953,6 +4953,16 @@ F: Documentation/input/multi-touch-protocol.txt | |||
| 4953 | F: drivers/input/input-mt.c | 4953 | F: drivers/input/input-mt.c |
| 4954 | K: \b(ABS|SYN)_MT_ | 4954 | K: \b(ABS|SYN)_MT_ |
| 4955 | 4955 | ||
| 4956 | INTEL ASoC BDW/HSW DRIVERS | ||
| 4957 | M: Jie Yang <yang.jie@linux.intel.com> | ||
| 4958 | L: alsa-devel@alsa-project.org | ||
| 4959 | S: Supported | ||
| 4960 | F: sound/soc/intel/sst-haswell* | ||
| 4961 | F: sound/soc/intel/sst-dsp* | ||
| 4962 | F: sound/soc/intel/sst-firmware.c | ||
| 4963 | F: sound/soc/intel/broadwell.c | ||
| 4964 | F: sound/soc/intel/haswell.c | ||
| 4965 | |||
| 4956 | INTEL C600 SERIES SAS CONTROLLER DRIVER | 4966 | INTEL C600 SERIES SAS CONTROLLER DRIVER |
| 4957 | M: Intel SCU Linux support <intel-linux-scu@intel.com> | 4967 | M: Intel SCU Linux support <intel-linux-scu@intel.com> |
| 4958 | M: Artur Paszkiewicz <artur.paszkiewicz@intel.com> | 4968 | M: Artur Paszkiewicz <artur.paszkiewicz@intel.com> |
diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi index b8168f1f8139..24ff27049ce0 100644 --- a/arch/arm/boot/dts/exynos4.dtsi +++ b/arch/arm/boot/dts/exynos4.dtsi | |||
| @@ -368,7 +368,7 @@ | |||
| 368 | }; | 368 | }; |
| 369 | 369 | ||
| 370 | i2s1: i2s@13960000 { | 370 | i2s1: i2s@13960000 { |
| 371 | compatible = "samsung,s5pv210-i2s"; | 371 | compatible = "samsung,s3c6410-i2s"; |
| 372 | reg = <0x13960000 0x100>; | 372 | reg = <0x13960000 0x100>; |
| 373 | clocks = <&clock CLK_I2S1>; | 373 | clocks = <&clock CLK_I2S1>; |
| 374 | clock-names = "iis"; | 374 | clock-names = "iis"; |
| @@ -378,7 +378,7 @@ | |||
| 378 | }; | 378 | }; |
| 379 | 379 | ||
| 380 | i2s2: i2s@13970000 { | 380 | i2s2: i2s@13970000 { |
| 381 | compatible = "samsung,s5pv210-i2s"; | 381 | compatible = "samsung,s3c6410-i2s"; |
| 382 | reg = <0x13970000 0x100>; | 382 | reg = <0x13970000 0x100>; |
| 383 | clocks = <&clock CLK_I2S2>; | 383 | clocks = <&clock CLK_I2S2>; |
| 384 | clock-names = "iis"; | 384 | clock-names = "iis"; |
diff --git a/include/sound/soc.h b/include/sound/soc.h index b4fca9aed2a2..ac8b333acb4d 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
| @@ -498,6 +498,7 @@ int snd_soc_test_bits(struct snd_soc_codec *codec, unsigned int reg, | |||
| 498 | unsigned int mask, unsigned int value); | 498 | unsigned int mask, unsigned int value); |
| 499 | 499 | ||
| 500 | #ifdef CONFIG_SND_SOC_AC97_BUS | 500 | #ifdef CONFIG_SND_SOC_AC97_BUS |
| 501 | struct snd_ac97 *snd_soc_alloc_ac97_codec(struct snd_soc_codec *codec); | ||
| 501 | struct snd_ac97 *snd_soc_new_ac97_codec(struct snd_soc_codec *codec); | 502 | struct snd_ac97 *snd_soc_new_ac97_codec(struct snd_soc_codec *codec); |
| 502 | void snd_soc_free_ac97_codec(struct snd_ac97 *ac97); | 503 | void snd_soc_free_ac97_codec(struct snd_ac97 *ac97); |
| 503 | 504 | ||
diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c index 99ff35e2a25d..35e44e463cfe 100644 --- a/sound/soc/atmel/atmel_ssc_dai.c +++ b/sound/soc/atmel/atmel_ssc_dai.c | |||
| @@ -348,7 +348,6 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream, | |||
| 348 | struct atmel_pcm_dma_params *dma_params; | 348 | struct atmel_pcm_dma_params *dma_params; |
| 349 | int dir, channels, bits; | 349 | int dir, channels, bits; |
| 350 | u32 tfmr, rfmr, tcmr, rcmr; | 350 | u32 tfmr, rfmr, tcmr, rcmr; |
| 351 | int start_event; | ||
| 352 | int ret; | 351 | int ret; |
| 353 | int fslen, fslen_ext; | 352 | int fslen, fslen_ext; |
| 354 | 353 | ||
| @@ -457,19 +456,10 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream, | |||
| 457 | * The SSC transmit clock is obtained from the BCLK signal on | 456 | * The SSC transmit clock is obtained from the BCLK signal on |
| 458 | * on the TK line, and the SSC receive clock is | 457 | * on the TK line, and the SSC receive clock is |
| 459 | * generated from the transmit clock. | 458 | * generated from the transmit clock. |
| 460 | * | ||
| 461 | * For single channel data, one sample is transferred | ||
| 462 | * on the falling edge of the LRC clock. | ||
| 463 | * For two channel data, one sample is | ||
| 464 | * transferred on both edges of the LRC clock. | ||
| 465 | */ | 459 | */ |
| 466 | start_event = ((channels == 1) | ||
| 467 | ? SSC_START_FALLING_RF | ||
| 468 | : SSC_START_EDGE_RF); | ||
| 469 | |||
| 470 | rcmr = SSC_BF(RCMR_PERIOD, 0) | 460 | rcmr = SSC_BF(RCMR_PERIOD, 0) |
| 471 | | SSC_BF(RCMR_STTDLY, START_DELAY) | 461 | | SSC_BF(RCMR_STTDLY, START_DELAY) |
| 472 | | SSC_BF(RCMR_START, start_event) | 462 | | SSC_BF(RCMR_START, SSC_START_FALLING_RF) |
| 473 | | SSC_BF(RCMR_CKI, SSC_CKI_RISING) | 463 | | SSC_BF(RCMR_CKI, SSC_CKI_RISING) |
| 474 | | SSC_BF(RCMR_CKO, SSC_CKO_NONE) | 464 | | SSC_BF(RCMR_CKO, SSC_CKO_NONE) |
| 475 | | SSC_BF(RCMR_CKS, ssc->clk_from_rk_pin ? | 465 | | SSC_BF(RCMR_CKS, ssc->clk_from_rk_pin ? |
| @@ -478,14 +468,14 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream, | |||
| 478 | rfmr = SSC_BF(RFMR_FSEDGE, SSC_FSEDGE_POSITIVE) | 468 | rfmr = SSC_BF(RFMR_FSEDGE, SSC_FSEDGE_POSITIVE) |
| 479 | | SSC_BF(RFMR_FSOS, SSC_FSOS_NONE) | 469 | | SSC_BF(RFMR_FSOS, SSC_FSOS_NONE) |
| 480 | | SSC_BF(RFMR_FSLEN, 0) | 470 | | SSC_BF(RFMR_FSLEN, 0) |
| 481 | | SSC_BF(RFMR_DATNB, 0) | 471 | | SSC_BF(RFMR_DATNB, (channels - 1)) |
| 482 | | SSC_BIT(RFMR_MSBF) | 472 | | SSC_BIT(RFMR_MSBF) |
| 483 | | SSC_BF(RFMR_LOOP, 0) | 473 | | SSC_BF(RFMR_LOOP, 0) |
| 484 | | SSC_BF(RFMR_DATLEN, (bits - 1)); | 474 | | SSC_BF(RFMR_DATLEN, (bits - 1)); |
| 485 | 475 | ||
| 486 | tcmr = SSC_BF(TCMR_PERIOD, 0) | 476 | tcmr = SSC_BF(TCMR_PERIOD, 0) |
| 487 | | SSC_BF(TCMR_STTDLY, START_DELAY) | 477 | | SSC_BF(TCMR_STTDLY, START_DELAY) |
| 488 | | SSC_BF(TCMR_START, start_event) | 478 | | SSC_BF(TCMR_START, SSC_START_FALLING_RF) |
| 489 | | SSC_BF(TCMR_CKI, SSC_CKI_FALLING) | 479 | | SSC_BF(TCMR_CKI, SSC_CKI_FALLING) |
| 490 | | SSC_BF(TCMR_CKO, SSC_CKO_NONE) | 480 | | SSC_BF(TCMR_CKO, SSC_CKO_NONE) |
| 491 | | SSC_BF(TCMR_CKS, ssc->clk_from_rk_pin ? | 481 | | SSC_BF(TCMR_CKS, ssc->clk_from_rk_pin ? |
| @@ -495,7 +485,7 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream, | |||
| 495 | | SSC_BF(TFMR_FSDEN, 0) | 485 | | SSC_BF(TFMR_FSDEN, 0) |
| 496 | | SSC_BF(TFMR_FSOS, SSC_FSOS_NONE) | 486 | | SSC_BF(TFMR_FSOS, SSC_FSOS_NONE) |
| 497 | | SSC_BF(TFMR_FSLEN, 0) | 487 | | SSC_BF(TFMR_FSLEN, 0) |
| 498 | | SSC_BF(TFMR_DATNB, 0) | 488 | | SSC_BF(TFMR_DATNB, (channels - 1)) |
| 499 | | SSC_BIT(TFMR_MSBF) | 489 | | SSC_BIT(TFMR_MSBF) |
| 500 | | SSC_BF(TFMR_DATDEF, 0) | 490 | | SSC_BF(TFMR_DATDEF, 0) |
| 501 | | SSC_BF(TFMR_DATLEN, (bits - 1)); | 491 | | SSC_BF(TFMR_DATLEN, (bits - 1)); |
| @@ -512,7 +502,7 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream, | |||
| 512 | rcmr = SSC_BF(RCMR_PERIOD, ssc_p->rcmr_period) | 502 | rcmr = SSC_BF(RCMR_PERIOD, ssc_p->rcmr_period) |
| 513 | | SSC_BF(RCMR_STTDLY, 1) | 503 | | SSC_BF(RCMR_STTDLY, 1) |
| 514 | | SSC_BF(RCMR_START, SSC_START_RISING_RF) | 504 | | SSC_BF(RCMR_START, SSC_START_RISING_RF) |
| 515 | | SSC_BF(RCMR_CKI, SSC_CKI_RISING) | 505 | | SSC_BF(RCMR_CKI, SSC_CKI_FALLING) |
| 516 | | SSC_BF(RCMR_CKO, SSC_CKO_NONE) | 506 | | SSC_BF(RCMR_CKO, SSC_CKO_NONE) |
| 517 | | SSC_BF(RCMR_CKS, SSC_CKS_DIV); | 507 | | SSC_BF(RCMR_CKS, SSC_CKS_DIV); |
| 518 | 508 | ||
| @@ -527,7 +517,7 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream, | |||
| 527 | tcmr = SSC_BF(TCMR_PERIOD, ssc_p->tcmr_period) | 517 | tcmr = SSC_BF(TCMR_PERIOD, ssc_p->tcmr_period) |
| 528 | | SSC_BF(TCMR_STTDLY, 1) | 518 | | SSC_BF(TCMR_STTDLY, 1) |
| 529 | | SSC_BF(TCMR_START, SSC_START_RISING_RF) | 519 | | SSC_BF(TCMR_START, SSC_START_RISING_RF) |
| 530 | | SSC_BF(TCMR_CKI, SSC_CKI_RISING) | 520 | | SSC_BF(TCMR_CKI, SSC_CKI_FALLING) |
| 531 | | SSC_BF(TCMR_CKO, SSC_CKO_CONTINUOUS) | 521 | | SSC_BF(TCMR_CKO, SSC_CKO_CONTINUOUS) |
| 532 | | SSC_BF(TCMR_CKS, SSC_CKS_DIV); | 522 | | SSC_BF(TCMR_CKS, SSC_CKS_DIV); |
| 533 | 523 | ||
| @@ -556,7 +546,7 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream, | |||
| 556 | rcmr = SSC_BF(RCMR_PERIOD, 0) | 546 | rcmr = SSC_BF(RCMR_PERIOD, 0) |
| 557 | | SSC_BF(RCMR_STTDLY, START_DELAY) | 547 | | SSC_BF(RCMR_STTDLY, START_DELAY) |
| 558 | | SSC_BF(RCMR_START, SSC_START_RISING_RF) | 548 | | SSC_BF(RCMR_START, SSC_START_RISING_RF) |
| 559 | | SSC_BF(RCMR_CKI, SSC_CKI_RISING) | 549 | | SSC_BF(RCMR_CKI, SSC_CKI_FALLING) |
| 560 | | SSC_BF(RCMR_CKO, SSC_CKO_NONE) | 550 | | SSC_BF(RCMR_CKO, SSC_CKO_NONE) |
| 561 | | SSC_BF(RCMR_CKS, ssc->clk_from_rk_pin ? | 551 | | SSC_BF(RCMR_CKS, ssc->clk_from_rk_pin ? |
| 562 | SSC_CKS_PIN : SSC_CKS_CLOCK); | 552 | SSC_CKS_PIN : SSC_CKS_CLOCK); |
diff --git a/sound/soc/codecs/rt286.c b/sound/soc/codecs/rt286.c index 1d1c7f8a9af2..f14d335b07b1 100644 --- a/sound/soc/codecs/rt286.c +++ b/sound/soc/codecs/rt286.c | |||
| @@ -305,6 +305,8 @@ static int rt286_jack_detect(struct rt286_priv *rt286, bool *hp, bool *mic) | |||
| 305 | *hp = false; | 305 | *hp = false; |
| 306 | *mic = false; | 306 | *mic = false; |
| 307 | 307 | ||
| 308 | if (!rt286->codec) | ||
| 309 | return -EINVAL; | ||
| 308 | if (rt286->pdata.cbj_en) { | 310 | if (rt286->pdata.cbj_en) { |
| 309 | regmap_read(rt286->regmap, RT286_GET_HP_SENSE, &buf); | 311 | regmap_read(rt286->regmap, RT286_GET_HP_SENSE, &buf); |
| 310 | *hp = buf & 0x80000000; | 312 | *hp = buf & 0x80000000; |
| @@ -417,6 +419,8 @@ static const DECLARE_TLV_DB_SCALE(mic_vol_tlv, 0, 1000, 0); | |||
| 417 | static const struct snd_kcontrol_new rt286_snd_controls[] = { | 419 | static const struct snd_kcontrol_new rt286_snd_controls[] = { |
| 418 | SOC_DOUBLE_R_TLV("DAC0 Playback Volume", RT286_DACL_GAIN, | 420 | SOC_DOUBLE_R_TLV("DAC0 Playback Volume", RT286_DACL_GAIN, |
| 419 | RT286_DACR_GAIN, 0, 0x7f, 0, out_vol_tlv), | 421 | RT286_DACR_GAIN, 0, 0x7f, 0, out_vol_tlv), |
| 422 | SOC_DOUBLE_R("ADC0 Capture Switch", RT286_ADCL_GAIN, | ||
| 423 | RT286_ADCR_GAIN, 7, 1, 1), | ||
| 420 | SOC_DOUBLE_R_TLV("ADC0 Capture Volume", RT286_ADCL_GAIN, | 424 | SOC_DOUBLE_R_TLV("ADC0 Capture Volume", RT286_ADCL_GAIN, |
| 421 | RT286_ADCR_GAIN, 0, 0x7f, 0, out_vol_tlv), | 425 | RT286_ADCR_GAIN, 0, 0x7f, 0, out_vol_tlv), |
| 422 | SOC_SINGLE_TLV("AMIC Volume", RT286_MIC_GAIN, | 426 | SOC_SINGLE_TLV("AMIC Volume", RT286_MIC_GAIN, |
| @@ -538,32 +542,6 @@ static int rt286_set_dmic1_event(struct snd_soc_dapm_widget *w, | |||
| 538 | return 0; | 542 | return 0; |
| 539 | } | 543 | } |
| 540 | 544 | ||
| 541 | static int rt286_adc_event(struct snd_soc_dapm_widget *w, | ||
| 542 | struct snd_kcontrol *kcontrol, int event) | ||
| 543 | { | ||
| 544 | struct snd_soc_codec *codec = w->codec; | ||
| 545 | unsigned int nid; | ||
| 546 | |||
| 547 | nid = (w->reg >> 20) & 0xff; | ||
| 548 | |||
| 549 | switch (event) { | ||
| 550 | case SND_SOC_DAPM_POST_PMU: | ||
| 551 | snd_soc_update_bits(codec, | ||
| 552 | VERB_CMD(AC_VERB_SET_AMP_GAIN_MUTE, nid, 0), | ||
| 553 | 0x7080, 0x7000); | ||
| 554 | break; | ||
| 555 | case SND_SOC_DAPM_PRE_PMD: | ||
| 556 | snd_soc_update_bits(codec, | ||
| 557 | VERB_CMD(AC_VERB_SET_AMP_GAIN_MUTE, nid, 0), | ||
| 558 | 0x7080, 0x7080); | ||
| 559 | break; | ||
| 560 | default: | ||
| 561 | return 0; | ||
| 562 | } | ||
| 563 | |||
| 564 | return 0; | ||
| 565 | } | ||
| 566 | |||
| 567 | static int rt286_vref_event(struct snd_soc_dapm_widget *w, | 545 | static int rt286_vref_event(struct snd_soc_dapm_widget *w, |
| 568 | struct snd_kcontrol *kcontrol, int event) | 546 | struct snd_kcontrol *kcontrol, int event) |
| 569 | { | 547 | { |
| @@ -667,12 +645,10 @@ static const struct snd_soc_dapm_widget rt286_dapm_widgets[] = { | |||
| 667 | SND_SOC_DAPM_ADC("ADC 1", NULL, SND_SOC_NOPM, 0, 0), | 645 | SND_SOC_DAPM_ADC("ADC 1", NULL, SND_SOC_NOPM, 0, 0), |
| 668 | 646 | ||
| 669 | /* ADC Mux */ | 647 | /* ADC Mux */ |
| 670 | SND_SOC_DAPM_MUX_E("ADC 0 Mux", RT286_SET_POWER(RT286_ADC_IN1), 0, 1, | 648 | SND_SOC_DAPM_MUX("ADC 0 Mux", RT286_SET_POWER(RT286_ADC_IN1), 0, 1, |
| 671 | &rt286_adc0_mux, rt286_adc_event, SND_SOC_DAPM_PRE_PMD | | 649 | &rt286_adc0_mux), |
| 672 | SND_SOC_DAPM_POST_PMU), | 650 | SND_SOC_DAPM_MUX("ADC 1 Mux", RT286_SET_POWER(RT286_ADC_IN2), 0, 1, |
| 673 | SND_SOC_DAPM_MUX_E("ADC 1 Mux", RT286_SET_POWER(RT286_ADC_IN2), 0, 1, | 651 | &rt286_adc1_mux), |
| 674 | &rt286_adc1_mux, rt286_adc_event, SND_SOC_DAPM_PRE_PMD | | ||
| 675 | SND_SOC_DAPM_POST_PMU), | ||
| 676 | 652 | ||
| 677 | /* Audio Interface */ | 653 | /* Audio Interface */ |
| 678 | SND_SOC_DAPM_AIF_IN("AIF1RX", "AIF1 Playback", 0, SND_SOC_NOPM, 0, 0), | 654 | SND_SOC_DAPM_AIF_IN("AIF1RX", "AIF1 Playback", 0, SND_SOC_NOPM, 0, 0), |
diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c index c3f2decd643c..1ff726c29249 100644 --- a/sound/soc/codecs/rt5640.c +++ b/sound/soc/codecs/rt5640.c | |||
| @@ -2124,6 +2124,7 @@ MODULE_DEVICE_TABLE(of, rt5640_of_match); | |||
| 2124 | static struct acpi_device_id rt5640_acpi_match[] = { | 2124 | static struct acpi_device_id rt5640_acpi_match[] = { |
| 2125 | { "INT33CA", 0 }, | 2125 | { "INT33CA", 0 }, |
| 2126 | { "10EC5640", 0 }, | 2126 | { "10EC5640", 0 }, |
| 2127 | { "10EC5642", 0 }, | ||
| 2127 | { }, | 2128 | { }, |
| 2128 | }; | 2129 | }; |
| 2129 | MODULE_DEVICE_TABLE(acpi, rt5640_acpi_match); | 2130 | MODULE_DEVICE_TABLE(acpi, rt5640_acpi_match); |
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index 29cf7ce610f4..aa98be32bb60 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c | |||
| @@ -483,21 +483,21 @@ static int sgtl5000_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) | |||
| 483 | /* setting i2s data format */ | 483 | /* setting i2s data format */ |
| 484 | switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { | 484 | switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { |
| 485 | case SND_SOC_DAIFMT_DSP_A: | 485 | case SND_SOC_DAIFMT_DSP_A: |
| 486 | i2sctl |= SGTL5000_I2S_MODE_PCM; | 486 | i2sctl |= SGTL5000_I2S_MODE_PCM << SGTL5000_I2S_MODE_SHIFT; |
| 487 | break; | 487 | break; |
| 488 | case SND_SOC_DAIFMT_DSP_B: | 488 | case SND_SOC_DAIFMT_DSP_B: |
| 489 | i2sctl |= SGTL5000_I2S_MODE_PCM; | 489 | i2sctl |= SGTL5000_I2S_MODE_PCM << SGTL5000_I2S_MODE_SHIFT; |
| 490 | i2sctl |= SGTL5000_I2S_LRALIGN; | 490 | i2sctl |= SGTL5000_I2S_LRALIGN; |
| 491 | break; | 491 | break; |
| 492 | case SND_SOC_DAIFMT_I2S: | 492 | case SND_SOC_DAIFMT_I2S: |
| 493 | i2sctl |= SGTL5000_I2S_MODE_I2S_LJ; | 493 | i2sctl |= SGTL5000_I2S_MODE_I2S_LJ << SGTL5000_I2S_MODE_SHIFT; |
| 494 | break; | 494 | break; |
| 495 | case SND_SOC_DAIFMT_RIGHT_J: | 495 | case SND_SOC_DAIFMT_RIGHT_J: |
| 496 | i2sctl |= SGTL5000_I2S_MODE_RJ; | 496 | i2sctl |= SGTL5000_I2S_MODE_RJ << SGTL5000_I2S_MODE_SHIFT; |
| 497 | i2sctl |= SGTL5000_I2S_LRPOL; | 497 | i2sctl |= SGTL5000_I2S_LRPOL; |
| 498 | break; | 498 | break; |
| 499 | case SND_SOC_DAIFMT_LEFT_J: | 499 | case SND_SOC_DAIFMT_LEFT_J: |
| 500 | i2sctl |= SGTL5000_I2S_MODE_I2S_LJ; | 500 | i2sctl |= SGTL5000_I2S_MODE_I2S_LJ << SGTL5000_I2S_MODE_SHIFT; |
| 501 | i2sctl |= SGTL5000_I2S_LRALIGN; | 501 | i2sctl |= SGTL5000_I2S_LRALIGN; |
| 502 | break; | 502 | break; |
| 503 | default: | 503 | default: |
| @@ -1462,6 +1462,9 @@ static int sgtl5000_i2c_probe(struct i2c_client *client, | |||
| 1462 | if (ret) | 1462 | if (ret) |
| 1463 | return ret; | 1463 | return ret; |
| 1464 | 1464 | ||
| 1465 | /* Need 8 clocks before I2C accesses */ | ||
| 1466 | udelay(1); | ||
| 1467 | |||
| 1465 | /* read chip information */ | 1468 | /* read chip information */ |
| 1466 | ret = regmap_read(sgtl5000->regmap, SGTL5000_CHIP_ID, ®); | 1469 | ret = regmap_read(sgtl5000->regmap, SGTL5000_CHIP_ID, ®); |
| 1467 | if (ret) | 1470 | if (ret) |
diff --git a/sound/soc/codecs/sta32x.h b/sound/soc/codecs/sta32x.h index d8e32a6262ee..d3191c983d71 100644 --- a/sound/soc/codecs/sta32x.h +++ b/sound/soc/codecs/sta32x.h | |||
| @@ -131,7 +131,7 @@ | |||
| 131 | #define STA32X_CONFF_OCFG_MASK 0x03 | 131 | #define STA32X_CONFF_OCFG_MASK 0x03 |
| 132 | #define STA32X_CONFF_OCFG_SHIFT 0 | 132 | #define STA32X_CONFF_OCFG_SHIFT 0 |
| 133 | #define STA32X_CONFF_IDE 0x04 | 133 | #define STA32X_CONFF_IDE 0x04 |
| 134 | #define STA32X_CONFF_IDE_SHIFT 3 | 134 | #define STA32X_CONFF_IDE_SHIFT 2 |
| 135 | #define STA32X_CONFF_BCLE 0x08 | 135 | #define STA32X_CONFF_BCLE 0x08 |
| 136 | #define STA32X_CONFF_ECLE 0x20 | 136 | #define STA32X_CONFF_ECLE 0x20 |
| 137 | #define STA32X_CONFF_PWDN 0x40 | 137 | #define STA32X_CONFF_PWDN 0x40 |
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index b7ebce054b4e..dd222b10ce13 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c | |||
| @@ -1046,7 +1046,7 @@ static int aic3x_prepare(struct snd_pcm_substream *substream, | |||
| 1046 | delay += aic3x->tdm_delay; | 1046 | delay += aic3x->tdm_delay; |
| 1047 | 1047 | ||
| 1048 | /* Configure data delay */ | 1048 | /* Configure data delay */ |
| 1049 | snd_soc_write(codec, AIC3X_ASD_INTF_CTRLC, aic3x->tdm_delay); | 1049 | snd_soc_write(codec, AIC3X_ASD_INTF_CTRLC, delay); |
| 1050 | 1050 | ||
| 1051 | return 0; | 1051 | return 0; |
| 1052 | } | 1052 | } |
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c index b9211b42f6e9..b115ed815db9 100644 --- a/sound/soc/codecs/wm8731.c +++ b/sound/soc/codecs/wm8731.c | |||
| @@ -717,6 +717,8 @@ static int wm8731_i2c_probe(struct i2c_client *i2c, | |||
| 717 | if (wm8731 == NULL) | 717 | if (wm8731 == NULL) |
| 718 | return -ENOMEM; | 718 | return -ENOMEM; |
| 719 | 719 | ||
| 720 | mutex_init(&wm8731->lock); | ||
| 721 | |||
| 720 | wm8731->regmap = devm_regmap_init_i2c(i2c, &wm8731_regmap); | 722 | wm8731->regmap = devm_regmap_init_i2c(i2c, &wm8731_regmap); |
| 721 | if (IS_ERR(wm8731->regmap)) { | 723 | if (IS_ERR(wm8731->regmap)) { |
| 722 | ret = PTR_ERR(wm8731->regmap); | 724 | ret = PTR_ERR(wm8731->regmap); |
diff --git a/sound/soc/codecs/wm9705.c b/sound/soc/codecs/wm9705.c index 3eddb18fefd1..5cc457ef8894 100644 --- a/sound/soc/codecs/wm9705.c +++ b/sound/soc/codecs/wm9705.c | |||
| @@ -344,23 +344,27 @@ static int wm9705_soc_probe(struct snd_soc_codec *codec) | |||
| 344 | struct snd_ac97 *ac97; | 344 | struct snd_ac97 *ac97; |
| 345 | int ret = 0; | 345 | int ret = 0; |
| 346 | 346 | ||
| 347 | ac97 = snd_soc_new_ac97_codec(codec); | 347 | ac97 = snd_soc_alloc_ac97_codec(codec); |
| 348 | if (IS_ERR(ac97)) { | 348 | if (IS_ERR(ac97)) { |
| 349 | ret = PTR_ERR(ac97); | 349 | ret = PTR_ERR(ac97); |
| 350 | dev_err(codec->dev, "Failed to register AC97 codec\n"); | 350 | dev_err(codec->dev, "Failed to register AC97 codec\n"); |
| 351 | return ret; | 351 | return ret; |
| 352 | } | 352 | } |
| 353 | 353 | ||
| 354 | snd_soc_codec_set_drvdata(codec, ac97); | ||
| 355 | |||
| 356 | ret = wm9705_reset(codec); | 354 | ret = wm9705_reset(codec); |
| 357 | if (ret) | 355 | if (ret) |
| 358 | goto reset_err; | 356 | goto err_put_device; |
| 357 | |||
| 358 | ret = device_add(&ac97->dev); | ||
| 359 | if (ret) | ||
| 360 | goto err_put_device; | ||
| 361 | |||
| 362 | snd_soc_codec_set_drvdata(codec, ac97); | ||
| 359 | 363 | ||
| 360 | return 0; | 364 | return 0; |
| 361 | 365 | ||
| 362 | reset_err: | 366 | err_put_device: |
| 363 | snd_soc_free_ac97_codec(ac97); | 367 | put_device(&ac97->dev); |
| 364 | return ret; | 368 | return ret; |
| 365 | } | 369 | } |
| 366 | 370 | ||
diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c index e04643d2bb24..9517571e820d 100644 --- a/sound/soc/codecs/wm9712.c +++ b/sound/soc/codecs/wm9712.c | |||
| @@ -666,7 +666,7 @@ static int wm9712_soc_probe(struct snd_soc_codec *codec) | |||
| 666 | struct wm9712_priv *wm9712 = snd_soc_codec_get_drvdata(codec); | 666 | struct wm9712_priv *wm9712 = snd_soc_codec_get_drvdata(codec); |
| 667 | int ret = 0; | 667 | int ret = 0; |
| 668 | 668 | ||
| 669 | wm9712->ac97 = snd_soc_new_ac97_codec(codec); | 669 | wm9712->ac97 = snd_soc_alloc_ac97_codec(codec); |
| 670 | if (IS_ERR(wm9712->ac97)) { | 670 | if (IS_ERR(wm9712->ac97)) { |
| 671 | ret = PTR_ERR(wm9712->ac97); | 671 | ret = PTR_ERR(wm9712->ac97); |
| 672 | dev_err(codec->dev, "Failed to register AC97 codec: %d\n", ret); | 672 | dev_err(codec->dev, "Failed to register AC97 codec: %d\n", ret); |
| @@ -675,15 +675,19 @@ static int wm9712_soc_probe(struct snd_soc_codec *codec) | |||
| 675 | 675 | ||
| 676 | ret = wm9712_reset(codec, 0); | 676 | ret = wm9712_reset(codec, 0); |
| 677 | if (ret < 0) | 677 | if (ret < 0) |
| 678 | goto reset_err; | 678 | goto err_put_device; |
| 679 | |||
| 680 | ret = device_add(&wm9712->ac97->dev); | ||
| 681 | if (ret) | ||
| 682 | goto err_put_device; | ||
| 679 | 683 | ||
| 680 | /* set alc mux to none */ | 684 | /* set alc mux to none */ |
| 681 | ac97_write(codec, AC97_VIDEO, ac97_read(codec, AC97_VIDEO) | 0x3000); | 685 | ac97_write(codec, AC97_VIDEO, ac97_read(codec, AC97_VIDEO) | 0x3000); |
| 682 | 686 | ||
| 683 | return 0; | 687 | return 0; |
| 684 | 688 | ||
| 685 | reset_err: | 689 | err_put_device: |
| 686 | snd_soc_free_ac97_codec(wm9712->ac97); | 690 | put_device(&wm9712->ac97->dev); |
| 687 | return ret; | 691 | return ret; |
| 688 | } | 692 | } |
| 689 | 693 | ||
diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c index 71b9d5b0734d..6ab1122a3872 100644 --- a/sound/soc/codecs/wm9713.c +++ b/sound/soc/codecs/wm9713.c | |||
| @@ -1225,7 +1225,7 @@ static int wm9713_soc_probe(struct snd_soc_codec *codec) | |||
| 1225 | struct wm9713_priv *wm9713 = snd_soc_codec_get_drvdata(codec); | 1225 | struct wm9713_priv *wm9713 = snd_soc_codec_get_drvdata(codec); |
| 1226 | int ret = 0, reg; | 1226 | int ret = 0, reg; |
| 1227 | 1227 | ||
| 1228 | wm9713->ac97 = snd_soc_new_ac97_codec(codec); | 1228 | wm9713->ac97 = snd_soc_alloc_ac97_codec(codec); |
| 1229 | if (IS_ERR(wm9713->ac97)) | 1229 | if (IS_ERR(wm9713->ac97)) |
| 1230 | return PTR_ERR(wm9713->ac97); | 1230 | return PTR_ERR(wm9713->ac97); |
| 1231 | 1231 | ||
| @@ -1234,7 +1234,11 @@ static int wm9713_soc_probe(struct snd_soc_codec *codec) | |||
| 1234 | wm9713_reset(codec, 0); | 1234 | wm9713_reset(codec, 0); |
| 1235 | ret = wm9713_reset(codec, 1); | 1235 | ret = wm9713_reset(codec, 1); |
| 1236 | if (ret < 0) | 1236 | if (ret < 0) |
| 1237 | goto reset_err; | 1237 | goto err_put_device; |
| 1238 | |||
| 1239 | ret = device_add(&wm9713->ac97->dev); | ||
| 1240 | if (ret) | ||
| 1241 | goto err_put_device; | ||
| 1238 | 1242 | ||
| 1239 | /* unmute the adc - move to kcontrol */ | 1243 | /* unmute the adc - move to kcontrol */ |
| 1240 | reg = ac97_read(codec, AC97_CD) & 0x7fff; | 1244 | reg = ac97_read(codec, AC97_CD) & 0x7fff; |
| @@ -1242,8 +1246,8 @@ static int wm9713_soc_probe(struct snd_soc_codec *codec) | |||
| 1242 | 1246 | ||
| 1243 | return 0; | 1247 | return 0; |
| 1244 | 1248 | ||
| 1245 | reset_err: | 1249 | err_put_device: |
| 1246 | snd_soc_free_ac97_codec(wm9713->ac97); | 1250 | put_device(&wm9713->ac97->dev); |
| 1247 | return ret; | 1251 | return ret; |
| 1248 | } | 1252 | } |
| 1249 | 1253 | ||
diff --git a/sound/soc/intel/sst-haswell-ipc.c b/sound/soc/intel/sst-haswell-ipc.c index 5bf14040c24a..8156cc1accb7 100644 --- a/sound/soc/intel/sst-haswell-ipc.c +++ b/sound/soc/intel/sst-haswell-ipc.c | |||
| @@ -651,11 +651,11 @@ static void hsw_notification_work(struct work_struct *work) | |||
| 651 | } | 651 | } |
| 652 | 652 | ||
| 653 | /* tell DSP that notification has been handled */ | 653 | /* tell DSP that notification has been handled */ |
| 654 | sst_dsp_shim_update_bits_unlocked(hsw->dsp, SST_IPCD, | 654 | sst_dsp_shim_update_bits(hsw->dsp, SST_IPCD, |
| 655 | SST_IPCD_BUSY | SST_IPCD_DONE, SST_IPCD_DONE); | 655 | SST_IPCD_BUSY | SST_IPCD_DONE, SST_IPCD_DONE); |
| 656 | 656 | ||
| 657 | /* unmask busy interrupt */ | 657 | /* unmask busy interrupt */ |
| 658 | sst_dsp_shim_update_bits_unlocked(hsw->dsp, SST_IMRX, SST_IMRX_BUSY, 0); | 658 | sst_dsp_shim_update_bits(hsw->dsp, SST_IMRX, SST_IMRX_BUSY, 0); |
| 659 | } | 659 | } |
| 660 | 660 | ||
| 661 | static struct ipc_message *reply_find_msg(struct sst_hsw *hsw, u32 header) | 661 | static struct ipc_message *reply_find_msg(struct sst_hsw *hsw, u32 header) |
diff --git a/sound/soc/intel/sst/sst.h b/sound/soc/intel/sst/sst.h index 7f4bbfcbc6f5..562bc483d6b7 100644 --- a/sound/soc/intel/sst/sst.h +++ b/sound/soc/intel/sst/sst.h | |||
| @@ -58,6 +58,7 @@ enum sst_algo_ops { | |||
| 58 | #define SST_BLOCK_TIMEOUT 1000 | 58 | #define SST_BLOCK_TIMEOUT 1000 |
| 59 | 59 | ||
| 60 | #define FW_SIGNATURE_SIZE 4 | 60 | #define FW_SIGNATURE_SIZE 4 |
| 61 | #define FW_NAME_SIZE 32 | ||
| 61 | 62 | ||
| 62 | /* stream states */ | 63 | /* stream states */ |
| 63 | enum sst_stream_states { | 64 | enum sst_stream_states { |
| @@ -426,7 +427,7 @@ struct intel_sst_drv { | |||
| 426 | * Holder for firmware name. Due to async call it needs to be | 427 | * Holder for firmware name. Due to async call it needs to be |
| 427 | * persistent till worker thread gets called | 428 | * persistent till worker thread gets called |
| 428 | */ | 429 | */ |
| 429 | char firmware_name[20]; | 430 | char firmware_name[FW_NAME_SIZE]; |
| 430 | }; | 431 | }; |
| 431 | 432 | ||
| 432 | /* misc definitions */ | 433 | /* misc definitions */ |
diff --git a/sound/soc/intel/sst/sst_acpi.c b/sound/soc/intel/sst/sst_acpi.c index c3fbcdec6a15..e541d0e69ea2 100644 --- a/sound/soc/intel/sst/sst_acpi.c +++ b/sound/soc/intel/sst/sst_acpi.c | |||
| @@ -47,7 +47,7 @@ struct sst_machines { | |||
| 47 | char board[32]; | 47 | char board[32]; |
| 48 | char machine[32]; | 48 | char machine[32]; |
| 49 | void (*machine_quirk)(void); | 49 | void (*machine_quirk)(void); |
| 50 | char firmware[32]; | 50 | char firmware[FW_NAME_SIZE]; |
| 51 | struct sst_platform_info *pdata; | 51 | struct sst_platform_info *pdata; |
| 52 | 52 | ||
| 53 | }; | 53 | }; |
| @@ -350,7 +350,7 @@ static struct sst_machines sst_acpi_bytcr[] = { | |||
| 350 | 350 | ||
| 351 | /* Cherryview-based platforms: CherryTrail and Braswell */ | 351 | /* Cherryview-based platforms: CherryTrail and Braswell */ |
| 352 | static struct sst_machines sst_acpi_chv[] = { | 352 | static struct sst_machines sst_acpi_chv[] = { |
| 353 | {"10EC5670", "cht-bsw", "cht-bsw-rt5672", NULL, "fw_sst_22a8.bin", | 353 | {"10EC5670", "cht-bsw", "cht-bsw-rt5672", NULL, "intel/fw_sst_22a8.bin", |
| 354 | &chv_platform_data }, | 354 | &chv_platform_data }, |
| 355 | {}, | 355 | {}, |
| 356 | }; | 356 | }; |
diff --git a/sound/soc/soc-ac97.c b/sound/soc/soc-ac97.c index 2e10e9a38376..08d7259bbaab 100644 --- a/sound/soc/soc-ac97.c +++ b/sound/soc/soc-ac97.c | |||
| @@ -48,15 +48,18 @@ static void soc_ac97_device_release(struct device *dev) | |||
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | /** | 50 | /** |
| 51 | * snd_soc_new_ac97_codec - initailise AC97 device | 51 | * snd_soc_alloc_ac97_codec() - Allocate new a AC'97 device |
| 52 | * @codec: audio codec | 52 | * @codec: The CODEC for which to create the AC'97 device |
| 53 | * | 53 | * |
| 54 | * Initialises AC97 codec resources for use by ad-hoc devices only. | 54 | * Allocated a new snd_ac97 device and intializes it, but does not yet register |
| 55 | * it. The caller is responsible to either call device_add(&ac97->dev) to | ||
| 56 | * register the device, or to call put_device(&ac97->dev) to free the device. | ||
| 57 | * | ||
| 58 | * Returns: A snd_ac97 device or a PTR_ERR in case of an error. | ||
| 55 | */ | 59 | */ |
| 56 | struct snd_ac97 *snd_soc_new_ac97_codec(struct snd_soc_codec *codec) | 60 | struct snd_ac97 *snd_soc_alloc_ac97_codec(struct snd_soc_codec *codec) |
| 57 | { | 61 | { |
| 58 | struct snd_ac97 *ac97; | 62 | struct snd_ac97 *ac97; |
| 59 | int ret; | ||
| 60 | 63 | ||
| 61 | ac97 = kzalloc(sizeof(struct snd_ac97), GFP_KERNEL); | 64 | ac97 = kzalloc(sizeof(struct snd_ac97), GFP_KERNEL); |
| 62 | if (ac97 == NULL) | 65 | if (ac97 == NULL) |
| @@ -73,7 +76,28 @@ struct snd_ac97 *snd_soc_new_ac97_codec(struct snd_soc_codec *codec) | |||
| 73 | codec->component.card->snd_card->number, 0, | 76 | codec->component.card->snd_card->number, 0, |
| 74 | codec->component.name); | 77 | codec->component.name); |
| 75 | 78 | ||
| 76 | ret = device_register(&ac97->dev); | 79 | device_initialize(&ac97->dev); |
| 80 | |||
| 81 | return ac97; | ||
| 82 | } | ||
| 83 | EXPORT_SYMBOL(snd_soc_alloc_ac97_codec); | ||
| 84 | |||
| 85 | /** | ||
| 86 | * snd_soc_new_ac97_codec - initailise AC97 device | ||
| 87 | * @codec: audio codec | ||
| 88 | * | ||
| 89 | * Initialises AC97 codec resources for use by ad-hoc devices only. | ||
| 90 | */ | ||
| 91 | struct snd_ac97 *snd_soc_new_ac97_codec(struct snd_soc_codec *codec) | ||
| 92 | { | ||
| 93 | struct snd_ac97 *ac97; | ||
| 94 | int ret; | ||
| 95 | |||
| 96 | ac97 = snd_soc_alloc_ac97_codec(codec); | ||
| 97 | if (IS_ERR(ac97)) | ||
| 98 | return ac97; | ||
| 99 | |||
| 100 | ret = device_add(&ac97->dev); | ||
| 77 | if (ret) { | 101 | if (ret) { |
| 78 | put_device(&ac97->dev); | 102 | put_device(&ac97->dev); |
| 79 | return ERR_PTR(ret); | 103 | return ERR_PTR(ret); |
