Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: "Jarosław Janik" <jaroslaw.janik@gmail.com>
Cc: Takashi Iwai <tiwai@suse.com>, linux-sound@vger.kernel.org
Subject: Re: [PATCH 0/2] Fix beep notifications by Thinkpad's ACPI firmware
Date: Thu, 31 Oct 2024 10:15:08 +0100	[thread overview]
Message-ID: <87r07wws4j.wl-tiwai@suse.de> (raw)
In-Reply-To: <20241030171813.18941-1-jaroslaw.janik@gmail.com>

On Wed, 30 Oct 2024 18:18:11 +0100,
Jarosław Janik wrote:
> 
> In Comment 17 of the following bug report:
> https://bugzilla.suse.com/show_bug.cgi?id=1228269
> user tigerlily had complained about "audible blip on shutdown" on a
> Thinkpad laptop, that led to a commit 4f61c8fe3520 ("ALSA: hda/conexant:
> Mute speakers at suspend / shutdown"), which mutes speakers on system
> shutdown or whenever HDA controller is suspended by PM. The
> aforementioned "blip" is a feature, not a bug however - Thinkpad's ACPI
> firmware uses short beeps / beep sequences as notifications in response
> to various events (enter/leave suspend or hibernation, AC power
> connect/disconnect, low battery, etc.); these can also be triggered by
> writing to /proc/acpi/ibm/beep, see details here:
> https://www.kernel.org/doc/html/v5.4/admin-guide/laptops/thinkpad-acpi.html#acpi-sounds-proc-acpi-ibm-beep
> The firmware doesn't touch any mixer, so depending on current mixer
> settings these beeps can be loud, silent or even muted completely,
> whatever has been set by the user.
> 
> The patch in question interferes this badly:
> - suspend/hibernate/shutdown related events are muted altogether because
>   HDA controller is in suspend mode when they occur (or snd_hda_intel
>   module has been closed in the event of system shutdown)
> - other events work "randomly", e.g. you can hear AC plug/unplug beep
>   if something is playing audio at the moment, otherwise the HDA
>   controller is likely in suspend mode, so you can't hear anything
>   (unless you disabled PM in snd_hda_intel module).
> 
> That said - let's revert this; this is what 1st commit does, the 2nd
> commit is somewhat optional - it removes helpers introduced to implement
> this muting, as they are no longer used.

As it's a regression, it's OK for the first revert, but the function
is useful for other purposes and other devices, so I'd like to keep
it.  I'm going to apply only the first patch.

> PS. Don't forget to have this backported to LTS kernels, please.

This should be taken usually automatically as long as Fixes tag points
to the right commit.

Per reading the patch description, though, the behavior appears to be
pretty unreliable, as it depends on the runtime suspend.  We may
control the runtime PM better if we know that the beep must be
submitted; or it's even possible to runtime resume/re-suspend upon
beeping, too.  But it's maybe too complex than needed.


thanks,

Takashi

  parent reply	other threads:[~2024-10-31  9:14 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-30 17:18 [PATCH 0/2] Fix beep notifications by Thinkpad's ACPI firmware Jarosław Janik
2024-10-30 17:18 ` [PATCH 1/2] Revert "ALSA: hda/conexant: Mute speakers at suspend / shutdown" Jarosław Janik
2024-10-30 17:18 ` [PATCH 2/2] Revert "ALSA: hda/generic: Add a helper to mute speakers at suspend/shutdown" Jarosław Janik
2024-10-31  9:15 ` Takashi Iwai [this message]
2024-10-31 16:12   ` [PATCH 0/2] Fix beep notifications by Thinkpad's ACPI firmware Jarosław Janik
2024-10-31 16:21     ` Takashi Iwai
2024-10-31 16:43       ` Jarosław Janik
2024-11-01  8:18         ` Takashi Iwai
2024-11-01 23:15           ` Jarosław Janik
2024-11-02  8:27             ` Takashi Iwai
2024-11-02 22:45               ` Jarosław Janik
2024-11-08 14:17                 ` Takashi Iwai
2024-11-14  0:04                   ` Jarosław Janik
2024-11-14 13:42                     ` Takashi Iwai
2024-11-15  4:34                       ` Jarosław Janik
2024-11-19 15:21                         ` Takashi Iwai
2024-11-20  1:29                           ` Jarosław Janik
2024-11-20  7:04                             ` Takashi Iwai
2024-11-20 15:00                               ` Jarosław Janik
2024-11-20 15:09                                 ` Takashi Iwai
2024-11-21  1:15                                   ` Jarosław Janik
2024-11-21 15:39                                     ` Takashi Iwai
2024-10-31 18:53   ` Thorsten Leemhuis

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=87r07wws4j.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=jaroslaw.janik@gmail.com \
    --cc=linux-sound@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox