History

Merge tag 'sound-fix-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai: "A collection of small fixes for 5.19 merge window. Nothing particular stands out, as most changes are device-specific fixes and quirks" * tag 'sound-fix-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: selftests: alsa: Handle pkg-config failure more gracefully ALSA: usb-audio: Optimize TEAC clock quirk ASoC: da7219: cancel AAD related work earlier for jack removal ASoC: da7219: Fix pole orientation detection on certain headsets ASoC: Intel: avs: Fix build error on arc, m68k and sparc ALSA: hda/realtek - Fix microphone noise on ASUS TUF B550M-PLUS ALSA: hda/via: Delete does not require return ALSA: hda/realtek: Enable 4-speaker output for Dell XPS 15 9520 laptop ASoC: Intel: common: fix typo for tplg naming ALSA: usb-audio: Cancel pending work at closing a MIDI substream ALSA: usb-audio: Add mixer mapping for Gigabyte B450/550 Mobos ASoC: rt5640: Do not manipulate pin "Platform Clock" if the "Platform Clock" is not in the DAPM ASoC: SOF: amd: Fixed Build error ASoC: fsl_sai: Fix FSL_SAI_xDR/xFR definition ASoC: soc-pcm: fix BE transition for TRIGGER_START

Linus Torvalds committed 4 years ago

Commit 6f6ebb92 parents ab18b7b 672362c15 files · +89 −17Browse files

Unified · Split

15 files
  1. sound/pci/hda/patch_realtek.c +11 −0
  2. sound/pci/hda/patch_via.c +0 −2
  3. sound/soc/amd/acp/acp-pci.c +1 −0
  4. sound/soc/codecs/da7219-aad.c +15 −3
  5. sound/soc/codecs/rt5640.c +9 −2
  6. sound/soc/codecs/rt5640.h +2 −0
  7. sound/soc/fsl/fsl_sai.h +2 −2
  8. sound/soc/intel/avs/board_selection.c +2 −1
  9. sound/soc/intel/boards/bytcr_rt5640.c +2 −0
  10. sound/soc/intel/common/soc-acpi-intel-adl-match.c +1 −1
  11. sound/soc/soc-pcm.c +0 −2
  12. sound/usb/clock.c +8 −4
  13. sound/usb/midi.c +3 −0
  14. sound/usb/mixer_maps.c +30 −0
  15. tools/testing/selftests/alsa/Makefile +3 −0
sound/pci/hda/patch_realtek.c+11−0
@@ -1981,6 +1981,7 @@ enum { · 1980 unmodified lines
19811981 ALC1220_FIXUP_CLEVO_PB51ED_PINS,
19821982 ALC887_FIXUP_ASUS_AUDIO,
19831983 ALC887_FIXUP_ASUS_HMIC,
1984+ ALCS1200A_FIXUP_MIC_VREF,
19841985 };
19851986
19861987 static void alc889_fixup_coef(struct hda_codec *codec,
@@ -2526,6 +2527,14 @@ static const struct hda_fixup alc882_fixups[] = { · 539 unmodified lines
25262527 .chained = true,
25272528 .chain_id = ALC887_FIXUP_ASUS_AUDIO,
25282529 },
2530+ [ALCS1200A_FIXUP_MIC_VREF] = {
2531+ .type = HDA_FIXUP_PINCTLS,
2532+ .v.pins = (const struct hda_pintbl[]) {
2533+ { 0x18, PIN_VREF50 }, /* rear mic */
2534+ { 0x19, PIN_VREF50 }, /* front mic */
2535+ {}
2536+ }
2537+ },
25292538 };
25302539
25312540 static const struct snd_pci_quirk alc882_fixup_tbl[] = {
@@ -2563,6 +2572,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = { · 31 unmodified lines
25632572 SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601),
25642573 SND_PCI_QUIRK(0x1043, 0x84bc, "ASUS ET2700", ALC887_FIXUP_ASUS_BASS),
25652574 SND_PCI_QUIRK(0x1043, 0x8691, "ASUS ROG Ranger VIII", ALC882_FIXUP_GPIO3),
2575+ SND_PCI_QUIRK(0x1043, 0x8797, "ASUS TUF B550M-PLUS", ALCS1200A_FIXUP_MIC_VREF),
25662576 SND_PCI_QUIRK(0x104d, 0x9043, "Sony Vaio VGC-LN51JGB", ALC882_FIXUP_NO_PRIMARY_HP),
25672577 SND_PCI_QUIRK(0x104d, 0x9044, "Sony VAIO AiO", ALC882_FIXUP_NO_PRIMARY_HP),
25682578 SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT),
@@ -8905,6 +8915,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { · 6336 unmodified lines
89058915 SND_PCI_QUIRK(0x1028, 0x0a62, "Dell Precision 5560", ALC289_FIXUP_DUAL_SPK),
89068916 SND_PCI_QUIRK(0x1028, 0x0a9d, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
89078917 SND_PCI_QUIRK(0x1028, 0x0a9e, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
8918+ SND_PCI_QUIRK(0x1028, 0x0b19, "Dell XPS 15 9520", ALC289_FIXUP_DUAL_SPK),
89088919 SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
89098920 SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
89108921 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),
sound/pci/hda/patch_via.c+0−2
@@ -449,8 +449,6 @@ static void vt1708_set_pinconfig_connect(struct hda_codec *codec, hda_nid_t nid) · 448 unmodified lines
449449 def_conf = def_conf & (~(AC_JACK_PORT_BOTH << 30));
450450 snd_hda_codec_set_pincfg(codec, nid, def_conf);
451451 }
452−
453− return;
454452 }
455453
456454 static int vt1708_jack_detect_get(struct snd_kcontrol *kcontrol,
sound/soc/amd/acp/acp-pci.c+1−0
@@ -16,6 +16,7 @@ · 15 unmodified lines
1616 #include <linux/pci.h>
1717 #include <linux/platform_device.h>
1818 #include <linux/pm_runtime.h>
19+#include <linux/module.h>
1920
2021 #include "amd.h"
2122 #include "../mach-config.h"
sound/soc/codecs/da7219-aad.c+15−3
@@ -60,6 +60,9 @@ static void da7219_aad_btn_det_work(struct work_struct *work) · 59 unmodified lines
6060 bool micbias_up = false;
6161 int retries = 0;
6262
63+ /* Disable ground switch */
64+ snd_soc_component_update_bits(component, 0xFB, 0x01, 0x00);
65+
6366 /* Drive headphones/lineout */
6467 snd_soc_component_update_bits(component, DA7219_HP_L_CTRL,
6568 DA7219_HP_L_AMP_OE_MASK,
@@ -153,6 +156,9 @@ static void da7219_aad_hptest_work(struct work_struct *work) · 87 unmodified lines
153156 tonegen_freq_hptest = cpu_to_le16(DA7219_AAD_HPTEST_RAMP_FREQ_INT_OSC);
154157 }
155158
159+ /* Disable ground switch */
160+ snd_soc_component_update_bits(component, 0xFB, 0x01, 0x00);
161+
156162 /* Ensure gain ramping at fastest rate */
157163 gain_ramp_ctrl = snd_soc_component_read(component, DA7219_GAIN_RAMP_CTRL);
158164 snd_soc_component_write(component, DA7219_GAIN_RAMP_CTRL, DA7219_GAIN_RAMP_RATE_X8);
@@ -428,6 +434,10 @@ static irqreturn_t da7219_aad_irq_thread(int irq, void *data) · 269 unmodified lines
428434 mask |= DA7219_AAD_REPORT_ALL_MASK;
429435 da7219_aad->jack_inserted = false;
430436
437+ /* Cancel any pending work */
438+ cancel_work_sync(&da7219_aad->btn_det_work);
439+ cancel_work_sync(&da7219_aad->hptest_work);
440+
431441 /* Un-drive headphones/lineout */
432442 snd_soc_component_update_bits(component, DA7219_HP_R_CTRL,
433443 DA7219_HP_R_AMP_OE_MASK, 0);
@@ -444,9 +454,8 @@ static irqreturn_t da7219_aad_irq_thread(int irq, void *data) · 10 unmodified lines
444454 snd_soc_dapm_disable_pin(dapm, "Mic Bias");
445455 snd_soc_dapm_sync(dapm);
446456
447− /* Cancel any pending work */
448− cancel_work_sync(&da7219_aad->btn_det_work);
449− cancel_work_sync(&da7219_aad->hptest_work);
457+ /* Enable ground switch */
458+ snd_soc_component_update_bits(component, 0xFB, 0x01, 0x01);
450459 }
451460 }
452461
@@ -899,6 +908,9 @@ int da7219_aad_init(struct snd_soc_component *component) · 446 unmodified lines
899908 snd_soc_component_update_bits(component, DA7219_ACCDET_CONFIG_1,
900909 DA7219_BUTTON_CONFIG_MASK, 0);
901910
911+ /* Enable ground switch */
912+ snd_soc_component_update_bits(component, 0xFB, 0x01, 0x01);
913+
902914 INIT_WORK(&da7219_aad->btn_det_work, da7219_aad_btn_det_work);
903915 INIT_WORK(&da7219_aad->hptest_work, da7219_aad_hptest_work);
904916
sound/soc/codecs/rt5640.c+9−2
@@ -2094,12 +2094,14 @@ EXPORT_SYMBOL_GPL(rt5640_sel_asrc_clk_src); · 2093 unmodified lines
20942094 void rt5640_enable_micbias1_for_ovcd(struct snd_soc_component *component)
20952095 {
20962096 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
2097+ struct rt5640_priv *rt5640 = snd_soc_component_get_drvdata(component);
20972098
20982099 snd_soc_dapm_mutex_lock(dapm);
20992100 snd_soc_dapm_force_enable_pin_unlocked(dapm, "LDO2");
21002101 snd_soc_dapm_force_enable_pin_unlocked(dapm, "MICBIAS1");
21012102 /* OVCD is unreliable when used with RCCLK as sysclk-source */
2102− snd_soc_dapm_force_enable_pin_unlocked(dapm, "Platform Clock");
2103+ if (rt5640->use_platform_clock)
2104+ snd_soc_dapm_force_enable_pin_unlocked(dapm, "Platform Clock");
21032105 snd_soc_dapm_sync_unlocked(dapm);
21042106 snd_soc_dapm_mutex_unlock(dapm);
21052107 }
@@ -2108,9 +2110,11 @@ EXPORT_SYMBOL_GPL(rt5640_enable_micbias1_for_ovcd); · 2 unmodified lines
21082110 void rt5640_disable_micbias1_for_ovcd(struct snd_soc_component *component)
21092111 {
21102112 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
2113+ struct rt5640_priv *rt5640 = snd_soc_component_get_drvdata(component);
21112114
21122115 snd_soc_dapm_mutex_lock(dapm);
2113− snd_soc_dapm_disable_pin_unlocked(dapm, "Platform Clock");
2116+ if (rt5640->use_platform_clock)
2117+ snd_soc_dapm_disable_pin_unlocked(dapm, "Platform Clock");
21142118 snd_soc_dapm_disable_pin_unlocked(dapm, "MICBIAS1");
21152119 snd_soc_dapm_disable_pin_unlocked(dapm, "LDO2");
21162120 snd_soc_dapm_sync_unlocked(dapm);
@@ -2535,6 +2539,9 @@ static void rt5640_enable_jack_detect(struct snd_soc_component *component, · 418 unmodified lines
25352539 rt5640->jd_gpio_irq_requested = true;
25362540 }
25372541
2542+ if (jack_data && jack_data->use_platform_clock)
2543+ rt5640->use_platform_clock = jack_data->use_platform_clock;
2544+
25382545 ret = request_irq(rt5640->irq, rt5640_irq,
25392546 IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
25402547 "rt5640", rt5640);
sound/soc/codecs/rt5640.h+2−0
@@ -2155,11 +2155,13 @@ struct rt5640_priv { · 2154 unmodified lines
21552155 bool jd_inverted;
21562156 unsigned int ovcd_th;
21572157 unsigned int ovcd_sf;
2158+ bool use_platform_clock;
21582159 };
21592160
21602161 struct rt5640_set_jack_data {
21612162 int codec_irq_override;
21622163 struct gpio_desc *jd_gpio;
2164+ bool use_platform_clock;
21632165 };
21642166
21652167 int rt5640_dmic_enable(struct snd_soc_component *component,
sound/soc/fsl/fsl_sai.h+2−2
@@ -80,8 +80,8 @@ · 79 unmodified lines
8080 #define FSL_SAI_xCR3(tx, ofs) (tx ? FSL_SAI_TCR3(ofs) : FSL_SAI_RCR3(ofs))
8181 #define FSL_SAI_xCR4(tx, ofs) (tx ? FSL_SAI_TCR4(ofs) : FSL_SAI_RCR4(ofs))
8282 #define FSL_SAI_xCR5(tx, ofs) (tx ? FSL_SAI_TCR5(ofs) : FSL_SAI_RCR5(ofs))
83−#define FSL_SAI_xDR(tx, ofs) (tx ? FSL_SAI_TDR(ofs) : FSL_SAI_RDR(ofs))
84−#define FSL_SAI_xFR(tx, ofs) (tx ? FSL_SAI_TFR(ofs) : FSL_SAI_RFR(ofs))
83+#define FSL_SAI_xDR0(tx) (tx ? FSL_SAI_TDR0 : FSL_SAI_RDR0)
84+#define FSL_SAI_xFR0(tx) (tx ? FSL_SAI_TFR0 : FSL_SAI_RFR0)
8585 #define FSL_SAI_xMR(tx) (tx ? FSL_SAI_TMR : FSL_SAI_RMR)
8686
8787 /* SAI Transmit/Receive Control Register */
sound/soc/intel/avs/board_selection.c+2−1
@@ -326,7 +326,8 @@ static int avs_register_i2s_board(struct avs_dev *adev, struct snd_soc_acpi_mach · 325 unmodified lines
326326 num_ssps = adev->hw_cfg.i2s_caps.ctrl_count;
327327 if (fls(mach->mach_params.i2s_link_mask) > num_ssps) {
328328 dev_err(adev->dev, "Platform supports %d SSPs but board %s requires SSP%ld\n",
329− num_ssps, mach->drv_name, __fls(mach->mach_params.i2s_link_mask));
329+ num_ssps, mach->drv_name,
330+ (unsigned long)__fls(mach->mach_params.i2s_link_mask));
330331 return -ENODEV;
331332 }
332333
sound/soc/intel/boards/bytcr_rt5640.c+2−0
@@ -1191,12 +1191,14 @@ static int byt_rt5640_init(struct snd_soc_pcm_runtime *runtime) · 1190 unmodified lines
11911191 {
11921192 struct snd_soc_card *card = runtime->card;
11931193 struct byt_rt5640_private *priv = snd_soc_card_get_drvdata(card);
1194+ struct rt5640_set_jack_data *jack_data = &priv->jack_data;
11941195 struct snd_soc_component *component = asoc_rtd_to_codec(runtime, 0)->component;
11951196 const struct snd_soc_dapm_route *custom_map = NULL;
11961197 int num_routes = 0;
11971198 int ret;
11981199
11991200 card->dapm.idle_bias_off = true;
1201+ jack_data->use_platform_clock = true;
12001202
12011203 /* Start with RC clk for jack-detect (we disable MCLK below) */
12021204 if (byt_rt5640_quirk & BYT_RT5640_MCLK_EN)
sound/soc/intel/common/soc-acpi-intel-adl-match.c+1−1
@@ -453,7 +453,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = { · 452 unmodified lines
453453 .drv_name = "adl_mx98360a_nau8825",
454454 .machine_quirk = snd_soc_acpi_codec_list,
455455 .quirk_data = &adl_max98360a_amp,
456− .sof_tplg_filename = "sof-adl-mx98360a-nau8825.tplg",
456+ .sof_tplg_filename = "sof-adl-max98360a-nau8825.tplg",
457457 },
458458 {
459459 .id = "RTL5682",
sound/soc/soc-pcm.c+0−2
@@ -2128,8 +2128,6 @@ int dpcm_be_dai_trigger(struct snd_soc_pcm_runtime *fe, int stream, · 2127 unmodified lines
21282128 else
21292129 ret = soc_pcm_trigger(be_substream,
21302130 SNDRV_PCM_TRIGGER_START);
2131−
2132− ret = soc_pcm_trigger(be_substream, cmd);
21332131 if (ret) {
21342132 be->dpcm[stream].be_start--;
21352133 goto next;
sound/usb/clock.c+8−4
@@ -573,10 +573,14 @@ static int set_sample_rate_v2v3(struct snd_usb_audio *chip, · 572 unmodified lines
573573 }
574574
575575 /* FIXME - TEAC devices require the immediate interface setup */
576− if (rate != prev_rate && USB_ID_VENDOR(chip->usb_id) == 0x0644) {
577− usb_set_interface(chip->dev, fmt->iface, fmt->altsetting);
578− if (chip->quirk_flags & QUIRK_FLAG_IFACE_DELAY)
579− msleep(50);
576+ if (USB_ID_VENDOR(chip->usb_id) == 0x0644) {
577+ bool cur_base_48k = (rate % 48000 == 0);
578+ bool prev_base_48k = (prev_rate % 48000 == 0);
579+ if (cur_base_48k != prev_base_48k) {
580+ usb_set_interface(chip->dev, fmt->iface, fmt->altsetting);
581+ if (chip->quirk_flags & QUIRK_FLAG_IFACE_DELAY)
582+ msleep(50);
583+ }
580584 }
581585
582586 validation:
sound/usb/midi.c+3−0
@@ -1145,6 +1145,9 @@ static int snd_usbmidi_output_open(struct snd_rawmidi_substream *substream) · 1144 unmodified lines
11451145
11461146 static int snd_usbmidi_output_close(struct snd_rawmidi_substream *substream)
11471147 {
1148+ struct usbmidi_out_port *port = substream->runtime->private_data;
1149+
1150+ cancel_work_sync(&port->ep->work);
11481151 return substream_open(substream, 0, 0);
11491152 }
11501153
sound/usb/mixer_maps.c+30−0
@@ -439,6 +439,31 @@ static const struct usbmix_name_map msi_mpg_x570s_carbon_max_wifi_alc4080_map[] · 438 unmodified lines
439439 {}
440440 };
441441
442+/* Gigabyte B450/550 Mobo */
443+static const struct usbmix_name_map gigabyte_b450_map[] = {
444+ { 24, NULL }, /* OT, IEC958?, disabled */
445+ { 21, "Speaker" }, /* OT */
446+ { 29, "Speaker Playback" }, /* FU */
447+ { 22, "Headphone" }, /* OT */
448+ { 30, "Headphone Playback" }, /* FU */
449+ { 11, "Line" }, /* IT */
450+ { 27, "Line Capture" }, /* FU */
451+ { 12, "Mic" }, /* IT */
452+ { 28, "Mic Capture" }, /* FU */
453+ { 9, "Front Mic" }, /* IT */
454+ { 25, "Front Mic Capture" }, /* FU */
455+ {}
456+};
457+
458+static const struct usbmix_connector_map gigabyte_b450_connector_map[] = {
459+ { 13, 21 }, /* Speaker */
460+ { 14, 22 }, /* Headphone */
461+ { 19, 11 }, /* Line */
462+ { 20, 12 }, /* Mic */
463+ { 17, 9 }, /* Front Mic */
464+ {}
465+};
466+
442467 /*
443468 * Control map entries
444469 */
@@ -581,6 +606,11 @@ static const struct usbmix_ctl_map usbmix_ctl_maps[] = { · 136 unmodified lines
581606 .map = trx40_mobo_map,
582607 .connector_map = trx40_mobo_connector_map,
583608 },
609+ { /* Gigabyte B450/550 Mobo */
610+ .id = USB_ID(0x0414, 0xa00d),
611+ .map = gigabyte_b450_map,
612+ .connector_map = gigabyte_b450_connector_map,
613+ },
584614 { /* ASUS ROG Zenith II */
585615 .id = USB_ID(0x0b05, 0x1916),
586616 .map = asus_rog_map,
tools/testing/selftests/alsa/Makefile+3−0
@@ -3,6 +3,9 @@ · 2 unmodified lines
33
44 CFLAGS += $(shell pkg-config --cflags alsa)
55 LDLIBS += $(shell pkg-config --libs alsa)
6+ifeq ($(LDLIBS),)
7+LDLIBS += -lasound
8+endif
69
710 TEST_GEN_PROGS := mixer-test
811

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t