Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH] Revert "ALSA: pcm: Prevent PCM hw_params & co during mmap on OSS, too"
@ 2026-12-02 16:20 Takashi Iwai
  2026-12-02 16:37 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Takashi Iwai @ 2026-12-02 16:20 UTC (permalink / raw)
  To: linux-sound

This reverts commit de57f471f664495ebf1f12a47f6c712410fbe702.

It turned out that OSS layer does need to change the hw_params even
after the buffer is mmapped.  As we're going to address the OSS-mmap
problem in another patch series, revert this workaround for now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/core/pcm_native.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index c7768793422a..011a30a3cec6 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -784,7 +784,7 @@ static int hw_params_state_check(struct snd_pcm_substream *substream,
 	case SNDRV_PCM_STATE_OPEN:
 	case SNDRV_PCM_STATE_SETUP:
 	case SNDRV_PCM_STATE_PREPARED:
-		if (check_mmap &&
+		if (check_mmap && !is_oss_stream(substream) &&
 		    atomic_read(&substream->mmap_count))
 			return -EBADFD;
 		return 0;
-- 
2.53.0


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

end of thread, other threads:[~2026-12-02 16:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02 16:20 [PATCH] Revert "ALSA: pcm: Prevent PCM hw_params & co during mmap on OSS, too" Takashi Iwai
2026-12-02 16:37 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox