All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Paul Menzel <pmenzel@molgen.mpg.de>
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: pcsp: Only autoload if the pcspkr input driver is disabled
Date: Fri, 20 Nov 2026 18:07:46 +0100	[thread overview]
Message-ID: <877bi7whwd.wl-tiwai@suse.de> (raw)
In-Reply-To: <20261120120307.629996-1-pmenzel@molgen.mpg.de>

On Fri, 20 Nov 2026 13:03:04 +0100,
Paul Menzel wrote:
> 
> The input driver pcspkr and snd-pcsp both register a platform driver
> named "pcspkr" for the platform device of the same name, and both
> declare the module alias platform:pcspkr. With both built as modules,
> as distribution configurations do, udev loads both for the device, and
> the second one fails to register its driver on every boot. On a Dell
> XPS 13 9310 with Linux 7.4-rc1 and the Debian configuration:
> 
>     [    0.793761] input: PC Speaker as /devices/platform/pcspkr/input/input7
>     [    0.813617] Error: Driver 'pcspkr' is already registered, aborting...
> 
> Which driver ends up handling the beeps depends on the module load
> order. The help text of SND_PCSP already says that the driver is not
> needed for beeps, and that it may become the default sound card. Debian
> therefore removes the alias since 2014 [1], and Ubuntu blacklists
> snd_pcsp. With pcspkr built in, snd-pcsp cannot register its driver at
> all, so the alias is useless there, too.
> 
> Only declare the alias if INPUT_PCSPKR is disabled. Then snd-pcsp is
> loaded automatically and takes over the beeps as before. Otherwise only
> pcspkr is loaded automatically, and users wanting PCM sound from the PC
> speaker keep pcspkr from loading and load snd-pcsp explicitly, which is
> already needed today for a deterministic result. Document it in the
> Kconfig help text.
> 
> Tested on the Dell XPS 13 9310 with Linux 7.4-rc1 and the Debian
> configuration (INPUT_PCSPKR=m, SND_PCSP=m), with snd-pcsp not
> blacklisted: without this change, the error above is logged; with it,
> only pcspkr is loaded and provides the PC Speaker input device, and after
> `rmmod pcspkr`, `modprobe snd-pcsp` binds snd-pcsp and creates its sound
> card. In QEMU with x86_64_defconfig, kvm_guest.config and SND_PCSP=m,
> with systemd-udevd loading the modules, the same holds for
> INPUT_PCSPKR=m, and with INPUT_PCSPKR=n, snd-pcsp is still loaded
> automatically, binds the device, and creates its sound card and PC
> Speaker input device.
> 
> [1]: https://bugs.debian.org/697709
> 
> Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>

Applied to for-next branch now.


thanks,

Takashi

      reply	other threads:[~2026-11-20 17:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20 12:03 [PATCH] ALSA: pcsp: Only autoload if the pcspkr input driver is disabled Paul Menzel
2026-11-20 17:07 ` Takashi Iwai [this message]

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=877bi7whwd.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=pmenzel@molgen.mpg.de \
    --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.