From: Greg Kroah-Hartman Date: Tue, 26 Nov 2013 19:47:30 +0000 (-0800) Subject: 3.12-stable patches X-Git-Tag: v3.11.10~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3426556cb1a3cc9b36b7a326b9b380f47d3decde;p=thirdparty%2Fkernel%2Fstable-queue.git 3.12-stable patches added patches: alsa-6fire-fix-probe-of-multiple-cards.patch alsa-compress-fix-drain-calls-blocking-other-compress-functions.patch alsa-compress-fix-drain-calls-blocking-other-compress-functions-v6.patch alsa-hda-add-headset-quirk-for-dell-inspiron-3135.patch alsa-hda-add-pincfg-fixup-for-asus-w5a.patch alsa-hda-add-support-for-cx20952.patch alsa-hda-add-support-of-alc255-codecs.patch alsa-hda-apply-gpio-setup-for-macbooks-with-cs4208.patch alsa-hda-apply-macbook-fixups-for-cs4208-correctly.patch alsa-hda-check-keep_eapd_on-before-inv_eapd.patch alsa-hda-don-t-clear-the-power-state-at-snd_hda_codec_reset.patch alsa-hda-don-t-turn-off-eapd-for-headphone-on-lenovo-n100.patch alsa-hda-enable-spdif-for-acer-travelmate-6293.patch alsa-hda-fix-line-out-automute-on-realtek-multifunction-jacks.patch alsa-hda-fix-the-headphone-jack-detection-on-sony-vaio-tx.patch alsa-hda-fix-unbalanced-runtime-pm-notification-at-resume.patch alsa-hda-force-buffer-alignment-for-haswell-hdmi-controllers.patch alsa-hda-introduce-the-bitmask-for-excluding-output-volume.patch alsa-hda-make-sure-mute-leds-stay-on-during-runtime-suspend-realtek.patch alsa-hda-provide-missing-pin-configs-for-vaio-with-alc260.patch alsa-msnd-avoid-duplicated-driver-name.patch alsa-pcsp-fix-the-order-of-input-device-unregistration.patch --- diff --git a/queue-3.12/alsa-6fire-fix-probe-of-multiple-cards.patch b/queue-3.12/alsa-6fire-fix-probe-of-multiple-cards.patch new file mode 100644 index 00000000000..9821019c08e --- /dev/null +++ b/queue-3.12/alsa-6fire-fix-probe-of-multiple-cards.patch @@ -0,0 +1,33 @@ +From 9b389a8a022110b4bc055a19b888283544d9eba6 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Mon, 28 Oct 2013 11:24:23 +0100 +Subject: ALSA: 6fire: Fix probe of multiple cards + +From: Takashi Iwai + +commit 9b389a8a022110b4bc055a19b888283544d9eba6 upstream. + +The probe code of snd-usb-6fire driver overrides the devices[] pointer +wrongly without checking whether it's already occupied or not. This +would screw up the device disconnection later. + +Spotted by coverity CID 141423. + +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/usb/6fire/chip.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/usb/6fire/chip.c ++++ b/sound/usb/6fire/chip.c +@@ -101,7 +101,7 @@ static int usb6fire_chip_probe(struct us + usb_set_intfdata(intf, chips[i]); + mutex_unlock(®ister_mutex); + return 0; +- } else if (regidx < 0) ++ } else if (!devices[i] && regidx < 0) + regidx = i; + } + if (regidx < 0) { diff --git a/queue-3.12/alsa-compress-fix-drain-calls-blocking-other-compress-functions-v6.patch b/queue-3.12/alsa-compress-fix-drain-calls-blocking-other-compress-functions-v6.patch new file mode 100644 index 00000000000..6dc56a55f56 --- /dev/null +++ b/queue-3.12/alsa-compress-fix-drain-calls-blocking-other-compress-functions-v6.patch @@ -0,0 +1,156 @@ +From f44f2a5417b2968a8724b352cc0b2545a6bcb1f4 Mon Sep 17 00:00:00 2001 +From: Vinod Koul +Date: Thu, 7 Nov 2013 10:08:22 +0100 +Subject: ALSA: compress: fix drain calls blocking other compress functions (v6) + +From: Vinod Koul + +commit f44f2a5417b2968a8724b352cc0b2545a6bcb1f4 upstream. + +The drain and drain_notify callback were blocked by low level driver +until the draining was complete. Due to this being invoked with big +fat mutex held, others ops like reading timestamp, calling pause, drop +were blocked. + +So to fix this we add a new snd_compr_drain_notify() API. This would +be required to be invoked by low level driver when drain or partial +drain has been completed by the DSP. Thus we make the drain and +partial_drain callback as non blocking and driver returns immediately +after notifying DSP. The waiting is done while releasing the lock so +that other ops can go ahead. + +[ The commit 917f4b5cba78 was wrongly applied from the preliminary + patch. This commit corrects to the final version. + Sorry for inconvenience! -- tiwai ] + +Signed-off-by: Vinod Koul +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + include/sound/compress_driver.h | 11 ++++------- + sound/core/compress_offload.c | 31 +++++++++++++++++++------------ + 2 files changed, 23 insertions(+), 19 deletions(-) + +--- a/include/sound/compress_driver.h ++++ b/include/sound/compress_driver.h +@@ -48,8 +48,6 @@ struct snd_compr_ops; + * the ring buffer + * @total_bytes_transferred: cumulative bytes transferred by offload DSP + * @sleep: poll sleep +- * @wait: drain wait queue +- * @drain_wake: condition for drain wake + */ + struct snd_compr_runtime { + snd_pcm_state_t state; +@@ -61,8 +59,6 @@ struct snd_compr_runtime { + u64 total_bytes_available; + u64 total_bytes_transferred; + wait_queue_head_t sleep; +- wait_queue_head_t wait; +- unsigned int drain_wake; + void *private_data; + }; + +@@ -177,10 +173,11 @@ static inline void snd_compr_fragment_el + + static inline void snd_compr_drain_notify(struct snd_compr_stream *stream) + { +- snd_BUG_ON(!stream); ++ if (snd_BUG_ON(!stream)) ++ return; + +- stream->runtime->drain_wake = 1; +- wake_up(&stream->runtime->wait); ++ stream->runtime->state = SNDRV_PCM_STATE_SETUP; ++ wake_up(&stream->runtime->sleep); + } + + #endif +--- a/sound/core/compress_offload.c ++++ b/sound/core/compress_offload.c +@@ -123,7 +123,6 @@ static int snd_compr_open(struct inode * + } + runtime->state = SNDRV_PCM_STATE_OPEN; + init_waitqueue_head(&runtime->sleep); +- init_waitqueue_head(&runtime->wait); + data->stream.runtime = runtime; + f->private_data = (void *)data; + mutex_lock(&compr->lock); +@@ -681,8 +680,6 @@ static int snd_compr_stop(struct snd_com + return -EPERM; + retval = stream->ops->trigger(stream, SNDRV_PCM_TRIGGER_STOP); + if (!retval) { +- stream->runtime->state = SNDRV_PCM_STATE_SETUP; +- wake_up(&stream->runtime->sleep); + snd_compr_drain_notify(stream); + stream->runtime->total_bytes_available = 0; + stream->runtime->total_bytes_transferred = 0; +@@ -692,6 +689,8 @@ static int snd_compr_stop(struct snd_com + + static int snd_compress_wait_for_drain(struct snd_compr_stream *stream) + { ++ int ret; ++ + /* + * We are called with lock held. So drop the lock while we wait for + * drain complete notfication from the driver +@@ -703,12 +702,24 @@ static int snd_compress_wait_for_drain(s + stream->runtime->state = SNDRV_PCM_STATE_DRAINING; + mutex_unlock(&stream->device->lock); + +- wait_event(stream->runtime->wait, stream->runtime->drain_wake); ++ /* we wait for drain to complete here, drain can return when ++ * interruption occurred, wait returned error or success. ++ * For the first two cases we don't do anything different here and ++ * return after waking up ++ */ ++ ++ ret = wait_event_interruptible(stream->runtime->sleep, ++ (stream->runtime->state != SNDRV_PCM_STATE_DRAINING)); ++ if (ret == -ERESTARTSYS) ++ pr_debug("wait aborted by a signal"); ++ else if (ret) ++ pr_debug("wait for drain failed with %d\n", ret); ++ + + wake_up(&stream->runtime->sleep); + mutex_lock(&stream->device->lock); + +- return 0; ++ return ret; + } + + static int snd_compr_drain(struct snd_compr_stream *stream) +@@ -719,17 +730,14 @@ static int snd_compr_drain(struct snd_co + stream->runtime->state == SNDRV_PCM_STATE_SETUP) + return -EPERM; + +- stream->runtime->drain_wake = 0; + retval = stream->ops->trigger(stream, SND_COMPR_TRIGGER_DRAIN); + if (retval) { +- pr_err("SND_COMPR_TRIGGER_DRAIN failed %d\n", retval); ++ pr_debug("SND_COMPR_TRIGGER_DRAIN failed %d\n", retval); + wake_up(&stream->runtime->sleep); + return retval; + } + +- retval = snd_compress_wait_for_drain(stream); +- stream->runtime->state = SNDRV_PCM_STATE_SETUP; +- return retval; ++ return snd_compress_wait_for_drain(stream); + } + + static int snd_compr_next_track(struct snd_compr_stream *stream) +@@ -764,10 +772,9 @@ static int snd_compr_partial_drain(struc + if (stream->next_track == false) + return -EPERM; + +- stream->runtime->drain_wake = 0; + retval = stream->ops->trigger(stream, SND_COMPR_TRIGGER_PARTIAL_DRAIN); + if (retval) { +- pr_err("Partial drain returned failure\n"); ++ pr_debug("Partial drain returned failure\n"); + wake_up(&stream->runtime->sleep); + return retval; + } diff --git a/queue-3.12/alsa-compress-fix-drain-calls-blocking-other-compress-functions.patch b/queue-3.12/alsa-compress-fix-drain-calls-blocking-other-compress-functions.patch new file mode 100644 index 00000000000..6b65d4a34f3 --- /dev/null +++ b/queue-3.12/alsa-compress-fix-drain-calls-blocking-other-compress-functions.patch @@ -0,0 +1,144 @@ +From 917f4b5cba78980a527098a910d94139d3e82c8d Mon Sep 17 00:00:00 2001 +From: Vinod Koul +Date: Thu, 24 Oct 2013 16:37:31 +0530 +Subject: ALSA: compress: fix drain calls blocking other compress functions + +From: Vinod Koul + +commit 917f4b5cba78980a527098a910d94139d3e82c8d upstream. + +The drain and drain_notify callback were blocked by low level driver untill the +draining was complete. Due to this being invoked with big fat mutex held, others +ops like reading timestamp, calling pause, drop were blocked. + +So to fix this we add a new snd_compr_drain_notify() API. This would be required +to be invoked by low level driver when drain or partial drain has been completed +by the DSP. Thus we make the drain and partial_drain callback as non blocking +and driver returns immediately after notifying DSP. +The waiting is done while relasing the lock so that other ops can go ahead. + +Signed-off-by: Vinod Koul +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + include/sound/compress_driver.h | 12 +++++++++++ + sound/core/compress_offload.c | 41 +++++++++++++++++++++++++++++++++++++--- + 2 files changed, 50 insertions(+), 3 deletions(-) + +--- a/include/sound/compress_driver.h ++++ b/include/sound/compress_driver.h +@@ -48,6 +48,8 @@ struct snd_compr_ops; + * the ring buffer + * @total_bytes_transferred: cumulative bytes transferred by offload DSP + * @sleep: poll sleep ++ * @wait: drain wait queue ++ * @drain_wake: condition for drain wake + */ + struct snd_compr_runtime { + snd_pcm_state_t state; +@@ -59,6 +61,8 @@ struct snd_compr_runtime { + u64 total_bytes_available; + u64 total_bytes_transferred; + wait_queue_head_t sleep; ++ wait_queue_head_t wait; ++ unsigned int drain_wake; + void *private_data; + }; + +@@ -171,4 +175,12 @@ static inline void snd_compr_fragment_el + wake_up(&stream->runtime->sleep); + } + ++static inline void snd_compr_drain_notify(struct snd_compr_stream *stream) ++{ ++ snd_BUG_ON(!stream); ++ ++ stream->runtime->drain_wake = 1; ++ wake_up(&stream->runtime->wait); ++} ++ + #endif +--- a/sound/core/compress_offload.c ++++ b/sound/core/compress_offload.c +@@ -123,6 +123,7 @@ static int snd_compr_open(struct inode * + } + runtime->state = SNDRV_PCM_STATE_OPEN; + init_waitqueue_head(&runtime->sleep); ++ init_waitqueue_head(&runtime->wait); + data->stream.runtime = runtime; + f->private_data = (void *)data; + mutex_lock(&compr->lock); +@@ -682,12 +683,34 @@ static int snd_compr_stop(struct snd_com + if (!retval) { + stream->runtime->state = SNDRV_PCM_STATE_SETUP; + wake_up(&stream->runtime->sleep); ++ snd_compr_drain_notify(stream); + stream->runtime->total_bytes_available = 0; + stream->runtime->total_bytes_transferred = 0; + } + return retval; + } + ++static int snd_compress_wait_for_drain(struct snd_compr_stream *stream) ++{ ++ /* ++ * We are called with lock held. So drop the lock while we wait for ++ * drain complete notfication from the driver ++ * ++ * It is expected that driver will notify the drain completion and then ++ * stream will be moved to SETUP state, even if draining resulted in an ++ * error. We can trigger next track after this. ++ */ ++ stream->runtime->state = SNDRV_PCM_STATE_DRAINING; ++ mutex_unlock(&stream->device->lock); ++ ++ wait_event(stream->runtime->wait, stream->runtime->drain_wake); ++ ++ wake_up(&stream->runtime->sleep); ++ mutex_lock(&stream->device->lock); ++ ++ return 0; ++} ++ + static int snd_compr_drain(struct snd_compr_stream *stream) + { + int retval; +@@ -695,11 +718,17 @@ static int snd_compr_drain(struct snd_co + if (stream->runtime->state == SNDRV_PCM_STATE_PREPARED || + stream->runtime->state == SNDRV_PCM_STATE_SETUP) + return -EPERM; ++ ++ stream->runtime->drain_wake = 0; + retval = stream->ops->trigger(stream, SND_COMPR_TRIGGER_DRAIN); +- if (!retval) { +- stream->runtime->state = SNDRV_PCM_STATE_DRAINING; ++ if (retval) { ++ pr_err("SND_COMPR_TRIGGER_DRAIN failed %d\n", retval); + wake_up(&stream->runtime->sleep); ++ return retval; + } ++ ++ retval = snd_compress_wait_for_drain(stream); ++ stream->runtime->state = SNDRV_PCM_STATE_SETUP; + return retval; + } + +@@ -735,10 +764,16 @@ static int snd_compr_partial_drain(struc + if (stream->next_track == false) + return -EPERM; + ++ stream->runtime->drain_wake = 0; + retval = stream->ops->trigger(stream, SND_COMPR_TRIGGER_PARTIAL_DRAIN); ++ if (retval) { ++ pr_err("Partial drain returned failure\n"); ++ wake_up(&stream->runtime->sleep); ++ return retval; ++ } + + stream->next_track = false; +- return retval; ++ return snd_compress_wait_for_drain(stream); + } + + static long snd_compr_ioctl(struct file *f, unsigned int cmd, unsigned long arg) diff --git a/queue-3.12/alsa-hda-add-headset-quirk-for-dell-inspiron-3135.patch b/queue-3.12/alsa-hda-add-headset-quirk-for-dell-inspiron-3135.patch new file mode 100644 index 00000000000..18d33a6ed1b --- /dev/null +++ b/queue-3.12/alsa-hda-add-headset-quirk-for-dell-inspiron-3135.patch @@ -0,0 +1,28 @@ +From b8362e70cbbb397db50939bc4c7c78dc3246c3eb Mon Sep 17 00:00:00 2001 +From: David Henningsson +Date: Thu, 21 Nov 2013 14:12:59 +0100 +Subject: ALSA: hda - Add headset quirk for Dell Inspiron 3135 + +From: David Henningsson + +commit b8362e70cbbb397db50939bc4c7c78dc3246c3eb upstream. + +BugLink: https://bugs.launchpad.net/bugs/1253636 +Signed-off-by: David Henningsson +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_realtek.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -3951,6 +3951,7 @@ static const struct snd_pci_quirk alc269 + SND_PCI_QUIRK(0x1028, 0x0608, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1028, 0x0609, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1028, 0x0613, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1028, 0x0614, "Dell Inspiron 3135", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_MONO_SPEAKERS), + SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1028, 0x15cd, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), diff --git a/queue-3.12/alsa-hda-add-pincfg-fixup-for-asus-w5a.patch b/queue-3.12/alsa-hda-add-pincfg-fixup-for-asus-w5a.patch new file mode 100644 index 00000000000..230cf09b612 --- /dev/null +++ b/queue-3.12/alsa-hda-add-pincfg-fixup-for-asus-w5a.patch @@ -0,0 +1,65 @@ +From 487a588d09db0d6508261867df208d8bdc718251 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Thu, 7 Nov 2013 07:29:30 +0100 +Subject: ALSA: hda - Add pincfg fixup for ASUS W5A + +From: Takashi Iwai + +commit 487a588d09db0d6508261867df208d8bdc718251 upstream. + +BIOS on ASUS W5A laptop with ALC880 codec doesn't provide any pin +configurations, so we have to set up all pins manually. + +Reported-and-tested-by: nb +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_realtek.c | 22 ++++++++++++++++++++++ + 1 file changed, 22 insertions(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -1043,6 +1043,7 @@ enum { + ALC880_FIXUP_UNIWILL, + ALC880_FIXUP_UNIWILL_DIG, + ALC880_FIXUP_Z71V, ++ ALC880_FIXUP_ASUS_W5A, + ALC880_FIXUP_3ST_BASE, + ALC880_FIXUP_3ST, + ALC880_FIXUP_3ST_DIG, +@@ -1213,6 +1214,26 @@ static const struct hda_fixup alc880_fix + { } + } + }, ++ [ALC880_FIXUP_ASUS_W5A] = { ++ .type = HDA_FIXUP_PINS, ++ .v.pins = (const struct hda_pintbl[]) { ++ /* set up the whole pins as BIOS is utterly broken */ ++ { 0x14, 0x0121411f }, /* HP */ ++ { 0x15, 0x411111f0 }, /* N/A */ ++ { 0x16, 0x411111f0 }, /* N/A */ ++ { 0x17, 0x411111f0 }, /* N/A */ ++ { 0x18, 0x90a60160 }, /* mic */ ++ { 0x19, 0x411111f0 }, /* N/A */ ++ { 0x1a, 0x411111f0 }, /* N/A */ ++ { 0x1b, 0x411111f0 }, /* N/A */ ++ { 0x1c, 0x411111f0 }, /* N/A */ ++ { 0x1d, 0x411111f0 }, /* N/A */ ++ { 0x1e, 0xb743111e }, /* SPDIF out */ ++ { } ++ }, ++ .chained = true, ++ .chain_id = ALC880_FIXUP_GPIO1, ++ }, + [ALC880_FIXUP_3ST_BASE] = { + .type = HDA_FIXUP_PINS, + .v.pins = (const struct hda_pintbl[]) { +@@ -1334,6 +1355,7 @@ static const struct hda_fixup alc880_fix + + static const struct snd_pci_quirk alc880_fixup_tbl[] = { + SND_PCI_QUIRK(0x1019, 0x0f69, "Coeus G610P", ALC880_FIXUP_W810), ++ SND_PCI_QUIRK(0x1043, 0x10c3, "ASUS W5A", ALC880_FIXUP_ASUS_W5A), + SND_PCI_QUIRK(0x1043, 0x1964, "ASUS Z71V", ALC880_FIXUP_Z71V), + SND_PCI_QUIRK_VENDOR(0x1043, "ASUS", ALC880_FIXUP_GPIO1), + SND_PCI_QUIRK(0x1558, 0x5401, "Clevo GPIO2", ALC880_FIXUP_GPIO2), diff --git a/queue-3.12/alsa-hda-add-support-for-cx20952.patch b/queue-3.12/alsa-hda-add-support-for-cx20952.patch new file mode 100644 index 00000000000..a834b06d3be --- /dev/null +++ b/queue-3.12/alsa-hda-add-support-for-cx20952.patch @@ -0,0 +1,38 @@ +From 8f42d7698751a45cd9f7134a5da49bc5b6206179 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Wed, 6 Nov 2013 18:47:42 +0100 +Subject: ALSA: hda - Add support for CX20952 + +From: Takashi Iwai + +commit 8f42d7698751a45cd9f7134a5da49bc5b6206179 upstream. + +It's a superset of the existing CX2075x codecs, so we can reuse the +existing parser code. + +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_conexant.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/sound/pci/hda/patch_conexant.c ++++ b/sound/pci/hda/patch_conexant.c +@@ -3568,6 +3568,8 @@ static const struct hda_codec_preset snd + .patch = patch_conexant_auto }, + { .id = 0x14f15115, .name = "CX20757", + .patch = patch_conexant_auto }, ++ { .id = 0x14f151d7, .name = "CX20952", ++ .patch = patch_conexant_auto }, + {} /* terminator */ + }; + +@@ -3594,6 +3596,7 @@ MODULE_ALIAS("snd-hda-codec-id:14f15111" + MODULE_ALIAS("snd-hda-codec-id:14f15113"); + MODULE_ALIAS("snd-hda-codec-id:14f15114"); + MODULE_ALIAS("snd-hda-codec-id:14f15115"); ++MODULE_ALIAS("snd-hda-codec-id:14f151d7"); + + MODULE_LICENSE("GPL"); + MODULE_DESCRIPTION("Conexant HD-audio codec"); diff --git a/queue-3.12/alsa-hda-add-support-of-alc255-codecs.patch b/queue-3.12/alsa-hda-add-support-of-alc255-codecs.patch new file mode 100644 index 00000000000..e533c6e2802 --- /dev/null +++ b/queue-3.12/alsa-hda-add-support-of-alc255-codecs.patch @@ -0,0 +1,55 @@ +From 1d04c9de5c76df113e4af7120feb53c628b5efcc Mon Sep 17 00:00:00 2001 +From: Kailang Yang +Date: Thu, 24 Oct 2013 11:35:18 +0200 +Subject: ALSA: hda - Add support of ALC255 codecs + +From: Kailang Yang + +commit 1d04c9de5c76df113e4af7120feb53c628b5efcc upstream. + +It's just another variant of ALC269 & co. + +Signed-off-by: Kailang Yang +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_realtek.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -2540,6 +2540,7 @@ enum { + ALC269_TYPE_ALC283, + ALC269_TYPE_ALC284, + ALC269_TYPE_ALC286, ++ ALC269_TYPE_ALC255, + }; + + /* +@@ -2565,6 +2566,7 @@ static int alc269_parse_auto_config(stru + case ALC269_TYPE_ALC282: + case ALC269_TYPE_ALC283: + case ALC269_TYPE_ALC286: ++ case ALC269_TYPE_ALC255: + ssids = alc269_ssids; + break; + default: +@@ -4128,6 +4130,9 @@ static int patch_alc269(struct hda_codec + case 0x10ec0286: + spec->codec_variant = ALC269_TYPE_ALC286; + break; ++ case 0x10ec0255: ++ spec->codec_variant = ALC269_TYPE_ALC255; ++ break; + } + + if (snd_hda_codec_read(codec, 0x51, 0, AC_VERB_PARAMETERS, 0) == 0x10ec5505) { +@@ -4842,6 +4847,7 @@ static int patch_alc680(struct hda_codec + static const struct hda_codec_preset snd_hda_preset_realtek[] = { + { .id = 0x10ec0221, .name = "ALC221", .patch = patch_alc269 }, + { .id = 0x10ec0233, .name = "ALC233", .patch = patch_alc269 }, ++ { .id = 0x10ec0255, .name = "ALC255", .patch = patch_alc269 }, + { .id = 0x10ec0260, .name = "ALC260", .patch = patch_alc260 }, + { .id = 0x10ec0262, .name = "ALC262", .patch = patch_alc262 }, + { .id = 0x10ec0267, .name = "ALC267", .patch = patch_alc268 }, diff --git a/queue-3.12/alsa-hda-apply-gpio-setup-for-macbooks-with-cs4208.patch b/queue-3.12/alsa-hda-apply-gpio-setup-for-macbooks-with-cs4208.patch new file mode 100644 index 00000000000..0acdcffd06d --- /dev/null +++ b/queue-3.12/alsa-hda-apply-gpio-setup-for-macbooks-with-cs4208.patch @@ -0,0 +1,30 @@ +From 8fe7b65ab4656e5db466a7d98b1fd48ff83b2c64 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Tue, 5 Nov 2013 10:31:07 +0100 +Subject: ALSA: hda - Apply GPIO setup for MacBooks with CS4208 + +From: Takashi Iwai + +commit 8fe7b65ab4656e5db466a7d98b1fd48ff83b2c64 upstream. + +Apply the existing GPIO0 fixup as default for MacBooks with CS4208 +codec. + +Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=64401 +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_cirrus.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/sound/pci/hda/patch_cirrus.c ++++ b/sound/pci/hda/patch_cirrus.c +@@ -611,6 +611,7 @@ static const struct snd_pci_quirk cs4208 + /* codec SSID */ + 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 */ + }; + diff --git a/queue-3.12/alsa-hda-apply-macbook-fixups-for-cs4208-correctly.patch b/queue-3.12/alsa-hda-apply-macbook-fixups-for-cs4208-correctly.patch new file mode 100644 index 00000000000..4ca2477a33d --- /dev/null +++ b/queue-3.12/alsa-hda-apply-macbook-fixups-for-cs4208-correctly.patch @@ -0,0 +1,86 @@ +From 885845d78551be7bf8570f6283df8b7a7797c4d1 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Fri, 8 Nov 2013 12:50:31 +0100 +Subject: ALSA: hda - Apply MacBook fixups for CS4208 correctly + +From: Takashi Iwai + +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 +Signed-off-by: Greg Kroah-Hartman + +--- + 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 */ diff --git a/queue-3.12/alsa-hda-check-keep_eapd_on-before-inv_eapd.patch b/queue-3.12/alsa-hda-check-keep_eapd_on-before-inv_eapd.patch new file mode 100644 index 00000000000..84fb00ca704 --- /dev/null +++ b/queue-3.12/alsa-hda-check-keep_eapd_on-before-inv_eapd.patch @@ -0,0 +1,38 @@ +From 468ac413045af1e0e4d1272291bed6878f248a69 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Tue, 12 Nov 2013 11:36:00 +0100 +Subject: ALSA: hda - Check keep_eapd_on before inv_eapd + +From: Takashi Iwai + +commit 468ac413045af1e0e4d1272291bed6878f248a69 upstream. + +We don't change the EAPD bit in set_pin_eapd() if keep_eapd_on flag is +set by the codec driver and enable is false. But, we also apply the +flipping of enable value according to inv_eapd flag in the same +function, and this confused the former check, handled as if it's +turned ON. The inverted EAPD check must be applied after keep_eapd_on +check, instead. + +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/hda_generic.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/sound/pci/hda/hda_generic.c ++++ b/sound/pci/hda/hda_generic.c +@@ -796,10 +796,10 @@ static void set_pin_eapd(struct hda_code + if (spec->own_eapd_ctl || + !(snd_hda_query_pin_caps(codec, pin) & AC_PINCAP_EAPD)) + return; +- if (codec->inv_eapd) +- enable = !enable; + if (spec->keep_eapd_on && !enable) + return; ++ if (codec->inv_eapd) ++ enable = !enable; + snd_hda_codec_update_cache(codec, pin, 0, + AC_VERB_SET_EAPD_BTLENABLE, + enable ? 0x02 : 0x00); diff --git a/queue-3.12/alsa-hda-don-t-clear-the-power-state-at-snd_hda_codec_reset.patch b/queue-3.12/alsa-hda-don-t-clear-the-power-state-at-snd_hda_codec_reset.patch new file mode 100644 index 00000000000..43cf76e87be --- /dev/null +++ b/queue-3.12/alsa-hda-don-t-clear-the-power-state-at-snd_hda_codec_reset.patch @@ -0,0 +1,36 @@ +From d183b4fc463489b6bbe05c99afa0257a6fe578eb Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Wed, 13 Nov 2013 16:58:10 +0100 +Subject: ALSA: hda - Don't clear the power state at snd_hda_codec_reset() + +From: Takashi Iwai + +commit d183b4fc463489b6bbe05c99afa0257a6fe578eb upstream. + +snd_hda_codec_reset() is called either in resetting the whole setup at +error paths or hwdep clear/reconfig sysfs triggers. But all of these +don't assume that the power has to be off, rather they want to keep +the power state unchanged (e.g. reconfig_codec() calls the power +up/down by itself). Thus, unconditionally clearing the power state in +snd_hda_codec_reset() leads to the inconsistency, confuses the further +operation. This patch gets rid of the lines doing that bad thing. + +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/hda_codec.c | 3 --- + 1 file changed, 3 deletions(-) + +--- a/sound/pci/hda/hda_codec.c ++++ b/sound/pci/hda/hda_codec.c +@@ -2579,9 +2579,6 @@ int snd_hda_codec_reset(struct hda_codec + cancel_delayed_work_sync(&codec->jackpoll_work); + #ifdef CONFIG_PM + cancel_delayed_work_sync(&codec->power_work); +- codec->power_on = 0; +- codec->power_transition = 0; +- codec->power_jiffies = jiffies; + flush_workqueue(bus->workq); + #endif + snd_hda_ctls_clear(codec); diff --git a/queue-3.12/alsa-hda-don-t-turn-off-eapd-for-headphone-on-lenovo-n100.patch b/queue-3.12/alsa-hda-don-t-turn-off-eapd-for-headphone-on-lenovo-n100.patch new file mode 100644 index 00000000000..83b04073f4f --- /dev/null +++ b/queue-3.12/alsa-hda-don-t-turn-off-eapd-for-headphone-on-lenovo-n100.patch @@ -0,0 +1,36 @@ +From 7a3e6107f94344e65c35bfe62de6c096a7b48965 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Wed, 13 Nov 2013 09:39:08 +0100 +Subject: ALSA: hda - Don't turn off EAPD for headphone on Lenovo N100 + +From: Takashi Iwai + +commit 7a3e6107f94344e65c35bfe62de6c096a7b48965 upstream. + +The only EAPD on AD1986A is on NID 0x1b where usually the speaker. +But this doesn't control only the speaker amp but may influence on all +outputs, e.g. Lenovo N100 laptop seems to have this issue. + +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_analog.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +--- a/sound/pci/hda/patch_analog.c ++++ b/sound/pci/hda/patch_analog.c +@@ -219,8 +219,12 @@ static int alloc_ad_spec(struct hda_code + static void ad_fixup_inv_jack_detect(struct hda_codec *codec, + const struct hda_fixup *fix, int action) + { +- if (action == HDA_FIXUP_ACT_PRE_PROBE) ++ struct ad198x_spec *spec = codec->spec; ++ ++ if (action == HDA_FIXUP_ACT_PRE_PROBE) { + codec->inv_jack_detect = 1; ++ spec->gen.keep_eapd_on = 1; ++ } + } + + enum { diff --git a/queue-3.12/alsa-hda-enable-spdif-for-acer-travelmate-6293.patch b/queue-3.12/alsa-hda-enable-spdif-for-acer-travelmate-6293.patch new file mode 100644 index 00000000000..eadf4683755 --- /dev/null +++ b/queue-3.12/alsa-hda-enable-spdif-for-acer-travelmate-6293.patch @@ -0,0 +1,52 @@ +From 24eff328f65c8ef352c90b6adb7c2f39eb94205d Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Mon, 4 Nov 2013 18:21:08 +0100 +Subject: ALSA: hda - Enable SPDIF for Acer TravelMate 6293 + +From: Takashi Iwai + +commit 24eff328f65c8ef352c90b6adb7c2f39eb94205d upstream. + +BIOS on Acer TravelMate 6293 doesn't set up the SPDIF output pin +correctly as default, so enable it via a fixup entry. + +Reported-and-tested-by: Hagen Heiduck +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_realtek.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -2388,6 +2388,7 @@ static const struct hda_verb alc268_beep + enum { + ALC268_FIXUP_INV_DMIC, + ALC268_FIXUP_HP_EAPD, ++ ALC268_FIXUP_SPDIF, + }; + + static const struct hda_fixup alc268_fixups[] = { +@@ -2402,6 +2403,13 @@ static const struct hda_fixup alc268_fix + {} + } + }, ++ [ALC268_FIXUP_SPDIF] = { ++ .type = HDA_FIXUP_PINS, ++ .v.pins = (const struct hda_pintbl[]) { ++ { 0x1e, 0x014b1180 }, /* enable SPDIF out */ ++ {} ++ } ++ }, + }; + + static const struct hda_model_fixup alc268_fixup_models[] = { +@@ -2411,6 +2419,7 @@ static const struct hda_model_fixup alc2 + }; + + static const struct snd_pci_quirk alc268_fixup_tbl[] = { ++ SND_PCI_QUIRK(0x1025, 0x0139, "Acer TravelMate 6293", ALC268_FIXUP_SPDIF), + SND_PCI_QUIRK(0x1025, 0x015b, "Acer AOA 150 (ZG5)", ALC268_FIXUP_INV_DMIC), + /* below is codec SSID since multiple Toshiba laptops have the + * same PCI SSID 1179:ff00 diff --git a/queue-3.12/alsa-hda-fix-line-out-automute-on-realtek-multifunction-jacks.patch b/queue-3.12/alsa-hda-fix-line-out-automute-on-realtek-multifunction-jacks.patch new file mode 100644 index 00000000000..481e96e45fa --- /dev/null +++ b/queue-3.12/alsa-hda-fix-line-out-automute-on-realtek-multifunction-jacks.patch @@ -0,0 +1,37 @@ +From 5959a6bc1124211a359525d209005abc07b0197b Mon Sep 17 00:00:00 2001 +From: David Henningsson +Date: Tue, 12 Nov 2013 11:10:57 +0100 +Subject: ALSA: hda - Fix Line Out automute on Realtek multifunction jacks + +From: David Henningsson + +commit 5959a6bc1124211a359525d209005abc07b0197b upstream. + +In case there is both a multifunction headset jack and a Line Out +jack, automuting was not working properly from the Line Out jack. +This patch fixes that issue. + +BugLink: https://bugs.launchpad.net/bugs/1250377 +Tested-by: Cyrus Lien +Signed-off-by: David Henningsson +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_realtek.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -3283,8 +3283,10 @@ static void alc_update_headset_mode(stru + else + new_headset_mode = ALC_HEADSET_MODE_HEADPHONE; + +- if (new_headset_mode == spec->current_headset_mode) ++ if (new_headset_mode == spec->current_headset_mode) { ++ snd_hda_gen_update_outputs(codec); + return; ++ } + + switch (new_headset_mode) { + case ALC_HEADSET_MODE_UNPLUGGED: diff --git a/queue-3.12/alsa-hda-fix-the-headphone-jack-detection-on-sony-vaio-tx.patch b/queue-3.12/alsa-hda-fix-the-headphone-jack-detection-on-sony-vaio-tx.patch new file mode 100644 index 00000000000..7b11815b149 --- /dev/null +++ b/queue-3.12/alsa-hda-fix-the-headphone-jack-detection-on-sony-vaio-tx.patch @@ -0,0 +1,28 @@ +From 0f5a5b8515472a0219768423226b58228001e3d5 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Thu, 21 Nov 2013 09:12:52 +0100 +Subject: ALSA: hda - Fix the headphone jack detection on Sony VAIO TX + +From: Takashi Iwai + +commit 0f5a5b8515472a0219768423226b58228001e3d5 upstream. + +BIOS sets MISC_NO_PRESENCE bit wrongly to the pin config on NID 0x0f. + +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_realtek.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -1649,6 +1649,7 @@ static const struct snd_pci_quirk alc260 + SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_FIXUP_GPIO1), + SND_PCI_QUIRK(0x103c, 0x280a, "HP dc5750", ALC260_FIXUP_HP_DC5750), + SND_PCI_QUIRK(0x103c, 0x30ba, "HP Presario B1900", ALC260_FIXUP_HP_B1900), ++ SND_PCI_QUIRK(0x104d, 0x81e2, "Sony VAIO TX", ALC260_FIXUP_HP_PIN_0F), + SND_PCI_QUIRK(0x10cf, 0x1326, "FSC LifeBook S7020", ALC260_FIXUP_FSC_S7020), + SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FIXUP_GPIO1), + SND_PCI_QUIRK(0x152d, 0x0729, "Quanta KN1", ALC260_FIXUP_KN1), diff --git a/queue-3.12/alsa-hda-fix-unbalanced-runtime-pm-notification-at-resume.patch b/queue-3.12/alsa-hda-fix-unbalanced-runtime-pm-notification-at-resume.patch new file mode 100644 index 00000000000..e6276efaf86 --- /dev/null +++ b/queue-3.12/alsa-hda-fix-unbalanced-runtime-pm-notification-at-resume.patch @@ -0,0 +1,42 @@ +From 0fc28fc030a85aa3d6d14e9e9fca0c8237c9ffb5 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Wed, 20 Nov 2013 12:15:07 +0100 +Subject: ALSA: hda - Fix unbalanced runtime PM notification at resume + +From: Takashi Iwai + +commit 0fc28fc030a85aa3d6d14e9e9fca0c8237c9ffb5 upstream. + +When a codec is resumed, it keeps the power on while the resuming +phase via hda_keep_power_on(), then turns down via +snd_hda_power_down(). At that point, snd_hda_power_down() notifies +the power down to the controller, and this may confuse the refcount if +the codec was already powered up before the resume. + +In the end result, the controller goes to runtime suspend even before +the codec is kicked off to the power save, and the communication +stalls happens. + +The fix is to add the power-up notification together with +hda_keep_power_on(), and clears the flag appropriately. + +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/hda_codec.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/sound/pci/hda/hda_codec.c ++++ b/sound/pci/hda/hda_codec.c +@@ -3988,6 +3988,10 @@ static void hda_call_codec_resume(struct + * in the resume / power-save sequence + */ + hda_keep_power_on(codec); ++ if (codec->pm_down_notified) { ++ codec->pm_down_notified = 0; ++ hda_call_pm_notify(codec->bus, true); ++ } + hda_set_power_state(codec, AC_PWRST_D0); + restore_shutup_pins(codec); + hda_exec_init_verbs(codec); diff --git a/queue-3.12/alsa-hda-force-buffer-alignment-for-haswell-hdmi-controllers.patch b/queue-3.12/alsa-hda-force-buffer-alignment-for-haswell-hdmi-controllers.patch new file mode 100644 index 00000000000..17373152979 --- /dev/null +++ b/queue-3.12/alsa-hda-force-buffer-alignment-for-haswell-hdmi-controllers.patch @@ -0,0 +1,58 @@ +From 33499a15c2f7addc81695778753c2338b960eff7 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Tue, 5 Nov 2013 17:34:46 +0100 +Subject: ALSA: hda - Force buffer alignment for Haswell HDMI controllers + +From: Takashi Iwai + +commit 33499a15c2f7addc81695778753c2338b960eff7 upstream. + +Haswell HDMI audio controllers seem to get stuck when unaligned buffer +size is used. Let's enable the buffer alignment for the corresponding +entries. + +Since AZX_DCAPS_INTEL_PCH contains AZX_DCAPS_BUFSIZE that disables the +buffer alignment forcibly, define AZX_DCAPS_INTEL_HASWELL and put the +necessary AZX_DCAPS bits there. + +Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=60769 +Reported-by: Alexander E. Patrakov +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/hda_intel.c | 14 ++++++++------ + 1 file changed, 8 insertions(+), 6 deletions(-) + +--- a/sound/pci/hda/hda_intel.c ++++ b/sound/pci/hda/hda_intel.c +@@ -612,6 +612,11 @@ enum { + #define AZX_DCAPS_INTEL_PCH \ + (AZX_DCAPS_INTEL_PCH_NOPM | AZX_DCAPS_PM_RUNTIME) + ++#define AZX_DCAPS_INTEL_HASWELL \ ++ (AZX_DCAPS_SCH_SNOOP | AZX_DCAPS_ALIGN_BUFSIZE | \ ++ AZX_DCAPS_COUNT_LPIB_DELAY | AZX_DCAPS_PM_RUNTIME | \ ++ AZX_DCAPS_I915_POWERWELL) ++ + /* quirks for ATI SB / AMD Hudson */ + #define AZX_DCAPS_PRESET_ATI_SB \ + (AZX_DCAPS_ATI_SNOOP | AZX_DCAPS_NO_TCSEL | \ +@@ -3987,14 +3992,11 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids) + .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, + /* Haswell */ + { PCI_DEVICE(0x8086, 0x0a0c), +- .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH | +- AZX_DCAPS_I915_POWERWELL }, ++ .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_HASWELL }, + { PCI_DEVICE(0x8086, 0x0c0c), +- .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH | +- AZX_DCAPS_I915_POWERWELL }, ++ .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_HASWELL }, + { PCI_DEVICE(0x8086, 0x0d0c), +- .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH | +- AZX_DCAPS_I915_POWERWELL }, ++ .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_HASWELL }, + /* 5 Series/3400 */ + { PCI_DEVICE(0x8086, 0x3b56), + .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_NOPM }, diff --git a/queue-3.12/alsa-hda-introduce-the-bitmask-for-excluding-output-volume.patch b/queue-3.12/alsa-hda-introduce-the-bitmask-for-excluding-output-volume.patch new file mode 100644 index 00000000000..c8601866240 --- /dev/null +++ b/queue-3.12/alsa-hda-introduce-the-bitmask-for-excluding-output-volume.patch @@ -0,0 +1,71 @@ +From a1114a8c681b0724d6ad905f53ff06aa756f5fb8 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Mon, 4 Nov 2013 16:32:01 +0100 +Subject: ALSA: hda - Introduce the bitmask for excluding output volume + +From: Takashi Iwai + +commit a1114a8c681b0724d6ad905f53ff06aa756f5fb8 upstream. + +Add a bitmask to hda_gen_spec indicating NIDs to exclude from the +possible volume controls. That is, when the bit is set, the NID +corresponding to the bit won't be picked as an output volume control +any longer. + +Basically this is just a band-aid for working around the issue found +with CS4208 codec, where only the headphone pin has a volume AMP with +different dB steps. + +Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=60811 +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/hda_generic.c | 8 ++++++-- + sound/pci/hda/hda_generic.h | 3 +++ + sound/pci/hda/patch_cirrus.c | 2 ++ + 3 files changed, 11 insertions(+), 2 deletions(-) + +--- a/sound/pci/hda/hda_generic.c ++++ b/sound/pci/hda/hda_generic.c +@@ -549,11 +549,15 @@ static hda_nid_t look_for_out_mute_nid(s + static hda_nid_t look_for_out_vol_nid(struct hda_codec *codec, + struct nid_path *path) + { ++ struct hda_gen_spec *spec = codec->spec; + int i; + + for (i = path->depth - 1; i >= 0; i--) { +- if (nid_has_volume(codec, path->path[i], HDA_OUTPUT)) +- return path->path[i]; ++ hda_nid_t nid = path->path[i]; ++ if ((spec->out_vol_mask >> nid) & 1) ++ continue; ++ if (nid_has_volume(codec, nid, HDA_OUTPUT)) ++ return nid; + } + return 0; + } +--- a/sound/pci/hda/hda_generic.h ++++ b/sound/pci/hda/hda_generic.h +@@ -242,6 +242,9 @@ struct hda_gen_spec { + /* additional mute flags (only effective with auto_mute_via_amp=1) */ + u64 mute_bits; + ++ /* bitmask for skipping volume controls */ ++ u64 out_vol_mask; ++ + /* badness tables for output path evaluations */ + const struct badness_table *main_out_badness; + const struct badness_table *extra_out_badness; +--- a/sound/pci/hda/patch_cirrus.c ++++ b/sound/pci/hda/patch_cirrus.c +@@ -684,6 +684,8 @@ static int patch_cs4208(struct hda_codec + return -ENOMEM; + + spec->gen.automute_hook = cs_automute; ++ /* exclude NID 0x10 (HP) from output volumes due to different steps */ ++ spec->gen.out_vol_mask = 1ULL << 0x10; + + snd_hda_pick_fixup(codec, cs4208_models, cs4208_fixup_tbl, + cs4208_fixups); diff --git a/queue-3.12/alsa-hda-make-sure-mute-leds-stay-on-during-runtime-suspend-realtek.patch b/queue-3.12/alsa-hda-make-sure-mute-leds-stay-on-during-runtime-suspend-realtek.patch new file mode 100644 index 00000000000..aced9ff4c07 --- /dev/null +++ b/queue-3.12/alsa-hda-make-sure-mute-leds-stay-on-during-runtime-suspend-realtek.patch @@ -0,0 +1,76 @@ +From d5b6b65e75ce607c2734227524e11574317a1c1a Mon Sep 17 00:00:00 2001 +From: David Henningsson +Date: Wed, 6 Nov 2013 10:50:44 +0100 +Subject: ALSA: hda - Make sure mute LEDs stay on during runtime suspend (Realtek) + +From: David Henningsson + +commit d5b6b65e75ce607c2734227524e11574317a1c1a upstream. + +Some HP machines with Realtek codecs have mute LEDs connected to VREF pins. +However when these go into runtime suspend, the pin powers down and its +pin control is disabled, thus disabling the LED too. + +This patch fixes that issue by making sure that the pin stays in D0 with +correct pin control. + +BugLink: https://bugs.launchpad.net/bugs/1248465 +Tested-by: Franz Hsieh +Signed-off-by: David Henningsson +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_realtek.c | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -2955,6 +2955,23 @@ static void alc269_fixup_mic_mute_hook(v + snd_hda_set_pin_ctl_cache(codec, spec->mute_led_nid, pinval); + } + ++/* Make sure the led works even in runtime suspend */ ++static unsigned int led_power_filter(struct hda_codec *codec, ++ hda_nid_t nid, ++ unsigned int power_state) ++{ ++ struct alc_spec *spec = codec->spec; ++ ++ if (power_state != AC_PWRST_D3 || nid != spec->mute_led_nid) ++ return power_state; ++ ++ /* Set pin ctl again, it might have just been set to 0 */ ++ snd_hda_set_pin_ctl(codec, nid, ++ snd_hda_codec_get_pin_target(codec, nid)); ++ ++ return AC_PWRST_D0; ++} ++ + static void alc269_fixup_hp_mute_led(struct hda_codec *codec, + const struct hda_fixup *fix, int action) + { +@@ -2974,6 +2991,7 @@ static void alc269_fixup_hp_mute_led(str + spec->mute_led_nid = pin - 0x0a + 0x18; + spec->gen.vmaster_mute.hook = alc269_fixup_mic_mute_hook; + spec->gen.vmaster_mute_enum = 1; ++ codec->power_filter = led_power_filter; + snd_printd("Detected mute LED for %x:%d\n", spec->mute_led_nid, + spec->mute_led_polarity); + break; +@@ -2989,6 +3007,7 @@ static void alc269_fixup_hp_mute_led_mic + spec->mute_led_nid = 0x18; + spec->gen.vmaster_mute.hook = alc269_fixup_mic_mute_hook; + spec->gen.vmaster_mute_enum = 1; ++ codec->power_filter = led_power_filter; + } + } + +@@ -3001,6 +3020,7 @@ static void alc269_fixup_hp_mute_led_mic + spec->mute_led_nid = 0x19; + spec->gen.vmaster_mute.hook = alc269_fixup_mic_mute_hook; + spec->gen.vmaster_mute_enum = 1; ++ codec->power_filter = led_power_filter; + } + } + diff --git a/queue-3.12/alsa-hda-provide-missing-pin-configs-for-vaio-with-alc260.patch b/queue-3.12/alsa-hda-provide-missing-pin-configs-for-vaio-with-alc260.patch new file mode 100644 index 00000000000..6636f3240b4 --- /dev/null +++ b/queue-3.12/alsa-hda-provide-missing-pin-configs-for-vaio-with-alc260.patch @@ -0,0 +1,65 @@ +From d08c5ef2a039393eaf2ab2152db5f07790fa0f40 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Fri, 22 Nov 2013 08:06:36 +0100 +Subject: ALSA: hda - Provide missing pin configs for VAIO with ALC260 + +From: Takashi Iwai + +commit d08c5ef2a039393eaf2ab2152db5f07790fa0f40 upstream. + +Some models (or maybe depending on BIOS version) of Sony VAIO with +ALC260 give no proper pin configurations as default, resulting in the +non-working speaker, etc. Just provide the whole pin configurations +via a fixup. + +Reported-by: Matthew Markus +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_realtek.c | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -1501,6 +1501,7 @@ enum { + ALC260_FIXUP_KN1, + ALC260_FIXUP_FSC_S7020, + ALC260_FIXUP_FSC_S7020_JWSE, ++ ALC260_FIXUP_VAIO_PINS, + }; + + static void alc260_gpio1_automute(struct hda_codec *codec) +@@ -1641,6 +1642,24 @@ static const struct hda_fixup alc260_fix + .chained = true, + .chain_id = ALC260_FIXUP_FSC_S7020, + }, ++ [ALC260_FIXUP_VAIO_PINS] = { ++ .type = HDA_FIXUP_PINS, ++ .v.pins = (const struct hda_pintbl[]) { ++ /* Pin configs are missing completely on some VAIOs */ ++ { 0x0f, 0x01211020 }, ++ { 0x10, 0x0001003f }, ++ { 0x11, 0x411111f0 }, ++ { 0x12, 0x01a15930 }, ++ { 0x13, 0x411111f0 }, ++ { 0x14, 0x411111f0 }, ++ { 0x15, 0x411111f0 }, ++ { 0x16, 0x411111f0 }, ++ { 0x17, 0x411111f0 }, ++ { 0x18, 0x411111f0 }, ++ { 0x19, 0x411111f0 }, ++ { } ++ } ++ }, + }; + + static const struct snd_pci_quirk alc260_fixup_tbl[] = { +@@ -1649,6 +1668,7 @@ static const struct snd_pci_quirk alc260 + SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_FIXUP_GPIO1), + SND_PCI_QUIRK(0x103c, 0x280a, "HP dc5750", ALC260_FIXUP_HP_DC5750), + SND_PCI_QUIRK(0x103c, 0x30ba, "HP Presario B1900", ALC260_FIXUP_HP_B1900), ++ SND_PCI_QUIRK(0x104d, 0x81bb, "Sony VAIO", ALC260_FIXUP_VAIO_PINS), + SND_PCI_QUIRK(0x104d, 0x81e2, "Sony VAIO TX", ALC260_FIXUP_HP_PIN_0F), + SND_PCI_QUIRK(0x10cf, 0x1326, "FSC LifeBook S7020", ALC260_FIXUP_FSC_S7020), + SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FIXUP_GPIO1), diff --git a/queue-3.12/alsa-msnd-avoid-duplicated-driver-name.patch b/queue-3.12/alsa-msnd-avoid-duplicated-driver-name.patch new file mode 100644 index 00000000000..5081aa7a8d4 --- /dev/null +++ b/queue-3.12/alsa-msnd-avoid-duplicated-driver-name.patch @@ -0,0 +1,51 @@ +From 092f9cd16aac7d054af1755c945f37c1b33399e6 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Tue, 12 Nov 2013 08:06:20 +0100 +Subject: ALSA: msnd: Avoid duplicated driver name + +From: Takashi Iwai + +commit 092f9cd16aac7d054af1755c945f37c1b33399e6 upstream. + +msnd_pinnacle.c is used for both snd-msnd-pinnacle and +snd-msnd-classic drivers, and both should have different driver +names. Using the same driver name results in the sysfs warning for +duplicated entries like + kobject: 'msnd-pinnacle.7' (cec33408): kobject_release, parent (null) (delayed) + kobject: 'msnd-pinnacle' (cecd4980): kobject_release, parent cf3ad9b0 (delayed) + ------------[ cut here ]------------ + WARNING: CPU: 0 PID: 1 at fs/sysfs/dir.c:486 sysfs_warn_dup+0x7d/0xa0() + sysfs: cannot create duplicate filename '/bus/isa/drivers/msnd-pinnacle' + ...... + +Reported-by: Fengguang Wu +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/isa/msnd/msnd_pinnacle.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/sound/isa/msnd/msnd_pinnacle.c ++++ b/sound/isa/msnd/msnd_pinnacle.c +@@ -73,9 +73,11 @@ + #ifdef MSND_CLASSIC + # include "msnd_classic.h" + # define LOGNAME "msnd_classic" ++# define DEV_NAME "msnd-classic" + #else + # include "msnd_pinnacle.h" + # define LOGNAME "snd_msnd_pinnacle" ++# define DEV_NAME "msnd-pinnacle" + #endif + + static void set_default_audio_parameters(struct snd_msnd *chip) +@@ -1067,8 +1069,6 @@ static int snd_msnd_isa_remove(struct de + return 0; + } + +-#define DEV_NAME "msnd-pinnacle" +- + static struct isa_driver snd_msnd_driver = { + .match = snd_msnd_isa_match, + .probe = snd_msnd_isa_probe, diff --git a/queue-3.12/alsa-pcsp-fix-the-order-of-input-device-unregistration.patch b/queue-3.12/alsa-pcsp-fix-the-order-of-input-device-unregistration.patch new file mode 100644 index 00000000000..7cc457cfb28 --- /dev/null +++ b/queue-3.12/alsa-pcsp-fix-the-order-of-input-device-unregistration.patch @@ -0,0 +1,32 @@ +From 6408eac2665955343cd0e4bcd7d6237ce39611ed Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Thu, 14 Nov 2013 15:45:12 +0100 +Subject: ALSA: pcsp: Fix the order of input device unregistration + +From: Takashi Iwai + +commit 6408eac2665955343cd0e4bcd7d6237ce39611ed upstream. + +The current code may access to the already freed object. The input +device must be accessed and unregistered before freeing the top level +sound object. + +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/drivers/pcsp/pcsp.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/drivers/pcsp/pcsp.c ++++ b/sound/drivers/pcsp/pcsp.c +@@ -187,8 +187,8 @@ static int pcsp_probe(struct platform_de + static int pcsp_remove(struct platform_device *dev) + { + struct snd_pcsp *chip = platform_get_drvdata(dev); +- alsa_card_pcsp_exit(chip); + pcspkr_input_remove(chip->input_dev); ++ alsa_card_pcsp_exit(chip); + return 0; + } + diff --git a/queue-3.12/series b/queue-3.12/series index 8bb1dd7ac10..b37fbcd912e 100644 --- a/queue-3.12/series +++ b/queue-3.12/series @@ -34,3 +34,25 @@ rt2x00-fix-ht-tx-descriptor-settings-regression.patch bluetooth-revert-bluetooth-add-missing-reset_resume-dev_pm_ops.patch revert-ima-policy-for-ramfs.patch exec-ptrace-fix-get_dumpable-incorrect-tests.patch +alsa-6fire-fix-probe-of-multiple-cards.patch +alsa-compress-fix-drain-calls-blocking-other-compress-functions.patch +alsa-compress-fix-drain-calls-blocking-other-compress-functions-v6.patch +alsa-pcsp-fix-the-order-of-input-device-unregistration.patch +alsa-hda-apply-gpio-setup-for-macbooks-with-cs4208.patch +alsa-hda-apply-macbook-fixups-for-cs4208-correctly.patch +alsa-msnd-avoid-duplicated-driver-name.patch +alsa-hda-add-support-of-alc255-codecs.patch +alsa-hda-introduce-the-bitmask-for-excluding-output-volume.patch +alsa-hda-enable-spdif-for-acer-travelmate-6293.patch +alsa-hda-force-buffer-alignment-for-haswell-hdmi-controllers.patch +alsa-hda-make-sure-mute-leds-stay-on-during-runtime-suspend-realtek.patch +alsa-hda-add-support-for-cx20952.patch +alsa-hda-add-pincfg-fixup-for-asus-w5a.patch +alsa-hda-fix-line-out-automute-on-realtek-multifunction-jacks.patch +alsa-hda-check-keep_eapd_on-before-inv_eapd.patch +alsa-hda-don-t-turn-off-eapd-for-headphone-on-lenovo-n100.patch +alsa-hda-don-t-clear-the-power-state-at-snd_hda_codec_reset.patch +alsa-hda-fix-unbalanced-runtime-pm-notification-at-resume.patch +alsa-hda-fix-the-headphone-jack-detection-on-sony-vaio-tx.patch +alsa-hda-add-headset-quirk-for-dell-inspiron-3135.patch +alsa-hda-provide-missing-pin-configs-for-vaio-with-alc260.patch