Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix beep notifications by Thinkpad's ACPI firmware
@ 2024-10-30 17:18 Jarosław Janik
  2024-10-30 17:18 ` [PATCH 1/2] Revert "ALSA: hda/conexant: Mute speakers at suspend / shutdown" Jarosław Janik
                   ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: Jarosław Janik @ 2024-10-30 17:18 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: linux-sound, Jarosław Janik

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.

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

Jarosław Janik (2):
  Revert "ALSA: hda/conexant: Mute speakers at suspend / shutdown"
  Revert "ALSA: hda/generic: Add a helper to mute speakers at
    suspend/shutdown"

 sound/pci/hda/hda_generic.c    | 63 ----------------------------------
 sound/pci/hda/hda_generic.h    |  1 -
 sound/pci/hda/patch_conexant.c |  2 --
 3 files changed, 66 deletions(-)

-- 
2.39.5


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

* [PATCH 1/2] Revert "ALSA: hda/conexant: Mute speakers at suspend / shutdown"
  2024-10-30 17:18 [PATCH 0/2] Fix beep notifications by Thinkpad's ACPI firmware Jarosław Janik
@ 2024-10-30 17:18 ` 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 ` [PATCH 0/2] Fix beep notifications by Thinkpad's ACPI firmware Takashi Iwai
  2 siblings, 0 replies; 23+ messages in thread
From: Jarosław Janik @ 2024-10-30 17:18 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: linux-sound, Jarosław Janik

Commit 4f61c8fe3520 ("ALSA: hda/conexant: Mute speakers at suspend /
shutdown") mutes speakers on system shutdown or whenever HDA controller
is suspended by PM; this however interacts badly with Thinkpad's ACPI
firmware behavior which uses beeps to signal various events (enter/leave
suspend or hibernation, AC power connect/disconnect, low battery, etc.);
now those beeps are either muted altogether (for suspend/hibernate/
shutdown related events) or work more or less randomly (eg. AC
plug/unplug is only audible when you are playing music at the moment,
because HDA device is likely in suspend mode otherwise).

Since the original bug report mentioned in 4f61c8fe3520 complained about
Lenovo's Thinkpad laptop - revert this commit altogether.

Fixes: 4f61c8fe3520 ("ALSA: hda/conexant: Mute speakers at suspend / shutdown")
Signed-off-by: Jarosław Janik <jaroslaw.janik@gmail.com>
---
 sound/pci/hda/patch_conexant.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index c74f6742c359..b2bcdf76da30 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -205,8 +205,6 @@ static void cx_auto_shutdown(struct hda_codec *codec)
 {
 	struct conexant_spec *spec = codec->spec;
 
-	snd_hda_gen_shutup_speakers(codec);
-
 	/* Turn the problematic codec into D3 to avoid spurious noises
 	   from the internal speaker during (and after) reboot */
 	cx_auto_turn_eapd(codec, spec->num_eapds, spec->eapds, false);
-- 
2.39.5


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

* [PATCH 2/2] Revert "ALSA: hda/generic: Add a helper to mute speakers at suspend/shutdown"
  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 ` Jarosław Janik
  2024-10-31  9:15 ` [PATCH 0/2] Fix beep notifications by Thinkpad's ACPI firmware Takashi Iwai
  2 siblings, 0 replies; 23+ messages in thread
From: Jarosław Janik @ 2024-10-30 17:18 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: linux-sound, Jarosław Janik

This reverts commit 6cd23b26b348fa52c88e1adf9c0e48d68e13f95e.

snd_hda_gen_shutup_speakers() no longer has users in the kernel; revert
a commit that introduced it then.

Signed-off-by: Jarosław Janik <jaroslaw.janik@gmail.com>
---
 sound/pci/hda/hda_generic.c | 63 -------------------------------------
 sound/pci/hda/hda_generic.h |  1 -
 2 files changed, 64 deletions(-)

diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index b34d84fedcc8..e4accb70ecf4 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -4955,69 +4955,6 @@ void snd_hda_gen_stream_pm(struct hda_codec *codec, hda_nid_t nid, bool on)
 }
 EXPORT_SYMBOL_GPL(snd_hda_gen_stream_pm);
 
-/* forcibly mute the speaker output without caching; return true if updated */
-static bool force_mute_output_path(struct hda_codec *codec, hda_nid_t nid)
-{
-	if (!nid)
-		return false;
-	if (!nid_has_mute(codec, nid, HDA_OUTPUT))
-		return false; /* no mute, skip */
-	if (snd_hda_codec_amp_read(codec, nid, 0, HDA_OUTPUT, 0) &
-	    snd_hda_codec_amp_read(codec, nid, 1, HDA_OUTPUT, 0) &
-	    HDA_AMP_MUTE)
-		return false; /* both channels already muted, skip */
-
-	/* direct amp update without caching */
-	snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE,
-			    AC_AMP_SET_OUTPUT | AC_AMP_SET_LEFT |
-			    AC_AMP_SET_RIGHT | HDA_AMP_MUTE);
-	return true;
-}
-
-/**
- * snd_hda_gen_shutup_speakers - Forcibly mute the speaker outputs
- * @codec: the HDA codec
- *
- * Forcibly mute the speaker outputs, to be called at suspend or shutdown.
- *
- * The mute state done by this function isn't cached, hence the original state
- * will be restored at resume.
- *
- * Return true if the mute state has been changed.
- */
-bool snd_hda_gen_shutup_speakers(struct hda_codec *codec)
-{
-	struct hda_gen_spec *spec = codec->spec;
-	const int *paths;
-	const struct nid_path *path;
-	int i, p, num_paths;
-	bool updated = false;
-
-	/* if already powered off, do nothing */
-	if (!snd_hdac_is_power_on(&codec->core))
-		return false;
-
-	if (spec->autocfg.line_out_type == AUTO_PIN_SPEAKER_OUT) {
-		paths = spec->out_paths;
-		num_paths = spec->autocfg.line_outs;
-	} else {
-		paths = spec->speaker_paths;
-		num_paths = spec->autocfg.speaker_outs;
-	}
-
-	for (i = 0; i < num_paths; i++) {
-		path = snd_hda_get_path_from_idx(codec, paths[i]);
-		if (!path)
-			continue;
-		for (p = 0; p < path->depth; p++)
-			if (force_mute_output_path(codec, path->path[p]))
-				updated = true;
-	}
-
-	return updated;
-}
-EXPORT_SYMBOL_GPL(snd_hda_gen_shutup_speakers);
-
 /**
  * snd_hda_gen_parse_auto_config - Parse the given BIOS configuration and
  * set up the hda_gen_spec
diff --git a/sound/pci/hda/hda_generic.h b/sound/pci/hda/hda_generic.h
index 9612afaa61c2..9201c852173f 100644
--- a/sound/pci/hda/hda_generic.h
+++ b/sound/pci/hda/hda_generic.h
@@ -352,6 +352,5 @@ int snd_hda_gen_add_mute_led_cdev(struct hda_codec *codec,
 int snd_hda_gen_add_micmute_led_cdev(struct hda_codec *codec,
 				     int (*callback)(struct led_classdev *,
 						     enum led_brightness));
-bool snd_hda_gen_shutup_speakers(struct hda_codec *codec);
 
 #endif /* __SOUND_HDA_GENERIC_H */
-- 
2.39.5


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

* Re: [PATCH 0/2] Fix beep notifications by Thinkpad's ACPI firmware
  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
  2024-10-31 16:12   ` Jarosław Janik
  2024-10-31 18:53   ` Thorsten Leemhuis
  2 siblings, 2 replies; 23+ messages in thread
From: Takashi Iwai @ 2024-10-31  9:15 UTC (permalink / raw)
  To: Jarosław Janik; +Cc: Takashi Iwai, linux-sound

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

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

* Re: [PATCH 0/2] Fix beep notifications by Thinkpad's ACPI firmware
  2024-10-31  9:15 ` [PATCH 0/2] Fix beep notifications by Thinkpad's ACPI firmware Takashi Iwai
@ 2024-10-31 16:12   ` Jarosław Janik
  2024-10-31 16:21     ` Takashi Iwai
  2024-10-31 18:53   ` Thorsten Leemhuis
  1 sibling, 1 reply; 23+ messages in thread
From: Jarosław Janik @ 2024-10-31 16:12 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Takashi Iwai, linux-sound

On 31.10.2024 10:15, Takashi Iwai wrote:

> 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.

You must have misunderstood that, this unreliable behavior is what
happens with your patch applied, once this patch is reverted everything
works perfectly fine (again). Perhaps the commit message should be
rewritten to indicate it more clearly, e.g. replace:
> now those beeps are either muted altogether
with
> since 4f61c8fe3520 those beeps are either muted altogether

... or perhaps it should be just left as it is...

Thanks anyway!

-- 
Regards!
Jarosław Janik


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

* Re: [PATCH 0/2] Fix beep notifications by Thinkpad's ACPI firmware
  2024-10-31 16:12   ` Jarosław Janik
@ 2024-10-31 16:21     ` Takashi Iwai
  2024-10-31 16:43       ` Jarosław Janik
  0 siblings, 1 reply; 23+ messages in thread
From: Takashi Iwai @ 2024-10-31 16:21 UTC (permalink / raw)
  To: Jarosław Janik; +Cc: Takashi Iwai, Takashi Iwai, linux-sound

On Thu, 31 Oct 2024 17:12:53 +0100,
Jarosław Janik wrote:
> 
> On 31.10.2024 10:15, Takashi Iwai wrote:
> 
> > 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.
> 
> You must have misunderstood that, this unreliable behavior is what
> happens with your patch applied, once this patch is reverted everything
> works perfectly fine (again). Perhaps the commit message should be
> rewritten to indicate it more clearly, e.g. replace:
> > now those beeps are either muted altogether
> with
> > since 4f61c8fe3520 those beeps are either muted altogether
> 
> ... or perhaps it should be just left as it is...

Hm, so the beep works even if the HD-audio device is runtime-suspended
before shutdown?  Also, beeping at suspend/resume works no matter
whether runtime-suspended or not?


thanks,

Takashi

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

* Re: [PATCH 0/2] Fix beep notifications by Thinkpad's ACPI firmware
  2024-10-31 16:21     ` Takashi Iwai
@ 2024-10-31 16:43       ` Jarosław Janik
  2024-11-01  8:18         ` Takashi Iwai
  0 siblings, 1 reply; 23+ messages in thread
From: Jarosław Janik @ 2024-10-31 16:43 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Takashi Iwai, linux-sound

On 31.10.2024 17:21, Takashi Iwai wrote:
> Hm, so the beep works even if the HD-audio device is runtime-suspended
> before shutdown?  Also, beeping at suspend/resume works no matter
> whether runtime-suspended or not?

Well, to what I recall - my (current) Thinkpad has never beeped on
shutdown, other than that - without your "extra muting" patch - yes -
beeping in every other circumstances works no matter if HDA controller
is in PM suspend or not; this is what I've got used to for many years of
using Thinkpads.

And one more thing - with your patch - beeping is not muted on my laptop
completely, you can still hear it if you are in a quiet room, it's just
very "weak".

-- 
Regards!
Jarosław Janik


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

* Re: [PATCH 0/2] Fix beep notifications by Thinkpad's ACPI firmware
  2024-10-31  9:15 ` [PATCH 0/2] Fix beep notifications by Thinkpad's ACPI firmware Takashi Iwai
  2024-10-31 16:12   ` Jarosław Janik
@ 2024-10-31 18:53   ` Thorsten Leemhuis
  1 sibling, 0 replies; 23+ messages in thread
From: Thorsten Leemhuis @ 2024-10-31 18:53 UTC (permalink / raw)
  To: Takashi Iwai, Jarosław Janik; +Cc: Takashi Iwai, linux-sound

On 31.10.24 10:15, Takashi Iwai wrote:
> On Wed, 30 Oct 2024 18:18:11 +0100,
> Jarosław Janik wrote:
>
>> 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.

Usually: yes. But a quick reminder: it also might be silently dropped.

If you want to ensure it's backported, a stable tag is a must:
https://docs.kernel.org/process/stable-kernel-rules.html

Ciao, Thorsten

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

* Re: [PATCH 0/2] Fix beep notifications by Thinkpad's ACPI firmware
  2024-10-31 16:43       ` Jarosław Janik
@ 2024-11-01  8:18         ` Takashi Iwai
  2024-11-01 23:15           ` Jarosław Janik
  0 siblings, 1 reply; 23+ messages in thread
From: Takashi Iwai @ 2024-11-01  8:18 UTC (permalink / raw)
  To: Jarosław Janik; +Cc: Takashi Iwai, Takashi Iwai, linux-sound

On Thu, 31 Oct 2024 17:43:18 +0100,
Jarosław Janik wrote:
> 
> On 31.10.2024 17:21, Takashi Iwai wrote:
> > Hm, so the beep works even if the HD-audio device is runtime-suspended
> > before shutdown?  Also, beeping at suspend/resume works no matter
> > whether runtime-suspended or not?
> 
> Well, to what I recall - my (current) Thinkpad has never beeped on
> shutdown, other than that - without your "extra muting" patch - yes -
> beeping in every other circumstances works no matter if HDA controller
> is in PM suspend or not; this is what I've got used to for many years of
> using Thinkpads.

Do you mean about the beep emitted via thinkpad_acpi stuff or the
normal beep via terminal etc?  The latter must work even with the
patch, but the question is only about the former.  And that's the case
for the shutdown beep tone.

You can pass snd_hda_intel.beep_mode=0 option to disable HD-audio
beep, verify the device being runtime-suspended, and check whether the
beep via thinkpad_acpi still works (after reverting).

> And one more thing - with your patch - beeping is not muted on my laptop
> completely, you can still hear it if you are in a quiet room, it's just
> very "weak".

It might be because there can be two routes of beep tone; one via
HD-audio and another internally.


thanks,

Takashi

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

* Re: [PATCH 0/2] Fix beep notifications by Thinkpad's ACPI firmware
  2024-11-01  8:18         ` Takashi Iwai
@ 2024-11-01 23:15           ` Jarosław Janik
  2024-11-02  8:27             ` Takashi Iwai
  0 siblings, 1 reply; 23+ messages in thread
From: Jarosław Janik @ 2024-11-01 23:15 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Takashi Iwai, linux-sound

On 11/1/24 09:18, Takashi Iwai wrote:

>> Well, to what I recall - my (current) Thinkpad has never beeped on
>> shutdown, other than that - without your "extra muting" patch - yes -
>> beeping in every other circumstances works no matter if HDA controller
>> is in PM suspend or not; this is what I've got used to for many years of
>> using Thinkpads.
> 
> Do you mean about the beep emitted via thinkpad_acpi stuff or the
> normal beep via terminal etc?  The latter must work even with the
> patch, but the question is only about the former.  And that's the case
> for the shutdown beep tone.

Yes, I meant beeps emitted by ACPI firmware and I'm not confusing them
with beeps generated by linux console - as you said - the latter work
fine no matter if your patch is applied or not, the former only work
fine if that patch is reverted.

BTW. The ACPI beeps we are talking about are not emitted by
thinkapd_acpi module, but by ACPI firmware; you can take a look at how
thinpad_acpi handles writes to /proc/acpi/ibm/beep - it doesn't make any
beep itself, it just injects some "fake" ACPI event - and beep is
generated by laptop's firmware in response to that event (the
terminology here might not be too good, because my knowledge of ACPI is
rather modest).

Anyway - with that being said - when it comes to the lack of beep on
shutdown on *my* laptop - this must be because of *my* laptop's APCI
firmware just doesn't  emit beep for this specific event.

> You can pass snd_hda_intel.beep_mode=0 option to disable HD-audio
> beep, verify the device being runtime-suspended, and check whether the
> beep via thinkpad_acpi still works (after reverting).

Yes, that works.
I've even had another test - with patch applied I increased power_save
param in this module to 3 seconds and now:
- when I unplug AC - there is no beep, because device is PM suspended
- now I hit Tab in bash on linux console, kernel emits beep and keeps
device awaken for 3 more seconds - so I quickly unplug AC - there is a
beep, then wait ~3 seconds and plug it back - no beep now. That shall
prove that our understanding of what's going on is OK.

-- 
Regards
Jarosław Janik


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

* Re: [PATCH 0/2] Fix beep notifications by Thinkpad's ACPI firmware
  2024-11-01 23:15           ` Jarosław Janik
@ 2024-11-02  8:27             ` Takashi Iwai
  2024-11-02 22:45               ` Jarosław Janik
  0 siblings, 1 reply; 23+ messages in thread
From: Takashi Iwai @ 2024-11-02  8:27 UTC (permalink / raw)
  To: Jarosław Janik; +Cc: Takashi Iwai, Takashi Iwai, linux-sound

On Sat, 02 Nov 2024 00:15:24 +0100,
Jarosław Janik wrote:
> 
> On 11/1/24 09:18, Takashi Iwai wrote:
> 
> >> Well, to what I recall - my (current) Thinkpad has never beeped on
> >> shutdown, other than that - without your "extra muting" patch - yes -
> >> beeping in every other circumstances works no matter if HDA controller
> >> is in PM suspend or not; this is what I've got used to for many years of
> >> using Thinkpads.
> > 
> > Do you mean about the beep emitted via thinkpad_acpi stuff or the
> > normal beep via terminal etc?  The latter must work even with the
> > patch, but the question is only about the former.  And that's the case
> > for the shutdown beep tone.
> 
> Yes, I meant beeps emitted by ACPI firmware and I'm not confusing them
> with beeps generated by linux console - as you said - the latter work
> fine no matter if your patch is applied or not, the former only work
> fine if that patch is reverted.

OK.

> BTW. The ACPI beeps we are talking about are not emitted by
> thinkapd_acpi module, but by ACPI firmware; you can take a look at how
> thinpad_acpi handles writes to /proc/acpi/ibm/beep - it doesn't make any
> beep itself, it just injects some "fake" ACPI event - and beep is
> generated by laptop's firmware in response to that event (the
> terminology here might not be too good, because my knowledge of ACPI is
> rather modest).
> 
> Anyway - with that being said - when it comes to the lack of beep on
> shutdown on *my* laptop - this must be because of *my* laptop's APCI
> firmware just doesn't  emit beep for this specific event.

Yes, it seems like that. 

> > You can pass snd_hda_intel.beep_mode=0 option to disable HD-audio
> > beep, verify the device being runtime-suspended, and check whether the
> > beep via thinkpad_acpi still works (after reverting).
> 
> Yes, that works.
> I've even had another test - with patch applied I increased power_save
> param in this module to 3 seconds and now:
> - when I unplug AC - there is no beep, because device is PM suspended
> - now I hit Tab in bash on linux console, kernel emits beep and keeps
> device awaken for 3 more seconds - so I quickly unplug AC - there is a
> beep, then wait ~3 seconds and plug it back - no beep now. That shall
> prove that our understanding of what's going on is OK.

For checking the runtime-suspend, at best check the sysfs file entry.
e.g. cat /sys/bus/hdaudio/devices/hdaudioC0D0/power/runtime_status

And, I see that Conexant codec doesn't have the beep generator but
it's only passthrough.  Then beep_mode option doesn't change
anything, but the "Beep" mixer volume/switch may influence on the
behavior; not only the beep volume but also the runtime-suspend
behavior.  You can try adjusting the volume/switch if it influences on
anything.

In anyway, you can try unload pcspkr module as well.  This is the
Linux input device for the beep in your case.  (For Realtek codecs,
there can be additional beep input device driven by HD-audio codec
itself, and that's managed via beep_mode module option).

Without pcspkr, the beep from the terminal shouldn't work -- unless
it's handled by the sound server like pulesaudio.  And, if I
understand correctly from your description, even without pcspkr, the
firmware beep should keep working.

As you see, the simple beeping stuff is really complex due to its
history.  Although it's a legacy feature, a few people still love it,
hence it can't go away soon :)


Takashi

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

* Re: [PATCH 0/2] Fix beep notifications by Thinkpad's ACPI firmware
  2024-11-02  8:27             ` Takashi Iwai
@ 2024-11-02 22:45               ` Jarosław Janik
  2024-11-08 14:17                 ` Takashi Iwai
  0 siblings, 1 reply; 23+ messages in thread
From: Jarosław Janik @ 2024-11-02 22:45 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Takashi Iwai, linux-sound

On 11/2/24 09:27, Takashi Iwai wrote:

> For checking the runtime-suspend, at best check the sysfs file entry.
> e.g. cat /sys/bus/hdaudio/devices/hdaudioC0D0/power/runtime_status

OK, so - just to be sure - I verified my assumptions about PM state of
HDA controller when "nothing interesting is happening" (suspended) and
for a short while after I generate a beep on a console (active) - so not
a huge surprise here :)

> As you see, the simple beeping stuff is really complex due to its
> history.  Although it's a legacy feature, a few people still love it,
> hence it can't go away soon :)

OK, so (again - just to be sure) - I understand that you are going to
revert that patch this is all about (no more tests or whatever needed
from my side)?

-- 
Regards
Jarosław Janik


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

* Re: [PATCH 0/2] Fix beep notifications by Thinkpad's ACPI firmware
  2024-11-02 22:45               ` Jarosław Janik
@ 2024-11-08 14:17                 ` Takashi Iwai
  2024-11-14  0:04                   ` Jarosław Janik
  0 siblings, 1 reply; 23+ messages in thread
From: Takashi Iwai @ 2024-11-08 14:17 UTC (permalink / raw)
  To: Jarosław Janik; +Cc: Takashi Iwai, Takashi Iwai, linux-sound

On Sat, 02 Nov 2024 23:45:33 +0100,
Jarosław Janik wrote:
> 
> On 11/2/24 09:27, Takashi Iwai wrote:
> 
> > For checking the runtime-suspend, at best check the sysfs file entry.
> > e.g. cat /sys/bus/hdaudio/devices/hdaudioC0D0/power/runtime_status
> 
> OK, so - just to be sure - I verified my assumptions about PM state of
> HDA controller when "nothing interesting is happening" (suspended) and
> for a short while after I generate a beep on a console (active) - so not
> a huge surprise here :)

A beep sound triggered via the input beep device -- the one from
HD-audio driver, not from pcspkr -- does resume the runtime suspend.
So it's no surprise that it works.

OTOH, a question is rather the other route -- the beep via pcspkr
driver -- if this beep still works while the HD-audio is runtime
suspended: that's the interesting point.  Could you check that?
You can figure out which input device corresponds what, and try to
trigger directly there.

Also, one more question is whether the beep tone persists if you mute
the volume on the HD-audio (e.g. set "Speaker Playback Switch" to
off).  The beep tone at shutdown should be gone in this state, too.

> > As you see, the simple beeping stuff is really complex due to its
> > history.  Although it's a legacy feature, a few people still love it,
> > hence it can't go away soon :)
> 
> OK, so (again - just to be sure) - I understand that you are going to
> revert that patch this is all about (no more tests or whatever needed
> from my side)?

Yes, the revert is on the way to 6.12-rc7.


thanks,

Takashi

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

* Re: [PATCH 0/2] Fix beep notifications by Thinkpad's ACPI firmware
  2024-11-08 14:17                 ` Takashi Iwai
@ 2024-11-14  0:04                   ` Jarosław Janik
  2024-11-14 13:42                     ` Takashi Iwai
  0 siblings, 1 reply; 23+ messages in thread
From: Jarosław Janik @ 2024-11-14  0:04 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Takashi Iwai, linux-sound

On 8.11.2024 15:17, Takashi Iwai wrote:
> OTOH, a question is rather the other route -- the beep via pcspkr
> driver -- if this beep still works while the HD-audio is runtime
> suspended: that's the interesting point.  Could you check that?
> You can figure out which input device corresponds what, and try to
> trigger directly there.

Beep via pcspkr module works fine without your patch - regardless of
current PM state of HDA device; with your patch applied - the beep is
very quiet if HDA is suspended (same as with firmware generated beeps).

> Also, one more question is whether the beep tone persists if you mute
> the volume on the HD-audio (e.g. set "Speaker Playback Switch" to
> off).  The beep tone at shutdown should be gone in this state, too.

pcspkr generated beeps are immune to every mixer/switch setting except
for "Master Mute Switch", which mutes them completely (i.e. they are not
very quiet, they are gone). And again - this is the very same as with
firmware beeps; that would mean that both (firmware's and pcspkr's) are
using PIT to drive "PC Speaker".

> Yes, the revert is on the way to 6.12-rc7.

Already there by now, thanks!

-- 
Regards!
Jarosław Janik

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

* Re: [PATCH 0/2] Fix beep notifications by Thinkpad's ACPI firmware
  2024-11-14  0:04                   ` Jarosław Janik
@ 2024-11-14 13:42                     ` Takashi Iwai
  2024-11-15  4:34                       ` Jarosław Janik
  0 siblings, 1 reply; 23+ messages in thread
From: Takashi Iwai @ 2024-11-14 13:42 UTC (permalink / raw)
  To: Jarosław Janik; +Cc: Takashi Iwai, Takashi Iwai, linux-sound

On Thu, 14 Nov 2024 01:04:22 +0100,
Jarosław Janik wrote:
> 
> On 8.11.2024 15:17, Takashi Iwai wrote:
> > OTOH, a question is rather the other route -- the beep via pcspkr
> > driver -- if this beep still works while the HD-audio is runtime
> > suspended: that's the interesting point.  Could you check that?
> > You can figure out which input device corresponds what, and try to
> > trigger directly there.
> 
> Beep via pcspkr module works fine without your patch - regardless of
> current PM state of HDA device; with your patch applied - the beep is
> very quiet if HDA is suspended (same as with firmware generated beeps).
> 
> > Also, one more question is whether the beep tone persists if you mute
> > the volume on the HD-audio (e.g. set "Speaker Playback Switch" to
> > off).  The beep tone at shutdown should be gone in this state, too.
> 
> pcspkr generated beeps are immune to every mixer/switch setting except
> for "Master Mute Switch", which mutes them completely (i.e. they are not
> very quiet, they are gone). And again - this is the very same as with
> firmware beeps; that would mean that both (firmware's and pcspkr's) are
> using PIT to drive "PC Speaker".

So, if the HD-audio Master volume influence on the beep output of
pcspkr, it means that it's flowing over HD-audio, likely there is some
analog-input loopback.

Could you give alsa-info.sh output?  (Run with --no-upload option and
attach the output).

If there is a mixer widget there, one of input pins might correspond
to the analog beep input -- even if the pin is marked as unused.


Takashi

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

* Re: [PATCH 0/2] Fix beep notifications by Thinkpad's ACPI firmware
  2024-11-14 13:42                     ` Takashi Iwai
@ 2024-11-15  4:34                       ` Jarosław Janik
  2024-11-19 15:21                         ` Takashi Iwai
  0 siblings, 1 reply; 23+ messages in thread
From: Jarosław Janik @ 2024-11-15  4:34 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Takashi Iwai, linux-sound

[-- Attachment #1: Type: text/plain, Size: 498 bytes --]

On 14.11.2024 14:42, Takashi Iwai wrote:
> So, if the HD-audio Master volume influence on the beep output of
> pcspkr, it means that it's flowing over HD-audio, likely there is some
> analog-input loopback.
> 
> Could you give alsa-info.sh output?  (Run with --no-upload option and
> attach the output).
> 
> If there is a mixer widget there, one of input pins might correspond
> to the analog beep input -- even if the pin is marked as unused.

alsa-info.txt attached

-- 
Regards!
Jarosław Janik

[-- Attachment #2: alsa-info.txt.ejm6tibpa1 --]
[-- Type: text/plain, Size: 41525 bytes --]

upload=true&script=true&cardinfo=
!!################################
!!ALSA Information Script v 0.5.3
!!################################

!!Script ran on: Fri Nov 15 02:42:28 UTC 2024


!!Linux Distribution
!!------------------

Debian GNU/Linux 12 \n \l PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" NAME="Debian GNU/Linux" ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/"


!!DMI Information
!!---------------

Manufacturer:      
Product Name:      
Product Version:   
Firmware Version:  
System SKU:        
Board Vendor:      
Board Name:        


!!ACPI Device Status Information
!!---------------

/sys/bus/acpi/devices/ACPI0003:00/status 	 15
/sys/bus/acpi/devices/LEN0068:00/status 	 15
/sys/bus/acpi/devices/LNXPOWER:00/status 	 1
/sys/bus/acpi/devices/LNXVIDEO:01/status 	 15
/sys/bus/acpi/devices/PNP0103:00/status 	 15
/sys/bus/acpi/devices/PNP0C0A:00/status 	 31
/sys/bus/acpi/devices/PNP0C0F:00/status 	 9
/sys/bus/acpi/devices/PNP0C0F:01/status 	 9
/sys/bus/acpi/devices/PNP0C0F:02/status 	 9
/sys/bus/acpi/devices/PNP0C0F:03/status 	 9
/sys/bus/acpi/devices/PNP0C0F:04/status 	 9
/sys/bus/acpi/devices/PNP0C0F:05/status 	 9
/sys/bus/acpi/devices/PNP0C0F:06/status 	 9
/sys/bus/acpi/devices/PNP0C0F:07/status 	 9
/sys/bus/acpi/devices/SMO1200:00/status 	 15


!!ACPI SoundWire Device Status Information
!!---------------



!!Kernel Information
!!------------------

Kernel release:    #2 SMP PREEMPT_DYNAMIC Tue Nov 12 03:14:53 CET 2024
Operating System:  GNU/Linux
Architecture:      x86_64
Processor:         unknown
SMP Enabled:       Yes


!!ALSA Version
!!------------

Driver version:     k6.1.115+yaro0
Library version:    1.2.8
Utilities version:  1.2.8


!!Loaded ALSA modules
!!-------------------

snd_hda_intel (card 0)


!!Sound Servers on this system
!!----------------------------

PipeWire:
      Installed - Yes (/usr/bin/pipewire)
      Running - Yes

No sound servers found.


!!Soundcards recognised by ALSA
!!-----------------------------

 0 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xd1520000 irq 29


!!PCI Soundcards installed in the system
!!--------------------------------------

00:1b.0 Audio device [0403]: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller [8086:1c20] (rev 04)
	Subsystem: Lenovo 6 Series/C200 Series Chipset Family High Definition Audio Controller [17aa:21ce]


!!Modprobe options (Sound related)
!!--------------------------------

snd_pcsp: index=-2
snd_atiixp_modem: index=-2
snd_intel8x0m: index=-2
snd_via82xx_modem: index=-2


!!Loaded sound module options
!!---------------------------

!!Module: snd_hda_intel
	align_buffer_size : -1
	bdl_pos_adj : -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
	beep_mode : Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y
	ctl_dev_id : N
	dmic_detect : Y
	enable : Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y
	enable_msi : -1
	id : (null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)
	index : -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
	jackpoll_ms : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
	model : (null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)
	patch : (null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)
	pm_blacklist : Y
	position_fix : -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
	power_save : 1
	power_save_controller : Y
	probe_mask : -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
	probe_only : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
	single_cmd : -1
	snoop : -1


!!Sysfs card info
!!---------------

!!Card: /sys/class/sound/card0
Driver: /sys/bus/pci/drivers/snd_hda_intel
Tree:
	/sys/class/sound/card0
	|-- controlC0
	|   |-- dev
	|   |-- device -> ../../card0
	|   |-- led-mic -> ../../../../../virtual/sound/ctl-led/mic/card0
	|   |-- led-speaker -> ../../../../../virtual/sound/ctl-led/speaker/card0
	|   |-- power
	|   |-- subsystem -> ../../../../../../class/sound
	|   `-- uevent
	|-- device -> ../../../0000:00:1b.0
	|-- hwC0D0
	|   |-- afg
	|   |-- chip_name
	|   |-- clear
	|   |-- dev
	|   |-- device -> ../../card0
	|   |-- driver_pin_configs
	|   |-- hints
	|   |-- init_pin_configs
	|   |-- init_verbs
	|   |-- mfg
	|   |-- modelname
	|   |-- power
	|   |-- power_off_acct
	|   |-- power_on_acct
	|   |-- reconfig
	|   |-- revision_id
	|   |-- subsystem -> ../../../../../../class/sound
	|   |-- subsystem_id
	|   |-- uevent
	|   |-- user_pin_configs
	|   |-- vendor_id
	|   `-- vendor_name
	|-- hwC0D3
	|   |-- afg
	|   |-- chip_name
	|   |-- clear
	|   |-- dev
	|   |-- device -> ../../card0
	|   |-- driver_pin_configs
	|   |-- hints
	|   |-- init_pin_configs
	|   |-- init_verbs
	|   |-- mfg
	|   |-- modelname
	|   |-- power
	|   |-- power_off_acct
	|   |-- power_on_acct
	|   |-- reconfig
	|   |-- revision_id
	|   |-- subsystem -> ../../../../../../class/sound
	|   |-- subsystem_id
	|   |-- uevent
	|   |-- user_pin_configs
	|   |-- vendor_id
	|   `-- vendor_name
	|-- id
	|-- input10
	|   |-- capabilities
	|   |-- device -> ../../card0
	|   |-- event9
	|   |-- id
	|   |-- inhibited
	|   |-- modalias
	|   |-- name
	|   |-- phys
	|   |-- power
	|   |-- properties
	|   |-- subsystem -> ../../../../../../class/input
	|   |-- uevent
	|   `-- uniq
	|-- input11
	|   |-- capabilities
	|   |-- device -> ../../card0
	|   |-- event10
	|   |-- id
	|   |-- inhibited
	|   |-- modalias
	|   |-- name
	|   |-- phys
	|   |-- power
	|   |-- properties
	|   |-- subsystem -> ../../../../../../class/input
	|   |-- uevent
	|   `-- uniq
	|-- input12
	|   |-- capabilities
	|   |-- device -> ../../card0
	|   |-- event11
	|   |-- id
	|   |-- inhibited
	|   |-- modalias
	|   |-- name
	|   |-- phys
	|   |-- power
	|   |-- properties
	|   |-- subsystem -> ../../../../../../class/input
	|   |-- uevent
	|   `-- uniq
	|-- input13
	|   |-- capabilities
	|   |-- device -> ../../card0
	|   |-- event12
	|   |-- id
	|   |-- inhibited
	|   |-- modalias
	|   |-- name
	|   |-- phys
	|   |-- power
	|   |-- properties
	|   |-- subsystem -> ../../../../../../class/input
	|   |-- uevent
	|   `-- uniq
	|-- input14
	|   |-- capabilities
	|   |-- device -> ../../card0
	|   |-- event13
	|   |-- id
	|   |-- inhibited
	|   |-- modalias
	|   |-- name
	|   |-- phys
	|   |-- power
	|   |-- properties
	|   |-- subsystem -> ../../../../../../class/input
	|   |-- uevent
	|   `-- uniq
	|-- input15
	|   |-- capabilities
	|   |-- device -> ../../card0
	|   |-- event14
	|   |-- id
	|   |-- inhibited
	|   |-- modalias
	|   |-- name
	|   |-- phys
	|   |-- power
	|   |-- properties
	|   |-- subsystem -> ../../../../../../class/input
	|   |-- uevent
	|   `-- uniq
	|-- input16
	|   |-- capabilities
	|   |-- device -> ../../card0
	|   |-- event15
	|   |-- id
	|   |-- inhibited
	|   |-- modalias
	|   |-- name
	|   |-- phys
	|   |-- power
	|   |-- properties
	|   |-- subsystem -> ../../../../../../class/input
	|   |-- uevent
	|   `-- uniq
	|-- input17
	|   |-- capabilities
	|   |-- device -> ../../card0
	|   |-- event16
	|   |-- id
	|   |-- inhibited
	|   |-- modalias
	|   |-- name
	|   |-- phys
	|   |-- power
	|   |-- properties
	|   |-- subsystem -> ../../../../../../class/input
	|   |-- uevent
	|   `-- uniq
	|-- number
	|-- pcmC0D0c
	|   |-- dev
	|   |-- device -> ../../card0
	|   |-- pcm_class
	|   |-- power
	|   |-- subsystem -> ../../../../../../class/sound
	|   `-- uevent
	|-- pcmC0D0p
	|   |-- dev
	|   |-- device -> ../../card0
	|   |-- pcm_class
	|   |-- power
	|   |-- subsystem -> ../../../../../../class/sound
	|   `-- uevent
	|-- pcmC0D3p
	|   |-- dev
	|   |-- device -> ../../card0
	|   |-- pcm_class
	|   |-- power
	|   |-- subsystem -> ../../../../../../class/sound
	|   `-- uevent
	|-- pcmC0D7p
	|   |-- dev
	|   |-- device -> ../../card0
	|   |-- pcm_class
	|   |-- power
	|   |-- subsystem -> ../../../../../../class/sound
	|   `-- uevent
	|-- pcmC0D8p
	|   |-- dev
	|   |-- device -> ../../card0
	|   |-- pcm_class
	|   |-- power
	|   |-- subsystem -> ../../../../../../class/sound
	|   `-- uevent
	|-- power
	|   |-- async
	|   |-- autosuspend_delay_ms
	|   |-- control
	|   |-- runtime_active_kids
	|   |-- runtime_active_time
	|   |-- runtime_enabled
	|   |-- runtime_status
	|   |-- runtime_suspended_time
	|   `-- runtime_usage
	|-- subsystem -> ../../../../../class/sound
	`-- uevent


!!Sysfs ctl-led info
!!---------------

!!CTL-LED: /sys/class/sound/ctl-led/mic/card0
List: 9

!!CTL-LED: /sys/class/sound/ctl-led/speaker/card0
List: 13

!!HDA-Intel Codec information
!!---------------------------
--startcollapse--

Codec: Conexant CX20590
Address: 0
AFG Function Id: 0x1 (unsol 1)
Vendor Id: 0x14f1506e
Subsystem Id: 0x17aa21ce
Revision Id: 0x100000
No Modem Function Group found
Default PCM:
    rates [0x160]: 44100 48000 96000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
State of AFG node 0x01:
  Power states:  D0 D1 D2 D3 D3cold CLKSTOP EPSS
  Power: setting=D0, actual=D0
GPIO: io=4, o=0, i=0, unsolicited=1, wake=0
  IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
  IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
  IO[2]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
  IO[3]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
Node 0x10 [Audio Output] wcaps 0xc1d: Stereo Amp-Out R/L
  Control: name="Speaker Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Speaker Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Device: name="CX20590 Analog", type="Audio", device=0
  Amp-Out caps: ofs=0x4a, nsteps=0x4a, stepsize=0x03, mute=1
  Amp-Out vals:  [0x40 0x40]
  Converter: stream=0, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 D3cold EPSS
  Power: setting=D0, actual=D0
Node 0x11 [Audio Output] wcaps 0xc1d: Stereo Amp-Out R/L
  Control: name="Headphone Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Headphone Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x4a, nsteps=0x4a, stepsize=0x03, mute=1
  Amp-Out vals:  [0x80 0x80]
  Converter: stream=0, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 D3cold EPSS
  Power: setting=D0, actual=D0
Node 0x12 [Audio Output] wcaps 0x611: Stereo Digital
  Converter: stream=0, channel=0
  Digital:
  Digital category: 0x0
  IEC Coding Type: 0x0
  PCM:
    rates [0x160]: 44100 48000 96000
    bits [0xe]: 16 20 24
    formats [0x5]: PCM AC3
  Power states:  D0 D1 D2 D3 D3cold EPSS
  Power: setting=D0, actual=D0
Node 0x13 [Beep Generator Widget] wcaps 0x70000c: Mono Amp-Out
  Control: name="Beep Playback Volume", index=0, device=0
    ControlAmp: chs=1, dir=Out, idx=0, ofs=0
  Control: name="Beep Playback Switch", index=0, device=0
    ControlAmp: chs=1, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x07, nsteps=0x07, stepsize=0x0f, mute=0
  Amp-Out vals:  [0x01]
Node 0x14 [Audio Input] wcaps 0x100d1b: Stereo Amp-In R/L
  Control: name="Capture Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Control: name="Capture Switch", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Device: name="CX20590 Analog", type="Audio", device=0
  Amp-In caps: ofs=0x4a, nsteps=0x50, stepsize=0x03, mute=1
  Amp-In vals:  [0x50 0x50] [0x80 0x80] [0x50 0x50] [0x80 0x80]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x160]: 44100 48000 96000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 D3cold EPSS
  Power: setting=D0, actual=D0
  Connection: 4
     0x17 0x18 0x23* 0x24
Node 0x15 [Audio Input] wcaps 0x100d1b: Stereo Amp-In R/L
  Amp-In caps: ofs=0x4a, nsteps=0x50, stepsize=0x03, mute=1
  Amp-In vals:  [0x4a 0x4a] [0x4a 0x4a] [0x4a 0x4a] [0x4a 0x4a]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x160]: 44100 48000 96000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 D3cold EPSS
  Power: setting=D0, actual=D0
  Connection: 4
     0x17* 0x18 0x23 0x24
Node 0x16 [Audio Input] wcaps 0x100d1b: Stereo Amp-In R/L
  Amp-In caps: ofs=0x4a, nsteps=0x50, stepsize=0x03, mute=1
  Amp-In vals:  [0x4a 0x4a] [0x4a 0x4a] [0x4a 0x4a] [0x4a 0x4a]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x160]: 44100 48000 96000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 D3cold EPSS
  Power: setting=D0, actual=D0
  Connection: 4
     0x17* 0x18 0x23 0x24
Node 0x17 [Audio Selector] wcaps 0x30050d: Stereo Amp-Out
  Control: name="Mic Boost Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x00, nsteps=0x04, stepsize=0x27, mute=0
  Amp-Out vals:  [0x00 0x00]
  Power states:  D0 D1 D2 D3 D3cold EPSS
  Power: setting=D0, actual=D0
  Connection: 4
     0x1a* 0x1b 0x1d 0x1e
Node 0x18 [Audio Selector] wcaps 0x30050d: Stereo Amp-Out
  Amp-Out caps: ofs=0x00, nsteps=0x04, stepsize=0x27, mute=0
  Amp-Out vals:  [0x00 0x00]
  Power states:  D0 D1 D2 D3 D3cold EPSS
  Power: setting=D0, actual=D0
  Connection: 4
     0x1a* 0x1b 0x1d 0x1e
Node 0x19 [Pin Complex] wcaps 0x400581: Stereo
  Pincap 0x0000001c: OUT HP Detect
  Pin Default 0x04211040: [Jack] HP Out at Ext Right
    Conn = 1/8, Color = Black
    DefAssociation = 0x4, Sequence = 0x0
  Pin-ctls: 0xc0: OUT HP
  Unsolicited: tag=02, enabled=1
  Power states:  D0 D1 D2 D3 D3cold EPSS
  Power: setting=D0, actual=D0
  Connection: 2
     0x10 0x11*
Node 0x1a [Pin Complex] wcaps 0x400481: Stereo
  Pincap 0x00001324: IN Detect
    Vref caps: HIZ 50 80
  Pin Default 0x61a19050: [N/A] Mic at Sep Rear
    Conn = 1/8, Color = Pink
    DefAssociation = 0x5, Sequence = 0x0
  Pin-ctls: 0x24: IN VREF_80
  Unsolicited: tag=03, enabled=1
  Power states:  D0 D1 D2 D3 D3cold EPSS
  Power: setting=D0, actual=D0
Node 0x1b [Pin Complex] wcaps 0x400581: Stereo
  Pincap 0x00011334: IN OUT EAPD Detect
    Vref caps: HIZ 50 80
  EAPD 0x2: EAPD
  Pin Default 0x04a11060: [Jack] Mic at Ext Right
    Conn = 1/8, Color = Black
    DefAssociation = 0x6, Sequence = 0x0
  Pin-ctls: 0x24: IN VREF_80
  Unsolicited: tag=04, enabled=1
  Power states:  D0 D1 D2 D3 D3cold EPSS
  Power: setting=D0, actual=D0
  Connection: 2
     0x10* 0x11
Node 0x1c [Pin Complex] wcaps 0x400581: Stereo
  Pincap 0x00000014: OUT Detect
  Pin Default 0x6121401f: [N/A] HP Out at Sep Rear
    Conn = 1/8, Color = Green
    DefAssociation = 0x1, Sequence = 0xf
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=01, enabled=1
  Power states:  D0 D1 D2 D3 D3cold EPSS
  Power: setting=D0, actual=D0
  Connection: 2
     0x10 0x11*
Node 0x1d [Pin Complex] wcaps 0x400581: Stereo
  Pincap 0x00010034: IN OUT EAPD Detect
  EAPD 0x2: EAPD
  Pin Default 0x40f001f0: [N/A] Other at Ext N/A
    Conn = Unknown, Color = Unknown
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D1 D2 D3 D3cold EPSS
  Power: setting=D0, actual=D0
  Connection: 2
     0x10* 0x11
Node 0x1e [Pin Complex] wcaps 0x400481: Stereo
  Pincap 0x00000024: IN Detect
  Pin Default 0x40f001f0: [N/A] Other at Ext N/A
    Conn = Unknown, Color = Unknown
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x00:
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D1 D2 D3 D3cold EPSS
  Power: setting=D0, actual=D0
Node 0x1f [Pin Complex] wcaps 0x400501: Stereo
  Pincap 0x00000010: OUT
  Pin Default 0x90170110: [Fixed] Speaker at Int N/A
    Conn = Analog, Color = Unknown
    DefAssociation = 0x1, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Power states:  D0 D1 D2 D3 D3cold EPSS
  Power: setting=D0, actual=D0
  Connection: 2
     0x10* 0x11
Node 0x20 [Pin Complex] wcaps 0x400781: Stereo Digital
  Pincap 0x00000010: OUT
  Pin Default 0x40f001f0: [N/A] Other at Ext N/A
    Conn = Unknown, Color = Unknown
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x00:
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D1 D2 D3 D3cold EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x12
Node 0x21 [Audio Output] wcaps 0x611: Stereo Digital
  Converter: stream=0, channel=0
  Digital:
  Digital category: 0x0
  IEC Coding Type: 0x0
  PCM:
    rates [0x160]: 44100 48000 96000
    bits [0xe]: 16 20 24
    formats [0x5]: PCM AC3
  Power states:  D0 D1 D2 D3 D3cold EPSS
  Power: setting=D0, actual=D0
Node 0x22 [Pin Complex] wcaps 0x400781: Stereo Digital
  Pincap 0x00000010: OUT
  Pin Default 0x40f001f0: [N/A] Other at Ext N/A
    Conn = Unknown, Color = Unknown
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x00:
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D1 D2 D3 D3cold EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x21
Node 0x23 [Pin Complex] wcaps 0x40040b: Stereo Amp-In
  Control: name="Internal Mic Boost Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Amp-In caps: ofs=0x00, nsteps=0x04, stepsize=0x2f, mute=0
  Amp-In vals:  [0x02 0x02]
  Pincap 0x00000020: IN
  Pin Default 0x90a60170: [Fixed] Mic at Int N/A
    Conn = Digital, Color = Unknown
    DefAssociation = 0x7, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x20: IN
  Power states:  D0 D1 D2 D3 D3cold EPSS
  Power: setting=D0, actual=D0
Node 0x24 [Audio Mixer] wcaps 0x20050b: Stereo Amp-In
  Amp-In caps: ofs=0x4a, nsteps=0x4a, stepsize=0x03, mute=1
  Amp-In vals:  [0x00 0x00] [0x00 0x00]
  Power states:  D0 D1 D2 D3 D3cold EPSS
  Power: setting=D0, actual=D0
  Connection: 2
     0x10 0x11
Node 0x25 [Vendor Defined Widget] wcaps 0xf00000: Mono
Codec: Intel CougarPoint HDMI
Address: 3
AFG Function Id: 0x1 (unsol 0)
Vendor Id: 0x80862805
Subsystem Id: 0x80860101
Revision Id: 0x100000
No Modem Function Group found
Default PCM:
    rates [0x0]:
    bits [0x0]:
    formats [0x0]:
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
State of AFG node 0x01:
  Power states:  D0 D3 CLKSTOP EPSS
  Power: setting=D0, actual=D0, Clock-stop-OK
GPIO: io=0, o=0, i=0, unsolicited=0, wake=0
Node 0x02 [Audio Output] wcaps 0x6611: 8-Channels Digital
  Converter: stream=0, channel=0
  Digital: Enabled
  Digital category: 0x0
  IEC Coding Type: 0x0
  PCM:
    rates [0x7f0]: 32000 44100 48000 88200 96000 176400 192000
    bits [0x1e]: 16 20 24 32
    formats [0x5]: PCM AC3
  Power states:  D0 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x03 [Audio Output] wcaps 0x6611: 8-Channels Digital
  Converter: stream=0, channel=0
  Digital: Enabled
  Digital category: 0x0
  IEC Coding Type: 0x0
  PCM:
    rates [0x7f0]: 32000 44100 48000 88200 96000 176400 192000
    bits [0x1e]: 16 20 24 32
    formats [0x5]: PCM AC3
  Power states:  D0 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x04 [Audio Output] wcaps 0x6611: 8-Channels Digital
  Converter: stream=0, channel=0
  Digital: Enabled
  Digital category: 0x0
  IEC Coding Type: 0x0
  PCM:
    rates [0x7f0]: 32000 44100 48000 88200 96000 176400 192000
    bits [0x1e]: 16 20 24 32
    formats [0x5]: PCM AC3
  Power states:  D0 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x05 [Pin Complex] wcaps 0x40778d: 8-Channels Digital Amp-Out CP
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x09000094: OUT Detect HBR HDMI DP
  Pin Default 0x18560010: [Jack] Digital Out at Int HDMI
    Conn = Digital, Color = Unknown
    DefAssociation = 0x1, Sequence = 0x0
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x02
Node 0x06 [Pin Complex] wcaps 0x40778d: 8-Channels Digital Amp-Out CP
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x09000094: OUT Detect HBR HDMI DP
  Pin Default 0x18560020: [Jack] Digital Out at Int HDMI
    Conn = Digital, Color = Unknown
    DefAssociation = 0x2, Sequence = 0x0
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x03
Node 0x07 [Pin Complex] wcaps 0x40778d: 8-Channels Digital Amp-Out CP
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x09000094: OUT Detect HBR HDMI DP
  Pin Default 0x18560030: [Jack] Digital Out at Int HDMI
    Conn = Digital, Color = Unknown
    DefAssociation = 0x3, Sequence = 0x0
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Power states:  D0 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 1
     0x04
Node 0x08 [Vendor Defined Widget] wcaps 0xf00000: Mono
--endcollapse--


!!ALSA Device nodes
!!-----------------

crw-rw----+ 1 root audio 116,  9 Nov 13 19:17 /dev/snd/controlC0
crw-rw----+ 1 root audio 116,  7 Nov 13 19:17 /dev/snd/hwC0D0
crw-rw----+ 1 root audio 116,  8 Nov 13 19:17 /dev/snd/hwC0D3
crw-rw----+ 1 root audio 116,  3 Nov 14 01:21 /dev/snd/pcmC0D0c
crw-rw----+ 1 root audio 116,  2 Nov 14 01:29 /dev/snd/pcmC0D0p
crw-rw----+ 1 root audio 116,  4 Nov 14 01:21 /dev/snd/pcmC0D3p
crw-rw----+ 1 root audio 116,  5 Nov 14 01:21 /dev/snd/pcmC0D7p
crw-rw----+ 1 root audio 116,  6 Nov 14 01:21 /dev/snd/pcmC0D8p
crw-rw----+ 1 root audio 116,  1 Nov 14 01:21 /dev/snd/seq
crw-rw----+ 1 root audio 116, 33 Nov 13 19:17 /dev/snd/timer

/dev/snd/by-path:
total 0
drwxr-xr-x 2 root root  60 Nov 13 19:17 .
drwxr-xr-x 3 root root 260 Nov 13 19:17 ..
lrwxrwxrwx 1 root root  12 Nov 13 19:17 pci-0000:00:1b.0 -> ../controlC0


!!Aplay/Arecord output
!!--------------------

APLAY

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: CX20590 Analog [CX20590 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

ARECORD

**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: CX20590 Analog [CX20590 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

!!Amixer output
!!-------------

!!-------Mixer controls for card PCH

Card sysdefault:0 'PCH'/'HDA Intel PCH at 0xd1520000 irq 29'
  Mixer name	: 'Conexant CX20590'
  Components	: 'HDA:14f1506e,17aa21ce,00100000 HDA:80862805,80860101,00100000'
  Controls      : 44
  Simple ctrls  : 13
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 74
  Mono: Playback 64 [86%] [-10.00dB] [on]
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 74
  Mono:
  Front Left: Playback 0 [0%] [-74.00dB] [off]
  Front Right: Playback 0 [0%] [-74.00dB] [off]
Simple mixer control 'Speaker',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 74
  Mono:
  Front Left: Playback 74 [100%] [0.00dB] [on]
  Front Right: Playback 74 [100%] [0.00dB] [on]
Simple mixer control 'PCM',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 255 [100%] [0.00dB]
  Front Right: Playback 255 [100%] [0.00dB]
Simple mixer control 'Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 4
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'IEC958',1
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',2
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Beep',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 7
  Mono: Playback 1 [14%] [-24.00dB] [on]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 80
  Front Left: Capture 80 [100%] [6.00dB] [on]
  Front Right: Capture 80 [100%] [6.00dB] [on]
Simple mixer control 'Auto-Mute Mode',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Disabled'
Simple mixer control 'Digital',0
  Capabilities: cvolume
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 120
  Front Left: Capture 59 [49%] [-0.50dB]
  Front Right: Capture 59 [49%] [-0.50dB]
Simple mixer control 'Internal Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 4
  Front Left: 2 [50%] [24.00dB]
  Front Right: 2 [50%] [24.00dB]


!!Alsactl output
!!--------------

--startcollapse--
state.PCH {
	control.1 {
		iface MIXER
		name 'Beep Playback Volume'
		value 1
		comment {
			access 'read write'
			type INTEGER
			count 1
			range '0 - 7'
			dbmin -2800
			dbmax 0
			dbvalue.0 -2400
		}
	}
	control.2 {
		iface MIXER
		name 'Beep Playback Switch'
		value true
		comment {
			access 'read write'
			type BOOLEAN
			count 1
		}
	}
	control.3 {
		iface MIXER
		name 'Speaker Playback Volume'
		value.0 74
		value.1 74
		comment {
			access 'read write'
			type INTEGER
			count 2
			range '0 - 74'
			dbmin -7400
			dbmax 0
			dbvalue.0 0
			dbvalue.1 0
		}
	}
	control.4 {
		iface MIXER
		name 'Speaker Playback Switch'
		value.0 true
		value.1 true
		comment {
			access 'read write'
			type BOOLEAN
			count 2
		}
	}
	control.5 {
		iface MIXER
		name 'Headphone Playback Volume'
		value.0 0
		value.1 0
		comment {
			access 'read write'
			type INTEGER
			count 2
			range '0 - 74'
			dbmin -7400
			dbmax 0
			dbvalue.0 -7400
			dbvalue.1 -7400
		}
	}
	control.6 {
		iface MIXER
		name 'Headphone Playback Switch'
		value.0 false
		value.1 false
		comment {
			access 'read write'
			type BOOLEAN
			count 2
		}
	}
	control.7 {
		iface MIXER
		name 'Auto-Mute Mode'
		value Disabled
		comment {
			access 'read write'
			type ENUMERATED
			count 1
			item.0 Disabled
			item.1 Enabled
		}
	}
	control.8 {
		iface MIXER
		name 'Capture Volume'
		value.0 80
		value.1 80
		comment {
			access 'read write'
			type INTEGER
			count 2
			range '0 - 80'
			dbmin -7400
			dbmax 600
			dbvalue.0 600
			dbvalue.1 600
		}
	}
	control.9 {
		iface MIXER
		name 'Capture Switch'
		value.0 true
		value.1 true
		comment {
			access 'read write'
			type BOOLEAN
			count 2
		}
	}
	control.10 {
		iface MIXER
		name 'Internal Mic Boost Volume'
		value.0 2
		value.1 2
		comment {
			access 'read write'
			type INTEGER
			count 2
			range '0 - 4'
			dbmin 0
			dbmax 4800
			dbvalue.0 2400
			dbvalue.1 2400
		}
	}
	control.11 {
		iface MIXER
		name 'Mic Boost Volume'
		value.0 0
		value.1 0
		comment {
			access 'read write'
			type INTEGER
			count 2
			range '0 - 4'
			dbmin 0
			dbmax 4000
			dbvalue.0 0
			dbvalue.1 0
		}
	}
	control.12 {
		iface MIXER
		name 'Master Playback Volume'
		value 64
		comment {
			access 'read write'
			type INTEGER
			count 1
			range '0 - 74'
			dbmin -7400
			dbmax 0
			dbvalue.0 -1000
		}
	}
	control.13 {
		iface MIXER
		name 'Master Playback Switch'
		value true
		comment {
			access 'read write'
			type BOOLEAN
			count 1
		}
	}
	control.14 {
		iface CARD
		name 'Internal Mic Phantom Jack'
		value true
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.15 {
		iface CARD
		name 'Mic Jack'
		value false
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.16 {
		iface CARD
		name 'Dock Mic Jack'
		value false
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.17 {
		iface CARD
		name 'Speaker Phantom Jack'
		value true
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.18 {
		iface CARD
		name 'Dock Headphone Jack'
		value false
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.19 {
		iface CARD
		name 'Headphone Jack'
		value false
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.20 {
		iface PCM
		name 'Playback Channel Map'
		value.0 0
		value.1 0
		value.2 0
		value.3 0
		comment {
			access read
			type INTEGER
			count 4
			range '0 - 36'
		}
	}
	control.21 {
		iface PCM
		name 'Capture Channel Map'
		value.0 0
		value.1 0
		comment {
			access read
			type INTEGER
			count 2
			range '0 - 36'
		}
	}
	control.22 {
		iface CARD
		name 'HDMI/DP,pcm=3 Jack'
		value false
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.23 {
		iface MIXER
		name 'IEC958 Playback Con Mask'
		value '0fff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
		comment {
			access read
			type IEC958
			count 1
		}
	}
	control.24 {
		iface MIXER
		name 'IEC958 Playback Pro Mask'
		value '0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
		comment {
			access read
			type IEC958
			count 1
		}
	}
	control.25 {
		iface MIXER
		name 'IEC958 Playback Default'
		value '0400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
		comment {
			access 'read write'
			type IEC958
			count 1
		}
	}
	control.26 {
		iface MIXER
		name 'IEC958 Playback Switch'
		value false
		comment {
			access 'read write'
			type BOOLEAN
			count 1
		}
	}
	control.27 {
		iface PCM
		device 3
		name ELD
		value ''
		comment {
			access 'read volatile'
			type BYTES
			count 0
		}
	}
	control.28 {
		iface CARD
		name 'HDMI/DP,pcm=7 Jack'
		value false
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.29 {
		iface MIXER
		name 'IEC958 Playback Con Mask'
		index 1
		value '0fff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
		comment {
			access read
			type IEC958
			count 1
		}
	}
	control.30 {
		iface MIXER
		name 'IEC958 Playback Pro Mask'
		index 1
		value '0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
		comment {
			access read
			type IEC958
			count 1
		}
	}
	control.31 {
		iface MIXER
		name 'IEC958 Playback Default'
		index 1
		value '0400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
		comment {
			access 'read write'
			type IEC958
			count 1
		}
	}
	control.32 {
		iface MIXER
		name 'IEC958 Playback Switch'
		index 1
		value true
		comment {
			access 'read write'
			type BOOLEAN
			count 1
		}
	}
	control.33 {
		iface PCM
		device 7
		name ELD
		value ''
		comment {
			access 'read volatile'
			type BYTES
			count 0
		}
	}
	control.34 {
		iface CARD
		name 'HDMI/DP,pcm=8 Jack'
		value false
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.35 {
		iface MIXER
		name 'IEC958 Playback Con Mask'
		index 2
		value '0fff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
		comment {
			access read
			type IEC958
			count 1
		}
	}
	control.36 {
		iface MIXER
		name 'IEC958 Playback Pro Mask'
		index 2
		value '0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
		comment {
			access read
			type IEC958
			count 1
		}
	}
	control.37 {
		iface MIXER
		name 'IEC958 Playback Default'
		index 2
		value '0400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
		comment {
			access 'read write'
			type IEC958
			count 1
		}
	}
	control.38 {
		iface MIXER
		name 'IEC958 Playback Switch'
		index 2
		value true
		comment {
			access 'read write'
			type BOOLEAN
			count 1
		}
	}
	control.39 {
		iface PCM
		device 8
		name ELD
		value ''
		comment {
			access 'read volatile'
			type BYTES
			count 0
		}
	}
	control.40 {
		iface PCM
		device 3
		name 'Playback Channel Map'
		value.0 0
		value.1 0
		value.2 0
		value.3 0
		value.4 0
		value.5 0
		value.6 0
		value.7 0
		comment {
			access 'read write'
			type INTEGER
			count 8
			range '0 - 36'
		}
	}
	control.41 {
		iface PCM
		device 7
		name 'Playback Channel Map'
		value.0 0
		value.1 0
		value.2 0
		value.3 0
		value.4 0
		value.5 0
		value.6 0
		value.7 0
		comment {
			access 'read write'
			type INTEGER
			count 8
			range '0 - 36'
		}
	}
	control.42 {
		iface PCM
		device 8
		name 'Playback Channel Map'
		value.0 0
		value.1 0
		value.2 0
		value.3 0
		value.4 0
		value.5 0
		value.6 0
		value.7 0
		comment {
			access 'read write'
			type INTEGER
			count 8
			range '0 - 36'
		}
	}
	control.43 {
		iface MIXER
		name 'PCM Playback Volume'
		value.0 255
		value.1 255
		comment {
			access 'read write user'
			type INTEGER
			count 2
			range '0 - 255'
			tlv '0000000100000008ffffec1400000014'
			dbmin -5100
			dbmax 0
			dbvalue.0 0
			dbvalue.1 0
		}
	}
	control.44 {
		iface MIXER
		name 'Digital Capture Volume'
		value.0 59
		value.1 59
		comment {
			access 'read write user'
			type INTEGER
			count 2
			range '0 - 120'
			tlv '0000000100000008fffff44800000032'
			dbmin -3000
			dbmax 3000
			dbvalue.0 -50
			dbvalue.1 -50
		}
	}
}
--endcollapse--


!!All Loaded Modules
!!------------------

ac
af_packet_diag
ahci
ansi_cprng
at24
autofs4
battery
binfmt_misc
bluetooth
btbcm
btintel
btmtk
btrtl
btusb
button
cec
cfg80211
configfs
coretemp
cpufreq_conservative
cpufreq_ondemand
cpufreq_powersave
cpufreq_userspace
cqhci
crc16
crc32_pclmul
crc32c_generic
crc32c_intel
crc64
crc64_rocksoft
crc64_rocksoft_generic
crc_t10dif
crct10dif_common
crct10dif_generic
crct10dif_pclmul
cryptd
crypto_simd
ctr
dm_crypt
dm_mod
drbg
drivetemp
drm
drm_buddy
drm_display_helper
drm_kms_helper
e1000e
ecb
ecc
ecdh_generic
efi_pstore
efivarfs
ehci_hcd
ehci_pci
evdev
ext4
fat
firmware_attributes_class
fuse
ghash_clmulni_intel
i2c_algo_bit
i2c_i801
i2c_smbus
i915
iTCO_vendor_support
iTCO_wdt
inet_diag
intel_cstate
intel_pmc_bxt
intel_powerclamp
intel_rapl_common
intel_rapl_msr
intel_uncore
ip_tables
irqbypass
iwldvm
iwlwifi
jbd2
jitterentropy_rng
joydev
kvm
kvm_intel
ledtrig_audio
libahci
libarc4
libata
lm75
loop
lp
lpc_ich
mac80211
max6650
mbcache
mc
mei
mei_hdcp
mei_me
mei_wdt
mmc_core
mptcp_diag
netlink_diag
nls_ascii
nls_cp437
nvram
parport
parport_pc
pcspkr
pkcs8_key_parser
platform_profile
ppdev
psmouse
rapl
raw_diag
rc_core
rfkill
sbs
sbshc
scsi_common
scsi_mod
sd_mod
sdhci
sdhci_pci
serio_raw
sg
sha1_ssse3
sha256_ssse3
sha512_generic
sha512_ssse3
snd
snd_ctl_led
snd_hda_codec
snd_hda_codec_conexant
snd_hda_codec_generic
snd_hda_codec_hdmi
snd_hda_core
snd_hda_intel
snd_hrtimer
snd_hwdep
snd_intel_dspcfg
snd_intel_sdw_acpi
snd_pcm
snd_seq
snd_seq_device
snd_seq_dummy
snd_timer
soundcore
t10_pi
tcp_diag
think_lmi
thinkpad_acpi
thinkpad_ec
tp_smapi
ttm
udp_diag
uinput
unix_diag
usb_common
usb_storage
usbcore
uvcvideo
vfat
video
videobuf2_common
videobuf2_memops
videobuf2_v4l2
videobuf2_vmalloc
videodev
watchdog
wmi
wmi_bmof
x86_pkg_temp_thermal
x_tables
xts


!!Sysfs Files
!!-----------

/sys/class/sound/hwC0D0/init_pin_configs:
0x19 0x04211040
0x1a 0x61a19050
0x1b 0x04a11060
0x1c 0x6121401f
0x1d 0x40f001f0
0x1e 0x40f001f0
0x1f 0x90170110
0x20 0x40f001f0
0x22 0x40f001f0
0x23 0x90a60170

/sys/class/sound/hwC0D0/driver_pin_configs:
0x19 0x042110ff
0x1a 0x21a190f0
0x1c 0x212140ff

/sys/class/sound/hwC0D0/user_pin_configs:

/sys/class/sound/hwC0D0/init_verbs:

/sys/class/sound/hwC0D0/hints:

/sys/class/sound/hwC0D3/init_pin_configs:
0x05 0x18560010
0x06 0x18560020
0x07 0x18560030

/sys/class/sound/hwC0D3/driver_pin_configs:

/sys/class/sound/hwC0D3/user_pin_configs:

/sys/class/sound/hwC0D3/init_verbs:

/sys/class/sound/hwC0D3/hints:


!!ALSA/HDA dmesg
!!--------------

[   30.114654] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input9
[   30.114812] snd_hda_intel 0000:00:1b.0: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[   30.120720] ieee80211 phy0: Selected rate control algorithm 'iwl-agn-rs'
--
[   31.271900] alg: No test for fips(ansi_cprng) (fips_ansi_cprng)
[   31.293161] snd_hda_codec_conexant hdaudioC0D0: CX20590: BIOS auto-probing.
[   31.296199] snd_hda_codec_conexant hdaudioC0D0: autoconfig for CX20590: line_outs=1 (0x1f/0x0/0x0/0x0/0x0) type:speaker
[   31.296207] snd_hda_codec_conexant hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[   31.296211] snd_hda_codec_conexant hdaudioC0D0:    hp_outs=2 (0x1c/0x19/0x0/0x0/0x0)
[   31.296215] snd_hda_codec_conexant hdaudioC0D0:    mono: mono_out=0x0
[   31.296217] snd_hda_codec_conexant hdaudioC0D0:    inputs:
[   31.296219] snd_hda_codec_conexant hdaudioC0D0:      Internal Mic=0x23
[   31.296222] snd_hda_codec_conexant hdaudioC0D0:      Mic=0x1b
[   31.296225] snd_hda_codec_conexant hdaudioC0D0:      Dock Mic=0x1a
[   31.325116] input: HDA Digital PCBeep as /devices/pci0000:00/0000:00:1b.0/sound/card0/input10
[   31.325226] input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input11
[   31.325329] input: HDA Intel PCH Dock Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input12
[   31.325902] input: HDA Intel PCH Dock Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input13
[   31.326010] input: HDA Intel PCH Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input14
[   31.326106] input: HDA Intel PCH HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1b.0/sound/card0/input15
[   31.326202] input: HDA Intel PCH HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:1b.0/sound/card0/input16
[   31.326300] input: HDA Intel PCH HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:1b.0/sound/card0/input17
[   31.377380] usb 1-1.6: Found UVC 1.00 device Integrated Camera (04f2:b221)


!!Packages installed
!!--------------------

ii  alsa-topology-conf                            1.2.5.1-2                                            all          ALSA topology configuration files
ii  alsa-ucm-conf                                 1.2.8-1                                              all          ALSA Use Case Manager configuration files
ii  alsa-utils                                    1.2.8-1                                              amd64        Utilities for configuring and using ALSA


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

* Re: [PATCH 0/2] Fix beep notifications by Thinkpad's ACPI firmware
  2024-11-15  4:34                       ` Jarosław Janik
@ 2024-11-19 15:21                         ` Takashi Iwai
  2024-11-20  1:29                           ` Jarosław Janik
  0 siblings, 1 reply; 23+ messages in thread
From: Takashi Iwai @ 2024-11-19 15:21 UTC (permalink / raw)
  To: Jarosław Janik; +Cc: Takashi Iwai, Takashi Iwai, linux-sound

On Fri, 15 Nov 2024 05:34:57 +0100,
Jarosław Janik wrote:
> 
> On 14.11.2024 14:42, Takashi Iwai wrote:
> > So, if the HD-audio Master volume influence on the beep output of
> > pcspkr, it means that it's flowing over HD-audio, likely there is some
> > analog-input loopback.
> > 
> > Could you give alsa-info.sh output?  (Run with --no-upload option and
> > attach the output).
> > 
> > If there is a mixer widget there, one of input pins might correspond
> > to the analog beep input -- even if the pin is marked as unused.
> 
> alsa-info.txt attached

Thanks.  So this codec chip has no analog input mixer unlike Realtek.
Hmm. 

I'm not sure whether I already asked it: did you try to turn on/off
"Beep Playback Switch" (i.e. mute/unute "Beep" mixer element)?
It should control the digital beep of HD-audio's own beep input
device, but this might be also related with the internal beep from the
Lenovo firmware (and the output of pcspkr input device).

And, judging from the fact that "Master" volume influences on the beep
sound, it also means that the sound is routed to DACs -- for Conexant
codecs, Master is a virtual control just changes both Speaker and
Headphone volumes/switches, and both Speaker and Headphone controls
are tied with the Audio Output widgets.  You can check whether the
beep tone volume from pcspkr or Thinkpad ACPI is also controlled via
Speaker and Headphone mixer volume and switch.


Takashi

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

* Re: [PATCH 0/2] Fix beep notifications by Thinkpad's ACPI firmware
  2024-11-19 15:21                         ` Takashi Iwai
@ 2024-11-20  1:29                           ` Jarosław Janik
  2024-11-20  7:04                             ` Takashi Iwai
  0 siblings, 1 reply; 23+ messages in thread
From: Jarosław Janik @ 2024-11-20  1:29 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Takashi Iwai, linux-sound

On 19.11.2024 16:21, Takashi Iwai wrote:
> I'm not sure whether I already asked it: did you try to turn on/off
> "Beep Playback Switch" (i.e. mute/unute "Beep" mixer element)?
> It should control the digital beep of HD-audio's own beep input
> device, but this might be also related with the internal beep from the
> Lenovo firmware (and the output of pcspkr input device).

Both "Beep" mixer and mute switch don't affect beeps generated by ACPI
firmware (and pcspkr module for that matter)

> And, judging from the fact that "Master" volume influences on the beep
> sound, it also means that the sound is routed to DACs -- for Conexant
> codecs, Master is a virtual control just changes both Speaker and
> Headphone volumes/switches, and both Speaker and Headphone controls
> are tied with the Audio Output widgets.  You can check whether the
> beep tone volume from pcspkr or Thinkpad ACPI is also controlled via
> Speaker and Headphone mixer volume and switch.

The volume of beeps from firmware and pcspkr is fixed, it's not changed
by any available mixer setting; the only thing that affects those beeps
is Master Mute Switch, which mutes them both on the speakers and on the
headphones.

And one more thing - both beep types are audible on the headphones even
if Headphones mixer is set minimum and Headphones Mute Switch is set to
mute (if Master is unmuted, obviously)

-- 
Regards
Jarosław Janik

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

* Re: [PATCH 0/2] Fix beep notifications by Thinkpad's ACPI firmware
  2024-11-20  1:29                           ` Jarosław Janik
@ 2024-11-20  7:04                             ` Takashi Iwai
  2024-11-20 15:00                               ` Jarosław Janik
  0 siblings, 1 reply; 23+ messages in thread
From: Takashi Iwai @ 2024-11-20  7:04 UTC (permalink / raw)
  To: Jarosław Janik; +Cc: Takashi Iwai, Takashi Iwai, linux-sound

On Wed, 20 Nov 2024 02:29:59 +0100,
Jarosław Janik wrote:
> 
> On 19.11.2024 16:21, Takashi Iwai wrote:
> > I'm not sure whether I already asked it: did you try to turn on/off
> > "Beep Playback Switch" (i.e. mute/unute "Beep" mixer element)?
> > It should control the digital beep of HD-audio's own beep input
> > device, but this might be also related with the internal beep from the
> > Lenovo firmware (and the output of pcspkr input device).
> 
> Both "Beep" mixer and mute switch don't affect beeps generated by ACPI
> firmware (and pcspkr module for that matter)
> 
> > And, judging from the fact that "Master" volume influences on the beep
> > sound, it also means that the sound is routed to DACs -- for Conexant
> > codecs, Master is a virtual control just changes both Speaker and
> > Headphone volumes/switches, and both Speaker and Headphone controls
> > are tied with the Audio Output widgets.  You can check whether the
> > beep tone volume from pcspkr or Thinkpad ACPI is also controlled via
> > Speaker and Headphone mixer volume and switch.
> 
> The volume of beeps from firmware and pcspkr is fixed, it's not changed
> by any available mixer setting; the only thing that affects those beeps
> is Master Mute Switch, which mutes them both on the speakers and on the
> headphones.
>
> And one more thing - both beep types are audible on the headphones even
> if Headphones mixer is set minimum and Headphones Mute Switch is set to
> mute (if Master is unmuted, obviously)

Hm, that's odd.  At this moment, do you hear from the speaker?  Or
Speaker Playback Switch is off?


Takashi

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

* Re: [PATCH 0/2] Fix beep notifications by Thinkpad's ACPI firmware
  2024-11-20  7:04                             ` Takashi Iwai
@ 2024-11-20 15:00                               ` Jarosław Janik
  2024-11-20 15:09                                 ` Takashi Iwai
  0 siblings, 1 reply; 23+ messages in thread
From: Jarosław Janik @ 2024-11-20 15:00 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Takashi Iwai, linux-sound

On 20.11.2024 08:04, Takashi Iwai wrote:
> On Wed, 20 Nov 2024 02:29:59 +0100,

>> And one more thing - both beep types are audible on the headphones even
>> if Headphones mixer is set minimum and Headphones Mute Switch is set to
>> mute (if Master is unmuted, obviously)
> 
> Hm, that's odd.  At this moment, do you hear from the speaker?  Or
> Speaker Playback Switch is off?

The speakers are completely silent once you connect headphones,
regardless of Speakers Volume / Mute Switch settings.

-- 
Regards
Jarosław Janik

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

* Re: [PATCH 0/2] Fix beep notifications by Thinkpad's ACPI firmware
  2024-11-20 15:00                               ` Jarosław Janik
@ 2024-11-20 15:09                                 ` Takashi Iwai
  2024-11-21  1:15                                   ` Jarosław Janik
  0 siblings, 1 reply; 23+ messages in thread
From: Takashi Iwai @ 2024-11-20 15:09 UTC (permalink / raw)
  To: Jarosław Janik; +Cc: Takashi Iwai, Takashi Iwai, linux-sound

On Wed, 20 Nov 2024 16:00:07 +0100,
Jarosław Janik wrote:
> 
> On 20.11.2024 08:04, Takashi Iwai wrote:
> > On Wed, 20 Nov 2024 02:29:59 +0100,
> 
> >> And one more thing - both beep types are audible on the headphones even
> >> if Headphones mixer is set minimum and Headphones Mute Switch is set to
> >> mute (if Master is unmuted, obviously)
> > 
> > Hm, that's odd.  At this moment, do you hear from the speaker?  Or
> > Speaker Playback Switch is off?
> 
> The speakers are completely silent once you connect headphones,
> regardless of Speakers Volume / Mute Switch settings.

Even if you turn off "Auto-Mute Mode"...?  If yes, check the widget
NID 0x10 and 0x1f in the codec proc file
(/proc/asound/card*/codec#*).  The former should have the output amp
value like 0x40, and the latter should be pinctl 0x40 (output).
You can override the values directly via hda-verb, too.


Takashi

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

* Re: [PATCH 0/2] Fix beep notifications by Thinkpad's ACPI firmware
  2024-11-20 15:09                                 ` Takashi Iwai
@ 2024-11-21  1:15                                   ` Jarosław Janik
  2024-11-21 15:39                                     ` Takashi Iwai
  0 siblings, 1 reply; 23+ messages in thread
From: Jarosław Janik @ 2024-11-21  1:15 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Takashi Iwai, linux-sound

On 20.11.2024 16:09, Takashi Iwai wrote:
>> The speakers are completely silent once you connect headphones,
>> regardless of Speakers Volume / Mute Switch settings.
> 
> Even if you turn off "Auto-Mute Mode"...?  If yes, check the widget
> NID 0x10 and 0x1f in the codec proc file
> (/proc/asound/card*/codec#*).  The former should have the output amp
> value like 0x40, and the latter should be pinctl 0x40 (output).
> You can override the values directly via hda-verb, too.

Yes, speakers are always silent when headphones are connected,
regardless of Auto-Mute Mode and even if Speaker Mixer is set to max and
unmuted (which translates to 0x40 for NID 0x10 in my
/proc/asound/card0/codec#0).
When it comes to Pin-ctl of 0x1f - it is "0x40: OUT" as you said it
should be, unless Auto-Mute is enabled and headphones are connected
(it's 0x00 then); but it doesn't change anything - if you plug
headphones - speakers are quiet.

-- 
Regards
Jarosław Janik

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

* Re: [PATCH 0/2] Fix beep notifications by Thinkpad's ACPI firmware
  2024-11-21  1:15                                   ` Jarosław Janik
@ 2024-11-21 15:39                                     ` Takashi Iwai
  0 siblings, 0 replies; 23+ messages in thread
From: Takashi Iwai @ 2024-11-21 15:39 UTC (permalink / raw)
  To: Jarosław Janik; +Cc: Takashi Iwai, Takashi Iwai, linux-sound

On Thu, 21 Nov 2024 02:15:43 +0100,
Jarosław Janik wrote:
> 
> On 20.11.2024 16:09, Takashi Iwai wrote:
> >> The speakers are completely silent once you connect headphones,
> >> regardless of Speakers Volume / Mute Switch settings.
> > 
> > Even if you turn off "Auto-Mute Mode"...?  If yes, check the widget
> > NID 0x10 and 0x1f in the codec proc file
> > (/proc/asound/card*/codec#*).  The former should have the output amp
> > value like 0x40, and the latter should be pinctl 0x40 (output).
> > You can override the values directly via hda-verb, too.
> 
> Yes, speakers are always silent when headphones are connected,
> regardless of Auto-Mute Mode and even if Speaker Mixer is set to max and
> unmuted (which translates to 0x40 for NID 0x10 in my
> /proc/asound/card0/codec#0).
> When it comes to Pin-ctl of 0x1f - it is "0x40: OUT" as you said it
> should be, unless Auto-Mute is enabled and headphones are connected
> (it's 0x00 then); but it doesn't change anything - if you plug
> headphones - speakers are quiet.

Aha, that's an interesting information.  Then basically Auto-Mute Mode
control is useless on your machine, and can be omitted.


Takashi

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

end of thread, other threads:[~2024-11-21 15:39 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 0/2] Fix beep notifications by Thinkpad's ACPI firmware Takashi Iwai
2024-10-31 16:12   ` 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

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