From: Takashi Iwai <tiwai@suse.de>
To: Bui Duc Phuc <phucduc.bui@gmail.com>
Cc: "Ali Ahmet Memiş" <aliamemis@disroot.org>,
"Takashi Iwai" <tiwai@suse.com>,
"Jaroslav Kysela" <perex@perex.cz>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: core: Use the allocated major number with major=0
Date: Mon, 12 Oct 2026 09:09:36 +0200 [thread overview]
Message-ID: <877bjniedr.wl-tiwai@suse.de> (raw)
In-Reply-To: <CAABR9nHp0jL2fQ4w6rkd8Avfj9eD2=05TnxOYeOqGDWDqD=9jQ@mail.gmail.com>
On Mon, 12 Oct 2026 06:32:47 +0200,
Bui Duc Phuc wrote:
>
> Hi Ali , Takashi-san,
>
> >
> > Since commit bd8f21876189 ("ALSA: core: propagate actual error code from
> > register_chrdev"), alsa_sound_init() only treats negative values from
> > register_chrdev() as errors. With the major=0 module option
> > register_chrdev() allocates a major number dynamically and returns it
> > but snd_major and the devices still use 0. The devices are then
> > created without device numbers so no /dev/snd nodes appear and sound
> > is unusable.
>
>
> Note that major=0 has never worked, even before bd8f21876189: the old
> code treated the positive return value of register_chrdev() as an
> error and failed with -EIO. bd8f21876189 only changed the symptom.
>
> So this patch adds support for a dynamic major rather than fixing a
> regression. Takashi-san, is a dynamic major something ALSA wants to
> support?
No, it's supposed to be only the fixed one.
If there is a real demand, we can extend the implementation, but I
don't know of such a request.
Takashi
> If not, rejecting major=0 with -EINVAL might be simpler.
> If it is kept, the Fixes tag is fine since the patch depends on
> bd8f21876189, but please mention in the changelog that major=0
> never worked before.
>
> Best regards,
> Phuc
next prev parent reply other threads:[~2026-10-12 7:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-11 22:13 [PATCH] ALSA: core: Use the allocated major number with major=0 Ali Ahmet Memiş
2026-10-12 4:32 ` Bui Duc Phuc
2026-10-12 7:09 ` Takashi Iwai [this message]
2026-10-12 7:45 ` Bui Duc Phuc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877bjniedr.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=aliamemis@disroot.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=phucduc.bui@gmail.com \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.