Skip to contentSkip to conversation

x86/dma conversion for v4.17-rc1 breaks sound / sst-acpi (commit 6e4bf5867783)

DISCUSSION Dominik Brodowski 4 participants 7 messages Apr 5, 2018 – Apr 6, 2018 Library code

lore
Share & tools
lore
#0 lore raw

Christoph,

unfortunately, commit 6e4bf5867783 breaks sound on my Dell XPS13, see the dmesg diff between fec777c385b6 and 6e4bf5867783:

-sst-acpi INT3438:00: DesignWare DMA Controller, 8 channels
-haswell-pcm-audio haswell-pcm-audio: Direct firmware load for intel/IntcPP01.bin failed with error -2
-haswell-pcm-audio haswell-pcm-audio: fw image intel/IntcPP01.bin not available(-2)
-haswell-pcm-audio haswell-pcm-audio: FW loaded, mailbox readback FW info: type 01, - version: 00.00, build 77, source commit id: 876ac6906f31a43b6772b23c7c983ce9dcb18a19 -broadwell-audio broadwell-audio: snd-soc-dummy-dai <-> System Pin mapping ok
-broadwell-audio broadwell-audio: snd-soc-dummy-dai <-> Offload0 Pin mapping ok
-broadwell-audio broadwell-audio: snd-soc-dummy-dai <-> Offload1 Pin mapping ok
-broadwell-audio broadwell-audio: snd-soc-dummy-dai <-> Loopback Pin mapping ok
-broadwell-audio broadwell-audio: rt286-aif1 <-> snd-soc-dummy-dai mapping ok
-input: broadwell-rt286 Headset as /devices/pci0000:00/INT3438:00/broadwell-audio/sound/card1/input15
+broadwell-audio broadwell-audio: ASoC: CPU DAI System Pin not registered

So it seems that sst-acpi is unhappy with this patch. Any ideas?

Thanks,
Dominik

#1 lore raw
Quoted 4 lines · Dominik Brodowski

Christoph,

unfortunately, commit 6e4bf5867783 breaks sound on my Dell XPS13, see the dmesg diff between fec777c385b6 and 6e4bf5867783:

Very strange. I'll need to spend some time untangling all that sound-soc mess where it might be stuck.

#2 lore raw
In reply to Dominik Brodowski
Quoted 4 lines · Dominik Brodowski

Christoph,

unfortunately, commit 6e4bf5867783 breaks sound on my Dell XPS13, see the dmesg diff between fec777c385b6 and 6e4bf5867783:

Adding Vinod and Pierre from Intel in case they have any ideas here. Which model of XPS13 is this (2015?)?

Quoted 16 lines
(quoted diff) +1 -10
-sst-acpi INT3438:00: DesignWare DMA Controller, 8 channels
-haswell-pcm-audio haswell-pcm-audio: Direct firmware load for intel/IntcPP01.bin failed with error -2
-haswell-pcm-audio haswell-pcm-audio: fw image intel/IntcPP01.bin not available(-2)
-haswell-pcm-audio haswell-pcm-audio: FW loaded, mailbox readback FW info: type 01, - version: 00.00, build 77, source commit id: 876ac6906f31a43b6772b23c7c983ce9dcb18a19
-broadwell-audio broadwell-audio: snd-soc-dummy-dai <-> System Pin mapping ok
-broadwell-audio broadwell-audio: snd-soc-dummy-dai <-> Offload0 Pin mapping ok
-broadwell-audio broadwell-audio: snd-soc-dummy-dai <-> Offload1 Pin mapping ok
-broadwell-audio broadwell-audio: snd-soc-dummy-dai <-> Loopback Pin mapping ok
-broadwell-audio broadwell-audio: rt286-aif1 <-> snd-soc-dummy-dai mapping ok
-input: broadwell-rt286 Headset as /devices/pci0000:00/INT3438:00/broadwell-audio/sound/card1/input15
+broadwell-audio broadwell-audio: ASoC: CPU DAI System Pin not registered

So it seems that sst-acpi is unhappy with this patch. Any ideas?

Thanks,
Dominik

#3 lore raw
Quoted 8 lines · Mark Brown
Quoted 4 lines · Dominik Brodowski

Christoph,

unfortunately, commit 6e4bf5867783 breaks sound on my Dell XPS13, see the dmesg diff between fec777c385b6 and 6e4bf5867783:

Adding Vinod and Pierre from Intel in case they have any ideas here. Which model of XPS13 is this (2015?)?

Dell Inc. XPS 13 9343/0TM99H, BIOS A11 12/08/2016, with

# CONFIG_GPIOLIB is not set,

just CONFIG_PINCTRL=y but no

# CONFIG_PINCTRL_BAYTRAIL is not set
# CONFIG_PINCTRL_CHERRYVIEW is not set
# CONFIG_PINCTRL_BROXTON is not set
# CONFIG_PINCTRL_CANNONLAKE is not set
# CONFIG_PINCTRL_CEDARFORK is not set
# CONFIG_PINCTRL_DENVERTON is not set
# CONFIG_PINCTRL_GEMINILAKE is not set
# CONFIG_PINCTRL_LEWISBURG is not set
# CONFIG_PINCTRL_SUNRISEPOINT is not set

(yes, this works, see commit d1fa74520dcd ), and,

CONFIG_SND_HDA_I915=y
CONFIG_SND_SOC=y
CONFIG_SND_SOC_AC97_BUS=y
CONFIG_SND_SOC_COMPRESS=y
CONFIG_SND_SOC_ACPI=y
CONFIG_SND_SOC_INTEL_SST_TOPLEVEL=y
CONFIG_SND_SST_IPC=y
CONFIG_SND_SST_IPC_ACPI=y
CONFIG_SND_SOC_INTEL_SST_ACPI=y
CONFIG_SND_SOC_INTEL_SST=y
CONFIG_SND_SOC_INTEL_SST_FIRMWARE=y
CONFIG_SND_SOC_INTEL_HASWELL=y
CONFIG_SND_SST_ATOM_HIFI2_PLATFORM=y
CONFIG_SND_SOC_ACPI_INTEL_MATCH=y
CONFIG_SND_SOC_INTEL_MACH=y
CONFIG_SND_SOC_INTEL_BROADWELL_MACH=y
CONFIG_SND_SOC_INTEL_BYTCR_RT5640_MACH=y
CONFIG_SND_SOC_INTEL_BYTCR_RT5651_MACH=y
CONFIG_SND_SOC_INTEL_CHT_BSW_MAX98090_TI_MACH=y
CONFIG_SND_SOC_I2C_AND_SPI=y
CONFIG_SND_SOC_AC97_CODEC=y

Thanks for looking into this!

Dominik

Quoted 13 lines
Quoted 13 lines
(quoted diff) +1 -10
-sst-acpi INT3438:00: DesignWare DMA Controller, 8 channels
-haswell-pcm-audio haswell-pcm-audio: Direct firmware load for intel/IntcPP01.bin failed with error -2
-haswell-pcm-audio haswell-pcm-audio: fw image intel/IntcPP01.bin not available(-2)
-haswell-pcm-audio haswell-pcm-audio: FW loaded, mailbox readback FW info: type 01, - version: 00.00, build 77, source commit id: 876ac6906f31a43b6772b23c7c983ce9dcb18a19
-broadwell-audio broadwell-audio: snd-soc-dummy-dai <-> System Pin mapping ok
-broadwell-audio broadwell-audio: snd-soc-dummy-dai <-> Offload0 Pin mapping ok
-broadwell-audio broadwell-audio: snd-soc-dummy-dai <-> Offload1 Pin mapping ok
-broadwell-audio broadwell-audio: snd-soc-dummy-dai <-> Loopback Pin mapping ok
-broadwell-audio broadwell-audio: rt286-aif1 <-> snd-soc-dummy-dai mapping ok
-input: broadwell-rt286 Headset as /devices/pci0000:00/INT3438:00/broadwell-audio/sound/card1/input15
+broadwell-audio broadwell-audio: ASoC: CPU DAI System Pin not registered

So it seems that sst-acpi is unhappy with this patch. Any ideas?

#4 lore raw
In reply to Mark Brown
Quoted 7 lines · Mark Brown
Quoted 4 lines · Dominik Brodowski

Christoph,

unfortunately, commit 6e4bf5867783 breaks sound on my Dell XPS13, see the dmesg diff between fec777c385b6 and 6e4bf5867783:

Adding Vinod and Pierre from Intel in case they have any ideas here. Which model of XPS13 is this (2015?)?

No clear idea, but this patch is odd. It claims to replace a dma_ops structure by an equivalent one but the callbacks for alloc/free are different.

-void *x86_swiotlb_alloc_coherent(struct device *hwdev, size_t size, -                    dma_addr_t *dma_handle, gfp_t flags,
-                    unsigned long attrs)
-{
-    void *vaddr;
-
-    /*
-     * Don't print a warning when the first allocation attempt fails. -     * swiotlb_alloc_coherent() will print a warning when the DMA -     * memory allocation ultimately failed.
-     */
-    flags |= __GFP_NOWARN;
-
-    vaddr = dma_direct_alloc(hwdev, size, dma_handle, flags, attrs); -    if (vaddr)
-        return vaddr;
-
-    return swiotlb_alloc_coherent(hwdev, size, dma_handle, flags); -}
-
-void x86_swiotlb_free_coherent(struct device *dev, size_t size, -                      void *vaddr, dma_addr_t dma_addr,
-                      unsigned long attrs)
-{
-    if (is_swiotlb_buffer(dma_to_phys(dev, dma_addr)))
-        swiotlb_free_coherent(dev, size, vaddr, dma_addr); -    else
-        dma_direct_free(dev, size, vaddr, dma_addr, attrs); -}

Quoted 15 lines
Quoted 15 lines
(quoted diff) +1 -10
-sst-acpi INT3438:00: DesignWare DMA Controller, 8 channels
-haswell-pcm-audio haswell-pcm-audio: Direct firmware load for intel/IntcPP01.bin failed with error -2
-haswell-pcm-audio haswell-pcm-audio: fw image intel/IntcPP01.bin not available(-2)
-haswell-pcm-audio haswell-pcm-audio: FW loaded, mailbox readback FW info: type 01, - version: 00.00, build 77, source commit id: 876ac6906f31a43b6772b23c7c983ce9dcb18a19
-broadwell-audio broadwell-audio: snd-soc-dummy-dai <-> System Pin mapping ok
-broadwell-audio broadwell-audio: snd-soc-dummy-dai <-> Offload0 Pin mapping ok
-broadwell-audio broadwell-audio: snd-soc-dummy-dai <-> Offload1 Pin mapping ok
-broadwell-audio broadwell-audio: snd-soc-dummy-dai <-> Loopback Pin mapping ok
-broadwell-audio broadwell-audio: rt286-aif1 <-> snd-soc-dummy-dai mapping ok
-input: broadwell-rt286 Headset as /devices/pci0000:00/INT3438:00/broadwell-audio/sound/card1/input15
+broadwell-audio broadwell-audio: ASoC: CPU DAI System Pin not registered

So it seems that sst-acpi is unhappy with this patch. Any ideas? Thanks,
Dominik

#5 lore raw
In reply to Dominik Brodowski

Hi Dominik,

can you try current Linus' master with the following hack applied and see if that works?

lib/swiotlb.c +1 -1
index 47aeb04c1997..32aacd0d56a8 100644
@@ -1087,6 +1087,6 @@ const struct dma_map_ops swiotlb_dma_ops = {
 	.unmap_sg		= swiotlb_unmap_sg_attrs,
 	.map_page		= swiotlb_map_page,
 	.unmap_page		= swiotlb_unmap_page,
-	.dma_supported		= swiotlb_dma_supported,
+	.dma_supported		= dma_direct_supported,
 };
 #endif /* CONFIG_DMA_DIRECT_OPS */
#6 lore raw
Quoted 10 lines · Christoph Hellwig

Hi Dominik,

can you try current Linus' master with the following hack applied and see if that works?

lib/swiotlb.c +0 -0
index 47aeb04c1997..32aacd0d56a8 100644

lib/swiotlb.c const struct dma_map_ops swiotlb_dma_ops = { · line 1092

Quoted 7 lines
lib/swiotlb.c +1 -1
@@ -1087,6 +1087,6 @@ const struct dma_map_ops swiotlb_dma_ops = {
 	.unmap_sg		= swiotlb_unmap_sg_attrs,
 	.map_page		= swiotlb_map_page,
 	.unmap_page		= swiotlb_unmap_page,
-	.dma_supported		= swiotlb_dma_supported,
+	.dma_supported		= dma_direct_supported,
 };
 #endif /* CONFIG_DMA_DIRECT_OPS */

Yes, it solves the issue.

Thanks,
Dominik