public inbox for linux-sound@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC] sound: add uevent notifications for jack events
@ 2025-10-29  8:11 Cryolitia PukNgae
  2025-10-31 11:36 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Cryolitia PukNgae @ 2025-10-29  8:11 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai
  Cc: linux-sound, linux-kernel, Jun Zhan, 聂诚,
	Guan Wentao, Feng Yuan, kernel, Cryolitia PukNgae

I propose adding uevent notifications for all audio jack events in the
sound subsystem, including headphone and microphone jacks.

The kernel already sends uevents for certain jack types like HDMI,
demonstrating this pattern is well-established. However, other common
audio jacks like headphones and microphones only generate input events,
not uevents.

This inconsistency affects userspace tools that rely on uevents for
device management. Adding uevents for all jack types would provide a
uniform interface for monitoring audio connection state changes.

My proposal is straightforward: extend the existing uevent mechanism to
cover all audio jack plug/unplug events in the sound subsystem. This
change would maintain backward compatibility with existing input event
consumers while providing consistent device notification for all jack
types.

The change aligns with the semantic purpose of uvents - to notify about
hardware state changes. Physical connection events naturally fit this
category.

If there are objections or historical context I should consider, I would
appreciate hearing them.

Thanks.

Best regards,
Cryolitia PukNgae

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

* Re: [RFC] sound: add uevent notifications for jack events
  2025-10-29  8:11 [RFC] sound: add uevent notifications for jack events Cryolitia PukNgae
@ 2025-10-31 11:36 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2025-10-31 11:36 UTC (permalink / raw)
  To: Cryolitia PukNgae
  Cc: Jaroslav Kysela, Takashi Iwai, linux-sound, linux-kernel,
	Jun Zhan, 聂诚, Guan Wentao, Feng Yuan, kernel,
	Cryolitia PukNgae

On Wed, 29 Oct 2025 09:11:56 +0100,
Cryolitia PukNgae wrote:
> 
> I propose adding uevent notifications for all audio jack events in the
> sound subsystem, including headphone and microphone jacks.
> 
> The kernel already sends uevents for certain jack types like HDMI,
> demonstrating this pattern is well-established. However, other common
> audio jacks like headphones and microphones only generate input events,
> not uevents.
> 
> This inconsistency affects userspace tools that rely on uevents for
> device management. Adding uevents for all jack types would provide a
> uniform interface for monitoring audio connection state changes.
> 
> My proposal is straightforward: extend the existing uevent mechanism to
> cover all audio jack plug/unplug events in the sound subsystem. This
> change would maintain backward compatibility with existing input event
> consumers while providing consistent device notification for all jack
> types.
> 
> The change aligns with the semantic purpose of uvents - to notify about
> hardware state changes. Physical connection events naturally fit this
> category.
> 
> If there are objections or historical context I should consider, I would
> appreciate hearing them.
> 
> Thanks.
> 
> Best regards,
> Cryolitia PukNgae

Honestly speaking, I have a mixed feeling for this approach.
I understand that uevents can be used for handling commonly for all
jack events, but OTOH, it means that we may spam a lot there.

FWIW, as generic jack event handling, there is the notification via
ALSA control API for each sound card, not only the input devices,
too.  If any, we may add yet another notifications on top of that with
uevents; but this must not be enabled blindly.


thanks,

Takashi

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

end of thread, other threads:[~2025-10-31 11:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-29  8:11 [RFC] sound: add uevent notifications for jack events Cryolitia PukNgae
2025-10-31 11:36 ` Takashi Iwai

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