From 0d02b4d84098e511f44fedba82e891ed33830839 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sat, 1 Mar 2014 08:46:42 -0800 Subject: [PATCH] 3.13-stable patches added patches: alsa-hda-add-headset-mic-detect-quirks-for-two-dell-laptops.patch alsa-hda-ca0132-fix-recording-from-mode-id-0x8.patch alsa-hda-ca0132-setup-cleanup-streams.patch alsa-hda-enable-front-audio-jacks-on-one-hp-desktop-model.patch alsa-usb-audio-work-around-kef-x300a-firmware-bug.patch --- ...c-detect-quirks-for-two-dell-laptops.patch | 37 +++++ ...a0132-fix-recording-from-mode-id-0x8.patch | 40 ++++++ ...lsa-hda-ca0132-setup-cleanup-streams.patch | 136 ++++++++++++++++++ ...-audio-jacks-on-one-hp-desktop-model.patch | 74 ++++++++++ ...o-work-around-kef-x300a-firmware-bug.patch | 46 ++++++ queue-3.13/series | 5 + 6 files changed, 338 insertions(+) create mode 100644 queue-3.13/alsa-hda-add-headset-mic-detect-quirks-for-two-dell-laptops.patch create mode 100644 queue-3.13/alsa-hda-ca0132-fix-recording-from-mode-id-0x8.patch create mode 100644 queue-3.13/alsa-hda-ca0132-setup-cleanup-streams.patch create mode 100644 queue-3.13/alsa-hda-enable-front-audio-jacks-on-one-hp-desktop-model.patch create mode 100644 queue-3.13/alsa-usb-audio-work-around-kef-x300a-firmware-bug.patch diff --git a/queue-3.13/alsa-hda-add-headset-mic-detect-quirks-for-two-dell-laptops.patch b/queue-3.13/alsa-hda-add-headset-mic-detect-quirks-for-two-dell-laptops.patch new file mode 100644 index 00000000000..5050665cb2a --- /dev/null +++ b/queue-3.13/alsa-hda-add-headset-mic-detect-quirks-for-two-dell-laptops.patch @@ -0,0 +1,37 @@ +From 4913e0bf239dafee356bc7fab61806cc2518930c Mon Sep 17 00:00:00 2001 +From: Hui Wang +Date: Tue, 18 Feb 2014 10:56:46 +0800 +Subject: ALSA: hda - add headset mic detect quirks for two Dell laptops + +From: Hui Wang + +commit 4913e0bf239dafee356bc7fab61806cc2518930c upstream. + +When we plug a 3-ring headset on the Dell machines (Vendor ID: +0x10ec0255, Subsystem ID: 0x10280657; Vendor ID: 0x10ec0255, +Subsystem ID: 0x1028065f), the headset mic can't be +detected, after apply this patch, the headset mic can work well. + +BugLink: https://bugs.launchpad.net/bugs/1260303 +Cc: David Henningsson +Tested-by: Cyrus Lien +Signed-off-by: Hui Wang +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_realtek.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -4295,7 +4295,9 @@ static const struct snd_pci_quirk alc269 + SND_PCI_QUIRK(0x1028, 0x0651, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1028, 0x0652, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1028, 0x0653, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1028, 0x0657, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1028, 0x0658, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1028, 0x065f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1028, 0x0662, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), + 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.13/alsa-hda-ca0132-fix-recording-from-mode-id-0x8.patch b/queue-3.13/alsa-hda-ca0132-fix-recording-from-mode-id-0x8.patch new file mode 100644 index 00000000000..ffda9b8ed10 --- /dev/null +++ b/queue-3.13/alsa-hda-ca0132-fix-recording-from-mode-id-0x8.patch @@ -0,0 +1,40 @@ +From 13c12dbe3a2ce17227f7ddef652b6a53c78fa51f Mon Sep 17 00:00:00 2001 +From: Hsin-Yu Chao +Date: Wed, 19 Feb 2014 14:30:35 +0800 +Subject: ALSA: hda/ca0132 - Fix recording from mode id 0x8 + +From: Hsin-Yu Chao + +commit 13c12dbe3a2ce17227f7ddef652b6a53c78fa51f upstream. + +Incorrect ADC is picked in ca0132_capture_pcm_prepare(), +where it assumes multiple streams while there is one stream +per ADC. Note that ca0132_capture_pcm_cleanup() already does +the right thing. + +The Chromebook Pixel has a microphone under the keyboard that +is attached to node id 0x8. Before this fix, recording would +always go to the main internal mic (node id 0x7). + +Signed-off-by: Hsin-Yu Chao +Reviewed-by: Dylan Reid +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_ca0132.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +--- a/sound/pci/hda/patch_ca0132.c ++++ b/sound/pci/hda/patch_ca0132.c +@@ -2768,9 +2768,7 @@ static int ca0132_capture_pcm_prepare(st + unsigned int format, + struct snd_pcm_substream *substream) + { +- struct ca0132_spec *spec = codec->spec; +- +- snd_hda_codec_setup_stream(codec, spec->adcs[substream->number], ++ snd_hda_codec_setup_stream(codec, hinfo->nid, + stream_tag, 0, format); + + return 0; diff --git a/queue-3.13/alsa-hda-ca0132-setup-cleanup-streams.patch b/queue-3.13/alsa-hda-ca0132-setup-cleanup-streams.patch new file mode 100644 index 00000000000..f9bf72833aa --- /dev/null +++ b/queue-3.13/alsa-hda-ca0132-setup-cleanup-streams.patch @@ -0,0 +1,136 @@ +From 28fba95087a7f3d107a3a6728aef7dbfaf3fd782 Mon Sep 17 00:00:00 2001 +From: Hsin-Yu Chao +Date: Wed, 19 Feb 2014 14:27:07 +0800 +Subject: ALSA: hda/ca0132 - setup/cleanup streams + +From: Hsin-Yu Chao + +commit 28fba95087a7f3d107a3a6728aef7dbfaf3fd782 upstream. + +When a HDMI stream is opened with the same stream tag +as a following opened stream to ca0132, audio will be +heard from two ports simultaneously. +Fix this issue by change to use snd_hda_codec_setup_stream +and snd_hda_codec_cleanup_stream instead, so that an +inactive stream can be marked as 'dirty' when found +with a conflict stream tag, and then get purified. + +Signed-off-by: Hsin-Yu Chao +Reviewed-by: Chih-Chung Chang +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_ca0132.c | 66 ++++--------------------------------------- + 1 file changed, 7 insertions(+), 59 deletions(-) + +--- a/sound/pci/hda/patch_ca0132.c ++++ b/sound/pci/hda/patch_ca0132.c +@@ -2662,60 +2662,6 @@ static bool dspload_wait_loaded(struct h + } + + /* +- * PCM stuffs +- */ +-static void ca0132_setup_stream(struct hda_codec *codec, hda_nid_t nid, +- u32 stream_tag, +- int channel_id, int format) +-{ +- unsigned int oldval, newval; +- +- if (!nid) +- return; +- +- snd_printdd( +- "ca0132_setup_stream: NID=0x%x, stream=0x%x, " +- "channel=%d, format=0x%x\n", +- nid, stream_tag, channel_id, format); +- +- /* update the format-id if changed */ +- oldval = snd_hda_codec_read(codec, nid, 0, +- AC_VERB_GET_STREAM_FORMAT, +- 0); +- if (oldval != format) { +- msleep(20); +- snd_hda_codec_write(codec, nid, 0, +- AC_VERB_SET_STREAM_FORMAT, +- format); +- } +- +- oldval = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONV, 0); +- newval = (stream_tag << 4) | channel_id; +- if (oldval != newval) { +- snd_hda_codec_write(codec, nid, 0, +- AC_VERB_SET_CHANNEL_STREAMID, +- newval); +- } +-} +- +-static void ca0132_cleanup_stream(struct hda_codec *codec, hda_nid_t nid) +-{ +- unsigned int val; +- +- if (!nid) +- return; +- +- snd_printdd(KERN_INFO "ca0132_cleanup_stream: NID=0x%x\n", nid); +- +- val = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONV, 0); +- if (!val) +- return; +- +- snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_STREAM_FORMAT, 0); +- snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_CHANNEL_STREAMID, 0); +-} +- +-/* + * PCM callbacks + */ + static int ca0132_playback_pcm_prepare(struct hda_pcm_stream *hinfo, +@@ -2726,7 +2672,7 @@ static int ca0132_playback_pcm_prepare(s + { + struct ca0132_spec *spec = codec->spec; + +- ca0132_setup_stream(codec, spec->dacs[0], stream_tag, 0, format); ++ snd_hda_codec_setup_stream(codec, spec->dacs[0], stream_tag, 0, format); + + return 0; + } +@@ -2745,7 +2691,7 @@ static int ca0132_playback_pcm_cleanup(s + if (spec->effects_switch[PLAY_ENHANCEMENT - EFFECT_START_NID]) + msleep(50); + +- ca0132_cleanup_stream(codec, spec->dacs[0]); ++ snd_hda_codec_cleanup_stream(codec, spec->dacs[0]); + + return 0; + } +@@ -2824,8 +2770,8 @@ static int ca0132_capture_pcm_prepare(st + { + struct ca0132_spec *spec = codec->spec; + +- ca0132_setup_stream(codec, spec->adcs[substream->number], +- stream_tag, 0, format); ++ snd_hda_codec_setup_stream(codec, spec->adcs[substream->number], ++ stream_tag, 0, format); + + return 0; + } +@@ -2839,7 +2785,7 @@ static int ca0132_capture_pcm_cleanup(st + if (spec->dsp_state == DSP_DOWNLOADING) + return 0; + +- ca0132_cleanup_stream(codec, hinfo->nid); ++ snd_hda_codec_cleanup_stream(codec, hinfo->nid); + return 0; + } + +@@ -4742,6 +4688,8 @@ static int patch_ca0132(struct hda_codec + return err; + + codec->patch_ops = ca0132_patch_ops; ++ codec->pcm_format_first = 1; ++ codec->no_sticky_stream = 1; + + return 0; + } diff --git a/queue-3.13/alsa-hda-enable-front-audio-jacks-on-one-hp-desktop-model.patch b/queue-3.13/alsa-hda-enable-front-audio-jacks-on-one-hp-desktop-model.patch new file mode 100644 index 00000000000..83d87bcd220 --- /dev/null +++ b/queue-3.13/alsa-hda-enable-front-audio-jacks-on-one-hp-desktop-model.patch @@ -0,0 +1,74 @@ +From 1de7ca5e844866f56bebb2fc47fa18e090677e88 Mon Sep 17 00:00:00 2001 +From: Hui Wang +Date: Thu, 20 Feb 2014 11:47:21 +0800 +Subject: ALSA: hda - Enable front audio jacks on one HP desktop model + +From: Hui Wang + +commit 1de7ca5e844866f56bebb2fc47fa18e090677e88 upstream. + +The front headphone and mic jackes on a HP desktop model (Vendor Id: +0x111d76c7 Subsystem Id: 0x103c2b17) can not work, the codec on this +machine has 8 physical ports, 6 of them are routed to rear jackes +and all of them work very well, while the remaining 2 ports are +routed to front headphone and mic jackes, but the corresponding +pin complex node are not defined correctly. + +After apply this fix, the front audio jackes can work very well. + +[trivial fix of enum definition by tiwai] + +BugLink: https://bugs.launchpad.net/bugs/1282369 +Cc: David Henningsson +Tested-by: Gerald Yang +Signed-off-by: Hui Wang +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_sigmatel.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +--- a/sound/pci/hda/patch_sigmatel.c ++++ b/sound/pci/hda/patch_sigmatel.c +@@ -83,6 +83,7 @@ enum { + STAC_DELL_M6_BOTH, + STAC_DELL_EQ, + STAC_ALIENWARE_M17X, ++ STAC_92HD89XX_HP_FRONT_JACK, + STAC_92HD73XX_MODELS + }; + +@@ -1777,6 +1778,12 @@ static const struct hda_pintbl intel_dg4 + {} + }; + ++static const struct hda_pintbl stac92hd89xx_hp_front_jack_pin_configs[] = { ++ { 0x0a, 0x02214030 }, ++ { 0x0b, 0x02A19010 }, ++ {} ++}; ++ + static void stac92hd73xx_fixup_ref(struct hda_codec *codec, + const struct hda_fixup *fix, int action) + { +@@ -1895,6 +1902,10 @@ static const struct hda_fixup stac92hd73 + [STAC_92HD73XX_NO_JD] = { + .type = HDA_FIXUP_FUNC, + .v.func = stac92hd73xx_fixup_no_jd, ++ }, ++ [STAC_92HD89XX_HP_FRONT_JACK] = { ++ .type = HDA_FIXUP_PINS, ++ .v.pins = stac92hd89xx_hp_front_jack_pin_configs, + } + }; + +@@ -1955,6 +1966,8 @@ static const struct snd_pci_quirk stac92 + "Alienware M17x", STAC_ALIENWARE_M17X), + SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0490, + "Alienware M17x R3", STAC_DELL_EQ), ++ SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2b17, ++ "unknown HP", STAC_92HD89XX_HP_FRONT_JACK), + {} /* terminator */ + }; + diff --git a/queue-3.13/alsa-usb-audio-work-around-kef-x300a-firmware-bug.patch b/queue-3.13/alsa-usb-audio-work-around-kef-x300a-firmware-bug.patch new file mode 100644 index 00000000000..d2901a03020 --- /dev/null +++ b/queue-3.13/alsa-usb-audio-work-around-kef-x300a-firmware-bug.patch @@ -0,0 +1,46 @@ +From 624aef494f86ed0c58056361c06347ad62b26806 Mon Sep 17 00:00:00 2001 +From: Clemens Ladisch +Date: Sun, 16 Feb 2014 17:11:10 +0100 +Subject: ALSA: usb-audio: work around KEF X300A firmware bug + +From: Clemens Ladisch + +commit 624aef494f86ed0c58056361c06347ad62b26806 upstream. + +When the driver tries to access Function Unit 10, the KEF X300A +speakers' firmware apparently locks up, making even PCM streaming +impossible. Work around this by ignoring this FU. + +Signed-off-by: Clemens Ladisch +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/usb/mixer_maps.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +--- a/sound/usb/mixer_maps.c ++++ b/sound/usb/mixer_maps.c +@@ -322,6 +322,11 @@ static struct usbmix_name_map hercules_u + { 0 } /* terminator */ + }; + ++static const struct usbmix_name_map kef_x300a_map[] = { ++ { 10, NULL }, /* firmware locks up (?) when we try to access this FU */ ++ { 0 } ++}; ++ + /* + * Control map entries + */ +@@ -409,6 +414,10 @@ static struct usbmix_ctl_map usbmix_ctl_ + .id = USB_ID(0x200c, 0x1018), + .map = ebox44_map, + }, ++ { ++ .id = USB_ID(0x27ac, 0x1000), ++ .map = kef_x300a_map, ++ }, + { 0 } /* terminator */ + }; + diff --git a/queue-3.13/series b/queue-3.13/series index 9a45cc7368c..09496d0b054 100644 --- a/queue-3.13/series +++ b/queue-3.13/series @@ -70,6 +70,11 @@ batman-adv-fix-tt-crc-computation-by-ensuring-byte-order.patch batman-adv-free-skb-on-tvlv-parsing-success.patch batman-adv-avoid-double-free-when-orig_node-initialization-fails.patch batman-adv-fix-potential-kernel-paging-error-for-unicast-transmissions.patch +alsa-usb-audio-work-around-kef-x300a-firmware-bug.patch +alsa-hda-add-headset-mic-detect-quirks-for-two-dell-laptops.patch +alsa-hda-ca0132-setup-cleanup-streams.patch +alsa-hda-ca0132-fix-recording-from-mode-id-0x8.patch +alsa-hda-enable-front-audio-jacks-on-one-hp-desktop-model.patch cgroup-fix-error-return-value-in-cgroup_mount.patch cgroup-fix-error-return-from-cgroup_create.patch cgroup-fix-locking-in-cgroup_cfts_commit.patch -- 2.47.3