Pull sound fixes from Takashi Iwai: "This batch became slightly large, just because I've been on vacation for the last two weeks. Nothing to scare much here, all device-specific fixes, mostly small patches. Majority of patches are for HD-audio, especially Dell machines. The rest are small ASoC fixes for various codecs, and a USB-audio quirk. One PCM fix is included to ease the faulty condition checks in the case of two periods PCM buffers" * tag 'sound-4.1-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Disable widget power-saving for ALC292 & co ALSA: hda - Reduce verbs by node power-saves ALSA: sound/atmel/ac97c.c: remove unused variable ALSA: usb-audio: Add quirk for MS LifeCam Studio ALSA: pcm: Modify double acknowledged interrupts check condition ALSA: hda/realtek - ALC292 dock fix for Thinkpad L450 ALSA: hda - Add Conexant codecs CX20721, CX20722, CX20723 and CX20724 ALSA: hda - Fix headset mic and mic-in for a Dell desktop ASoC: wm8994: correct BCLK DIV 348 to 384 ASoC: wm8960: fix "RINPUT3" audio route error ASoC: dapm: Modify widget stream name according to prefix ALSA: hda - Add headset mic quirk for Dell Inspiron 5548 ASoC: rt5645: Fix mask for setting RT5645_DMIC_2_DP_GPIO12 bit ASoC: rt5645: Add ACPI match ID ALSA: hda/realtek - Add ALC298 alias name for Dell ASoC: uda1380: Avoid accessing i2c bus when codec is disabled ALSA: hda/realtek - Fix typo for ALC286/ALC288 ASoC: mc13783: Fix wrong mask value used in mc13xxx_reg_rmw() calls ALSA: hda - Add headphone quirk for Lifebook E752 ASoC: davinci-mcasp: Correct pm status check in suspend callback
Unified · Split
| @@ -916,7 +916,6 @@ static struct ac97c_platform_data *atmel_ac97c_probe_dt(struct device *dev) · 915 unmodified lines | ||
| 916 | 916 | { |
| 917 | 917 | struct ac97c_platform_data *pdata; |
| 918 | 918 | struct device_node *node = dev->of_node; |
| 919 | − const struct of_device_id *match; | |
| 920 | 919 | |
| 921 | 920 | if (!node) { |
| 922 | 921 | dev_err(dev, "Device does not have associated DT data\n"); |
| @@ -339,7 +339,7 @@ static int snd_pcm_update_hw_ptr0(struct snd_pcm_substream *substream, · 338 unmodified lines | ||
| 339 | 339 | if (delta > new_hw_ptr) { |
| 340 | 340 | /* check for double acknowledged interrupts */ |
| 341 | 341 | hdelta = curr_jiffies - runtime->hw_ptr_jiffies; |
| 342 | − if (hdelta > runtime->hw_ptr_buffer_jiffies/2) { | |
| 342 | + if (hdelta > runtime->hw_ptr_buffer_jiffies/2 + 1) { | |
| 343 | 343 | hw_base += runtime->buffer_size; |
| 344 | 344 | if (hw_base >= runtime->boundary) { |
| 345 | 345 | hw_base = 0; |
| @@ -844,8 +844,16 @@ static hda_nid_t path_power_update(struct hda_codec *codec, · 843 unmodified lines | ||
| 844 | 844 | snd_hda_codec_write(codec, nid, 0, |
| 845 | 845 | AC_VERB_SET_POWER_STATE, state); |
| 846 | 846 | changed = nid; |
| 847 | + /* all known codecs seem to be capable to handl | |
| 848 | + * widgets state even in D3, so far. | |
| 849 | + * if any new codecs need to restore the widget | |
| 850 | + * states after D0 transition, call the function | |
| 851 | + * below. | |
| 852 | + */ | |
| 853 | +#if 0 /* disabled */ | |
| 847 | 854 | if (state == AC_PWRST_D0) |
| 848 | 855 | snd_hdac_regmap_sync_node(&codec->core, nid); |
| 856 | +#endif | |
| 849 | 857 | } |
| 850 | 858 | } |
| 851 | 859 | return changed; |
| @@ -968,6 +968,14 @@ static const struct hda_codec_preset snd_hda_preset_conexant[] = { · 967 unmodified lines | ||
| 968 | 968 | .patch = patch_conexant_auto }, |
| 969 | 969 | { .id = 0x14f150b9, .name = "CX20665", |
| 970 | 970 | .patch = patch_conexant_auto }, |
| 971 | + { .id = 0x14f150f1, .name = "CX20721", | |
| 972 | + .patch = patch_conexant_auto }, | |
| 973 | + { .id = 0x14f150f2, .name = "CX20722", | |
| 974 | + .patch = patch_conexant_auto }, | |
| 975 | + { .id = 0x14f150f3, .name = "CX20723", | |
| 976 | + .patch = patch_conexant_auto }, | |
| 977 | + { .id = 0x14f150f4, .name = "CX20724", | |
| 978 | + .patch = patch_conexant_auto }, | |
| 971 | 979 | { .id = 0x14f1510f, .name = "CX20751/2", |
| 972 | 980 | .patch = patch_conexant_auto }, |
| 973 | 981 | { .id = 0x14f15110, .name = "CX20751/2", |
| @@ -1002,6 +1010,10 @@ MODULE_ALIAS("snd-hda-codec-id:14f150ab"); · 28 unmodified lines | ||
| 1002 | 1010 | MODULE_ALIAS("snd-hda-codec-id:14f150ac"); |
| 1003 | 1011 | MODULE_ALIAS("snd-hda-codec-id:14f150b8"); |
| 1004 | 1012 | MODULE_ALIAS("snd-hda-codec-id:14f150b9"); |
| 1013 | +MODULE_ALIAS("snd-hda-codec-id:14f150f1"); | |
| 1014 | +MODULE_ALIAS("snd-hda-codec-id:14f150f2"); | |
| 1015 | +MODULE_ALIAS("snd-hda-codec-id:14f150f3"); | |
| 1016 | +MODULE_ALIAS("snd-hda-codec-id:14f150f4"); | |
| 1005 | 1017 | MODULE_ALIAS("snd-hda-codec-id:14f1510f"); |
| 1006 | 1018 | MODULE_ALIAS("snd-hda-codec-id:14f15110"); |
| 1007 | 1019 | MODULE_ALIAS("snd-hda-codec-id:14f15111"); |
| @@ -883,6 +883,7 @@ static struct alc_codec_rename_pci_table rename_pci_tbl[] = { · 882 unmodified lines | ||
| 883 | 883 | { 0x10ec0668, 0x1028, 0, "ALC3661" }, |
| 884 | 884 | { 0x10ec0275, 0x1028, 0, "ALC3260" }, |
| 885 | 885 | { 0x10ec0899, 0x1028, 0, "ALC3861" }, |
| 886 | + { 0x10ec0298, 0x1028, 0, "ALC3266" }, | |
| 886 | 887 | { 0x10ec0670, 0x1025, 0, "ALC669X" }, |
| 887 | 888 | { 0x10ec0676, 0x1025, 0, "ALC679X" }, |
| 888 | 889 | { 0x10ec0282, 0x1043, 0, "ALC3229" }, |
| @@ -3673,6 +3674,10 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin, · 2784 unmodified lines | ||
| 3673 | 3674 | alc_process_coef_fw(codec, coef0293); |
| 3674 | 3675 | snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); |
| 3675 | 3676 | break; |
| 3677 | + case 0x10ec0662: | |
| 3678 | + snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); | |
| 3679 | + snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); | |
| 3680 | + break; | |
| 3676 | 3681 | case 0x10ec0668: |
| 3677 | 3682 | alc_write_coef_idx(codec, 0x11, 0x0001); |
| 3678 | 3683 | snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); |
| @@ -3738,7 +3743,6 @@ static void alc_headset_mode_default(struct hda_codec *codec) · 59 unmodified lines | ||
| 3738 | 3743 | case 0x10ec0288: |
| 3739 | 3744 | alc_process_coef_fw(codec, coef0288); |
| 3740 | 3745 | break; |
| 3741 | − break; | |
| 3742 | 3746 | case 0x10ec0292: |
| 3743 | 3747 | alc_process_coef_fw(codec, coef0292); |
| 3744 | 3748 | break; |
| @@ -4012,7 +4016,7 @@ static void alc_update_headset_mode(struct hda_codec *codec) · 267 unmodified lines | ||
| 4012 | 4016 | if (new_headset_mode != ALC_HEADSET_MODE_MIC) { |
| 4013 | 4017 | snd_hda_set_pin_ctl_cache(codec, hp_pin, |
| 4014 | 4018 | AC_PINCTL_OUT_EN | AC_PINCTL_HP_EN); |
| 4015 | − if (spec->headphone_mic_pin) | |
| 4019 | + if (spec->headphone_mic_pin && spec->headphone_mic_pin != hp_pin) | |
| 4016 | 4020 | snd_hda_set_pin_ctl_cache(codec, spec->headphone_mic_pin, |
| 4017 | 4021 | PIN_VREFHIZ); |
| 4018 | 4022 | } |
| @@ -4215,6 +4219,18 @@ static void alc_fixup_dell_xps13(struct hda_codec *codec, · 196 unmodified lines | ||
| 4215 | 4219 | } |
| 4216 | 4220 | } |
| 4217 | 4221 | |
| 4222 | +static void alc_fixup_headset_mode_alc662(struct hda_codec *codec, | |
| 4223 | + const struct hda_fixup *fix, int action) | |
| 4224 | +{ | |
| 4225 | + struct alc_spec *spec = codec->spec; | |
| 4226 | + | |
| 4227 | + if (action == HDA_FIXUP_ACT_PRE_PROBE) { | |
| 4228 | + spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; | |
| 4229 | + spec->gen.hp_mic = 1; /* Mic-in is same pin as headphone */ | |
| 4230 | + } else | |
| 4231 | + alc_fixup_headset_mode(codec, fix, action); | |
| 4232 | +} | |
| 4233 | + | |
| 4218 | 4234 | static void alc_fixup_headset_mode_alc668(struct hda_codec *codec, |
| 4219 | 4235 | const struct hda_fixup *fix, int action) |
| 4220 | 4236 | { |
| @@ -5119,6 +5135,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { · 898 unmodified lines | ||
| 5119 | 5135 | SND_PCI_QUIRK(0x104d, 0x9099, "Sony VAIO S13", ALC275_FIXUP_SONY_DISABLE_AAMIX), |
| 5120 | 5136 | SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook", ALC269_FIXUP_LIFEBOOK), |
| 5121 | 5137 | SND_PCI_QUIRK(0x10cf, 0x15dc, "Lifebook T731", ALC269_FIXUP_LIFEBOOK_HP_PIN), |
| 5138 | + SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN), | |
| 5122 | 5139 | SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC), |
| 5123 | 5140 | SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC), |
| 5124 | 5141 | SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_BXBT2807_MIC), |
| @@ -5148,6 +5165,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { · 23 unmodified lines | ||
| 5148 | 5165 | SND_PCI_QUIRK(0x17aa, 0x5026, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), |
| 5149 | 5166 | SND_PCI_QUIRK(0x17aa, 0x5034, "Thinkpad T450", ALC292_FIXUP_TPT440_DOCK), |
| 5150 | 5167 | SND_PCI_QUIRK(0x17aa, 0x5036, "Thinkpad T450s", ALC292_FIXUP_TPT440_DOCK), |
| 5168 | + SND_PCI_QUIRK(0x17aa, 0x503c, "Thinkpad L450", ALC292_FIXUP_TPT440_DOCK), | |
| 5151 | 5169 | SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), |
| 5152 | 5170 | SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K), |
| 5153 | 5171 | SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD), |
| @@ -5345,6 +5363,13 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = { · 191 unmodified lines | ||
| 5345 | 5363 | {0x17, 0x40000000}, |
| 5346 | 5364 | {0x1d, 0x40700001}, |
| 5347 | 5365 | {0x21, 0x02211050}), |
| 5366 | + SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell Inspiron 5548", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, | |
| 5367 | + ALC255_STANDARD_PINS, | |
| 5368 | + {0x12, 0x90a60180}, | |
| 5369 | + {0x14, 0x90170130}, | |
| 5370 | + {0x17, 0x40000000}, | |
| 5371 | + {0x1d, 0x40700001}, | |
| 5372 | + {0x21, 0x02211040}), | |
| 5348 | 5373 | SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, |
| 5349 | 5374 | ALC256_STANDARD_PINS, |
| 5350 | 5375 | {0x13, 0x40000000}), |
| @@ -5598,7 +5623,8 @@ static int patch_alc269(struct hda_codec *codec) · 247 unmodified lines | ||
| 5598 | 5623 | |
| 5599 | 5624 | spec = codec->spec; |
| 5600 | 5625 | spec->gen.shared_mic_vref_pin = 0x18; |
| 5601 | − codec->power_save_node = 1; | |
| 5626 | + if (codec->core.vendor_id != 0x10ec0292) | |
| 5627 | + codec->power_save_node = 1; | |
| 5602 | 5628 | |
| 5603 | 5629 | snd_hda_pick_fixup(codec, alc269_fixup_models, |
| 5604 | 5630 | alc269_fixup_tbl, alc269_fixups); |
| @@ -6079,7 +6105,9 @@ enum { · 474 unmodified lines | ||
| 6079 | 6105 | ALC662_FIXUP_NO_JACK_DETECT, |
| 6080 | 6106 | ALC662_FIXUP_ZOTAC_Z68, |
| 6081 | 6107 | ALC662_FIXUP_INV_DMIC, |
| 6108 | + ALC662_FIXUP_DELL_MIC_NO_PRESENCE, | |
| 6082 | 6109 | ALC668_FIXUP_DELL_MIC_NO_PRESENCE, |
| 6110 | + ALC662_FIXUP_HEADSET_MODE, | |
| 6083 | 6111 | ALC668_FIXUP_HEADSET_MODE, |
| 6084 | 6112 | ALC662_FIXUP_BASS_MODE4_CHMAP, |
| 6085 | 6113 | ALC662_FIXUP_BASS_16, |
| @@ -6272,6 +6300,20 @@ static const struct hda_fixup alc662_fixups[] = { · 186 unmodified lines | ||
| 6272 | 6300 | .chained = true, |
| 6273 | 6301 | .chain_id = ALC668_FIXUP_DELL_MIC_NO_PRESENCE |
| 6274 | 6302 | }, |
| 6303 | + [ALC662_FIXUP_DELL_MIC_NO_PRESENCE] = { | |
| 6304 | + .type = HDA_FIXUP_PINS, | |
| 6305 | + .v.pins = (const struct hda_pintbl[]) { | |
| 6306 | + { 0x19, 0x03a1113c }, /* use as headset mic, without its own jack detect */ | |
| 6307 | + /* headphone mic by setting pin control of 0x1b (headphone out) to in + vref_50 */ | |
| 6308 | + { } | |
| 6309 | + }, | |
| 6310 | + .chained = true, | |
| 6311 | + .chain_id = ALC662_FIXUP_HEADSET_MODE | |
| 6312 | + }, | |
| 6313 | + [ALC662_FIXUP_HEADSET_MODE] = { | |
| 6314 | + .type = HDA_FIXUP_FUNC, | |
| 6315 | + .v.func = alc_fixup_headset_mode_alc662, | |
| 6316 | + }, | |
| 6275 | 6317 | [ALC668_FIXUP_DELL_MIC_NO_PRESENCE] = { |
| 6276 | 6318 | .type = HDA_FIXUP_PINS, |
| 6277 | 6319 | .v.pins = (const struct hda_pintbl[]) { |
| @@ -6423,6 +6465,18 @@ static const struct hda_model_fixup alc662_fixup_models[] = { · 145 unmodified lines | ||
| 6423 | 6465 | }; |
| 6424 | 6466 | |
| 6425 | 6467 | static const struct snd_hda_pin_quirk alc662_pin_fixup_tbl[] = { |
| 6468 | + SND_HDA_PIN_QUIRK(0x10ec0662, 0x1028, "Dell", ALC662_FIXUP_DELL_MIC_NO_PRESENCE, | |
| 6469 | + {0x12, 0x4004c000}, | |
| 6470 | + {0x14, 0x01014010}, | |
| 6471 | + {0x15, 0x411111f0}, | |
| 6472 | + {0x16, 0x411111f0}, | |
| 6473 | + {0x18, 0x01a19020}, | |
| 6474 | + {0x19, 0x411111f0}, | |
| 6475 | + {0x1a, 0x0181302f}, | |
| 6476 | + {0x1b, 0x0221401f}, | |
| 6477 | + {0x1c, 0x411111f0}, | |
| 6478 | + {0x1d, 0x4054c601}, | |
| 6479 | + {0x1e, 0x411111f0}), | |
| 6426 | 6480 | SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE, |
| 6427 | 6481 | {0x12, 0x99a30130}, |
| 6428 | 6482 | {0x14, 0x90170110}, |
| @@ -623,14 +623,14 @@ static int mc13783_probe(struct snd_soc_codec *codec) · 622 unmodified lines | ||
| 623 | 623 | AUDIO_SSI_SEL, 0); |
| 624 | 624 | else |
| 625 | 625 | mc13xxx_reg_rmw(priv->mc13xxx, MC13783_AUDIO_CODEC, |
| 626 | − 0, AUDIO_SSI_SEL); | |
| 626 | + AUDIO_SSI_SEL, AUDIO_SSI_SEL); | |
| 627 | 627 | |
| 628 | 628 | if (priv->dac_ssi_port == MC13783_SSI1_PORT) |
| 629 | 629 | mc13xxx_reg_rmw(priv->mc13xxx, MC13783_AUDIO_DAC, |
| 630 | 630 | AUDIO_SSI_SEL, 0); |
| 631 | 631 | else |
| 632 | 632 | mc13xxx_reg_rmw(priv->mc13xxx, MC13783_AUDIO_DAC, |
| 633 | − 0, AUDIO_SSI_SEL); | |
| 633 | + AUDIO_SSI_SEL, AUDIO_SSI_SEL); | |
| 634 | 634 | |
| 635 | 635 | return 0; |
| 636 | 636 | } |
| @@ -437,7 +437,7 @@ static int uda1380_set_dai_fmt_both(struct snd_soc_dai *codec_dai, · 436 unmodified lines | ||
| 437 | 437 | if ((fmt & SND_SOC_DAIFMT_MASTER_MASK) != SND_SOC_DAIFMT_CBS_CFS) |
| 438 | 438 | return -EINVAL; |
| 439 | 439 | |
| 440 | − uda1380_write(codec, UDA1380_IFACE, iface); | |
| 440 | + uda1380_write_reg_cache(codec, UDA1380_IFACE, iface); | |
| 441 | 441 | |
| 442 | 442 | return 0; |
| 443 | 443 | } |
| @@ -395,7 +395,7 @@ static const struct snd_soc_dapm_route audio_paths[] = { · 394 unmodified lines | ||
| 395 | 395 | { "Right Input Mixer", "Boost Switch", "Right Boost Mixer", }, |
| 396 | 396 | { "Right Input Mixer", NULL, "RINPUT1", }, /* Really Boost Switch */ |
| 397 | 397 | { "Right Input Mixer", NULL, "RINPUT2" }, |
| 398 | − { "Right Input Mixer", NULL, "LINPUT3" }, | |
| 398 | + { "Right Input Mixer", NULL, "RINPUT3" }, | |
| 399 | 399 | |
| 400 | 400 | { "Left ADC", NULL, "Left Input Mixer" }, |
| 401 | 401 | { "Right ADC", NULL, "Right Input Mixer" }, |
| @@ -2754,7 +2754,7 @@ static struct { · 2753 unmodified lines | ||
| 2754 | 2754 | }; |
| 2755 | 2755 | |
| 2756 | 2756 | static int fs_ratios[] = { |
| 2757 | − 64, 128, 192, 256, 348, 512, 768, 1024, 1408, 1536 | |
| 2757 | + 64, 128, 192, 256, 384, 512, 768, 1024, 1408, 1536 | |
| 2758 | 2758 | }; |
| 2759 | 2759 | |
| 2760 | 2760 | static int bclk_divs[] = { |
| @@ -1247,7 +1247,7 @@ static int davinci_mcasp_suspend(struct snd_soc_dai *dai) · 1246 unmodified lines | ||
| 1247 | 1247 | u32 reg; |
| 1248 | 1248 | int i; |
| 1249 | 1249 | |
| 1250 | − context->pm_state = pm_runtime_enabled(mcasp->dev); | |
| 1250 | + context->pm_state = pm_runtime_active(mcasp->dev); | |
| 1251 | 1251 | if (!context->pm_state) |
| 1252 | 1252 | pm_runtime_get_sync(mcasp->dev); |
| 1253 | 1253 | |
| @@ -3100,11 +3100,16 @@ snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm, · 3099 unmodified lines | ||
| 3100 | 3100 | } |
| 3101 | 3101 | |
| 3102 | 3102 | prefix = soc_dapm_prefix(dapm); |
| 3103 | − if (prefix) | |
| 3103 | + if (prefix) { | |
| 3104 | 3104 | w->name = kasprintf(GFP_KERNEL, "%s %s", prefix, widget->name); |
| 3105 | − else | |
| 3105 | + if (widget->sname) | |
| 3106 | + w->sname = kasprintf(GFP_KERNEL, "%s %s", prefix, | |
| 3107 | + widget->sname); | |
| 3108 | + } else { | |
| 3106 | 3109 | w->name = kasprintf(GFP_KERNEL, "%s", widget->name); |
| 3107 | − | |
| 3110 | + if (widget->sname) | |
| 3111 | + w->sname = kasprintf(GFP_KERNEL, "%s", widget->sname); | |
| 3112 | + } | |
| 3108 | 3113 | if (w->name == NULL) { |
| 3109 | 3114 | kfree(w); |
| 3110 | 3115 | return NULL; |
| @@ -1117,6 +1117,7 @@ bool snd_usb_get_sample_rate_quirk(struct snd_usb_audio *chip) · 1116 unmodified lines | ||
| 1117 | 1117 | switch (chip->usb_id) { |
| 1118 | 1118 | case USB_ID(0x045E, 0x075D): /* MS Lifecam Cinema */ |
| 1119 | 1119 | case USB_ID(0x045E, 0x076D): /* MS Lifecam HD-5000 */ |
| 1120 | + case USB_ID(0x045E, 0x0772): /* MS Lifecam Studio */ | |
| 1120 | 1121 | case USB_ID(0x04D8, 0xFEEA): /* Benchmark DAC1 Pre */ |
| 1121 | 1122 | return true; |
| 1122 | 1123 | } |