Skip to contentSkip to conversation

"ALSA: core: Add continuous and vmalloc mmap ops" breaks Intel SST audio

5.14 regression Hans de Goede 2 participants 4 messages Jul 30, 2021 – Aug 1, 2021 Sound

lore
Share & tools
lore
#0 lore raw

Hi All;,

As discussed in the "5.14 regression, Intel SST (BYT) audio no longer works" thread, audio on X86 devices using the Intel SST driver no longer works with 5.14.

After poking at this for a while I've found the culprit:
30b7ba6972d5 ("ALSA: core: Add continuous and vmalloc mmap ops")

If I revert that single commit then everything works fine again with 5.14.

This is with a Fedora 34 userspace using pipewire as audiodaemon

Regards,

Hans

#1 lore raw
Quoted 10 lines · Hans de Goede

Hi All;,

As discussed in the "5.14 regression, Intel SST (BYT) audio no longer works" thread, audio on X86 devices using the Intel SST driver no longer works with 5.14.

After poking at this for a while I've found the culprit:
30b7ba6972d5 ("ALSA: core: Add continuous and vmalloc mmap ops")

If I revert that single commit then everything works fine again with 5.14.

Does the patch below fix the problem?

thanks,

Takashi

---

sound/core/memalloc.c +1 -1
@@ -215,7 +215,7 @@ static int snd_dma_continuous_mmap(struct snd_dma_buffer *dmab,
 				   struct vm_area_struct *area)
 {
 	return remap_pfn_range(area, area->vm_start,
-			       dmab->addr >> PAGE_SHIFT,
+			       page_to_pfn(virt_to_page(dmab->area)),
 			       area->vm_end - area->vm_start,
 			       area->vm_page_prot);
 }
#2 lore raw

Hi,

Quoted 8 lines · Takashi Iwai
Quoted 6 lines · Hans de Goede

Hi All;,

As discussed in the "5.14 regression, Intel SST (BYT) audio no longer works" thread, audio on X86 devices using the Intel SST driver no longer works with 5.14.

Quoted 6 lines
Quoted 4 lines

After poking at this for a while I've found the culprit:
30b7ba6972d5 ("ALSA: core: Add continuous and vmalloc mmap ops")

If I revert that single commit then everything works fine again with 5.14.

Does the patch below fix the problem?

Yes that seems to fix things, thank you.

Regards,

Hans

Quoted 13 lines

---

sound/core/memalloc.c +1 -1
@@ -215,7 +215,7 @@ static int snd_dma_continuous_mmap(struct snd_dma_buffer *dmab,
 				   struct vm_area_struct *area)
 {
 	return remap_pfn_range(area, area->vm_start,
-			       dmab->addr >> PAGE_SHIFT,
+			       page_to_pfn(virt_to_page(dmab->area)),
 			       area->vm_end - area->vm_start,
 			       area->vm_page_prot);
 }
#3 lore raw
Quoted 12 lines · Hans de Goede

Hi,

Quoted 8 lines · Takashi Iwai
Quoted 6 lines · Hans de Goede

Hi All;,

As discussed in the "5.14 regression, Intel SST (BYT) audio no longer works" thread, audio on X86 devices using the Intel SST driver no longer works with 5.14.

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

After poking at this for a while I've found the culprit:
30b7ba6972d5 ("ALSA: core: Add continuous and vmalloc mmap ops")

If I revert that single commit then everything works fine again with 5.14.

Does the patch below fix the problem?

Yes that seems to fix things, thank you.

Great, I'll cook up and submit the proper patch.

thanks,

Takashi