Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'sound-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
"A bit higher volume of changes than wished, but each change is
relatively small and the fix targets are mostly device-specific, so
those should be safe as a late stage merge.

The most significant LoC is about the memalloc helper fix, which is
applied only to Xen PV. The other major parts are ASoC Intel SOF and
AVS fixes that are scattered as various small code changes. The rest
are device-specific fixes and quirks for HD- and USB-audio, FireWire
and ASoC AMD / HDMI"

* tag 'sound-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (30 commits)
ALSA: firewire-motu: fix unreleased lock warning in hwdep device
ALSA: memalloc: Workaround for Xen PV
ASoC: cs42l56: fix DT probe
ASoC: codecs: wsa883x: correct playback min/max rates
ALSA: hda/realtek: Add Acer Predator PH315-54
ASoC: amd: yc: Add Xiaomi Redmi Book Pro 15 2022 into DMI table
ALSA: hda: Do not unset preset when cleaning up codec
ASoC: SOF: sof-audio: prepare_widgets: Check swidget for NULL on sink failure
ASoC: hdmi-codec: zero clear HDMI pdata
ASoC: SOF: ipc4-mtrace: prevent underflow in sof_ipc4_priority_mask_dfs_write()
ASoC: Intel: sof_ssp_amp: always set dpcm_capture for amplifiers
ASoC: Intel: sof_nau8825: always set dpcm_capture for amplifiers
ASoC: Intel: sof_cs42l42: always set dpcm_capture for amplifiers
ASoC: Intel: sof_rt5682: always set dpcm_capture for amplifiers
ALSA: hda/via: Avoid potential array out-of-bound in add_secret_dac_path()
ALSA: usb-audio: Add FIXED_RATE quirk for JBL Quantum610 Wireless
ALSA: hda/realtek: fix mute/micmute LEDs, speaker don't work for a HP platform
ASoC: SOF: keep prepare/unprepare widgets in sink path
ASoC: SOF: sof-audio: skip prepare/unprepare if swidget is NULL
ASoC: SOF: sof-audio: unprepare when swidget->use_count > 0
...

+188 -68
+3 -1
drivers/firewire/core-cdev.c
··· 819 819 820 820 r = container_of(resource, struct inbound_transaction_resource, 821 821 resource); 822 - if (is_fcp_request(r->request)) 822 + if (is_fcp_request(r->request)) { 823 + kfree(r->data); 823 824 goto out; 825 + } 824 826 825 827 if (a->length != fw_get_response_length(r->request)) { 826 828 ret = -EINVAL;
+1
drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c
··· 193 193 struct hdmi_codec_pdata pdata; 194 194 struct platform_device *platform; 195 195 196 + memset(&pdata, 0, sizeof(pdata)); 196 197 pdata.ops = &dw_hdmi_i2s_ops; 197 198 pdata.i2s = 1; 198 199 pdata.max_i2s_channels = 8;
+68 -17
sound/core/memalloc.c
··· 541 541 struct sg_table *sgt; 542 542 void *p; 543 543 544 + #ifdef CONFIG_SND_DMA_SGBUF 545 + if (cpu_feature_enabled(X86_FEATURE_XENPV)) 546 + return snd_dma_sg_fallback_alloc(dmab, size); 547 + #endif 544 548 sgt = dma_alloc_noncontiguous(dmab->dev.dev, size, dmab->dev.dir, 545 549 DEFAULT_GFP, 0); 546 550 #ifdef CONFIG_SND_DMA_SGBUF 547 - if (!sgt && !get_dma_ops(dmab->dev.dev)) { 548 - if (dmab->dev.type == SNDRV_DMA_TYPE_DEV_WC_SG) 549 - dmab->dev.type = SNDRV_DMA_TYPE_DEV_WC_SG_FALLBACK; 550 - else 551 - dmab->dev.type = SNDRV_DMA_TYPE_DEV_SG_FALLBACK; 551 + if (!sgt && !get_dma_ops(dmab->dev.dev)) 552 552 return snd_dma_sg_fallback_alloc(dmab, size); 553 - } 554 553 #endif 555 554 if (!sgt) 556 555 return NULL; ··· 716 717 717 718 /* Fallback SG-buffer allocations for x86 */ 718 719 struct snd_dma_sg_fallback { 720 + bool use_dma_alloc_coherent; 719 721 size_t count; 720 722 struct page **pages; 723 + /* DMA address array; the first page contains #pages in ~PAGE_MASK */ 724 + dma_addr_t *addrs; 721 725 }; 722 726 723 727 static void __snd_dma_sg_fallback_free(struct snd_dma_buffer *dmab, 724 728 struct snd_dma_sg_fallback *sgbuf) 725 729 { 726 - bool wc = dmab->dev.type == SNDRV_DMA_TYPE_DEV_WC_SG_FALLBACK; 727 - size_t i; 730 + size_t i, size; 728 731 729 - for (i = 0; i < sgbuf->count && sgbuf->pages[i]; i++) 730 - do_free_pages(page_address(sgbuf->pages[i]), PAGE_SIZE, wc); 732 + if (sgbuf->pages && sgbuf->addrs) { 733 + i = 0; 734 + while (i < sgbuf->count) { 735 + if (!sgbuf->pages[i] || !sgbuf->addrs[i]) 736 + break; 737 + size = sgbuf->addrs[i] & ~PAGE_MASK; 738 + if (WARN_ON(!size)) 739 + break; 740 + if (sgbuf->use_dma_alloc_coherent) 741 + dma_free_coherent(dmab->dev.dev, size << PAGE_SHIFT, 742 + page_address(sgbuf->pages[i]), 743 + sgbuf->addrs[i] & PAGE_MASK); 744 + else 745 + do_free_pages(page_address(sgbuf->pages[i]), 746 + size << PAGE_SHIFT, false); 747 + i += size; 748 + } 749 + } 731 750 kvfree(sgbuf->pages); 751 + kvfree(sgbuf->addrs); 732 752 kfree(sgbuf); 733 753 } 734 754 ··· 756 738 struct snd_dma_sg_fallback *sgbuf; 757 739 struct page **pagep, *curp; 758 740 size_t chunk, npages; 741 + dma_addr_t *addrp; 759 742 dma_addr_t addr; 760 743 void *p; 761 - bool wc = dmab->dev.type == SNDRV_DMA_TYPE_DEV_WC_SG_FALLBACK; 744 + 745 + /* correct the type */ 746 + if (dmab->dev.type == SNDRV_DMA_TYPE_DEV_SG) 747 + dmab->dev.type = SNDRV_DMA_TYPE_DEV_SG_FALLBACK; 748 + else if (dmab->dev.type == SNDRV_DMA_TYPE_DEV_WC_SG) 749 + dmab->dev.type = SNDRV_DMA_TYPE_DEV_WC_SG_FALLBACK; 762 750 763 751 sgbuf = kzalloc(sizeof(*sgbuf), GFP_KERNEL); 764 752 if (!sgbuf) 765 753 return NULL; 754 + sgbuf->use_dma_alloc_coherent = cpu_feature_enabled(X86_FEATURE_XENPV); 766 755 size = PAGE_ALIGN(size); 767 756 sgbuf->count = size >> PAGE_SHIFT; 768 757 sgbuf->pages = kvcalloc(sgbuf->count, sizeof(*sgbuf->pages), GFP_KERNEL); 769 - if (!sgbuf->pages) 758 + sgbuf->addrs = kvcalloc(sgbuf->count, sizeof(*sgbuf->addrs), GFP_KERNEL); 759 + if (!sgbuf->pages || !sgbuf->addrs) 770 760 goto error; 771 761 772 762 pagep = sgbuf->pages; 773 - chunk = size; 763 + addrp = sgbuf->addrs; 764 + chunk = (PAGE_SIZE - 1) << PAGE_SHIFT; /* to fit in low bits in addrs */ 774 765 while (size > 0) { 775 766 chunk = min(size, chunk); 776 - p = do_alloc_pages(dmab->dev.dev, chunk, &addr, wc); 767 + if (sgbuf->use_dma_alloc_coherent) 768 + p = dma_alloc_coherent(dmab->dev.dev, chunk, &addr, DEFAULT_GFP); 769 + else 770 + p = do_alloc_pages(dmab->dev.dev, chunk, &addr, false); 777 771 if (!p) { 778 772 if (chunk <= PAGE_SIZE) 779 773 goto error; ··· 797 767 size -= chunk; 798 768 /* fill pages */ 799 769 npages = chunk >> PAGE_SHIFT; 770 + *addrp = npages; /* store in lower bits */ 800 771 curp = virt_to_page(p); 801 - while (npages--) 772 + while (npages--) { 802 773 *pagep++ = curp++; 774 + *addrp++ |= addr; 775 + addr += PAGE_SIZE; 776 + } 803 777 } 804 778 805 779 p = vmap(sgbuf->pages, sgbuf->count, VM_MAP, PAGE_KERNEL); 806 780 if (!p) 807 781 goto error; 782 + 783 + if (dmab->dev.type == SNDRV_DMA_TYPE_DEV_WC_SG_FALLBACK) 784 + set_pages_array_wc(sgbuf->pages, sgbuf->count); 785 + 808 786 dmab->private_data = sgbuf; 809 787 /* store the first page address for convenience */ 810 - dmab->addr = snd_sgbuf_get_addr(dmab, 0); 788 + dmab->addr = sgbuf->addrs[0] & PAGE_MASK; 811 789 return p; 812 790 813 791 error: ··· 825 787 826 788 static void snd_dma_sg_fallback_free(struct snd_dma_buffer *dmab) 827 789 { 790 + struct snd_dma_sg_fallback *sgbuf = dmab->private_data; 791 + 792 + if (dmab->dev.type == SNDRV_DMA_TYPE_DEV_WC_SG_FALLBACK) 793 + set_pages_array_wb(sgbuf->pages, sgbuf->count); 828 794 vunmap(dmab->area); 829 795 __snd_dma_sg_fallback_free(dmab, dmab->private_data); 796 + } 797 + 798 + static dma_addr_t snd_dma_sg_fallback_get_addr(struct snd_dma_buffer *dmab, 799 + size_t offset) 800 + { 801 + struct snd_dma_sg_fallback *sgbuf = dmab->private_data; 802 + size_t index = offset >> PAGE_SHIFT; 803 + 804 + return (sgbuf->addrs[index] & PAGE_MASK) | (offset & ~PAGE_MASK); 830 805 } 831 806 832 807 static int snd_dma_sg_fallback_mmap(struct snd_dma_buffer *dmab, ··· 856 805 .alloc = snd_dma_sg_fallback_alloc, 857 806 .free = snd_dma_sg_fallback_free, 858 807 .mmap = snd_dma_sg_fallback_mmap, 808 + .get_addr = snd_dma_sg_fallback_get_addr, 859 809 /* reuse vmalloc helpers */ 860 - .get_addr = snd_dma_vmalloc_get_addr, 861 810 .get_page = snd_dma_vmalloc_get_page, 862 811 .get_chunk_size = snd_dma_vmalloc_get_chunk_size, 863 812 };
+4
sound/firewire/motu/motu-hwdep.c
··· 87 87 return -EFAULT; 88 88 89 89 count = consumed; 90 + } else { 91 + spin_unlock_irq(&motu->lock); 92 + 93 + count = 0; 90 94 } 91 95 92 96 return count;
+2
sound/pci/hda/hda_bind.c
··· 144 144 145 145 error: 146 146 snd_hda_codec_cleanup_for_unbind(codec); 147 + codec->preset = NULL; 147 148 return err; 148 149 } 149 150 ··· 167 166 if (codec->patch_ops.free) 168 167 codec->patch_ops.free(codec); 169 168 snd_hda_codec_cleanup_for_unbind(codec); 169 + codec->preset = NULL; 170 170 module_put(dev->driver->owner); 171 171 return 0; 172 172 }
-1
sound/pci/hda/hda_codec.c
··· 795 795 snd_array_free(&codec->cvt_setups); 796 796 snd_array_free(&codec->spdif_out); 797 797 snd_array_free(&codec->verbs); 798 - codec->preset = NULL; 799 798 codec->follower_dig_outs = NULL; 800 799 codec->spdif_status_reset = 0; 801 800 snd_array_free(&codec->mixers);
+2
sound/pci/hda/patch_realtek.c
··· 9202 9202 SND_PCI_QUIRK(0x1025, 0x142b, "Acer Swift SF314-42", ALC255_FIXUP_ACER_MIC_NO_PRESENCE), 9203 9203 SND_PCI_QUIRK(0x1025, 0x1430, "Acer TravelMate B311R-31", ALC256_FIXUP_ACER_MIC_NO_PRESENCE), 9204 9204 SND_PCI_QUIRK(0x1025, 0x1466, "Acer Aspire A515-56", ALC255_FIXUP_ACER_HEADPHONE_AND_MIC), 9205 + SND_PCI_QUIRK(0x1025, 0x1534, "Acer Predator PH315-54", ALC255_FIXUP_ACER_MIC_NO_PRESENCE), 9205 9206 SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), 9206 9207 SND_PCI_QUIRK(0x1028, 0x053c, "Dell Latitude E5430", ALC292_FIXUP_DELL_E7X), 9207 9208 SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS), ··· 9433 9432 SND_PCI_QUIRK(0x103c, 0x8ad2, "HP EliteBook 860 16 inch G9 Notebook PC", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 9434 9433 SND_PCI_QUIRK(0x103c, 0x8b5d, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 9435 9434 SND_PCI_QUIRK(0x103c, 0x8b5e, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 9435 + SND_PCI_QUIRK(0x103c, 0x8b92, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 9436 9436 SND_PCI_QUIRK(0x103c, 0x8bf0, "HP", ALC236_FIXUP_HP_GPIO_LED), 9437 9437 SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC), 9438 9438 SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300),
+3
sound/pci/hda/patch_via.c
··· 819 819 return 0; 820 820 nums = snd_hda_get_connections(codec, spec->gen.mixer_nid, conn, 821 821 ARRAY_SIZE(conn) - 1); 822 + if (nums < 0) 823 + return nums; 824 + 822 825 for (i = 0; i < nums; i++) { 823 826 if (get_wcaps_type(get_wcaps(codec, conn[i])) == AC_WID_AUD_OUT) 824 827 return 0;
+4 -2
sound/soc/amd/acp-es8336.c
··· 198 198 int ret; 199 199 200 200 adev = acpi_dev_get_first_match_dev("ESSX8336", NULL, -1); 201 - if (adev) 202 - put_device(&adev->dev); 201 + if (!adev) 202 + return -ENODEV; 203 + 203 204 codec_dev = acpi_get_first_physical_node(adev); 205 + acpi_dev_put(adev); 204 206 if (!codec_dev) 205 207 dev_err(card->dev, "can not find codec dev\n"); 206 208
+21
sound/soc/amd/yc/acp6x-mach.c
··· 230 230 { 231 231 .driver_data = &acp6x_card, 232 232 .matches = { 233 + DMI_MATCH(DMI_BOARD_VENDOR, "TIMI"), 234 + DMI_MATCH(DMI_PRODUCT_NAME, "Redmi Book Pro 15 2022"), 235 + } 236 + }, 237 + { 238 + .driver_data = &acp6x_card, 239 + .matches = { 233 240 DMI_MATCH(DMI_BOARD_VENDOR, "Razer"), 234 241 DMI_MATCH(DMI_PRODUCT_NAME, "Blade 14 (2022) - RZ09-0427"), 242 + } 243 + }, 244 + { 245 + .driver_data = &acp6x_card, 246 + .matches = { 247 + DMI_MATCH(DMI_BOARD_VENDOR, "RB"), 248 + DMI_MATCH(DMI_PRODUCT_NAME, "Swift SFA16-41"), 249 + } 250 + }, 251 + { 252 + .driver_data = &acp6x_card, 253 + .matches = { 254 + DMI_MATCH(DMI_BOARD_VENDOR, "IRBIS"), 255 + DMI_MATCH(DMI_PRODUCT_NAME, "15NBC1011"), 235 256 } 236 257 }, 237 258 {}
-6
sound/soc/codecs/cs42l56.c
··· 1191 1191 if (pdata) { 1192 1192 cs42l56->pdata = *pdata; 1193 1193 } else { 1194 - pdata = devm_kzalloc(&i2c_client->dev, sizeof(*pdata), 1195 - GFP_KERNEL); 1196 - if (!pdata) 1197 - return -ENOMEM; 1198 - 1199 1194 if (i2c_client->dev.of_node) { 1200 1195 ret = cs42l56_handle_of_data(i2c_client, 1201 1196 &cs42l56->pdata); 1202 1197 if (ret != 0) 1203 1198 return ret; 1204 1199 } 1205 - cs42l56->pdata = *pdata; 1206 1200 } 1207 1201 1208 1202 if (cs42l56->pdata.gpio_nreset) {
+2 -2
sound/soc/codecs/wsa883x.c
··· 1359 1359 .stream_name = "SPKR Playback", 1360 1360 .rates = WSA883X_RATES | WSA883X_FRAC_RATES, 1361 1361 .formats = WSA883X_FORMATS, 1362 - .rate_max = 8000, 1363 - .rate_min = 352800, 1362 + .rate_min = 8000, 1363 + .rate_max = 352800, 1364 1364 .channels_min = 1, 1365 1365 .channels_max = 1, 1366 1366 },
+24
sound/soc/intel/avs/core.c
··· 481 481 return ret; 482 482 } 483 483 484 + static void avs_pci_shutdown(struct pci_dev *pci) 485 + { 486 + struct hdac_bus *bus = pci_get_drvdata(pci); 487 + struct avs_dev *adev = hdac_to_avs(bus); 488 + 489 + cancel_work_sync(&adev->probe_work); 490 + avs_ipc_block(adev->ipc); 491 + 492 + snd_hdac_stop_streams(bus); 493 + avs_dsp_op(adev, int_control, false); 494 + snd_hdac_ext_bus_ppcap_int_enable(bus, false); 495 + snd_hdac_ext_bus_link_power_down_all(bus); 496 + 497 + snd_hdac_bus_stop_chip(bus); 498 + snd_hdac_display_power(bus, HDA_CODEC_IDX_CONTROLLER, false); 499 + 500 + if (avs_platattr_test(adev, CLDMA)) 501 + pci_free_irq(pci, 0, &code_loader); 502 + pci_free_irq(pci, 0, adev); 503 + pci_free_irq(pci, 0, bus); 504 + pci_free_irq_vectors(pci); 505 + } 506 + 484 507 static void avs_pci_remove(struct pci_dev *pci) 485 508 { 486 509 struct hdac_device *hdev, *save; ··· 762 739 .id_table = avs_ids, 763 740 .probe = avs_pci_probe, 764 741 .remove = avs_pci_remove, 742 + .shutdown = avs_pci_shutdown, 765 743 .driver = { 766 744 .pm = &avs_dev_pm, 767 745 },
+12 -8
sound/soc/intel/boards/bytcht_es8316.c
··· 497 497 if (adev) { 498 498 snprintf(codec_name, sizeof(codec_name), 499 499 "i2c-%s", acpi_dev_name(adev)); 500 - put_device(&adev->dev); 501 500 byt_cht_es8316_dais[dai_index].codecs->name = codec_name; 502 501 } else { 503 502 dev_err(dev, "Error cannot find '%s' dev\n", mach->id); 504 503 return -ENXIO; 505 504 } 505 + 506 + codec_dev = acpi_get_first_physical_node(adev); 507 + acpi_dev_put(adev); 508 + if (!codec_dev) 509 + return -EPROBE_DEFER; 510 + priv->codec_dev = get_device(codec_dev); 506 511 507 512 /* override platform name, if required */ 508 513 byt_cht_es8316_card.dev = dev; ··· 515 510 516 511 ret = snd_soc_fixup_dai_links_platform_name(&byt_cht_es8316_card, 517 512 platform_name); 518 - if (ret) 513 + if (ret) { 514 + put_device(codec_dev); 519 515 return ret; 516 + } 520 517 521 518 /* Check for BYTCR or other platform and setup quirks */ 522 519 dmi_id = dmi_first_match(byt_cht_es8316_quirk_table); ··· 546 539 547 540 /* get the clock */ 548 541 priv->mclk = devm_clk_get(dev, "pmc_plt_clk_3"); 549 - if (IS_ERR(priv->mclk)) 542 + if (IS_ERR(priv->mclk)) { 543 + put_device(codec_dev); 550 544 return dev_err_probe(dev, PTR_ERR(priv->mclk), "clk_get pmc_plt_clk_3 failed\n"); 551 - 552 - codec_dev = acpi_get_first_physical_node(adev); 553 - if (!codec_dev) 554 - return -EPROBE_DEFER; 555 - priv->codec_dev = get_device(codec_dev); 545 + } 556 546 557 547 if (quirk & BYT_CHT_ES8316_JD_INVERTED) 558 548 props[cnt++] = PROPERTY_ENTRY_BOOL("everest,jack-detect-inverted");
+6 -6
sound/soc/intel/boards/bytcr_rt5640.c
··· 1636 1636 if (adev) { 1637 1637 snprintf(byt_rt5640_codec_name, sizeof(byt_rt5640_codec_name), 1638 1638 "i2c-%s", acpi_dev_name(adev)); 1639 - put_device(&adev->dev); 1640 1639 byt_rt5640_dais[dai_index].codecs->name = byt_rt5640_codec_name; 1641 1640 } else { 1642 1641 dev_err(dev, "Error cannot find '%s' dev\n", mach->id); 1643 1642 return -ENXIO; 1644 1643 } 1644 + 1645 + codec_dev = acpi_get_first_physical_node(adev); 1646 + acpi_dev_put(adev); 1647 + if (!codec_dev) 1648 + return -EPROBE_DEFER; 1649 + priv->codec_dev = get_device(codec_dev); 1645 1650 1646 1651 /* 1647 1652 * swap SSP0 if bytcr is detected ··· 1721 1716 byt_rt5640_quirk, quirk_override); 1722 1717 byt_rt5640_quirk = quirk_override; 1723 1718 } 1724 - 1725 - codec_dev = acpi_get_first_physical_node(adev); 1726 - if (!codec_dev) 1727 - return -EPROBE_DEFER; 1728 - priv->codec_dev = get_device(codec_dev); 1729 1719 1730 1720 if (byt_rt5640_quirk & BYT_RT5640_JD_HP_ELITEP_1000G2) { 1731 1721 acpi_dev_add_driver_gpios(ACPI_COMPANION(priv->codec_dev),
+1 -1
sound/soc/intel/boards/bytcr_rt5651.c
··· 922 922 if (adev) { 923 923 snprintf(byt_rt5651_codec_name, sizeof(byt_rt5651_codec_name), 924 924 "i2c-%s", acpi_dev_name(adev)); 925 - put_device(&adev->dev); 926 925 byt_rt5651_dais[dai_index].codecs->name = byt_rt5651_codec_name; 927 926 } else { 928 927 dev_err(dev, "Error cannot find '%s' dev\n", mach->id); ··· 929 930 } 930 931 931 932 codec_dev = acpi_get_first_physical_node(adev); 933 + acpi_dev_put(adev); 932 934 if (!codec_dev) 933 935 return -EPROBE_DEFER; 934 936 priv->codec_dev = get_device(codec_dev);
+1 -1
sound/soc/intel/boards/bytcr_wm5102.c
··· 411 411 return -ENOENT; 412 412 } 413 413 snprintf(codec_name, sizeof(codec_name), "spi-%s", acpi_dev_name(adev)); 414 - put_device(&adev->dev); 415 414 416 415 codec_dev = bus_find_device_by_name(&spi_bus_type, NULL, codec_name); 416 + acpi_dev_put(adev); 417 417 if (!codec_dev) 418 418 return -EPROBE_DEFER; 419 419
+3
sound/soc/intel/boards/sof_cs42l42.c
··· 336 336 links[*id].platforms = platform_component; 337 337 links[*id].num_platforms = ARRAY_SIZE(platform_component); 338 338 links[*id].dpcm_playback = 1; 339 + /* firmware-generated echo reference */ 340 + links[*id].dpcm_capture = 1; 341 + 339 342 links[*id].no_pcm = 1; 340 343 links[*id].cpus = &cpus[*id]; 341 344 links[*id].num_cpus = 1;
+8 -6
sound/soc/intel/boards/sof_es8336.c
··· 681 681 if (adev) { 682 682 snprintf(codec_name, sizeof(codec_name), 683 683 "i2c-%s", acpi_dev_name(adev)); 684 - put_device(&adev->dev); 685 684 dai_links[0].codecs->name = codec_name; 686 685 687 686 /* also fixup codec dai name if relevant */ ··· 691 692 return -ENXIO; 692 693 } 693 694 694 - ret = snd_soc_fixup_dai_links_platform_name(&sof_es8336_card, 695 - mach->mach_params.platform); 696 - if (ret) 697 - return ret; 698 - 699 695 codec_dev = acpi_get_first_physical_node(adev); 696 + acpi_dev_put(adev); 700 697 if (!codec_dev) 701 698 return -EPROBE_DEFER; 702 699 priv->codec_dev = get_device(codec_dev); 700 + 701 + ret = snd_soc_fixup_dai_links_platform_name(&sof_es8336_card, 702 + mach->mach_params.platform); 703 + if (ret) { 704 + put_device(codec_dev); 705 + return ret; 706 + } 703 707 704 708 if (quirk & SOF_ES8336_JD_INVERTED) 705 709 props[cnt++] = PROPERTY_ENTRY_BOOL("everest,jack-detect-inverted");
+3 -2
sound/soc/intel/boards/sof_nau8825.c
··· 487 487 links[id].num_codecs = ARRAY_SIZE(max_98373_components); 488 488 links[id].init = max_98373_spk_codec_init; 489 489 links[id].ops = &max_98373_ops; 490 - /* feedback stream */ 491 - links[id].dpcm_capture = 1; 492 490 } else if (sof_nau8825_quirk & 493 491 SOF_MAX98360A_SPEAKER_AMP_PRESENT) { 494 492 max_98360a_dai_link(&links[id]); ··· 504 506 links[id].platforms = platform_component; 505 507 links[id].num_platforms = ARRAY_SIZE(platform_component); 506 508 links[id].dpcm_playback = 1; 509 + /* feedback stream or firmware-generated echo reference */ 510 + links[id].dpcm_capture = 1; 511 + 507 512 links[id].no_pcm = 1; 508 513 links[id].cpus = &cpus[id]; 509 514 links[id].num_cpus = 1;
+3 -2
sound/soc/intel/boards/sof_rt5682.c
··· 761 761 links[id].num_codecs = ARRAY_SIZE(max_98373_components); 762 762 links[id].init = max_98373_spk_codec_init; 763 763 links[id].ops = &max_98373_ops; 764 - /* feedback stream */ 765 - links[id].dpcm_capture = 1; 766 764 } else if (sof_rt5682_quirk & 767 765 SOF_MAX98360A_SPEAKER_AMP_PRESENT) { 768 766 max_98360a_dai_link(&links[id]); ··· 787 789 links[id].platforms = platform_component; 788 790 links[id].num_platforms = ARRAY_SIZE(platform_component); 789 791 links[id].dpcm_playback = 1; 792 + /* feedback stream or firmware-generated echo reference */ 793 + links[id].dpcm_capture = 1; 794 + 790 795 links[id].no_pcm = 1; 791 796 links[id].cpus = &cpus[id]; 792 797 links[id].num_cpus = 1;
+2 -3
sound/soc/intel/boards/sof_ssp_amp.c
··· 258 258 sof_rt1308_dai_link(&links[id]); 259 259 } else if (sof_ssp_amp_quirk & SOF_CS35L41_SPEAKER_AMP_PRESENT) { 260 260 cs35l41_set_dai_link(&links[id]); 261 - 262 - /* feedback from amplifier */ 263 - links[id].dpcm_capture = 1; 264 261 } 265 262 links[id].platforms = platform_component; 266 263 links[id].num_platforms = ARRAY_SIZE(platform_component); 267 264 links[id].dpcm_playback = 1; 265 + /* feedback from amplifier or firmware-generated echo reference */ 266 + links[id].dpcm_capture = 1; 268 267 links[id].no_pcm = 1; 269 268 links[id].cpus = &cpus[id]; 270 269 links[id].num_cpus = 1;
+4 -3
sound/soc/sof/ipc4-mtrace.c
··· 344 344 size_t count, loff_t *ppos) 345 345 { 346 346 struct sof_mtrace_priv *priv = file->private_data; 347 - int id, ret; 347 + unsigned int id; 348 348 char *buf; 349 349 u32 mask; 350 + int ret; 350 351 351 352 /* 352 353 * To update Nth mask entry, write: ··· 358 357 if (IS_ERR(buf)) 359 358 return PTR_ERR(buf); 360 359 361 - ret = sscanf(buf, "%d,0x%x", &id, &mask); 360 + ret = sscanf(buf, "%u,0x%x", &id, &mask); 362 361 if (ret != 2) { 363 - ret = sscanf(buf, "%d,%x", &id, &mask); 362 + ret = sscanf(buf, "%u,%x", &id, &mask); 364 363 if (ret != 2) { 365 364 ret = -EINVAL; 366 365 goto out;
+9 -7
sound/soc/sof/sof-audio.c
··· 271 271 struct snd_sof_widget *swidget = widget->dobj.private; 272 272 struct snd_soc_dapm_path *p; 273 273 274 - /* return if the widget is in use or if it is already unprepared */ 275 - if (!swidget->prepared || swidget->use_count > 1) 276 - return; 274 + /* skip if the widget is in use or if it is already unprepared */ 275 + if (!swidget || !swidget->prepared || swidget->use_count > 0) 276 + goto sink_unprepare; 277 277 278 278 if (widget_ops[widget->id].ipc_unprepare) 279 279 /* unprepare the source widget */ ··· 281 281 282 282 swidget->prepared = false; 283 283 284 + sink_unprepare: 284 285 /* unprepare all widgets in the sink paths */ 285 286 snd_soc_dapm_widget_for_each_sink_path(widget, p) { 286 287 if (!p->walking && p->sink->dobj.private) { ··· 304 303 struct snd_soc_dapm_path *p; 305 304 int ret; 306 305 307 - if (!widget_ops[widget->id].ipc_prepare || swidget->prepared) 306 + if (!swidget || !widget_ops[widget->id].ipc_prepare || swidget->prepared) 308 307 goto sink_prepare; 309 308 310 309 /* prepare the source widget */ ··· 327 326 p->walking = false; 328 327 if (ret < 0) { 329 328 /* unprepare the source widget */ 330 - if (widget_ops[widget->id].ipc_unprepare && swidget->prepared) { 329 + if (widget_ops[widget->id].ipc_unprepare && 330 + swidget && swidget->prepared) { 331 331 widget_ops[widget->id].ipc_unprepare(swidget); 332 332 swidget->prepared = false; 333 333 } ··· 431 429 432 430 for_each_dapm_widgets(list, i, widget) { 433 431 /* starting widget for playback is AIF type */ 434 - if (dir == SNDRV_PCM_STREAM_PLAYBACK && !WIDGET_IS_AIF(widget->id)) 432 + if (dir == SNDRV_PCM_STREAM_PLAYBACK && widget->id != snd_soc_dapm_aif_in) 435 433 continue; 436 434 437 435 /* starting widget for capture is DAI type */ 438 - if (dir == SNDRV_PCM_STREAM_CAPTURE && !WIDGET_IS_DAI(widget->id)) 436 + if (dir == SNDRV_PCM_STREAM_CAPTURE && widget->id != snd_soc_dapm_dai_out) 439 437 continue; 440 438 441 439 switch (op) {
+2
sound/usb/quirks.c
··· 2152 2152 QUIRK_FLAG_GENERIC_IMPLICIT_FB), 2153 2153 DEVICE_FLG(0x0525, 0xa4ad, /* Hamedal C20 usb camero */ 2154 2154 QUIRK_FLAG_IFACE_SKIP_CLOSE), 2155 + DEVICE_FLG(0x0ecb, 0x205c, /* JBL Quantum610 Wireless */ 2156 + QUIRK_FLAG_FIXED_RATE), 2155 2157 DEVICE_FLG(0x0ecb, 0x2069, /* JBL Quantum810 Wireless */ 2156 2158 QUIRK_FLAG_FIXED_RATE), 2157 2159