public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda - Fix silent output on MacBook Air 1,1
@ 2014-01-24 19:56 Adrien Vergé
  2014-01-24 20:14 ` Paul Bolle
  0 siblings, 1 reply; 8+ messages in thread
From: Adrien Vergé @ 2014-01-24 19:56 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai
  Cc: Nicolo', David Henningsson, Kailang Yang, Hui Wang,
	alsa-devel, linux-kernel, Adrien Vergé

Similarly to other Apple products, MBA 1,1 needs a specific quirk.
Pin 0x18 must be set to VREF_50 to have sound output.  This was no
longer done since commit 1a97b7f, resulting in a mute built-in speaker.

This patch corrects the regression by creating a fixup for the MBA 1,1.

Tested-by: Adrien Vergé <adrienverge@gmail.com>
Signed-off-by: Adrien Vergé <adrienverge@gmail.com>
---
 sound/pci/hda/patch_realtek.c | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index c564694..723de28 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -1780,6 +1780,7 @@ enum {
 	ALC889_FIXUP_DAC_ROUTE,
 	ALC889_FIXUP_MBP_VREF,
 	ALC889_FIXUP_IMAC91_VREF,
+	ALC889_FIXUP_MBA11_VREF,
 	ALC889_FIXUP_MBA21_VREF,
 	ALC882_FIXUP_INV_DMIC,
 	ALC882_FIXUP_NO_PRIMARY_HP,
@@ -1910,6 +1911,16 @@ static void alc889_fixup_imac91_vref(struct hda_codec *codec,
 		alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids));
 }
 
+/* Set VREF on speaker pins on mba11 */
+static void alc889_fixup_mba11_vref(struct hda_codec *codec,
+				    const struct hda_fixup *fix, int action)
+{
+	static hda_nid_t nids[1] = { 0x18 };
+
+	if (action == HDA_FIXUP_ACT_INIT)
+		alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids));
+}
+
 /* Set VREF on speaker pins on mba21 */
 static void alc889_fixup_mba21_vref(struct hda_codec *codec,
 				    const struct hda_fixup *fix, int action)
@@ -2119,6 +2130,12 @@ static const struct hda_fixup alc882_fixups[] = {
 		.chained = true,
 		.chain_id = ALC882_FIXUP_GPIO1,
 	},
+	[ALC889_FIXUP_MBA11_VREF] = {
+		.type = HDA_FIXUP_FUNC,
+		.v.func = alc889_fixup_mba11_vref,
+		.chained = true,
+		.chain_id = ALC889_FIXUP_MBP_VREF,
+	},
 	[ALC889_FIXUP_MBA21_VREF] = {
 		.type = HDA_FIXUP_FUNC,
 		.v.func = alc889_fixup_mba21_vref,
@@ -2194,7 +2211,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x106b, 0x2c00, "MacbookPro rev3", ALC889_FIXUP_MBP_VREF),
 	SND_PCI_QUIRK(0x106b, 0x3000, "iMac", ALC889_FIXUP_MBP_VREF),
 	SND_PCI_QUIRK(0x106b, 0x3200, "iMac 7,1 Aluminum", ALC882_FIXUP_EAPD),
-	SND_PCI_QUIRK(0x106b, 0x3400, "MacBookAir 1,1", ALC889_FIXUP_MBP_VREF),
+	SND_PCI_QUIRK(0x106b, 0x3400, "MacBookAir 1,1", ALC889_FIXUP_MBA11_VREF),
 	SND_PCI_QUIRK(0x106b, 0x3500, "MacBookAir 2,1", ALC889_FIXUP_MBA21_VREF),
 	SND_PCI_QUIRK(0x106b, 0x3600, "Macbook 3,1", ALC889_FIXUP_MBP_VREF),
 	SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC889_FIXUP_MBP_VREF),
-- 
1.8.5.2


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

* Re: [PATCH] ALSA: hda - Fix silent output on MacBook Air 1,1
  2014-01-24 19:56 [PATCH] ALSA: hda - Fix silent output on MacBook Air 1,1 Adrien Vergé
@ 2014-01-24 20:14 ` Paul Bolle
  2014-01-24 20:46   ` Adrien Vergé
  0 siblings, 1 reply; 8+ messages in thread
From: Paul Bolle @ 2014-01-24 20:14 UTC (permalink / raw)
  To: Adrien Vergé
  Cc: Jaroslav Kysela, Takashi Iwai, Nicolo', David Henningsson,
	Kailang Yang, Hui Wang, alsa-devel, linux-kernel

On Fri, 2014-01-24 at 14:56 -0500, Adrien Vergé wrote:
> Similarly to other Apple products, MBA 1,1 needs a specific quirk.
> Pin 0x18 must be set to VREF_50 to have sound output.  This was no
> longer done since commit 1a97b7f, resulting in a mute built-in speaker.

Commit 1a97b7f ("ALSA: hda/realtek - Remove the last static quirks for
ALC882") was included in v3.4. Did no-one notice this for 9 releases?

> This patch corrects the regression by creating a fixup for the MBA 1,1.
> 
> Tested-by: Adrien Vergé <adrienverge@gmail.com>
> Signed-off-by: Adrien Vergé <adrienverge@gmail.com>


Paul Bolle


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

* Re: [PATCH] ALSA: hda - Fix silent output on MacBook Air 1,1
  2014-01-24 20:14 ` Paul Bolle
@ 2014-01-24 20:46   ` Adrien Vergé
  2014-01-24 21:08     ` Paul Bolle
  0 siblings, 1 reply; 8+ messages in thread
From: Adrien Vergé @ 2014-01-24 20:46 UTC (permalink / raw)
  To: Paul Bolle
  Cc: Jaroslav Kysela, Takashi Iwai, Nicolo', David Henningsson,
	Kailang Yang, Hui Wang, alsa-devel, linux-kernel@vger.kernel.org

I think very few people use Linux on their MBA 1,1. Moreover, part of
them remained on v2.6.

2014/1/24 Paul Bolle <pebolle@tiscali.nl>:
> On Fri, 2014-01-24 at 14:56 -0500, Adrien Vergé wrote:
>> Similarly to other Apple products, MBA 1,1 needs a specific quirk.
>> Pin 0x18 must be set to VREF_50 to have sound output.  This was no
>> longer done since commit 1a97b7f, resulting in a mute built-in speaker.
>
> Commit 1a97b7f ("ALSA: hda/realtek - Remove the last static quirks for
> ALC882") was included in v3.4. Did no-one notice this for 9 releases?
>
>> This patch corrects the regression by creating a fixup for the MBA 1,1.
>>
>> Tested-by: Adrien Vergé <adrienverge@gmail.com>
>> Signed-off-by: Adrien Vergé <adrienverge@gmail.com>
>
>
> Paul Bolle
>

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

* Re: [PATCH] ALSA: hda - Fix silent output on MacBook Air 1,1
  2014-01-24 20:46   ` Adrien Vergé
@ 2014-01-24 21:08     ` Paul Bolle
  2014-01-25  8:18       ` Takashi Iwai
  0 siblings, 1 reply; 8+ messages in thread
From: Paul Bolle @ 2014-01-24 21:08 UTC (permalink / raw)
  To: Adrien Vergé
  Cc: Jaroslav Kysela, Takashi Iwai, Nicolo', David Henningsson,
	Kailang Yang, Hui Wang, alsa-devel, linux-kernel@vger.kernel.org

On Fri, 2014-01-24 at 15:46 -0500, Adrien Vergé wrote:
> I think very few people use Linux on their MBA 1,1. Moreover, part of
> them remained on v2.6.

I see. Well, if your analysis is correct I think you're supposed to add
     Fixes: 1a97b7f22774 ("ALSA: hda/realtek - Remove the last static quirks for ALC882")

to your commit explanation. Not sure, since this tag is not documented,
as far as I can see.


Paul Bolle


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

* Re: [PATCH] ALSA: hda - Fix silent output on MacBook Air 1,1
  2014-01-24 21:08     ` Paul Bolle
@ 2014-01-25  8:18       ` Takashi Iwai
  2014-01-25 10:17         ` Nicolo'
  0 siblings, 1 reply; 8+ messages in thread
From: Takashi Iwai @ 2014-01-25  8:18 UTC (permalink / raw)
  To: Paul Bolle
  Cc: Adrien Vergé, Jaroslav Kysela, Nicolo',
	David Henningsson, Kailang Yang, Hui Wang, alsa-devel,
	linux-kernel@vger.kernel.org

At Fri, 24 Jan 2014 22:08:05 +0100,
Paul Bolle wrote:
> 
> On Fri, 2014-01-24 at 15:46 -0500, Adrien Vergé wrote:
> > I think very few people use Linux on their MBA 1,1. Moreover, part of
> > them remained on v2.6.
> 
> I see. Well, if your analysis is correct I think you're supposed to add
>      Fixes: 1a97b7f22774 ("ALSA: hda/realtek - Remove the last static quirks for ALC882")
> 
> to your commit explanation. Not sure, since this tag is not documented,
> as far as I can see.

I applied with fixes and cc-to-stable tags now.

thanks,

Takashi

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

* Re: [PATCH] ALSA: hda - Fix silent output on MacBook Air 1,1
  2014-01-25  8:18       ` Takashi Iwai
@ 2014-01-25 10:17         ` Nicolo'
  2014-01-25 14:36           ` Adrien Vergé
  0 siblings, 1 reply; 8+ messages in thread
From: Nicolo' @ 2014-01-25 10:17 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Paul Bolle, Adrien Vergé, Jaroslav Kysela, David Henningsson,
	Kailang Yang, Hui Wang, alsa-devel, linux-kernel@vger.kernel.org

I can confirm this happens on my machine too: does anybody have a hint
on why changing VREF on 0x18 mutes/unmutes speakers and hp, which are
on 0x14 and 0x15 ?

On Sat, Jan 25, 2014 at 9:18 AM, Takashi Iwai <tiwai@suse.de> wrote:
> At Fri, 24 Jan 2014 22:08:05 +0100,
> Paul Bolle wrote:
>>
>> On Fri, 2014-01-24 at 15:46 -0500, Adrien Vergé wrote:
>> > I think very few people use Linux on their MBA 1,1. Moreover, part of
>> > them remained on v2.6.
>>
>> I see. Well, if your analysis is correct I think you're supposed to add
>>      Fixes: 1a97b7f22774 ("ALSA: hda/realtek - Remove the last static quirks for ALC882")
>>
>> to your commit explanation. Not sure, since this tag is not documented,
>> as far as I can see.
>
> I applied with fixes and cc-to-stable tags now.
>
> thanks,
>
> Takashi

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

* Re: [PATCH] ALSA: hda - Fix silent output on MacBook Air 1,1
  2014-01-25 10:17         ` Nicolo'
@ 2014-01-25 14:36           ` Adrien Vergé
  2014-01-25 14:47             ` Nicolo'
  0 siblings, 1 reply; 8+ messages in thread
From: Adrien Vergé @ 2014-01-25 14:36 UTC (permalink / raw)
  To: Nicolo'
  Cc: Takashi Iwai, Paul Bolle, Jaroslav Kysela, David Henningsson,
	Kailang Yang, Hui Wang, alsa-devel, linux-kernel@vger.kernel.org

2014-01-24 Paul Bolle <pebolle@tiscali.nl>:
> I see. Well, if your analysis is correct I think you're supposed to add
>      Fixes: 1a97b7f22774 ("ALSA: hda/realtek - Remove the last static quirks for ALC882")

Sorry for that. Thank you for correcting.

2014-01-25 Nicolo' <nicolopiazzalunga@gmail.com>:
> I can confirm this happens on my machine too: does anybody have a hint
> on why changing VREF on 0x18 mutes/unmutes speakers and hp, which are
> on 0x14 and 0x15 ?

Very strange indeed. However Nicolo', on my machine (with v3.13),
playing with pin 0x18 only mutes/unmutes speakers, not headphones.

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

* Re: [PATCH] ALSA: hda - Fix silent output on MacBook Air 1,1
  2014-01-25 14:36           ` Adrien Vergé
@ 2014-01-25 14:47             ` Nicolo'
  0 siblings, 0 replies; 8+ messages in thread
From: Nicolo' @ 2014-01-25 14:47 UTC (permalink / raw)
  To: Adrien Vergé
  Cc: Takashi Iwai, Paul Bolle, Jaroslav Kysela, David Henningsson,
	Kailang Yang, Hui Wang, alsa-devel, linux-kernel@vger.kernel.org

I stand corrected, also on mine (3.2) VREF on 0x18 mutes only speakers

On Sat, Jan 25, 2014 at 3:36 PM, Adrien Vergé <adrienverge@gmail.com> wrote:
> 2014-01-24 Paul Bolle <pebolle@tiscali.nl>:
>> I see. Well, if your analysis is correct I think you're supposed to add
>>      Fixes: 1a97b7f22774 ("ALSA: hda/realtek - Remove the last static quirks for ALC882")
>
> Sorry for that. Thank you for correcting.
>
> 2014-01-25 Nicolo' <nicolopiazzalunga@gmail.com>:
>> I can confirm this happens on my machine too: does anybody have a hint
>> on why changing VREF on 0x18 mutes/unmutes speakers and hp, which are
>> on 0x14 and 0x15 ?
>
> Very strange indeed. However Nicolo', on my machine (with v3.13),
> playing with pin 0x18 only mutes/unmutes speakers, not headphones.

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

end of thread, other threads:[~2014-01-25 14:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-24 19:56 [PATCH] ALSA: hda - Fix silent output on MacBook Air 1,1 Adrien Vergé
2014-01-24 20:14 ` Paul Bolle
2014-01-24 20:46   ` Adrien Vergé
2014-01-24 21:08     ` Paul Bolle
2014-01-25  8:18       ` Takashi Iwai
2014-01-25 10:17         ` Nicolo'
2014-01-25 14:36           ` Adrien Vergé
2014-01-25 14:47             ` Nicolo'

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