linux/sound/pci
Takashi Iwai 37137ec26c ALSA: hda: Once again fix regression of page allocations with IOMMU
The last fix for trying to recover the regression on AMD platforms,
unfortunately, leaded to yet another regression: it turned out that
IOMMUs don't like the usage of raw page allocations.

This is yet another attempt for addressing the log saga; at this time,
we re-use the existing buffer allocation mechanism with SG-pages
although we require only single pages.  The SG buffer allocation
itself was confirmed to work for stream buffers, so it's relatively
easy to adapt for other places.

The only problem is: although the HD-audio code is accessing the
address directly via dmab->address field, SG-pages don't set up it.
For the ease of adaption, we now set up the dmab->addr field from the
address of the first page as default, so that it can run with the
HD-audio driver code as-is without the excessive call of
snd_sgbuf_get_addr() multiple times; that's the only change in the
memalloc helper side.  The rest is nothing but a flip of the dma_type
field in the HD-audio side.

Fixes: a8d302a0b7 ("ALSA: memalloc: Revive x86-specific WC page allocations again")
Reported-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Tested-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/CABXGCsO+kB2t5QyHY-rUe76npr1m0-5JOtt8g8SiHUo34ur7Ww@mail.gmail.com
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216112
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216363
Link: https://lore.kernel.org/r/20220906090319.23358-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-09-06 11:03:48 +02:00
..
ac97 ALSA: pci: fix reading of swapped values from pcmreg in AC97 codec 2022-03-22 21:19:26 +01:00
ali5451 ALSA: ali5451: Fix the missing snd_card_free() call at probe error 2022-04-12 17:58:19 +02:00
asihpi ALSA: asihpi: fix repeated words in comments 2022-07-25 08:28:00 +02:00
au88x0 ALSA: au88x0: Fix the missing snd_card_free() call at probe error 2022-04-12 17:58:21 +02:00
aw2 ALSA: aw2: Fix the missing snd_card_free() call at probe error 2022-04-12 17:58:38 +02:00
ca0106 ALSA: ca0106: Fix the missing snd_card_free() call at probe error 2022-04-12 17:58:22 +02:00
cs46xx ALSA: cs46xx: Fix missing snd_card_free() call at probe error 2022-07-05 17:24:05 +02:00
cs5535audio ALSA: cs5535audio: fix typo in comment 2022-05-23 09:47:45 +02:00
ctxfi ALSA: ctxfi: fix typo in comment 2022-05-23 09:48:29 +02:00
echoaudio Merge branch 'for-linus' into for-next 2022-04-13 10:49:49 +02:00
emu10k1 ALSA: emu10k1: Fix typo in comments 2022-07-22 09:40:34 +02:00
hda ALSA: hda: Once again fix regression of page allocations with IOMMU 2022-09-06 11:03:48 +02:00
ice1712 ALSA: ice1712: remove redundant assignment to new 2022-08-05 15:06:36 +02:00
korg1212 ALSA: korg1212: Fix the missing snd_card_free() call at probe error 2022-04-12 17:58:30 +02:00
lola ALSA: lola: Bounds check loop iterator against streams array size 2022-05-21 08:48:57 +02:00
lx6464es ALSA: lx6464es: Fix the missing snd_card_free() call at probe error 2022-04-12 17:58:40 +02:00
mixart ALSA: mixart: Add sanity check for timer notify streams 2021-12-07 16:35:58 +01:00
nm256 ALSA: nm256: Don't call card private_free at probe error path 2022-04-12 17:58:44 +02:00
oxygen ALSA: oxygen: Fix the missing snd_card_free() call at probe error 2022-04-12 17:58:40 +02:00
pcxhr ALSA: pcxhr: "fix" PCXHR_REG_TO_PORT definition 2021-09-16 11:09:04 +02:00
riptide ALSA: riptide: Fix the missing snd_card_free() call at probe error 2022-04-12 17:58:31 +02:00
rme9652 ALSA: hdsp: remove redundant assignment to pointer kctl 2022-05-09 10:42:28 +02:00
trident ALSA: trident: Allocate resources with device-managed APIs 2021-07-19 16:17:08 +02:00
vx222 ALSA: vx222: fix null-ptr-deref 2021-09-07 07:13:19 +02:00
ymfpci ALSA: ymfpci: Allocate resources with device-managed APIs 2021-07-19 16:17:11 +02:00
ad1889.c ALSA: ad1889: Fix the missing snd_card_free() call at probe error 2022-04-12 17:58:18 +02:00
ad1889.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ak4531_codec.c ALSA: ak4531: Fix assignment in if condition 2021-06-09 17:29:49 +02:00
als300.c ALSA: als300: Fix the missing snd_card_free() call at probe error 2022-04-12 17:58:38 +02:00
als4000.c ALSA: als4000: Fix the missing snd_card_free() call at probe error 2022-04-12 17:58:19 +02:00
atiixp_modem.c ALSA: atiixp: Fix the missing snd_card_free() call at probe error 2022-04-12 17:58:20 +02:00
atiixp.c ALSA: atiixp: Fix the missing snd_card_free() call at probe error 2022-04-12 17:58:20 +02:00
azt3328.c ALSA: azt3328: Fix the missing snd_card_free() call at probe error 2022-04-12 17:58:22 +02:00
azt3328.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bt87x.c ALSA: bt87x: Fix the missing snd_card_free() call at probe error 2022-04-12 17:58:36 +02:00
cmipci.c ALSA: cmipci: Fix the missing snd_card_free() call at probe error 2022-04-12 17:58:39 +02:00
cs4281.c ALSA: cs4281: Fix the missing snd_card_free() call at probe error 2022-04-12 17:58:23 +02:00
cs5530.c ALSA: cs5530: Allocate resources with device-managed APIs 2021-07-19 16:16:43 +02:00
ens1370.c ASoC: doc: Update dead links 2022-06-30 10:56:27 +01:00
ens1371.c
es1938.c ALSA: es1938: Fix the missing snd_card_free() call at probe error 2022-04-12 17:58:26 +02:00
es1968.c ALSA: es1968: Fix the missing snd_card_free() call at probe error 2022-04-12 17:58:27 +02:00
fm801.c ALSA: fm801: Fix the missing snd_card_free() call at probe error 2022-04-12 17:58:27 +02:00
intel8x0.c ALSA: intel8x0: Fix the missing snd_card_free() call at probe error 2022-04-12 17:58:29 +02:00
intel8x0m.c ALSA: intel8x0: Fix the missing snd_card_free() call at probe error 2022-04-12 17:58:29 +02:00
Kconfig media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
maestro3.c ALSA: maestro3: Fix the missing snd_card_free() call at probe error 2022-04-12 17:58:30 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rme32.c ALSA: rme32: Fix the missing snd_card_free() call at probe error 2022-04-12 17:58:32 +02:00
rme96.c ALSA: rme96: Fix the missing snd_card_free() call at probe error 2022-04-12 17:58:32 +02:00
sis7019.c ALSA: sis7019: Fix the missing error handling 2022-04-12 17:58:35 +02:00
sis7019.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 274 2019-06-05 17:30:30 +02:00
sonicvibes.c ALSA: sonicvibes: Fix the missing snd_card_free() call at probe error 2022-04-12 17:58:33 +02:00
via82xx_modem.c ALSA: via82xx: Fix the missing snd_card_free() call at probe error 2022-04-12 17:58:34 +02:00
via82xx.c ALSA: via82xx: Fix the missing snd_card_free() call at probe error 2022-04-12 17:58:34 +02:00