Skip to contentSkip to conversation

No audio output via built-in speaker on a MacMini while headphone jack is plugged in

DISCUSSION [email protected] 2 participants 9 messages Mar 14, 2016 – Mar 15, 2016 Sound

lore
Share & tools
lore
#0 lore raw

amixer set Speaker unmute' makes no difference physically unplugging the headphone jack from the socket does, i.e. amixer set Speaker (un)mute' does the right thing.

Signature · 1 line
mailto:[email protected]
#1 lore raw
Quoted 7 lines · On Mon, 14 Mar 2016 09:11:10 +0100, [email protected] wrote:

[1 Output of alsa-info.sh <application/octet-stream (base64)>]

amixer set Speaker unmute' makes no difference physically unplugging the headphone jack from the socket does, i.e. amixer set Speaker (un)mute' does the right thing.

Could you give more details? The description is too concise and vague.

The auto-mute feature is standard behavior. When "Auto-Mute Mode" control is set to "Enabled", the speaker is muted no matter what you set the speaker mute switch. If this isn't the case, please elaborate what you expected and what doesn't work.

thanks,

Takashi

#2 lore raw
Quoted 6 lines · Takashi Iwai
Quoted 4 lines · On Mon, 14 Mar 2016 09:11:10 +0100, [email protected] wrote:

[1 Output of alsa-info.sh <application/octet-stream (base64)>]

Quoted 7 lines
Quoted 3 lines

amixer set Speaker unmute' makes no difference physically unplugging the headphone jack from the socket does, i.e. amixer set Speaker (un)mute' does the right thing.

Could you give more details? The description is too concise and vague.

I have a script to toggles sound emission by the built-in speaker:

#!/bin/sh
amixer get Speaker | grep -q "\[on\]" && onoff="mute" || onoff="unmute" amixer set Speaker $onoff
echo "$onoff"

As we speak:

`--> atoggle
Simple mixer control 'Speaker',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 127
Mono:
Front Left: Playback 127 [100%] [0.00dB] [on]
Front Right: Playback 127 [100%] [0.00dB] [on]
unmute

This setting is ignored when (i.e. speaker is always silent) if the headphone jack is plugged in.

This used to work in prior kernels, I believe I've shared my bisection results with you in one of the earlier (personal) e-mails, if there's a better way to achieve the desired result (i.e. control sound emission by the speaker regardless of the headphone jack plug-status) I'll happily use that instead.

Quoted 9 lines

The auto-mute feature is standard behavior. When "Auto-Mute Mode" control is set to "Enabled", the speaker is muted no matter what you set the speaker mute switch. If this isn't the case, please elaborate what you expected and what doesn't work.

thanks,

Takashi

Signature · 1 line
mailto:[email protected]
#3 lore raw
Quoted 36 lines · On Mon, 14 Mar 2016 18:16:11 +0100, [email protected] wrote:
Quoted 6 lines · Takashi Iwai
Quoted 4 lines · On Mon, 14 Mar 2016 09:11:10 +0100, [email protected] wrote:

[1 Output of alsa-info.sh <application/octet-stream (base64)>]

Quoted 7 lines
Quoted 3 lines

amixer set Speaker unmute' makes no difference physically unplugging the headphone jack from the socket does, i.e. amixer set Speaker (un)mute' does the right thing.

Could you give more details? The description is too concise and vague.

I have a script to toggles sound emission by the built-in speaker:

#!/bin/sh
amixer get Speaker | grep -q "\[on\]" && onoff="mute" || onoff="unmute" amixer set Speaker $onoff
echo "$onoff"

As we speak:

`--> atoggle
Simple mixer control 'Speaker',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 127
Mono:
Front Left: Playback 127 [100%] [0.00dB] [on]
Front Right: Playback 127 [100%] [0.00dB] [on]
unmute

Quoted 8 lines

This setting is ignored when (i.e. speaker is always silent) if the headphone jack is plugged in.

This used to work in prior kernels, I believe I've shared my bisection results with you in one of the earlier (personal) e-mails, if there's a better way to achieve the desired result (i.e. control sound emission by the speaker regardless of the headphone jack plug-status) I'll happily use that instead.

As mentioned, make sure that you disable auto-mute mode:
amixer set "Auto-Mute Mode" "Disabled"

If you still have no speaker output even after that, give alsa-info.sh output with non-working state, and also the alsa-info.sh output from the working state on the earlier kernel.

Takashi

#4 lore raw
Quoted 47 lines · Takashi Iwai
Quoted 36 lines · On Mon, 14 Mar 2016 18:16:11 +0100, [email protected] wrote:
Quoted 6 lines · Takashi Iwai
Quoted 4 lines · On Mon, 14 Mar 2016 09:11:10 +0100, [email protected] wrote:

[1 Output of alsa-info.sh <application/octet-stream (base64)>]

Quoted 7 lines
Quoted 3 lines

amixer set Speaker unmute' makes no difference physically unplugging the headphone jack from the socket does, i.e. amixer set Speaker (un)mute' does the right thing.

Could you give more details? The description is too concise and vague.

I have a script to toggles sound emission by the built-in speaker:

#!/bin/sh
amixer get Speaker | grep -q "\[on\]" && onoff="mute" || onoff="unmute" amixer set Speaker $onoff
echo "$onoff"

As we speak:

`--> atoggle
Simple mixer control 'Speaker',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 127
Mono:
Front Left: Playback 127 [100%] [0.00dB] [on]
Front Right: Playback 127 [100%] [0.00dB] [on]
unmute

Quoted 8 lines

This setting is ignored when (i.e. speaker is always silent) if the headphone jack is plugged in.

This used to work in prior kernels, I believe I've shared my bisection results with you in one of the earlier (personal) e-mails, if there's a better way to achieve the desired result (i.e. control sound emission by the speaker regardless of the headphone jack plug-status) I'll happily use that instead.

Quoted 8 lines

As mentioned, make sure that you disable auto-mute mode:
amixer set "Auto-Mute Mode" "Disabled"

If you still have no speaker output even after that, give alsa-info.sh output with non-working state, and also the alsa-info.sh output from the working state on the earlier kernel.

    jack      | speaker | auto-mute | spaker emits sound
000 unplugged | muted   | disabled  | no
001 unplugged | muted   | enabled   | no
010 unplugged | unmuted | disabled  | yes
011 unplugged | unmuted | enabled   | yes
100 plugged   | muted   | disabled  | no
101 plugged   | muted   | enabled   | no
110 plugged   | unmuted | disabled  | no
111 plugged   | unmuted | enabled   | no

alsa-info outputs can be found in the attached archive

Signature · 2 lines
-- 
mailto:[email protected]
#5 lore raw
Quoted 68 lines · On Mon, 14 Mar 2016 19:39:26 +0100, [email protected] wrote:
Quoted 47 lines · Takashi Iwai
Quoted 36 lines · On Mon, 14 Mar 2016 18:16:11 +0100, [email protected] wrote:
Quoted 6 lines · Takashi Iwai
Quoted 4 lines · On Mon, 14 Mar 2016 09:11:10 +0100, [email protected] wrote:

[1 Output of alsa-info.sh <application/octet-stream (base64)>]

Quoted 7 lines
Quoted 3 lines

amixer set Speaker unmute' makes no difference physically unplugging the headphone jack from the socket does, i.e. amixer set Speaker (un)mute' does the right thing.

Could you give more details? The description is too concise and vague.

I have a script to toggles sound emission by the built-in speaker:

#!/bin/sh
amixer get Speaker | grep -q "\[on\]" && onoff="mute" || onoff="unmute" amixer set Speaker $onoff
echo "$onoff"

As we speak:

`--> atoggle
Simple mixer control 'Speaker',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 127
Mono:
Front Left: Playback 127 [100%] [0.00dB] [on]
Front Right: Playback 127 [100%] [0.00dB] [on]
unmute

Quoted 8 lines

This setting is ignored when (i.e. speaker is always silent) if the headphone jack is plugged in.

This used to work in prior kernels, I believe I've shared my bisection results with you in one of the earlier (personal) e-mails, if there's a better way to achieve the desired result (i.e. control sound emission by the speaker regardless of the headphone jack plug-status) I'll happily use that instead.

Quoted 8 lines

As mentioned, make sure that you disable auto-mute mode:
amixer set "Auto-Mute Mode" "Disabled"

If you still have no speaker output even after that, give alsa-info.sh output with non-working state, and also the alsa-info.sh output from the working state on the earlier kernel.

    jack      | speaker | auto-mute | spaker emits sound
000 unplugged | muted   | disabled  | no
001 unplugged | muted   | enabled   | no
010 unplugged | unmuted | disabled  | yes
011 unplugged | unmuted | enabled   | yes
100 plugged   | muted   | disabled  | no
101 plugged   | muted   | enabled   | no
110 plugged   | unmuted | disabled  | no
111 plugged   | unmuted | enabled   | no
Quoted 1 line

alsa-info outputs can be found in the attached archive

Thanks. This seems to be the missing GPIO setup when the auto-mute is disabled. Could you give the patch below?

Takashi

---

sound/pci/hda/patch_cirrus.c +6 -2
index c1c855a6c0af..a47e8ae0eb30 100644
@@ -174,8 +174,12 @@ static void cs_automute(struct hda_codec *codec)
 	snd_hda_gen_update_outputs(codec);
 
 	if (spec->gpio_eapd_hp || spec->gpio_eapd_speaker) {
-		spec->gpio_data = spec->gen.hp_jack_present ?
-			spec->gpio_eapd_hp : spec->gpio_eapd_speaker;
+		if (spec->gen.automute_speaker)
+			spec->gpio_data = spec->gen.hp_jack_present ?
+				spec->gpio_eapd_hp : spec->gpio_eapd_speaker;
+		else
+			spec->gpio_data =
+				spec->gpio_eapd_hp | spec->gpio_eapd_speaker;
 		snd_hda_codec_write(codec, 0x01, 0,
 				    AC_VERB_SET_GPIO_DATA, spec->gpio_data);
 	}
author Tested-by
#6 lore raw
Quoted 3 lines · Takashi Iwai
Quoted 1 line · On Mon, 14 Mar 2016 19:39:26 +0100, [email protected] wrote:

[..snip..]

Quoted 17 lines

Thanks. This seems to be the missing GPIO setup when the auto-mute is disabled. Could you give the patch below?

Takashi

---

sound/pci/hda/patch_cirrus.c +0 -1
index c1c855a6c0af..a47e8ae0eb30 100644
@@ -174,8 +174,12 @@ static void cs_automute(struct hda_codec *codec)
 	snd_hda_gen_update_outputs(codec);
 
 	if (spec->gpio_eapd_hp || spec->gpio_eapd_speaker) {
-		spec->gpio_data = spec->gen.hp_jack_present ?

sound/pci/hda/patch_cirrus.c static void cs_automute(struct hda_codec *codec) · line 185

Quoted 10 lines
sound/pci/hda/patch_cirrus.c +6 -1
-			spec->gpio_eapd_hp : spec->gpio_eapd_speaker;
+		if (spec->gen.automute_speaker)
+			spec->gpio_data = spec->gen.hp_jack_present ?
+				spec->gpio_eapd_hp : spec->gpio_eapd_speaker;
+		else
+			spec->gpio_data =
+				spec->gpio_eapd_hp | spec->gpio_eapd_speaker;
 		snd_hda_codec_write(codec, 0x01, 0,
 				    AC_VERB_SET_GPIO_DATA, spec->gpio_data);
 	}

That works perfectly with "Auto-Mute Mode" set to "Disabled".

Danke schön.

If you need one.

Signature · 5 lines
mailto:[email protected]
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
#7 lore raw
Quoted 39 lines · On Tue, 15 Mar 2016 16:43:58 +0100, [email protected] wrote:
Quoted 3 lines · Takashi Iwai
Quoted 1 line · On Mon, 14 Mar 2016 19:39:26 +0100, [email protected] wrote:

[..snip..]

Quoted 17 lines

Thanks. This seems to be the missing GPIO setup when the auto-mute is disabled. Could you give the patch below?

Takashi

---

sound/pci/hda/patch_cirrus.c +0 -1
index c1c855a6c0af..a47e8ae0eb30 100644
@@ -174,8 +174,12 @@ static void cs_automute(struct hda_codec *codec)
 	snd_hda_gen_update_outputs(codec);
 
 	if (spec->gpio_eapd_hp || spec->gpio_eapd_speaker) {
-		spec->gpio_data = spec->gen.hp_jack_present ?

sound/pci/hda/patch_cirrus.c static void cs_automute(struct hda_codec *codec) · line 185

Quoted 10 lines
sound/pci/hda/patch_cirrus.c +6 -1
-			spec->gpio_eapd_hp : spec->gpio_eapd_speaker;
+		if (spec->gen.automute_speaker)
+			spec->gpio_data = spec->gen.hp_jack_present ?
+				spec->gpio_eapd_hp : spec->gpio_eapd_speaker;
+		else
+			spec->gpio_data =
+				spec->gpio_eapd_hp | spec->gpio_eapd_speaker;
 		snd_hda_codec_write(codec, 0x01, 0,
 				    AC_VERB_SET_GPIO_DATA, spec->gpio_data);
 	}

That works perfectly with "Auto-Mute Mode" set to "Disabled".

Quoted 5 lines

Danke schön.

If you need one.

Good to hear. I'll cook up the official patch and submit/merge soon later. Thanks for your quick test.

Takashi
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#8 lore raw
In reply to Takashi Iwai
Quoted 2 lines · Takashi Iwai

On Mon, 14 Mar 2016 18:16:11 +0100,
[email protected] wrote:

[..snip..]

Quoted 7 lines

As mentioned, make sure that you disable auto-mute mode:
amixer set "Auto-Mute Mode" "Disabled"

If you still have no speaker output even after that, give alsa-info.sh output with non-working state, and also the alsa-info.sh output from the working state on the earlier kernel.

I would like to avoid checking out and building the earlier kernel if at all possible, will do it if there's no other way forward...

Signature · 1 line
mailto:[email protected]