From 081354961f39b744bb7b61b303b27b93c80e1cff Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 29 Apr 2014 17:03:07 -0700 Subject: [PATCH] 3.10-stable patches added patches: alsa-hda-enable-beep-for-asus-1015e.patch alsa-hda-fix-silent-speaker-output-due-to-mute-led-fixup.patch alsa-hda-realtek-add-support-of-alc288-codec.patch alsa-ice1712-fix-boundary-checks-in-pcm-pointer-ops.patch --- .../alsa-hda-enable-beep-for-asus-1015e.patch | 34 ++++++++ ...speaker-output-due-to-mute-led-fixup.patch | 40 +++++++++ ...-realtek-add-support-of-alc288-codec.patch | 35 ++++++++ ...x-boundary-checks-in-pcm-pointer-ops.patch | 87 +++++++++++++++++++ queue-3.10/series | 4 + 5 files changed, 200 insertions(+) create mode 100644 queue-3.10/alsa-hda-enable-beep-for-asus-1015e.patch create mode 100644 queue-3.10/alsa-hda-fix-silent-speaker-output-due-to-mute-led-fixup.patch create mode 100644 queue-3.10/alsa-hda-realtek-add-support-of-alc288-codec.patch create mode 100644 queue-3.10/alsa-ice1712-fix-boundary-checks-in-pcm-pointer-ops.patch diff --git a/queue-3.10/alsa-hda-enable-beep-for-asus-1015e.patch b/queue-3.10/alsa-hda-enable-beep-for-asus-1015e.patch new file mode 100644 index 00000000000..0d4350f3c40 --- /dev/null +++ b/queue-3.10/alsa-hda-enable-beep-for-asus-1015e.patch @@ -0,0 +1,34 @@ +From a4b7f21d7b42b33609df3f86992a8deff80abfaf Mon Sep 17 00:00:00 2001 +From: "W. Trevor King" +Date: Sat, 29 Mar 2014 17:47:24 -0700 +Subject: ALSA: hda - Enable beep for ASUS 1015E + +From: "W. Trevor King" + +commit a4b7f21d7b42b33609df3f86992a8deff80abfaf upstream. + +The `lspci -nnvv` output contains (wrapped for line length): + + 00:1b.0 Audio device [0403]: + Intel Corporation 7 Series/C210 Series Chipset Family + High Definition Audio Controller [8086:1e20] (rev 04) + Subsystem: ASUSTeK Computer Inc. Device [1043:115d] + +Signed-off-by: W. Trevor King +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 +@@ -937,6 +937,7 @@ static int alc_codec_rename_from_preset( + + static const struct snd_pci_quirk beep_white_list[] = { + SND_PCI_QUIRK(0x1043, 0x103c, "ASUS", 1), ++ SND_PCI_QUIRK(0x1043, 0x115d, "ASUS", 1), + SND_PCI_QUIRK(0x1043, 0x829f, "ASUS", 1), + SND_PCI_QUIRK(0x1043, 0x8376, "EeePC", 1), + SND_PCI_QUIRK(0x1043, 0x83ce, "EeePC", 1), diff --git a/queue-3.10/alsa-hda-fix-silent-speaker-output-due-to-mute-led-fixup.patch b/queue-3.10/alsa-hda-fix-silent-speaker-output-due-to-mute-led-fixup.patch new file mode 100644 index 00000000000..ab9645c30c3 --- /dev/null +++ b/queue-3.10/alsa-hda-fix-silent-speaker-output-due-to-mute-led-fixup.patch @@ -0,0 +1,40 @@ +From 415d555e6b398b00fc1733f0113065a54df9106a Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Thu, 3 Apr 2014 11:51:21 +0200 +Subject: ALSA: hda - Fix silent speaker output due to mute LED fixup + +From: Takashi Iwai + +commit 415d555e6b398b00fc1733f0113065a54df9106a upstream. + +The recent fixups for HP laptops to support the mute LED made the +speaker output silent on some machines. It turned out that they use +the NID 0x18 for the speaker while it's also used for controlling the +LED via VREF bits although the current driver code blindly assumes +that such a node is a mic pin (where 0x18 is usually so). + +This patch fixes the problem by only changing the VREF bits and +keeping the other pin ctl bits. + +Reported-and-tested-by: Hui Wang +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_realtek.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -2859,8 +2859,9 @@ static void alc269_fixup_mic_mute_hook(v + + if (spec->mute_led_polarity) + enabled = !enabled; +- pinval = AC_PINCTL_IN_EN | +- (enabled ? AC_PINCTL_VREF_HIZ : AC_PINCTL_VREF_80); ++ pinval = snd_hda_codec_get_pin_target(codec, spec->mute_led_nid); ++ pinval &= ~AC_PINCTL_VREFEN; ++ pinval |= enabled ? AC_PINCTL_VREF_HIZ : AC_PINCTL_VREF_80; + if (spec->mute_led_nid) + snd_hda_set_pin_ctl_cache(codec, spec->mute_led_nid, pinval); + } diff --git a/queue-3.10/alsa-hda-realtek-add-support-of-alc288-codec.patch b/queue-3.10/alsa-hda-realtek-add-support-of-alc288-codec.patch new file mode 100644 index 00000000000..9e6eecc9954 --- /dev/null +++ b/queue-3.10/alsa-hda-realtek-add-support-of-alc288-codec.patch @@ -0,0 +1,35 @@ +From 7c66593286bcd153e4868383e675673a27071bd5 Mon Sep 17 00:00:00 2001 +From: Kailang Yang +Date: Mon, 14 Apr 2014 15:09:44 +0800 +Subject: ALSA: hda/realtek - Add support of ALC288 codec + +From: Kailang Yang + +commit 7c66593286bcd153e4868383e675673a27071bd5 upstream. + +Signed-off-by: Kailang Yang +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 +@@ -3903,6 +3903,7 @@ static int patch_alc269(struct hda_codec + spec->codec_variant = ALC269_TYPE_ALC284; + break; + case 0x10ec0286: ++ case 0x10ec0288: + spec->codec_variant = ALC269_TYPE_ALC286; + break; + case 0x10ec0255: +@@ -4645,6 +4646,7 @@ static const struct hda_codec_preset snd + { .id = 0x10ec0283, .name = "ALC283", .patch = patch_alc269 }, + { .id = 0x10ec0284, .name = "ALC284", .patch = patch_alc269 }, + { .id = 0x10ec0286, .name = "ALC286", .patch = patch_alc269 }, ++ { .id = 0x10ec0288, .name = "ALC288", .patch = patch_alc269 }, + { .id = 0x10ec0290, .name = "ALC290", .patch = patch_alc269 }, + { .id = 0x10ec0292, .name = "ALC292", .patch = patch_alc269 }, + { .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660", diff --git a/queue-3.10/alsa-ice1712-fix-boundary-checks-in-pcm-pointer-ops.patch b/queue-3.10/alsa-ice1712-fix-boundary-checks-in-pcm-pointer-ops.patch new file mode 100644 index 00000000000..dcd3acb7730 --- /dev/null +++ b/queue-3.10/alsa-ice1712-fix-boundary-checks-in-pcm-pointer-ops.patch @@ -0,0 +1,87 @@ +From 4f8e940095536bc002a81666a4107a581c84e9b9 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Tue, 8 Apr 2014 16:58:34 +0200 +Subject: ALSA: ice1712: Fix boundary checks in PCM pointer ops + +From: Takashi Iwai + +commit 4f8e940095536bc002a81666a4107a581c84e9b9 upstream. + +PCM pointer callbacks in ice1712 driver check the buffer size boundary +wrongly between bytes and frames. This leads to PCM core warnings +like: + snd_pcm_update_hw_ptr0: 105 callbacks suppressed + ALSA pcm_lib.c:352 BUG: pcmC3D0c:0, pos = 5461, buffer size = 5461, period size = 2730 + +This patch fixes these checks to be placed after the proper unit +conversions. + +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/ice1712/ice1712.c | 15 ++++++++++----- + 1 file changed, 10 insertions(+), 5 deletions(-) + +--- a/sound/pci/ice1712/ice1712.c ++++ b/sound/pci/ice1712/ice1712.c +@@ -685,9 +685,10 @@ static snd_pcm_uframes_t snd_ice1712_pla + if (!(snd_ice1712_read(ice, ICE1712_IREG_PBK_CTRL) & 1)) + return 0; + ptr = runtime->buffer_size - inw(ice->ddma_port + 4); ++ ptr = bytes_to_frames(substream->runtime, ptr); + if (ptr == runtime->buffer_size) + ptr = 0; +- return bytes_to_frames(substream->runtime, ptr); ++ return ptr; + } + + static snd_pcm_uframes_t snd_ice1712_playback_ds_pointer(struct snd_pcm_substream *substream) +@@ -704,9 +705,10 @@ static snd_pcm_uframes_t snd_ice1712_pla + addr = ICE1712_DSC_ADDR0; + ptr = snd_ice1712_ds_read(ice, substream->number * 2, addr) - + ice->playback_con_virt_addr[substream->number]; ++ ptr = bytes_to_frames(substream->runtime, ptr); + if (ptr == substream->runtime->buffer_size) + ptr = 0; +- return bytes_to_frames(substream->runtime, ptr); ++ return ptr; + } + + static snd_pcm_uframes_t snd_ice1712_capture_pointer(struct snd_pcm_substream *substream) +@@ -717,9 +719,10 @@ static snd_pcm_uframes_t snd_ice1712_cap + if (!(snd_ice1712_read(ice, ICE1712_IREG_CAP_CTRL) & 1)) + return 0; + ptr = inl(ICEREG(ice, CONCAP_ADDR)) - ice->capture_con_virt_addr; ++ ptr = bytes_to_frames(substream->runtime, ptr); + if (ptr == substream->runtime->buffer_size) + ptr = 0; +- return bytes_to_frames(substream->runtime, ptr); ++ return ptr; + } + + static const struct snd_pcm_hardware snd_ice1712_playback = { +@@ -1113,9 +1116,10 @@ static snd_pcm_uframes_t snd_ice1712_pla + if (!(inl(ICEMT(ice, PLAYBACK_CONTROL)) & ICE1712_PLAYBACK_START)) + return 0; + ptr = ice->playback_pro_size - (inw(ICEMT(ice, PLAYBACK_SIZE)) << 2); ++ ptr = bytes_to_frames(substream->runtime, ptr); + if (ptr == substream->runtime->buffer_size) + ptr = 0; +- return bytes_to_frames(substream->runtime, ptr); ++ return ptr; + } + + static snd_pcm_uframes_t snd_ice1712_capture_pro_pointer(struct snd_pcm_substream *substream) +@@ -1126,9 +1130,10 @@ static snd_pcm_uframes_t snd_ice1712_cap + if (!(inl(ICEMT(ice, PLAYBACK_CONTROL)) & ICE1712_CAPTURE_START_SHADOW)) + return 0; + ptr = ice->capture_pro_size - (inw(ICEMT(ice, CAPTURE_SIZE)) << 2); ++ ptr = bytes_to_frames(substream->runtime, ptr); + if (ptr == substream->runtime->buffer_size) + ptr = 0; +- return bytes_to_frames(substream->runtime, ptr); ++ return ptr; + } + + static const struct snd_pcm_hardware snd_ice1712_playback_pro = { diff --git a/queue-3.10/series b/queue-3.10/series index a320f7b50fa..11acba1f278 100644 --- a/queue-3.10/series +++ b/queue-3.10/series @@ -14,3 +14,7 @@ arm-8030-1-arm-kdump-add-arch_crash_save_vmcoreinfo.patch arm-mvebu-ensure-the-mdio-node-has-a-clock-reference-on-armada-370-xp.patch arm-pxa-hx4700.h-include-irqs.h-for-pxa_nr_builtin_gpio.patch arm-7728-1-mm-use-phys_addr_t-properly-for-ioremap-functions.patch +alsa-hda-enable-beep-for-asus-1015e.patch +alsa-ice1712-fix-boundary-checks-in-pcm-pointer-ops.patch +alsa-hda-fix-silent-speaker-output-due-to-mute-led-fixup.patch +alsa-hda-realtek-add-support-of-alc288-codec.patch -- 2.47.3