Patch "ALSA: hda - Apply MacBook fixups for CS4208 correctly" has been added to the 3.12-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ALSA: hda - Apply MacBook fixups for CS4208 correctly

to the 3.12-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     alsa-hda-apply-macbook-fixups-for-cs4208-correctly.patch
and it can be found in the queue-3.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 885845d78551be7bf8570f6283df8b7a7797c4d1 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@xxxxxxx>
Date: Fri, 8 Nov 2013 12:50:31 +0100
Subject: ALSA: hda - Apply MacBook fixups for CS4208 correctly

From: Takashi Iwai <tiwai@xxxxxxx>

commit 885845d78551be7bf8570f6283df8b7a7797c4d1 upstream.

The commit [8fe7b65ab465: ALSA: hda - Apply GPIO setup for MacBooks
with CS4208] added a fixup entry matching with the vendor id 0x106b.
This broke the fixups for previous MBA6,1 and 6,2, since the PCI SSID
vendor id matches before evaluating the codec SSIDs.

We had a similar issue on Mac with Sigmatel codecs, and solve this
problem again similarly, by introducing a skeleton entry matching with
the all MacBooks, then remap to the right one.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=64401
Fixes: 8fe7b65ab465 ('ALSA: hda - Apply GPIO setup for MacBooks with CS4208')
Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 sound/pci/hda/patch_cirrus.c |   27 +++++++++++++++++++++++++--
 1 file changed, 25 insertions(+), 2 deletions(-)

--- a/sound/pci/hda/patch_cirrus.c
+++ b/sound/pci/hda/patch_cirrus.c
@@ -597,6 +597,7 @@ static int patch_cs420x(struct hda_codec
  * Its layout is no longer compatible with CS4206/CS4207
  */
 enum {
+	CS4208_MAC_AUTO,
 	CS4208_MBA6,
 	CS4208_GPIO0,
 };
@@ -608,10 +609,14 @@ static const struct hda_model_fixup cs42
 };
 
 static const struct snd_pci_quirk cs4208_fixup_tbl[] = {
-	/* codec SSID */
+	SND_PCI_QUIRK_VENDOR(0x106b, "Apple", CS4208_MAC_AUTO),
+	{} /* terminator */
+};
+
+/* codec SSID matching */
+static const struct snd_pci_quirk cs4208_mac_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x106b, 0x7100, "MacBookAir 6,1", CS4208_MBA6),
 	SND_PCI_QUIRK(0x106b, 0x7200, "MacBookAir 6,2", CS4208_MBA6),
-	SND_PCI_QUIRK_VENDOR(0x106b, "Apple", CS4208_GPIO0),
 	{} /* terminator */
 };
 
@@ -627,6 +632,20 @@ static void cs4208_fixup_gpio0(struct hd
 	}
 }
 
+static const struct hda_fixup cs4208_fixups[];
+
+/* remap the fixup from codec SSID and apply it */
+static void cs4208_fixup_mac(struct hda_codec *codec,
+			     const struct hda_fixup *fix, int action)
+{
+	if (action != HDA_FIXUP_ACT_PRE_PROBE)
+		return;
+	snd_hda_pick_fixup(codec, NULL, cs4208_mac_fixup_tbl, cs4208_fixups);
+	if (codec->fixup_id < 0 || codec->fixup_id == CS4208_MAC_AUTO)
+		codec->fixup_id = CS4208_GPIO0; /* default fixup */
+	snd_hda_apply_fixup(codec, action);
+}
+
 static const struct hda_fixup cs4208_fixups[] = {
 	[CS4208_MBA6] = {
 		.type = HDA_FIXUP_PINS,
@@ -638,6 +657,10 @@ static const struct hda_fixup cs4208_fix
 		.type = HDA_FIXUP_FUNC,
 		.v.func = cs4208_fixup_gpio0,
 	},
+	[CS4208_MAC_AUTO] = {
+		.type = HDA_FIXUP_FUNC,
+		.v.func = cs4208_fixup_mac,
+	},
 };
 
 /* correct the 0dB offset of input pins */


Patches currently in stable-queue which might be from tiwai@xxxxxxx are

queue-3.12/alsa-hda-check-keep_eapd_on-before-inv_eapd.patch
queue-3.12/alsa-hda-don-t-clear-the-power-state-at-snd_hda_codec_reset.patch
queue-3.12/alsa-hda-add-support-for-cx20952.patch
queue-3.12/alsa-hda-enable-spdif-for-acer-travelmate-6293.patch
queue-3.12/alsa-hda-fix-the-headphone-jack-detection-on-sony-vaio-tx.patch
queue-3.12/alsa-hda-provide-missing-pin-configs-for-vaio-with-alc260.patch
queue-3.12/alsa-compress-fix-drain-calls-blocking-other-compress-functions.patch
queue-3.12/alsa-hda-introduce-the-bitmask-for-excluding-output-volume.patch
queue-3.12/alsa-hda-apply-gpio-setup-for-macbooks-with-cs4208.patch
queue-3.12/thinkpad_acpi-fix-build-error-when-config_snd_max_cards-32.patch
queue-3.12/alsa-hda-force-buffer-alignment-for-haswell-hdmi-controllers.patch
queue-3.12/alsa-hda-apply-macbook-fixups-for-cs4208-correctly.patch
queue-3.12/alsa-compress-fix-drain-calls-blocking-other-compress-functions-v6.patch
queue-3.12/alsa-hda-add-pincfg-fixup-for-asus-w5a.patch
queue-3.12/alsa-hda-add-support-of-alc255-codecs.patch
queue-3.12/alsa-6fire-fix-probe-of-multiple-cards.patch
queue-3.12/alsa-hda-make-sure-mute-leds-stay-on-during-runtime-suspend-realtek.patch
queue-3.12/alsa-msnd-avoid-duplicated-driver-name.patch
queue-3.12/alsa-hda-fix-line-out-automute-on-realtek-multifunction-jacks.patch
queue-3.12/alsa-pcsp-fix-the-order-of-input-device-unregistration.patch
queue-3.12/alsa-hda-add-headset-quirk-for-dell-inspiron-3135.patch
queue-3.12/alsa-hda-don-t-turn-off-eapd-for-headphone-on-lenovo-n100.patch
queue-3.12/alsa-hda-fix-unbalanced-runtime-pm-notification-at-resume.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]