Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp5463545pxb; Sun, 7 Nov 2021 12:54:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJw/zrVkjrwg7QFHwbPYk44I/vLFTtvfdlrGFnkyhtdcgr/onzaEUmJ3kbVIhcTic1CiG803 X-Received: by 2002:a05:6e02:1546:: with SMTP id j6mr21158815ilu.223.1636318470052; Sun, 07 Nov 2021 12:54:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636318470; cv=none; d=google.com; s=arc-20160816; b=AQg5VkBuKhKkrKV8GTXO4dcjNwlAGwbiUqUTq9uUTOfdQEWkOJFBZONkyGIFaNnDX/ jav91iysSFzWkoL/pi7mR84bl+/LoSdeQJWLr6m1qWp13Ayp7Nj4mBCcsn4ST3F7uYc0 /jigcXHiMyJ96VkiujIuuouXHydWCOYiKdv0VeEu1ZFo7I8bkDSXVTRC+JtzeM4JaaV/ jMg/ESHgfJuj7ph6MKaNcH5vsn4TDBWDQwtYURfzlgvRGPqqUIlKi1gTDqPUjGA08iEz UzGlE4JiVL0lTPQvJPSfsP8gucF2EuUOEelzvQVdcZoKHyqm/g3qoqwezExjwgdfV0Tl vChg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature:dkim-signature; bh=o8oGrR1R7QTdSSChHKlBA8GQpqzCLAzy34s3p5HvB6U=; b=Y+QSIbaFRVAQ8DySS03xSG8KvfY9QlyHRIJXvAl/l1ApCLaUTJ32tDWIL/uglV0YVA Ou4vCyq0+pYM+HEVNStSyA/CDhTSxZTV1q+dmVoyKJ5AARfd+HREr3MPu+23n0k4rmod 6LFQlf68XzhEW+EQExhIGPRaIVGuDmV67EKLoUtG8HXCLF+VyXOdCNssrjdwA/ioV2QJ Y1GYxcQEtbSGVLNinK143NOfcstwqrLWIOXXPAgxrhsBiSrf5NZ3NGVVd+RUS5hFhpxD wYAyY73Ngq+LUhMurVuKn9KuVt6HyFLqNYom0ChBB5op/o34qXdQGwE8HnqYkhKlP06O Mk+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=dVNJQ3Ea; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=96ifIA3v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u5si33548206ill.11.2021.11.07.12.54.17; Sun, 07 Nov 2021 12:54:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=dVNJQ3Ea; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=96ifIA3v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234380AbhKGRDy (ORCPT + 99 others); Sun, 7 Nov 2021 12:03:54 -0500 Received: from smtp-out2.suse.de ([195.135.220.29]:33320 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230486AbhKGRDx (ORCPT ); Sun, 7 Nov 2021 12:03:53 -0500 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id A925B1FD3B; Sun, 7 Nov 2021 17:01:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1636304469; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=o8oGrR1R7QTdSSChHKlBA8GQpqzCLAzy34s3p5HvB6U=; b=dVNJQ3Eawl17hWaeFbI12wzE7bmlCPzScZZq2v9bV1hp99LG6tA+B8B8sgT28wiXAi9nXj xaxqSCD1KqLC1ZaPoZkz4Uk3WUsuza2WM8upJ8L1zJyxdxeqghZ5FtcoQu7aLuDRScZawg M3DzX6Ns1g8oYrdj25hMMXI7VRl0qAk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1636304469; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=o8oGrR1R7QTdSSChHKlBA8GQpqzCLAzy34s3p5HvB6U=; b=96ifIA3v4rX/b8Nsa183QItPQPUNbvJdT4c/pVFwDM87eZzgGbLC5Q5+zFjjp28OhzQqqw bzc9Nb7zxRm/m8Cg== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id 9ED09A3B81; Sun, 7 Nov 2021 17:01:09 +0000 (UTC) Date: Sun, 07 Nov 2021 18:01:09 +0100 Message-ID: From: Takashi Iwai To: Greg KH Cc: linux-kernel@vger.kernel.org, stable-commits@vger.kernel.org Subject: Re: Patch "ALSA: pci: rme: Set up buffer type properly" has been added to the 5.14-stable tree In-Reply-To: References: <163629655751249@kroah.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 07 Nov 2021 15:59:32 +0100, Greg KH wrote: > > On Sun, Nov 07, 2021 at 03:49:17PM +0100, gregkh@linuxfoundation.org wrote: > > > > This is a note to let you know that I've just added the patch titled > > > > ALSA: pci: rme: Set up buffer type properly > > > > to the 5.14-stable tree which can be found at: > > http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary > > > > The filename of the patch is: > > alsa-pci-rme-set-up-buffer-type-properly.patch > > and it can be found in the queue-5.14 subdirectory. > > > > If you, or anyone else, feels it should not be added to the stable tree, > > please let know about it. > > > > > > >From 0899a7a23047f106c06888769d6cd6ff43d7395f Mon Sep 17 00:00:00 2001 > > From: Takashi Iwai > > Date: Mon, 9 Aug 2021 09:18:28 +0200 > > Subject: ALSA: pci: rme: Set up buffer type properly > > > > From: Takashi Iwai > > > > commit 0899a7a23047f106c06888769d6cd6ff43d7395f upstream. > > > > Although the regression of the mmap was fixed in the recent commit > > dc0dc8a73e8e ("ALSA: pcm: Fix mmap breakage without explicit buffer > > setup"), RME9652 and HDSP drivers have still potential issues with > > their mmap handling. Namely, they use the default mmap handler > > without the standard buffer preallocation, and PCM core wouldn't use > > the coherent DMA mapping. It's practically OK on x86, but on some > > exotic architectures, it wouldn't work. > > > > This patch addresses the potential breakage by replacing the buffer > > setup with the proper macro. It also simplifies the source code, > > too. > > > > Link: https://lore.kernel.org/r/20210809071829.22238-3-tiwai@suse.de > > Signed-off-by: Takashi Iwai > > Signed-off-by: Greg Kroah-Hartman > > --- > > sound/pci/rme9652/hdsp.c | 6 ++---- > > sound/pci/rme9652/rme9652.c | 6 ++---- > > 2 files changed, 4 insertions(+), 8 deletions(-) > > > > --- a/sound/pci/rme9652/hdsp.c > > +++ b/sound/pci/rme9652/hdsp.c > > @@ -4518,8 +4518,7 @@ static int snd_hdsp_playback_open(struct > > snd_pcm_set_sync(substream); > > > > runtime->hw = snd_hdsp_playback_subinfo; > > - runtime->dma_area = hdsp->playback_buffer; > > - runtime->dma_bytes = HDSP_DMA_AREA_BYTES; > > + snd_pcm_set_runtime_buffer(substream, hdsp->playback_dma_buf); > > > > hdsp->playback_pid = current->pid; > > hdsp->playback_substream = substream; > > @@ -4595,8 +4594,7 @@ static int snd_hdsp_capture_open(struct > > snd_pcm_set_sync(substream); > > > > runtime->hw = snd_hdsp_capture_subinfo; > > - runtime->dma_area = hdsp->capture_buffer; > > - runtime->dma_bytes = HDSP_DMA_AREA_BYTES; > > + snd_pcm_set_runtime_buffer(substream, hdsp->capture_dma_buf); > > > > hdsp->capture_pid = current->pid; > > hdsp->capture_substream = substream; > > --- a/sound/pci/rme9652/rme9652.c > > +++ b/sound/pci/rme9652/rme9652.c > > @@ -2279,8 +2279,7 @@ static int snd_rme9652_playback_open(str > > snd_pcm_set_sync(substream); > > > > runtime->hw = snd_rme9652_playback_subinfo; > > - runtime->dma_area = rme9652->playback_buffer; > > - runtime->dma_bytes = RME9652_DMA_AREA_BYTES; > > + snd_pcm_set_runtime_buffer(substream, rme9652->playback_dma_buf); > > > > if (rme9652->capture_substream == NULL) { > > rme9652_stop(rme9652); > > @@ -2339,8 +2338,7 @@ static int snd_rme9652_capture_open(stru > > snd_pcm_set_sync(substream); > > > > runtime->hw = snd_rme9652_capture_subinfo; > > - runtime->dma_area = rme9652->capture_buffer; > > - runtime->dma_bytes = RME9652_DMA_AREA_BYTES; > > + snd_pcm_set_runtime_buffer(substream, rme9652->capture_dma_buf); > > > > if (rme9652->playback_substream == NULL) { > > rme9652_stop(rme9652); > > > > > > Patches currently in stable-queue which might be from tiwai@suse.de are > > > > queue-5.14/alsa-pci-rme-set-up-buffer-type-properly.patch > > queue-5.14/alsa-pcm-check-mmap-capability-of-runtime-dma-buffer-at-first.patch > > queue-5.14/alsa-pci-cs46xx-fix-set-up-buffer-type-properly.patch > > This patch breaks the build, so I will drop it. > > Can you provide a working backport? Sorry, I overlooked that it's after the recent code change with the devres support. Then rather drop this one, as I found another potential issue in this patch. I cooked another different fix now that should cover the regression, instead. It'll be included in the next pull request. The other two patches are fine for stable trees. thanks, Takashi