From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796270589; b=JtvLiYvFXg+Q1UXh6Wepc6KERgCBKi+/ZbnalWOmBgxXv/XFQ5dlhKpTXLuxtUo+0XkY tPUiZtWfENJ4jRLektyuRiE8xe56p+e63x+n8tjSMDbHjN9B4B22pHQkWVaPqD8uuBlf+ a4u0aKo3yYPWCyTTkNm0ERwt6a1iweYkJFtGtrTQAs2sGr8VfRKG2F/Zh30v67CafGd6m wx1mvlNi/GuL9p/MHvuUf5IbFLQTfJrqu6J9g0btlKJXY2ZkXMlS9gSb1lqqMHG5y2AD1 BHQCE/peRalSCrilkehMmWOJeT9eN0p5gtmy0zEp8v16ZE0pzjwhIcD0Jy/XjaAxTlg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796270589; h=Received:DKIM-Signature:Subject:To:Cc:From:Date:Message-ID: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=bfRUV3x3g7+YxiJkIWYVwgkfJS0ktM8Vg3SiIRKvmyI=; b=FQ3AxFOSw7AlowjapfXyVb/90ArdDecMoviFznr4tN6vdMTdutth2o8XNZutzQv11Y6W YCWZrltaswt3coCJpkQsEZ5D+0kPJRGQBTe+aA1BpfZnytFWZ9Dt++6k3f5aYBaXEGJd0 XW+Zsz7tzomlQnM6MxHq/EeX8V1+nXPd6SFC7uBP7RkqsUU7VFzyxmAQ5VBqfjjUwmKRJ N6qH6WdaJu5eJALiZfyAFb/qJL8rRJUc3SgZ5WAMMRu00NQmVRVNHl7WUEwa1GoHhgrXe dY229xTZE0d5N0CNdPN0eXXvc/ZYExYIYMuH4q3g0kfe0LK5EtSgRi0mxgd9j+UJU5Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=ILceI8nA; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E4166606A322 for ; Thu, 3 Dec 2026 04:03:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=ILceI8nA Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3F43F1F000C1; Thu, 3 Dec 2026 04:03:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796270588; bh=bfRUV3x3g7+YxiJkIWYVwgkfJS0ktM8Vg3SiIRKvmyI=; h=Subject:To:Cc:From:Date; b=ILceI8nAN2NecXe/b/d6O1QEU4i+bhv/c2Ly9tZYA30DL3U9dfDwSy3t5BGL1Il9M OsGKBsmvVUyo41RqoJw42vJjJDWL44+475V6qykdXkHdyMuDgf24AauCyuRKB86ZtO QkoWAtodFqFsOh9FncjsGTa2awK+u4GZ0aDzXchQ= Subject: FAILED: patch "[PATCH] ALSA: pcm: oss: Refine slave hw_params after setting format" failed to apply to 6.12-stable tree To: hengyul@cs.unc.edu,stable@vger.kernel.org,tiwai@suse.de Cc: From: Date: Thu, 03 Dec 2026 04:44:27 +0100 Message-ID: <2026120327-shelf-earwig-cafa@gregkh> X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.12-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y git checkout FETCH_HEAD git cherry-pick -x ddea524e437eae0d5581482a90565b4c1e6d4b24 # git commit -s git send-email --to '' --in-reply-to '2026120327-shelf-earwig-cafa@gregkh' --subject-prefix 'PATCH 6.12.y' 'HEAD^..' Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From ddea524e437eae0d5581482a90565b4c1e6d4b24 Mon Sep 17 00:00:00 2001 From: Hengyu Liang Date: Wed, 25 Nov 2026 13:10:05 -0500 Subject: [PATCH] ALSA: pcm: oss: Refine slave hw_params after setting format Commit 93d7d38fa61d ("ALSA: aloop: add DSD formats") added DSD_U8 to the formats of snd-aloop. Before that, its narrowest format had 16 bits. However, snd_pcm_oss_change_params_locked() sets the slave format with _snd_pcm_hw_param_set(), which does not refine the parameters, while the access, rate and channels before it are set with refining helpers. snd_pcm_oss_period_size() then reads a buffer size maximum that is still computed for the narrowest format, now DSD_U8, so the OSS period doubles. With the default U8 client format, the doubled period no longer fits in the format plugin, and snd_pcm_plugin_alloc() returns -ENOMEM. As of now, an OSS program that asks snd-aloop for 8 channels at 192 kHz gets ENOMEM from SNDCTL_DSP_SPEED and from every later ioctl on the same file. The issue can be reproduced with this program, where card 1 is snd-aloop: #include #include #include #include int main(void) { int fd = open("/dev/dsp1", O_WRONLY | O_NONBLOCK); int ch = 8, rate = 192000, blk = 0; ioctl(fd, SNDCTL_DSP_CHANNELS, &ch); if (ioctl(fd, SNDCTL_DSP_SPEED, &rate) < 0) perror("SNDCTL_DSP_SPEED"); if (ioctl(fd, SNDCTL_DSP_GETBLKSIZE, &blk) < 0) perror("SNDCTL_DSP_GETBLKSIZE"); printf("block size %d\n", blk); return 0; } Before that commit, it prints "block size 65536". After that commit, the result is: SNDCTL_DSP_SPEED: Cannot allocate memory SNDCTL_DSP_GETBLKSIZE: Cannot allocate memory block size 0 This patch will set the format with snd_pcm_hw_param_set(), which refines the parameters, as is done for the channels just before. Fixes: 93d7d38fa61d ("ALSA: aloop: add DSD formats") Cc: Signed-off-by: Hengyu Liang Link: https://patch.msgid.link/20261125181005.3683575-1-hengyul@cs.unc.edu Signed-off-by: Takashi Iwai diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index 66162caa45d4..3c2ac8966d5e 100644 --- a/sound/core/oss/pcm_oss.c +++ b/sound/core/oss/pcm_oss.c @@ -921,7 +921,8 @@ static int snd_pcm_oss_change_params_locked(struct snd_pcm_substream *substream) goto failure; } format_found: - err = _snd_pcm_hw_param_set(sparams, SNDRV_PCM_HW_PARAM_FORMAT, sformat, 0); + err = snd_pcm_hw_param_set(substream, sparams, + SNDRV_PCM_HW_PARAM_FORMAT, sformat, 0); if (err < 0) goto failure;