linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL] sound fixes for 6.1-rc5
@ 2022-11-11  8:56 Takashi Iwai
  2022-11-11 18:03 ` pr-tracker-bot
  2022-11-12  1:28 ` Linus Torvalds
  0 siblings, 2 replies; 4+ messages in thread
From: Takashi Iwai @ 2022-11-11  8:56 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Linux Kernel Mailing List

Linus,

please pull sound fixes for v6.1-rc5 from:

  git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git tags/sound-6.1-rc5

The topmost commit is 9a5523f72bd2b0d66eef3d58810c6eb7b5ffc143

----------------------------------------------------------------

sound fixes for 6.1-rc5

Things look calming down, as this contains only a few small fixes.

- Fix for a corner-case bug with SG-buffer page allocation helper
- A regression fix for Roland USB-audio device probe
- A potential memory leak fix at the error path
- Handful quirks and device-specific fixes for HD- and USB-audio

----------------------------------------------------------------

Ai Chao (1):
      ALSA: usb-audio: add quirk to fix Hamedal C20 disconnect issue

Edson Juliano Drosdeck (1):
      ALSA: hda/realtek: Add Positivo C6300 model quirk

Evan Quan (1):
      ALSA: hda/hdmi - enable runtime pm for more AMD display audio

Jussi Laako (1):
      ALSA: usb-audio: Add DSD support for Accuphase DAC-60

Pierre-Louis Bossart (1):
      ALSA: hda: clarify comments on SCF changes

Stefan Binding (1):
      ALSA: hda/realtek: Add quirk for ASUS Zenbook using CS35L41

Takashi Iwai (4):
      ALSA: usb-audio: Yet more regression for for the delayed card registration
      ALSA: usb-audio: Remove redundant workaround for Roland quirk
      ALSA: usb-audio: Add quirk entry for M-Audio Micro
      ALSA: memalloc: Don't fall back for SG-buffer with IOMMU

Xian Wang (1):
      ALSA: hda/ca0132: add quirk for EVGA Z390 DARK

Yang Yingliang (1):
      ALSA: arm: pxa: pxa2xx-ac97-lib: fix return value check of platform_get_irq()

Ye Bin (1):
      ALSA: hda: fix potential memleak in 'add_widget_node'

---
 sound/arm/pxa2xx-ac97-lib.c   |  4 +++-
 sound/core/memalloc.c         | 20 +++++++++---------
 sound/hda/hdac_sysfs.c        |  4 +++-
 sound/pci/hda/hda_intel.c     | 11 ++++++----
 sound/pci/hda/patch_ca0132.c  |  1 +
 sound/pci/hda/patch_realtek.c |  2 ++
 sound/usb/card.c              | 29 +++++++++++++++++---------
 sound/usb/endpoint.c          |  3 ++-
 sound/usb/quirks-table.h      |  4 ++++
 sound/usb/quirks.c            | 47 ++++++-------------------------------------
 sound/usb/usbaudio.h          |  3 +++
 11 files changed, 62 insertions(+), 66 deletions(-)


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [GIT PULL] sound fixes for 6.1-rc5
  2022-11-11  8:56 [GIT PULL] sound fixes for 6.1-rc5 Takashi Iwai
@ 2022-11-11 18:03 ` pr-tracker-bot
  2022-11-12  1:28 ` Linus Torvalds
  1 sibling, 0 replies; 4+ messages in thread
From: pr-tracker-bot @ 2022-11-11 18:03 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Linus Torvalds, Linux Kernel Mailing List

The pull request you sent on Fri, 11 Nov 2022 09:56:01 +0100:

> git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git tags/sound-6.1-rc5

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/64b4aef17ea65c423fbcdee323b503d8e3ffb3a2

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [GIT PULL] sound fixes for 6.1-rc5
  2022-11-11  8:56 [GIT PULL] sound fixes for 6.1-rc5 Takashi Iwai
  2022-11-11 18:03 ` pr-tracker-bot
@ 2022-11-12  1:28 ` Linus Torvalds
  2022-11-12  8:46   ` Takashi Iwai
  1 sibling, 1 reply; 4+ messages in thread
From: Linus Torvalds @ 2022-11-12  1:28 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Linux Kernel Mailing List

On Fri, Nov 11, 2022 at 12:56 AM Takashi Iwai <tiwai@suse.de> wrote:
>
> please pull sound fixes for v6.1-rc5 from:

Hmm. I don't know that this came in through this particular pull
request, but I don't seem to have seen it before:

  Nov 11 14:32:37 xps13 kernel:
        snd_hda_intel 0000:00:1f.3: Too many BDL entries:
buffer=2097152, period=65536

there's six of those lines in my logs (two batches of three, five
seconds apart).

I don't see any negative side effects aside from the messages, and
sound seems to work fine, but since I don't think I've ever seen this
one before I thought I'd just mention it.

I also haven't been using this laptop on a while - an arm64 Fedora
uboot update broke my M2 boot, so I'm temporarily back to using my
trusty old xps13.

So while it's new to me, the issue that introduced it may not be
particularly new.

Google does show that the message itself has been happening for others
for a long time. But I checked with 'journalctl', and it hasn't
happened on this particular machine before.

It might be a non-kernel change that triggers it, of course.

                 Linus

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [GIT PULL] sound fixes for 6.1-rc5
  2022-11-12  1:28 ` Linus Torvalds
@ 2022-11-12  8:46   ` Takashi Iwai
  0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2022-11-12  8:46 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Linux Kernel Mailing List

On Sat, 12 Nov 2022 02:28:19 +0100,
Linus Torvalds wrote:
> 
> On Fri, Nov 11, 2022 at 12:56 AM Takashi Iwai <tiwai@suse.de> wrote:
> >
> > please pull sound fixes for v6.1-rc5 from:
> 
> Hmm. I don't know that this came in through this particular pull
> request, but I don't seem to have seen it before:
> 
>   Nov 11 14:32:37 xps13 kernel:
>         snd_hda_intel 0000:00:1f.3: Too many BDL entries:
> buffer=2097152, period=65536
> 
> there's six of those lines in my logs (two batches of three, five
> seconds apart).
> 
> I don't see any negative side effects aside from the messages, and
> sound seems to work fine, but since I don't think I've ever seen this
> one before I thought I'd just mention it.
> 
> I also haven't been using this laptop on a while - an arm64 Fedora
> uboot update broke my M2 boot, so I'm temporarily back to using my
> trusty old xps13.
> 
> So while it's new to me, the issue that introduced it may not be
> particularly new.
> 
> Google does show that the message itself has been happening for others
> for a long time. But I checked with 'journalctl', and it hasn't
> happened on this particular machine before.
> 
> It might be a non-kernel change that triggers it, of course.

Wooh, that must be the last change in the memalloc helper for
non-contiguous pages :-<  Admittedly the fix was a bit premature,
sorry for the mess.

Below is the quick workaround.  I'm going to send another PR soon
later.


thanks,

Takashi

-- 8< --
From: Takashi Iwai <tiwai@suse.de>
Subject: [PATCH] ALSA: memalloc: Try dma_alloc_noncontiguous() at first

The latest fix for the non-contiguous memalloc helper changed the
allocation method for a non-IOMMU system to use only the fallback
allocator.  This should have worked, but it caused a problem sometimes
when too many non-contiguous pages are allocated that can't be treated
by HD-audio controller.

As a quirk workaround, go back to the original strategy: use
dma_alloc_noncontiguous() at first, and apply the fallback only when
it fails, but only for non-IOMMU case.

We'll need a better fix in the fallback code as well, but this
workaround should paper over most cases.

Fixes: 9736a325137b ("ALSA: memalloc: Don't fall back for SG-buffer with IOMMU")
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/CAHk-=wgSH5ubdvt76gNwa004ooZAEJL_1Q-Fyw5M2FDdqL==dg@mail.gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/core/memalloc.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/sound/core/memalloc.c b/sound/core/memalloc.c
index 6a81aaab25ab..ba095558b6d1 100644
--- a/sound/core/memalloc.c
+++ b/sound/core/memalloc.c
@@ -542,8 +542,10 @@ static void *snd_dma_noncontig_alloc(struct snd_dma_buffer *dmab, size_t size)
 	struct sg_table *sgt;
 	void *p;
 
+	sgt = dma_alloc_noncontiguous(dmab->dev.dev, size, dmab->dev.dir,
+				      DEFAULT_GFP, 0);
 #ifdef CONFIG_SND_DMA_SGBUF
-	if (!get_dma_ops(dmab->dev.dev)) {
+	if (!sgt && !get_dma_ops(dmab->dev.dev)) {
 		if (dmab->dev.type == SNDRV_DMA_TYPE_DEV_WC_SG)
 			dmab->dev.type = SNDRV_DMA_TYPE_DEV_WC_SG_FALLBACK;
 		else
@@ -551,9 +553,6 @@ static void *snd_dma_noncontig_alloc(struct snd_dma_buffer *dmab, size_t size)
 		return snd_dma_sg_fallback_alloc(dmab, size);
 	}
 #endif
-
-	sgt = dma_alloc_noncontiguous(dmab->dev.dev, size, dmab->dev.dir,
-				      DEFAULT_GFP, 0);
 	if (!sgt)
 		return NULL;
 
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-11-12  8:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-11  8:56 [GIT PULL] sound fixes for 6.1-rc5 Takashi Iwai
2022-11-11 18:03 ` pr-tracker-bot
2022-11-12  1:28 ` Linus Torvalds
2022-11-12  8:46   ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).