Pull sound fixes from Takashi Iwai: "We see various small fixes, but nothing looks too scary, all are small gentle bug fixes: - Most of changes are for ASoC codecs: Realtek, SGTL5000, TAS2552, TLV320, WM8962 - A couple of dwc and imx-ssi fixes - Usual oneliner HD-audio quirks - An old emux synth code fix" * tag 'sound-4.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: MAINTAINERS: Remove wm97xx entry ASoC: tas2552: fix dBscale-min declaration ALSA: synth: Fix conflicting OSS device registration on AWE32 ALSA: hda - Disable power_save_node for IDT 92HD73xx chips ALSA: hda - Apply SPDIF pin ctl to MacBookPro 12,1 ALSA: hda: Add dock support for ThinkPad T550 ASoC: dwc: fix dma stop transferring issue ASoC: dwc: correct irq clear method ASoC: tlv320aic3x: Prevent writing reserved registers on tlv320aic3104 CODECs ASoC: rt5645: Correct the naming and setting of ADC Boost Volume Control ASoC: sgtl5000: fix wrong register MIC_BIAS_VOLTAGE setup on probe ASoC: wm8962: balance pm_runtime_enable ASoC: imx-ssi: Fix DAI hardware signal inversions ASoC: sgtl5000: fix error message output for MicBias voltage ASoC: db1200: Fix DAI link format for db1300 and db1550
Unified · Split
| @@ -11378,15 +11378,6 @@ W: http://oops.ghostprotocols.net:81/blog · 11377 unmodified lines | ||
| 11378 | 11378 | S: Maintained |
| 11379 | 11379 | F: drivers/net/wireless/wl3501* |
| 11380 | 11380 | |
| 11381 | −WM97XX TOUCHSCREEN DRIVERS | |
| 11382 | −M: Mark Brown <broonie@kernel.org> | |
| 11383 | −M: Liam Girdwood <lrg@slimlogic.co.uk> | |
| 11384 | −L: linux-input@vger.kernel.org | |
| 11385 | −W: https://github.com/CirrusLogic/linux-drivers/wiki | |
| 11386 | −S: Supported | |
| 11387 | −F: drivers/input/touchscreen/*wm97* | |
| 11388 | −F: include/linux/wm97xx.h | |
| 11389 | − | |
| 11390 | 11381 | WOLFSON MICROELECTRONICS DRIVERS |
| 11391 | 11382 | L: patches@opensource.wolfsonmicro.com |
| 11392 | 11383 | T: git https://github.com/CirrusLogic/linux-drivers.git |
| @@ -633,6 +633,7 @@ static const struct snd_pci_quirk cs4208_mac_fixup_tbl[] = { · 632 unmodified lines | ||
| 633 | 633 | SND_PCI_QUIRK(0x106b, 0x5e00, "MacBookPro 11,2", CS4208_MBP11), |
| 634 | 634 | SND_PCI_QUIRK(0x106b, 0x7100, "MacBookAir 6,1", CS4208_MBA6), |
| 635 | 635 | SND_PCI_QUIRK(0x106b, 0x7200, "MacBookAir 6,2", CS4208_MBA6), |
| 636 | + SND_PCI_QUIRK(0x106b, 0x7b00, "MacBookPro 12,1", CS4208_MBP11), | |
| 636 | 637 | {} /* terminator */ |
| 637 | 638 | }; |
| 638 | 639 | |
| @@ -5306,6 +5306,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { · 5305 unmodified lines | ||
| 5306 | 5306 | SND_PCI_QUIRK(0x17aa, 0x2212, "Thinkpad T440", ALC292_FIXUP_TPT440_DOCK), |
| 5307 | 5307 | SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad X240", ALC292_FIXUP_TPT440_DOCK), |
| 5308 | 5308 | SND_PCI_QUIRK(0x17aa, 0x2215, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), |
| 5309 | + SND_PCI_QUIRK(0x17aa, 0x2223, "ThinkPad T550", ALC292_FIXUP_TPT440_DOCK), | |
| 5309 | 5310 | SND_PCI_QUIRK(0x17aa, 0x2226, "ThinkPad X250", ALC292_FIXUP_TPT440_DOCK), |
| 5310 | 5311 | SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC), |
| 5311 | 5312 | SND_PCI_QUIRK(0x17aa, 0x3978, "IdeaPad Y410P", ALC269_FIXUP_NO_SHUTUP), |
| @@ -4520,7 +4520,11 @@ static int patch_stac92hd73xx(struct hda_codec *codec) · 4519 unmodified lines | ||
| 4520 | 4520 | return err; |
| 4521 | 4521 | |
| 4522 | 4522 | spec = codec->spec; |
| 4523 | − codec->power_save_node = 1; | |
| 4523 | + /* enable power_save_node only for new 92HD89xx chips, as it causes | |
| 4524 | + * click noises on old 92HD73xx chips. | |
| 4525 | + */ | |
| 4526 | + if ((codec->core.vendor_id & 0xfffffff0) != 0x111d7670) | |
| 4527 | + codec->power_save_node = 1; | |
| 4524 | 4528 | spec->linear_tone_beep = 0; |
| 4525 | 4529 | spec->gen.mixer_nid = 0x1d; |
| 4526 | 4530 | spec->have_spdif_mux = 1; |
| @@ -129,6 +129,8 @@ static struct snd_soc_dai_link db1300_i2s_dai = { · 128 unmodified lines | ||
| 129 | 129 | .cpu_dai_name = "au1xpsc_i2s.2", |
| 130 | 130 | .platform_name = "au1xpsc-pcm.2", |
| 131 | 131 | .codec_name = "wm8731.0-001b", |
| 132 | + .dai_fmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_NB_NF | | |
| 133 | + SND_SOC_DAIFMT_CBM_CFM, | |
| 132 | 134 | .ops = &db1200_i2s_wm8731_ops, |
| 133 | 135 | }; |
| 134 | 136 | |
| @@ -146,6 +148,8 @@ static struct snd_soc_dai_link db1550_i2s_dai = { · 11 unmodified lines | ||
| 146 | 148 | .cpu_dai_name = "au1xpsc_i2s.3", |
| 147 | 149 | .platform_name = "au1xpsc-pcm.3", |
| 148 | 150 | .codec_name = "wm8731.0-001b", |
| 151 | + .dai_fmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_NB_NF | | |
| 152 | + SND_SOC_DAIFMT_CBM_CFM, | |
| 149 | 153 | .ops = &db1200_i2s_wm8731_ops, |
| 150 | 154 | }; |
| 151 | 155 | |
| @@ -519,11 +519,11 @@ static const struct snd_kcontrol_new rt5645_snd_controls[] = { · 518 unmodified lines | ||
| 519 | 519 | RT5645_L_VOL_SFT + 1, RT5645_R_VOL_SFT + 1, 63, 0, adc_vol_tlv), |
| 520 | 520 | |
| 521 | 521 | /* ADC Boost Volume Control */ |
| 522 | − SOC_DOUBLE_TLV("STO1 ADC Boost Gain", RT5645_ADC_BST_VOL1, | |
| 522 | + SOC_DOUBLE_TLV("ADC Boost Capture Volume", RT5645_ADC_BST_VOL1, | |
| 523 | 523 | RT5645_STO1_ADC_L_BST_SFT, RT5645_STO1_ADC_R_BST_SFT, 3, 0, |
| 524 | 524 | adc_bst_tlv), |
| 525 | − SOC_DOUBLE_TLV("STO2 ADC Boost Gain", RT5645_ADC_BST_VOL1, | |
| 526 | − RT5645_STO2_ADC_L_BST_SFT, RT5645_STO2_ADC_R_BST_SFT, 3, 0, | |
| 525 | + SOC_DOUBLE_TLV("Mono ADC Boost Capture Volume", RT5645_ADC_BST_VOL2, | |
| 526 | + RT5645_MONO_ADC_L_BST_SFT, RT5645_MONO_ADC_R_BST_SFT, 3, 0, | |
| 527 | 527 | adc_bst_tlv), |
| 528 | 528 | |
| 529 | 529 | /* I2S2 function select */ |
| @@ -39,8 +39,8 @@ · 38 unmodified lines | ||
| 39 | 39 | #define RT5645_STO1_ADC_DIG_VOL 0x1c |
| 40 | 40 | #define RT5645_MONO_ADC_DIG_VOL 0x1d |
| 41 | 41 | #define RT5645_ADC_BST_VOL1 0x1e |
| 42 | −/* Mixer - D-D */ | |
| 43 | 42 | #define RT5645_ADC_BST_VOL2 0x20 |
| 43 | +/* Mixer - D-D */ | |
| 44 | 44 | #define RT5645_STO1_ADC_MIXER 0x27 |
| 45 | 45 | #define RT5645_MONO_ADC_MIXER 0x28 |
| 46 | 46 | #define RT5645_AD_DA_MIXER 0x29 |
| @@ -315,12 +315,14 @@ · 268 unmodified lines | ||
| 315 | 315 | #define RT5645_STO1_ADC_R_BST_SFT 12 |
| 316 | 316 | #define RT5645_STO1_ADC_COMP_MASK (0x3 << 10) |
| 317 | 317 | #define RT5645_STO1_ADC_COMP_SFT 10 |
| 318 | −#define RT5645_STO2_ADC_L_BST_MASK (0x3 << 8) | |
| 319 | −#define RT5645_STO2_ADC_L_BST_SFT 8 | |
| 320 | −#define RT5645_STO2_ADC_R_BST_MASK (0x3 << 6) | |
| 321 | −#define RT5645_STO2_ADC_R_BST_SFT 6 | |
| 322 | −#define RT5645_STO2_ADC_COMP_MASK (0x3 << 4) | |
| 323 | −#define RT5645_STO2_ADC_COMP_SFT 4 | |
| 318 | + | |
| 319 | +/* ADC Boost Volume Control (0x20) */ | |
| 320 | +#define RT5645_MONO_ADC_L_BST_MASK (0x3 << 14) | |
| 321 | +#define RT5645_MONO_ADC_L_BST_SFT 14 | |
| 322 | +#define RT5645_MONO_ADC_R_BST_MASK (0x3 << 12) | |
| 323 | +#define RT5645_MONO_ADC_R_BST_SFT 12 | |
| 324 | +#define RT5645_MONO_ADC_COMP_MASK (0x3 << 10) | |
| 325 | +#define RT5645_MONO_ADC_COMP_SFT 10 | |
| 324 | 326 | |
| 325 | 327 | /* Stereo2 ADC Mixer Control (0x26) */ |
| 326 | 328 | #define RT5645_STO2_ADC_SRC_MASK (0x1 << 15) |
| @@ -1376,8 +1376,8 @@ static int sgtl5000_probe(struct snd_soc_codec *codec) · 1375 unmodified lines | ||
| 1376 | 1376 | sgtl5000->micbias_resistor << SGTL5000_BIAS_R_SHIFT); |
| 1377 | 1377 | |
| 1378 | 1378 | snd_soc_update_bits(codec, SGTL5000_CHIP_MIC_CTRL, |
| 1379 | − SGTL5000_BIAS_R_MASK, | |
| 1380 | − sgtl5000->micbias_voltage << SGTL5000_BIAS_R_SHIFT); | |
| 1379 | + SGTL5000_BIAS_VOLT_MASK, | |
| 1380 | + sgtl5000->micbias_voltage << SGTL5000_BIAS_VOLT_SHIFT); | |
| 1381 | 1381 | /* |
| 1382 | 1382 | * disable DAP |
| 1383 | 1383 | * TODO: |
| @@ -1549,7 +1549,7 @@ static int sgtl5000_i2c_probe(struct i2c_client *client, · 165 unmodified lines | ||
| 1549 | 1549 | else { |
| 1550 | 1550 | sgtl5000->micbias_voltage = 0; |
| 1551 | 1551 | dev_err(&client->dev, |
| 1552 | − "Unsuitable MicBias resistor\n"); | |
| 1552 | + "Unsuitable MicBias voltage\n"); | |
| 1553 | 1553 | } |
| 1554 | 1554 | } else { |
| 1555 | 1555 | sgtl5000->micbias_voltage = 0; |
| @@ -549,7 +549,7 @@ static struct snd_soc_dai_driver tas2552_dai[] = { · 548 unmodified lines | ||
| 549 | 549 | /* |
| 550 | 550 | * DAC digital volumes. From -7 to 24 dB in 1 dB steps |
| 551 | 551 | */ |
| 552 | −static DECLARE_TLV_DB_SCALE(dac_tlv, -7, 100, 0); | |
| 552 | +static DECLARE_TLV_DB_SCALE(dac_tlv, -700, 100, 0); | |
| 553 | 553 | |
| 554 | 554 | static const char * const tas2552_din_source_select[] = { |
| 555 | 555 | "Muted", |
| @@ -1509,14 +1509,17 @@ static int aic3x_init(struct snd_soc_codec *codec) · 1508 unmodified lines | ||
| 1509 | 1509 | snd_soc_write(codec, PGAL_2_LLOPM_VOL, DEFAULT_VOL); |
| 1510 | 1510 | snd_soc_write(codec, PGAR_2_RLOPM_VOL, DEFAULT_VOL); |
| 1511 | 1511 | |
| 1512 | − /* Line2 to HP Bypass default volume, disconnect from Output Mixer */ | |
| 1513 | − snd_soc_write(codec, LINE2L_2_HPLOUT_VOL, DEFAULT_VOL); | |
| 1514 | − snd_soc_write(codec, LINE2R_2_HPROUT_VOL, DEFAULT_VOL); | |
| 1515 | − snd_soc_write(codec, LINE2L_2_HPLCOM_VOL, DEFAULT_VOL); | |
| 1516 | − snd_soc_write(codec, LINE2R_2_HPRCOM_VOL, DEFAULT_VOL); | |
| 1517 | − /* Line2 Line Out default volume, disconnect from Output Mixer */ | |
| 1518 | − snd_soc_write(codec, LINE2L_2_LLOPM_VOL, DEFAULT_VOL); | |
| 1519 | − snd_soc_write(codec, LINE2R_2_RLOPM_VOL, DEFAULT_VOL); | |
| 1512 | + /* On tlv320aic3104, these registers are reserved and must not be written */ | |
| 1513 | + if (aic3x->model != AIC3X_MODEL_3104) { | |
| 1514 | + /* Line2 to HP Bypass default volume, disconnect from Output Mixer */ | |
| 1515 | + snd_soc_write(codec, LINE2L_2_HPLOUT_VOL, DEFAULT_VOL); | |
| 1516 | + snd_soc_write(codec, LINE2R_2_HPROUT_VOL, DEFAULT_VOL); | |
| 1517 | + snd_soc_write(codec, LINE2L_2_HPLCOM_VOL, DEFAULT_VOL); | |
| 1518 | + snd_soc_write(codec, LINE2R_2_HPRCOM_VOL, DEFAULT_VOL); | |
| 1519 | + /* Line2 Line Out default volume, disconnect from Output Mixer */ | |
| 1520 | + snd_soc_write(codec, LINE2L_2_LLOPM_VOL, DEFAULT_VOL); | |
| 1521 | + snd_soc_write(codec, LINE2R_2_RLOPM_VOL, DEFAULT_VOL); | |
| 1522 | + } | |
| 1520 | 1523 | |
| 1521 | 1524 | switch (aic3x->model) { |
| 1522 | 1525 | case AIC3X_MODEL_3X: |
| @@ -3760,7 +3760,7 @@ static int wm8962_i2c_probe(struct i2c_client *i2c, · 3759 unmodified lines | ||
| 3760 | 3760 | ret = snd_soc_register_codec(&i2c->dev, |
| 3761 | 3761 | &soc_codec_dev_wm8962, &wm8962_dai, 1); |
| 3762 | 3762 | if (ret < 0) |
| 3763 | − goto err_enable; | |
| 3763 | + goto err_pm_runtime; | |
| 3764 | 3764 | |
| 3765 | 3765 | regcache_cache_only(wm8962->regmap, true); |
| 3766 | 3766 | |
| @@ -3769,6 +3769,8 @@ static int wm8962_i2c_probe(struct i2c_client *i2c, · 2 unmodified lines | ||
| 3769 | 3769 | |
| 3770 | 3770 | return 0; |
| 3771 | 3771 | |
| 3772 | +err_pm_runtime: | |
| 3773 | + pm_runtime_disable(&i2c->dev); | |
| 3772 | 3774 | err_enable: |
| 3773 | 3775 | regulator_bulk_disable(ARRAY_SIZE(wm8962->supplies), wm8962->supplies); |
| 3774 | 3776 | err: |
| @@ -3778,6 +3780,7 @@ err: · 3 unmodified lines | ||
| 3778 | 3780 | static int wm8962_i2c_remove(struct i2c_client *client) |
| 3779 | 3781 | { |
| 3780 | 3782 | snd_soc_unregister_codec(&client->dev); |
| 3783 | + pm_runtime_disable(&client->dev); | |
| 3781 | 3784 | return 0; |
| 3782 | 3785 | } |
| 3783 | 3786 | |
| @@ -131,23 +131,32 @@ static inline void i2s_clear_irqs(struct dw_i2s_dev *dev, u32 stream) · 130 unmodified lines | ||
| 131 | 131 | |
| 132 | 132 | if (stream == SNDRV_PCM_STREAM_PLAYBACK) { |
| 133 | 133 | for (i = 0; i < 4; i++) |
| 134 | − i2s_write_reg(dev->i2s_base, TOR(i), 0); | |
| 134 | + i2s_read_reg(dev->i2s_base, TOR(i)); | |
| 135 | 135 | } else { |
| 136 | 136 | for (i = 0; i < 4; i++) |
| 137 | − i2s_write_reg(dev->i2s_base, ROR(i), 0); | |
| 137 | + i2s_read_reg(dev->i2s_base, ROR(i)); | |
| 138 | 138 | } |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | static void i2s_start(struct dw_i2s_dev *dev, |
| 142 | 142 | struct snd_pcm_substream *substream) |
| 143 | 143 | { |
| 144 | − | |
| 144 | + u32 i, irq; | |
| 145 | 145 | i2s_write_reg(dev->i2s_base, IER, 1); |
| 146 | 146 | |
| 147 | − if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | |
| 147 | + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { | |
| 148 | + for (i = 0; i < 4; i++) { | |
| 149 | + irq = i2s_read_reg(dev->i2s_base, IMR(i)); | |
| 150 | + i2s_write_reg(dev->i2s_base, IMR(i), irq & ~0x30); | |
| 151 | + } | |
| 148 | 152 | i2s_write_reg(dev->i2s_base, ITER, 1); |
| 149 | − else | |
| 153 | + } else { | |
| 154 | + for (i = 0; i < 4; i++) { | |
| 155 | + irq = i2s_read_reg(dev->i2s_base, IMR(i)); | |
| 156 | + i2s_write_reg(dev->i2s_base, IMR(i), irq & ~0x03); | |
| 157 | + } | |
| 150 | 158 | i2s_write_reg(dev->i2s_base, IRER, 1); |
| 159 | + } | |
| 151 | 160 | |
| 152 | 161 | i2s_write_reg(dev->i2s_base, CER, 1); |
| 153 | 162 | } |
| @@ -95,7 +95,8 @@ static int imx_ssi_set_dai_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt) · 94 unmodified lines | ||
| 95 | 95 | switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { |
| 96 | 96 | case SND_SOC_DAIFMT_I2S: |
| 97 | 97 | /* data on rising edge of bclk, frame low 1clk before data */ |
| 98 | − strcr |= SSI_STCR_TFSI | SSI_STCR_TEFS | SSI_STCR_TXBIT0; | |
| 98 | + strcr |= SSI_STCR_TXBIT0 | SSI_STCR_TSCKP | SSI_STCR_TFSI | | |
| 99 | + SSI_STCR_TEFS; | |
| 99 | 100 | scr |= SSI_SCR_NET; |
| 100 | 101 | if (ssi->flags & IMX_SSI_USE_I2S_SLAVE) { |
| 101 | 102 | scr &= ~SSI_I2S_MODE_MASK; |
| @@ -104,33 +105,31 @@ static int imx_ssi_set_dai_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt) · 2 unmodified lines | ||
| 104 | 105 | break; |
| 105 | 106 | case SND_SOC_DAIFMT_LEFT_J: |
| 106 | 107 | /* data on rising edge of bclk, frame high with data */ |
| 107 | − strcr |= SSI_STCR_TXBIT0; | |
| 108 | + strcr |= SSI_STCR_TXBIT0 | SSI_STCR_TSCKP; | |
| 108 | 109 | break; |
| 109 | 110 | case SND_SOC_DAIFMT_DSP_B: |
| 110 | 111 | /* data on rising edge of bclk, frame high with data */ |
| 111 | − strcr |= SSI_STCR_TFSL | SSI_STCR_TXBIT0; | |
| 112 | + strcr |= SSI_STCR_TXBIT0 | SSI_STCR_TSCKP | SSI_STCR_TFSL; | |
| 112 | 113 | break; |
| 113 | 114 | case SND_SOC_DAIFMT_DSP_A: |
| 114 | 115 | /* data on rising edge of bclk, frame high 1clk before data */ |
| 115 | − strcr |= SSI_STCR_TFSL | SSI_STCR_TXBIT0 | SSI_STCR_TEFS; | |
| 116 | + strcr |= SSI_STCR_TXBIT0 | SSI_STCR_TSCKP | SSI_STCR_TFSL | | |
| 117 | + SSI_STCR_TEFS; | |
| 116 | 118 | break; |
| 117 | 119 | } |
| 118 | 120 | |
| 119 | 121 | /* DAI clock inversion */ |
| 120 | 122 | switch (fmt & SND_SOC_DAIFMT_INV_MASK) { |
| 121 | 123 | case SND_SOC_DAIFMT_IB_IF: |
| 122 | − strcr |= SSI_STCR_TFSI; | |
| 123 | − strcr &= ~SSI_STCR_TSCKP; | |
| 124 | + strcr ^= SSI_STCR_TSCKP | SSI_STCR_TFSI; | |
| 124 | 125 | break; |
| 125 | 126 | case SND_SOC_DAIFMT_IB_NF: |
| 126 | − strcr &= ~(SSI_STCR_TSCKP | SSI_STCR_TFSI); | |
| 127 | + strcr ^= SSI_STCR_TSCKP; | |
| 127 | 128 | break; |
| 128 | 129 | case SND_SOC_DAIFMT_NB_IF: |
| 129 | − strcr |= SSI_STCR_TFSI | SSI_STCR_TSCKP; | |
| 130 | + strcr ^= SSI_STCR_TFSI; | |
| 130 | 131 | break; |
| 131 | 132 | case SND_SOC_DAIFMT_NB_NF: |
| 132 | − strcr &= ~SSI_STCR_TFSI; | |
| 133 | − strcr |= SSI_STCR_TSCKP; | |
| 134 | 133 | break; |
| 135 | 134 | } |
| 136 | 135 | |
| @@ -69,7 +69,8 @@ snd_emux_init_seq_oss(struct snd_emux *emu) · 68 unmodified lines | ||
| 69 | 69 | struct snd_seq_oss_reg *arg; |
| 70 | 70 | struct snd_seq_device *dev; |
| 71 | 71 | |
| 72 | − if (snd_seq_device_new(emu->card, 0, SNDRV_SEQ_DEV_ID_OSS, | |
| 72 | + /* using device#1 here for avoiding conflicts with OPL3 */ | |
| 73 | + if (snd_seq_device_new(emu->card, 1, SNDRV_SEQ_DEV_ID_OSS, | |
| 73 | 74 | sizeof(struct snd_seq_oss_reg), &dev) < 0) |
| 74 | 75 | return; |
| 75 | 76 | |