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

Configure Feed

Select the types of activity you want to include in your feed.

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

Pull sound fixes from Takashi Iwai:
"A collection of small fixes that have been gathered before rc1,
including a few regression fixes for the problem in the previous pull
request"

* tag 'sound-fix-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: gus: Fix repeated probe for ISA interwave card
ALSA: gus: Fix repeated probes of snd_gus_create()
ALSA: vx222: fix null-ptr-deref
ASoC: rockchip: i2s: Fix concurrency between tx/rx
ASoC: mt8195: correct the dts parsing logic about DPTX and HDMITX
ASoC: Intel: boards: Fix CONFIG_SND_SOC_SDW_MOCKUP select
ASoC: dt-bindings: fsl_rpmsg: Add compatible string for i.MX8ULP
ALSA: usb-audio: Add registration quirk for JBL Quantum 800
ASoC: rt5682: fix headset background noise when S3 state
ASoC: dt-bindings: mt8195: remove dependent headers in the example
ASoC: mediatek: SND_SOC_MT8195 should depend on ARCH_MEDIATEK
ASoC: samsung: s3c24xx_simtec: fix spelling mistake "devicec" -> "device"
ASoC: audio-graph: respawn Platform Support
ASoC: mediatek: mt8195: add MTK_PMIC_WRAP dependency

+111 -82
+1
Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml
··· 21 21 - fsl,imx8mn-rpmsg-audio 22 22 - fsl,imx8mm-rpmsg-audio 23 23 - fsl,imx8mp-rpmsg-audio 24 + - fsl,imx8ulp-rpmsg-audio 24 25 25 26 model: 26 27 $ref: /schemas/types.yaml#/definitions/string
+19 -21
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml
··· 130 130 131 131 examples: 132 132 - | 133 - #include <dt-bindings/clock/mt8195-clk.h> 134 133 #include <dt-bindings/interrupt-controller/arm-gic.h> 135 134 #include <dt-bindings/interrupt-controller/irq.h> 136 - #include <dt-bindings/power/mt8195-power.h> 137 135 138 136 afe: mt8195-afe-pcm@10890000 { 139 137 compatible = "mediatek,mt8195-audio"; 140 138 reg = <0x10890000 0x10000>; 141 139 interrupts = <GIC_SPI 822 IRQ_TYPE_LEVEL_HIGH 0>; 142 140 mediatek,topckgen = <&topckgen>; 143 - power-domains = <&spm MT8195_POWER_DOMAIN_AUDIO>; 141 + power-domains = <&spm 7>; //MT8195_POWER_DOMAIN_AUDIO 144 142 clocks = <&clk26m>, 145 - <&topckgen CLK_TOP_APLL1>, 146 - <&topckgen CLK_TOP_APLL2>, 147 - <&topckgen CLK_TOP_APLL12_DIV0>, 148 - <&topckgen CLK_TOP_APLL12_DIV1>, 149 - <&topckgen CLK_TOP_APLL12_DIV2>, 150 - <&topckgen CLK_TOP_APLL12_DIV3>, 151 - <&topckgen CLK_TOP_APLL12_DIV9>, 152 - <&topckgen CLK_TOP_A1SYS_HP_SEL>, 153 - <&topckgen CLK_TOP_AUD_INTBUS_SEL>, 154 - <&topckgen CLK_TOP_AUDIO_H_SEL>, 155 - <&topckgen CLK_TOP_AUDIO_LOCAL_BUS_SEL>, 156 - <&topckgen CLK_TOP_DPTX_M_SEL>, 157 - <&topckgen CLK_TOP_I2SO1_M_SEL>, 158 - <&topckgen CLK_TOP_I2SO2_M_SEL>, 159 - <&topckgen CLK_TOP_I2SI1_M_SEL>, 160 - <&topckgen CLK_TOP_I2SI2_M_SEL>, 161 - <&infracfg_ao CLK_INFRA_AO_AUDIO_26M_B>, 162 - <&scp_adsp CLK_SCP_ADSP_AUDIODSP>; 143 + <&topckgen 163>, //CLK_TOP_APLL1 144 + <&topckgen 166>, //CLK_TOP_APLL2 145 + <&topckgen 233>, //CLK_TOP_APLL12_DIV0 146 + <&topckgen 234>, //CLK_TOP_APLL12_DIV1 147 + <&topckgen 235>, //CLK_TOP_APLL12_DIV2 148 + <&topckgen 236>, //CLK_TOP_APLL12_DIV3 149 + <&topckgen 238>, //CLK_TOP_APLL12_DIV9 150 + <&topckgen 100>, //CLK_TOP_A1SYS_HP_SEL 151 + <&topckgen 33>, //CLK_TOP_AUD_INTBUS_SEL 152 + <&topckgen 34>, //CLK_TOP_AUDIO_H_SEL 153 + <&topckgen 107>, //CLK_TOP_AUDIO_LOCAL_BUS_SEL 154 + <&topckgen 98>, //CLK_TOP_DPTX_M_SEL 155 + <&topckgen 94>, //CLK_TOP_I2SO1_M_SEL 156 + <&topckgen 95>, //CLK_TOP_I2SO2_M_SEL 157 + <&topckgen 96>, //CLK_TOP_I2SI1_M_SEL 158 + <&topckgen 97>, //CLK_TOP_I2SI2_M_SEL 159 + <&infracfg_ao 50>, //CLK_INFRA_AO_AUDIO_26M_B 160 + <&scp_adsp 0>; //CLK_SCP_ADSP_AUDIODSP 163 161 clock-names = "clk26m", 164 162 "apll1_ck", 165 163 "apll2_ck",
+31 -13
sound/isa/gus/gus_main.c
··· 87 87 88 88 static int snd_gus_free(struct snd_gus_card *gus) 89 89 { 90 - if (gus->gf1.res_port2) { 91 - snd_gf1_stop(gus); 92 - snd_gus_init_dma_irq(gus, 0); 90 + if (gus->gf1.res_port2 == NULL) 91 + goto __hw_end; 92 + snd_gf1_stop(gus); 93 + snd_gus_init_dma_irq(gus, 0); 94 + __hw_end: 95 + release_and_free_resource(gus->gf1.res_port1); 96 + release_and_free_resource(gus->gf1.res_port2); 97 + if (gus->gf1.irq >= 0) 98 + free_irq(gus->gf1.irq, (void *) gus); 99 + if (gus->gf1.dma1 >= 0) { 100 + disable_dma(gus->gf1.dma1); 101 + free_dma(gus->gf1.dma1); 93 102 } 103 + if (!gus->equal_dma && gus->gf1.dma2 >= 0) { 104 + disable_dma(gus->gf1.dma2); 105 + free_dma(gus->gf1.dma2); 106 + } 107 + kfree(gus); 94 108 return 0; 95 109 } 96 110 ··· 130 116 }; 131 117 132 118 *rgus = NULL; 133 - gus = devm_kzalloc(card->dev, sizeof(*gus), GFP_KERNEL); 119 + gus = kzalloc(sizeof(*gus), GFP_KERNEL); 134 120 if (gus == NULL) 135 121 return -ENOMEM; 136 122 spin_lock_init(&gus->reg_lock); ··· 156 142 gus->gf1.reg_timerctrl = GUSP(gus, TIMERCNTRL); 157 143 gus->gf1.reg_timerdata = GUSP(gus, TIMERDATA); 158 144 /* allocate resources */ 159 - gus->gf1.res_port1 = devm_request_region(card->dev, port, 16, 160 - "GUS GF1 (Adlib/SB)"); 145 + gus->gf1.res_port1 = request_region(port, 16, "GUS GF1 (Adlib/SB)"); 161 146 if (!gus->gf1.res_port1) { 162 147 snd_printk(KERN_ERR "gus: can't grab SB port 0x%lx\n", port); 148 + snd_gus_free(gus); 163 149 return -EBUSY; 164 150 } 165 - gus->gf1.res_port2 = devm_request_region(card->dev, port + 0x100, 12, 166 - "GUS GF1 (Synth)"); 151 + gus->gf1.res_port2 = request_region(port + 0x100, 12, "GUS GF1 (Synth)"); 167 152 if (!gus->gf1.res_port2) { 168 153 snd_printk(KERN_ERR "gus: can't grab synth port 0x%lx\n", port + 0x100); 154 + snd_gus_free(gus); 169 155 return -EBUSY; 170 156 } 171 - if (irq >= 0 && devm_request_irq(card->dev, irq, snd_gus_interrupt, 0, 172 - "GUS GF1", (void *) gus)) { 157 + if (irq >= 0 && request_irq(irq, snd_gus_interrupt, 0, "GUS GF1", (void *) gus)) { 173 158 snd_printk(KERN_ERR "gus: can't grab irq %d\n", irq); 159 + snd_gus_free(gus); 174 160 return -EBUSY; 175 161 } 176 162 gus->gf1.irq = irq; 177 163 card->sync_irq = irq; 178 - if (snd_devm_request_dma(card->dev, dma1, "GUS - 1")) { 164 + if (request_dma(dma1, "GUS - 1")) { 179 165 snd_printk(KERN_ERR "gus: can't grab DMA1 %d\n", dma1); 166 + snd_gus_free(gus); 180 167 return -EBUSY; 181 168 } 182 169 gus->gf1.dma1 = dma1; 183 170 if (dma2 >= 0 && dma1 != dma2) { 184 - if (snd_devm_request_dma(card->dev, dma2, "GUS - 2")) { 171 + if (request_dma(dma2, "GUS - 2")) { 185 172 snd_printk(KERN_ERR "gus: can't grab DMA2 %d\n", dma2); 173 + snd_gus_free(gus); 186 174 return -EBUSY; 187 175 } 188 176 gus->gf1.dma2 = dma2; ··· 209 193 gus->gf1.volume_ramp = 25; 210 194 gus->gf1.smooth_pan = 1; 211 195 err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, gus, &ops); 212 - if (err < 0) 196 + if (err < 0) { 197 + snd_gus_free(gus); 213 198 return err; 199 + } 214 200 *rgus = gus; 215 201 return 0; 216 202 }
+31 -30
sound/isa/gus/interwave.c
··· 618 618 return 0; 619 619 } 620 620 621 - static int snd_interwave_probe(struct snd_card *card, int dev) 621 + static int snd_interwave_probe_gus(struct snd_card *card, int dev, 622 + struct snd_gus_card **gusp) 623 + { 624 + return snd_gus_create(card, port[dev], -irq[dev], dma1[dev], dma2[dev], 625 + 0, 32, pcm_channels[dev], effect[dev], gusp); 626 + } 627 + 628 + static int snd_interwave_probe(struct snd_card *card, int dev, 629 + struct snd_gus_card *gus) 622 630 { 623 631 int xirq, xdma1, xdma2; 624 632 struct snd_interwave *iwcard = card->private_data; 625 633 struct snd_wss *wss; 626 - struct snd_gus_card *gus; 627 634 #ifdef SNDRV_STB 628 635 struct snd_i2c_bus *i2c_bus; 629 636 #endif ··· 640 633 xirq = irq[dev]; 641 634 xdma1 = dma1[dev]; 642 635 xdma2 = dma2[dev]; 643 - 644 - err = snd_gus_create(card, 645 - port[dev], 646 - -xirq, xdma1, xdma2, 647 - 0, 32, 648 - pcm_channels[dev], effect[dev], &gus); 649 - if (err < 0) 650 - return err; 651 636 652 637 err = snd_interwave_detect(iwcard, gus, dev 653 638 #ifdef SNDRV_STB ··· 756 757 return 0; 757 758 } 758 759 759 - static int snd_interwave_isa_probe1(int dev, struct device *devptr) 760 - { 761 - struct snd_card *card; 762 - int err; 763 - 764 - err = snd_interwave_card_new(devptr, dev, &card); 765 - if (err < 0) 766 - return err; 767 - 768 - err = snd_interwave_probe(card, dev); 769 - if (err < 0) 770 - return err; 771 - dev_set_drvdata(devptr, card); 772 - return 0; 773 - } 774 - 775 760 static int snd_interwave_isa_match(struct device *pdev, 776 761 unsigned int dev) 777 762 { ··· 771 788 static int snd_interwave_isa_probe(struct device *pdev, 772 789 unsigned int dev) 773 790 { 791 + struct snd_card *card; 792 + struct snd_gus_card *gus; 774 793 int err; 775 794 static const int possible_irqs[] = {5, 11, 12, 9, 7, 15, 3, -1}; 776 795 static const int possible_dmas[] = {0, 1, 3, 5, 6, 7, -1}; ··· 799 814 } 800 815 } 801 816 817 + err = snd_interwave_card_new(pdev, dev, &card); 818 + if (err < 0) 819 + return err; 820 + 802 821 if (port[dev] != SNDRV_AUTO_PORT) 803 - return snd_interwave_isa_probe1(dev, pdev); 822 + err = snd_interwave_probe_gus(card, dev, &gus); 804 823 else { 805 824 static const long possible_ports[] = {0x210, 0x220, 0x230, 0x240, 0x250, 0x260}; 806 825 int i; 807 826 for (i = 0; i < ARRAY_SIZE(possible_ports); i++) { 808 827 port[dev] = possible_ports[i]; 809 - err = snd_interwave_isa_probe1(dev, pdev); 828 + err = snd_interwave_probe_gus(card, dev, &gus); 810 829 if (! err) 811 830 return 0; 812 831 } 813 - return err; 814 832 } 833 + if (err < 0) 834 + return err; 835 + 836 + err = snd_interwave_probe(card, dev, gus); 837 + if (err < 0) 838 + return err; 839 + 840 + dev_set_drvdata(pdev, card); 841 + return 0; 815 842 } 816 843 817 844 static struct isa_driver snd_interwave_driver = { ··· 841 844 { 842 845 static int dev; 843 846 struct snd_card *card; 847 + struct snd_gus_card *gus; 844 848 int res; 845 849 846 850 for ( ; dev < SNDRV_CARDS; dev++) { ··· 858 860 res = snd_interwave_pnp(dev, card->private_data, pcard, pid); 859 861 if (res < 0) 860 862 return res; 861 - res = snd_interwave_probe(card, dev); 863 + res = snd_interwave_probe_gus(card, dev, &gus); 864 + if (res < 0) 865 + return res; 866 + res = snd_interwave_probe(card, dev, gus); 862 867 if (res < 0) 863 868 return res; 864 869 pnp_set_card_drvdata(pcard, card);
+1
sound/pci/vx222/vx222.c
··· 137 137 } 138 138 chip->irq = pci->irq; 139 139 card->sync_irq = chip->irq; 140 + *rchip = vx; 140 141 141 142 return 0; 142 143 }
-3
sound/soc/codecs/rt5682.c
··· 2942 2942 break; 2943 2943 } 2944 2944 2945 - snd_soc_component_update_bits(component, RT5682_PWR_ANLG_3, 2946 - RT5682_PWR_CBJ, 0); 2947 - 2948 2945 /* enter SAR ADC power saving mode */ 2949 2946 snd_soc_component_update_bits(component, RT5682_SAR_IL_CMD_1, 2950 2947 RT5682_SAR_BUTT_DET_MASK | RT5682_SAR_BUTDET_MODE_MASK |
+6
sound/soc/generic/audio-graph-card.c
··· 285 285 if (li->cpu) { 286 286 struct snd_soc_card *card = simple_priv_to_card(priv); 287 287 struct snd_soc_dai_link_component *cpus = asoc_link_to_cpu(dai_link, 0); 288 + struct snd_soc_dai_link_component *platforms = asoc_link_to_platform(dai_link, 0); 288 289 int is_single_links = 0; 289 290 290 291 /* Codec is dummy */ ··· 314 313 dai_link->no_pcm = 1; 315 314 316 315 asoc_simple_canonicalize_cpu(cpus, is_single_links); 316 + asoc_simple_canonicalize_platform(platforms, cpus); 317 317 } else { 318 318 struct snd_soc_codec_conf *cconf = simple_props_to_codec_conf(dai_props, 0); 319 319 struct snd_soc_dai_link_component *codecs = asoc_link_to_codec(dai_link, 0); ··· 368 366 struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, li->link); 369 367 struct snd_soc_dai_link_component *cpus = asoc_link_to_cpu(dai_link, 0); 370 368 struct snd_soc_dai_link_component *codecs = asoc_link_to_codec(dai_link, 0); 369 + struct snd_soc_dai_link_component *platforms = asoc_link_to_platform(dai_link, 0); 371 370 char dai_name[64]; 372 371 int ret, is_single_links = 0; 373 372 ··· 386 383 "%s-%s", cpus->dai_name, codecs->dai_name); 387 384 388 385 asoc_simple_canonicalize_cpu(cpus, is_single_links); 386 + asoc_simple_canonicalize_platform(platforms, cpus); 389 387 390 388 ret = graph_link_init(priv, cpu_ep, codec_ep, li, dai_name); 391 389 if (ret < 0) ··· 612 608 613 609 li->num[li->link].cpus = 1; 614 610 li->num[li->link].codecs = 1; 611 + li->num[li->link].platforms = 1; 615 612 616 613 li->link += 1; /* 1xCPU-Codec */ 617 614 ··· 635 630 636 631 if (li->cpu) { 637 632 li->num[li->link].cpus = 1; 633 + li->num[li->link].platforms = 1; 638 634 639 635 li->link++; /* 1xCPU-dummy */ 640 636 } else {
+1 -1
sound/soc/intel/boards/Kconfig
··· 602 602 select SND_SOC_DMIC 603 603 select SND_SOC_INTEL_HDA_DSP_COMMON 604 604 select SND_SOC_INTEL_SOF_MAXIM_COMMON 605 - select SND_SOC_SDW_MOCKUP 605 + imply SND_SOC_SDW_MOCKUP 606 606 help 607 607 Add support for Intel SoundWire-based platforms connected to 608 608 MAX98373, RT700, RT711, RT1308 and RT715
+2 -1
sound/soc/mediatek/Kconfig
··· 187 187 188 188 config SND_SOC_MT8195 189 189 tristate "ASoC support for Mediatek MT8195 chip" 190 + depends on ARCH_MEDIATEK || COMPILE_TEST 190 191 select SND_SOC_MEDIATEK 191 192 help 192 193 This adds ASoC platform driver support for Mediatek MT8195 chip ··· 198 197 config SND_SOC_MT8195_MT6359_RT1019_RT5682 199 198 tristate "ASoC Audio driver for MT8195 with MT6359 RT1019 RT5682 codec" 200 199 depends on I2C 201 - depends on SND_SOC_MT8195 200 + depends on SND_SOC_MT8195 && MTK_PMIC_WRAP 202 201 select SND_SOC_MT6359 203 202 select SND_SOC_RT1015P 204 203 select SND_SOC_RT5682_I2C
+10 -12
sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c
··· 1018 1018 of_parse_phandle(pdev->dev.of_node, 1019 1019 "mediatek,dptx-codec", 0); 1020 1020 if (!dai_link->codecs->of_node) { 1021 - dev_err(&pdev->dev, "Property 'dptx-codec' missing or invalid\n"); 1022 - return -EINVAL; 1021 + dev_dbg(&pdev->dev, "No property 'dptx-codec'\n"); 1022 + } else { 1023 + dai_link->codecs->name = NULL; 1024 + dai_link->codecs->dai_name = "i2s-hifi"; 1025 + dai_link->init = mt8195_dptx_codec_init; 1023 1026 } 1024 - 1025 - dai_link->codecs->name = NULL; 1026 - dai_link->codecs->dai_name = "i2s-hifi"; 1027 - dai_link->init = mt8195_dptx_codec_init; 1028 1027 } 1029 1028 1030 1029 if (strcmp(dai_link->name, "ETDM3_OUT_BE") == 0) { ··· 1031 1032 of_parse_phandle(pdev->dev.of_node, 1032 1033 "mediatek,hdmi-codec", 0); 1033 1034 if (!dai_link->codecs->of_node) { 1034 - dev_err(&pdev->dev, "Property 'hdmi-codec' missing or invalid\n"); 1035 - return -EINVAL; 1035 + dev_dbg(&pdev->dev, "No property 'hdmi-codec'\n"); 1036 + } else { 1037 + dai_link->codecs->name = NULL; 1038 + dai_link->codecs->dai_name = "i2s-hifi"; 1039 + dai_link->init = mt8195_hdmi_codec_init; 1036 1040 } 1037 - 1038 - dai_link->codecs->name = NULL; 1039 - dai_link->codecs->dai_name = "i2s-hifi"; 1040 - dai_link->init = mt8195_hdmi_codec_init; 1041 1041 } 1042 1042 } 1043 1043
+7
sound/soc/rockchip/rockchip_i2s.c
··· 15 15 #include <linux/clk.h> 16 16 #include <linux/pm_runtime.h> 17 17 #include <linux/regmap.h> 18 + #include <linux/spinlock.h> 18 19 #include <sound/pcm_params.h> 19 20 #include <sound/dmaengine_pcm.h> 20 21 ··· 54 53 bool is_master_mode; 55 54 const struct rk_i2s_pins *pins; 56 55 unsigned int bclk_ratio; 56 + spinlock_t lock; /* tx/rx lock */ 57 57 }; 58 58 59 59 static int i2s_runtime_suspend(struct device *dev) ··· 98 96 unsigned int val = 0; 99 97 int retry = 10; 100 98 99 + spin_lock(&i2s->lock); 101 100 if (on) { 102 101 regmap_update_bits(i2s->regmap, I2S_DMACR, 103 102 I2S_DMACR_TDE_ENABLE, I2S_DMACR_TDE_ENABLE); ··· 139 136 } 140 137 } 141 138 } 139 + spin_unlock(&i2s->lock); 142 140 } 143 141 144 142 static void rockchip_snd_rxctrl(struct rk_i2s_dev *i2s, int on) ··· 147 143 unsigned int val = 0; 148 144 int retry = 10; 149 145 146 + spin_lock(&i2s->lock); 150 147 if (on) { 151 148 regmap_update_bits(i2s->regmap, I2S_DMACR, 152 149 I2S_DMACR_RDE_ENABLE, I2S_DMACR_RDE_ENABLE); ··· 188 183 } 189 184 } 190 185 } 186 + spin_unlock(&i2s->lock); 191 187 } 192 188 193 189 static int rockchip_i2s_set_fmt(struct snd_soc_dai *cpu_dai, ··· 690 684 if (!i2s) 691 685 return -ENOMEM; 692 686 687 + spin_lock_init(&i2s->lock); 693 688 i2s->dev = &pdev->dev; 694 689 695 690 i2s->grf = syscon_regmap_lookup_by_phandle(node, "rockchip,grf");
+1 -1
sound/soc/samsung/s3c24xx_simtec.c
··· 327 327 328 328 snd_dev = platform_device_alloc("soc-audio", -1); 329 329 if (!snd_dev) { 330 - dev_err(&pdev->dev, "failed to alloc soc-audio devicec\n"); 330 + dev_err(&pdev->dev, "failed to alloc soc-audio device\n"); 331 331 ret = -ENOMEM; 332 332 goto err_gpio; 333 333 }
+1
sound/usb/quirks.c
··· 1743 1743 REG_QUIRK_ENTRY(0x0951, 0x16ed, 2), /* Kingston HyperX Cloud Alpha S */ 1744 1744 REG_QUIRK_ENTRY(0x0951, 0x16ea, 2), /* Kingston HyperX Cloud Flight S */ 1745 1745 REG_QUIRK_ENTRY(0x0ecb, 0x1f46, 2), /* JBL Quantum 600 */ 1746 + REG_QUIRK_ENTRY(0x0ecb, 0x1f47, 2), /* JBL Quantum 800 */ 1746 1747 REG_QUIRK_ENTRY(0x0ecb, 0x2039, 2), /* JBL Quantum 400 */ 1747 1748 REG_QUIRK_ENTRY(0x0ecb, 0x203c, 2), /* JBL Quantum 600 */ 1748 1749 REG_QUIRK_ENTRY(0x0ecb, 0x203e, 2), /* JBL Quantum 800 */