linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Kailang Yang <kailang@realtek.com>,
	Takashi Iwai <tiwai@suse.de>
Subject: [PATCH 4.6 34/81] ALSA: hda/realtek - ALC256 speaker noise issue
Date: Wed, 22 Jun 2016 15:45:57 -0700	[thread overview]
Message-ID: <20160622223745.024867071@linuxfoundation.org> (raw)
In-Reply-To: <20160622223743.240652686@linuxfoundation.org>

4.6-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Kailang Yang <kailang@realtek.com>

commit e69e7e03ed225abf3e1c43545aa3bcb68dc81d5f upstream.

That is some different register for ALC255 and ALC256.
ALC256 can't fit with some ALC255 register.
This issue is cause from LDO output voltage control.
This patch is updated the right LDO register value.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/pci/hda/patch_realtek.c |   52 +++++++++++++++++++++++++++++++++++++-----
 1 file changed, 47 insertions(+), 5 deletions(-)

--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3618,13 +3618,20 @@ static void alc269_fixup_hp_line1_mic1_l
 static void alc_headset_mode_unplugged(struct hda_codec *codec)
 {
 	static struct coef_fw coef0255[] = {
-		WRITE_COEF(0x1b, 0x0c0b), /* LDO and MISC control */
 		WRITE_COEF(0x45, 0xd089), /* UAJ function set to menual mode */
 		UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/
 		WRITE_COEF(0x06, 0x6104), /* Set MIC2 Vref gate with HP */
 		WRITE_COEFEX(0x57, 0x03, 0x8aa6), /* Direct Drive HP Amp control */
 		{}
 	};
+	static struct coef_fw coef0255_1[] = {
+		WRITE_COEF(0x1b, 0x0c0b), /* LDO and MISC control */
+		{}
+	};
+	static struct coef_fw coef0256[] = {
+		WRITE_COEF(0x1b, 0x0c4b), /* LDO and MISC control */
+		{}
+	};
 	static struct coef_fw coef0233[] = {
 		WRITE_COEF(0x1b, 0x0c0b),
 		WRITE_COEF(0x45, 0xc429),
@@ -3677,7 +3684,11 @@ static void alc_headset_mode_unplugged(s
 
 	switch (codec->core.vendor_id) {
 	case 0x10ec0255:
+		alc_process_coef_fw(codec, coef0255_1);
+		alc_process_coef_fw(codec, coef0255);
+		break;
 	case 0x10ec0256:
+		alc_process_coef_fw(codec, coef0256);
 		alc_process_coef_fw(codec, coef0255);
 		break;
 	case 0x10ec0233:
@@ -3896,6 +3907,12 @@ static void alc_headset_mode_ctia(struct
 		WRITE_COEFEX(0x57, 0x03, 0x8ea6),
 		{}
 	};
+	static struct coef_fw coef0256[] = {
+		WRITE_COEF(0x45, 0xd489), /* Set to CTIA type */
+		WRITE_COEF(0x1b, 0x0c6b),
+		WRITE_COEFEX(0x57, 0x03, 0x8ea6),
+		{}
+	};
 	static struct coef_fw coef0233[] = {
 		WRITE_COEF(0x45, 0xd429),
 		WRITE_COEF(0x1b, 0x0c2b),
@@ -3936,9 +3953,11 @@ static void alc_headset_mode_ctia(struct
 
 	switch (codec->core.vendor_id) {
 	case 0x10ec0255:
-	case 0x10ec0256:
 		alc_process_coef_fw(codec, coef0255);
 		break;
+	case 0x10ec0256:
+		alc_process_coef_fw(codec, coef0256);
+		break;
 	case 0x10ec0233:
 	case 0x10ec0283:
 		alc_process_coef_fw(codec, coef0233);
@@ -3978,6 +3997,12 @@ static void alc_headset_mode_omtp(struct
 		WRITE_COEFEX(0x57, 0x03, 0x8ea6),
 		{}
 	};
+	static struct coef_fw coef0256[] = {
+		WRITE_COEF(0x45, 0xe489), /* Set to OMTP Type */
+		WRITE_COEF(0x1b, 0x0c6b),
+		WRITE_COEFEX(0x57, 0x03, 0x8ea6),
+		{}
+	};
 	static struct coef_fw coef0233[] = {
 		WRITE_COEF(0x45, 0xe429),
 		WRITE_COEF(0x1b, 0x0c2b),
@@ -4018,9 +4043,11 @@ static void alc_headset_mode_omtp(struct
 
 	switch (codec->core.vendor_id) {
 	case 0x10ec0255:
-	case 0x10ec0256:
 		alc_process_coef_fw(codec, coef0255);
 		break;
+	case 0x10ec0256:
+		alc_process_coef_fw(codec, coef0256);
+		break;
 	case 0x10ec0233:
 	case 0x10ec0283:
 		alc_process_coef_fw(codec, coef0233);
@@ -4266,7 +4293,7 @@ static void alc_fixup_headset_mode_no_hp
 static void alc255_set_default_jack_type(struct hda_codec *codec)
 {
 	/* Set to iphone type */
-	static struct coef_fw fw[] = {
+	static struct coef_fw alc255fw[] = {
 		WRITE_COEF(0x1b, 0x880b),
 		WRITE_COEF(0x45, 0xd089),
 		WRITE_COEF(0x1b, 0x080b),
@@ -4274,7 +4301,22 @@ static void alc255_set_default_jack_type
 		WRITE_COEF(0x1b, 0x0c0b),
 		{}
 	};
-	alc_process_coef_fw(codec, fw);
+	static struct coef_fw alc256fw[] = {
+		WRITE_COEF(0x1b, 0x884b),
+		WRITE_COEF(0x45, 0xd089),
+		WRITE_COEF(0x1b, 0x084b),
+		WRITE_COEF(0x46, 0x0004),
+		WRITE_COEF(0x1b, 0x0c4b),
+		{}
+	};
+	switch (codec->core.vendor_id) {
+	case 0x10ec0255:
+		alc_process_coef_fw(codec, alc255fw);
+		break;
+	case 0x10ec0256:
+		alc_process_coef_fw(codec, alc256fw);
+		break;
+	}
 	msleep(30);
 }
 

  parent reply	other threads:[~2016-06-22 22:47 UTC|newest]

Thread overview: 86+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-22 22:45 [PATCH 4.6 00/81] 4.6.3-stable review Greg Kroah-Hartman
2016-06-22 22:45 ` [PATCH 4.6 01/81] scsi_lib: correctly retry failed zero length REQ_TYPE_FS commands Greg Kroah-Hartman
2016-06-22 22:45 ` [PATCH 4.6 02/81] scsi: Add QEMU CD-ROM to VPD Inquiry Blacklist Greg Kroah-Hartman
2016-06-22 22:45 ` [PATCH 4.6 03/81] tipc: check nl sock before parsing nested attributes Greg Kroah-Hartman
2016-06-22 22:45 ` [PATCH 4.6 04/81] netlink: Fix dump skb leak/double free Greg Kroah-Hartman
2016-06-22 22:45 ` [PATCH 4.6 05/81] tipc: fix nametable publication field in nl compat Greg Kroah-Hartman
2016-06-22 22:45 ` [PATCH 4.6 06/81] switchdev: pass pointer to fib_info instead of copy Greg Kroah-Hartman
2016-06-22 22:45 ` [PATCH 4.6 07/81] macsec: fix netlink attribute for key id Greg Kroah-Hartman
2016-06-22 22:45 ` [PATCH 4.6 08/81] tuntap: correctly wake up process during uninit Greg Kroah-Hartman
2016-06-22 22:45 ` [PATCH 4.6 09/81] bpf: Use mount_nodev not mount_ns to mount the bpf filesystem Greg Kroah-Hartman
2016-06-22 22:45 ` [PATCH 4.6 10/81] udp: prevent skbs lingering in tunnel socket queues Greg Kroah-Hartman
2016-06-22 22:45 ` [PATCH 4.6 11/81] uapi glibc compat: fix compilation when !__USE_MISC in glibc Greg Kroah-Hartman
2016-06-22 22:45 ` [PATCH 4.6 12/81] ipv4: Fix non-initialized TTL when CONFIG_SYSCTL=n Greg Kroah-Hartman
2016-06-22 22:45 ` [PATCH 4.6 13/81] bpf, inode: disallow userns mounts Greg Kroah-Hartman
2016-06-22 22:45 ` [PATCH 4.6 14/81] net: mvneta: Fix lacking spinlock initialization Greg Kroah-Hartman
2016-06-22 22:45 ` [PATCH 4.6 15/81] net: hwbm: Fix unbalanced spinlock in error case Greg Kroah-Hartman
2016-06-22 22:45 ` [PATCH 4.6 16/81] sfc: on MC reset, clear PIO buffer linkage in TXQs Greg Kroah-Hartman
2016-06-22 22:45 ` [PATCH 4.6 17/81] team: dont call netdev_change_features under team->lock Greg Kroah-Hartman
2016-06-22 22:45 ` [PATCH 4.6 18/81] net: alx: use custom skb allocator Greg Kroah-Hartman
2016-06-22 22:45 ` [PATCH 4.6 19/81] net: stmmac: Fix incorrect memcpy source memory Greg Kroah-Hartman
2016-06-22 22:45 ` [PATCH 4.6 20/81] vxlan: Accept user specified MTU value when create new vxlan link Greg Kroah-Hartman
2016-06-22 22:45 ` [PATCH 4.6 21/81] net: nps_enet: Disable interrupts before napi reschedule Greg Kroah-Hartman
2016-06-22 22:45 ` [PATCH 4.6 22/81] bpf, trace: use READ_ONCE for retrieving file ptr Greg Kroah-Hartman
2016-06-22 22:45 ` [PATCH 4.6 23/81] tcp: record TLP and ER timer stats in v6 stats Greg Kroah-Hartman
2016-06-22 22:45 ` [PATCH 4.6 24/81] bridge: Dont insert unnecessary local fdb entry on changing mac address Greg Kroah-Hartman
2016-06-22 22:45 ` [PATCH 4.6 25/81] l2tp: fix configuration passed to setup_udp_tunnel_sock() Greg Kroah-Hartman
2016-06-22 22:45 ` [PATCH 4.6 26/81] ipv6: Skip XFRM lookup if dst_entry in socket cache is valid Greg Kroah-Hartman
2016-06-22 22:45 ` [PATCH 4.6 27/81] KVM: arm/arm64: vgic-v2: Clear all dirty LRs Greg Kroah-Hartman
2016-06-22 22:45 ` [PATCH 4.6 28/81] KVM: arm/arm64: vgic-v3: " Greg Kroah-Hartman
2016-06-22 22:45 ` [PATCH 4.6 31/81] drivers/perf: arm_pmu: Defer the setting of __oprofile_cpu_pmu Greg Kroah-Hartman
2016-06-22 22:45 ` [PATCH 4.6 32/81] ALSA: hda - Add PCI ID for Kabylake Greg Kroah-Hartman
2016-06-22 22:45 ` [PATCH 4.6 33/81] ALSA: hda - Fix headset mic detection problem for Dell machine Greg Kroah-Hartman
2016-06-22 22:45 ` Greg Kroah-Hartman [this message]
2016-06-22 22:45 ` [PATCH 4.6 35/81] ALSA: hda/realtek - Add support for new codecs ALC700/ALC701/ALC703 Greg Kroah-Hartman
2016-06-22 22:45 ` [PATCH 4.6 36/81] ALSA: hda/realtek: Add T560 docking unit fixup Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 37/81] ARM: fix PTRACE_SETVFPREGS on SMP systems Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 39/81] gpio: bcm-kona: fix bcm_kona_gpio_reset() warnings Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 40/81] gpiolib: Fix NULL pointer deference Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 41/81] gpiolib: Fix unaligned used of reference counters Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 42/81] s390/bpf: fix recache skb->data/hlen for skb_vlan_push/pop Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 43/81] s390/bpf: reduce maximum program size to 64 KB Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 44/81] irqchip/gic-v3: Fix ICC_SGI1R_EL1.INTID decoding mask Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 45/81] crypto: public_key: select CRYPTO_AKCIPHER Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 46/81] crypto: ccp - Fix AES XTS error for request sizes above 4096 Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 47/81] arm64: Provide "model name" in /proc/cpuinfo for PER_LINUX32 tasks Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 48/81] arm64: mm: always take dirty state from new pte in ptep_set_access_flags Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 49/81] powerpc/pseries/eeh: Handle RTAS delay requests in configure_bridge Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 50/81] powerpc: Fix definition of SIAR and SDAR registers Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 51/81] powerpc: Use privileged SPR number for MMCR2 Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 52/81] powerpc/pseries: Add POWER8NVL support to ibm,client-architecture-support call Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 53/81] powerpc/mm/hash: Fix the reference bit update when handling hash fault Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 54/81] pinctrl: mediatek: fix dual-edge code defect Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 55/81] parisc: Fix pagefault crash in unaligned __get_user() call Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 56/81] memcg: add RCU locking around css_for_each_descendant_pre() in memcg_offline_kmem() Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 57/81] ecryptfs: forbid opening files without mmap handler Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 58/81] wext: Fix 32 bit iwpriv compatibility issue with 64 bit Kernel Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 59/81] mm: thp: broken page count after commit aa88b68c3b1d Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 60/81] x86/entry/traps: Dont force in_interrupt() to return true in IST handlers Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 61/81] proc: prevent stacking filesystems on top Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 62/81] sched: panic on corrupted stack end Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 63/81] fix d_walk()/non-delayed __d_free() race Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 64/81] sparc64: Reduce TLB flushes during hugepte changes Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 65/81] sparc64: Take ctx_alloc_lock properly in hugetlb_setup() Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 66/81] sparc: Harden signal return frame checks Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 67/81] sparc64: Fix return from trap window fill crashes Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 68/81] gpio: zynq: Fix the error path Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 69/81] gpio: zynq: initialize clock even without CONFIG_PM Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 70/81] drm/core: Do not preserve framebuffer on rmfb, v4 Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 71/81] netfilter: x_tables: dont move to non-existent next rule Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 72/81] netfilter: x_tables: validate targets of jumps Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 73/81] netfilter: x_tables: add and use xt_check_entry_offsets Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 74/81] netfilter: x_tables: kill check_entry helper Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 75/81] netfilter: x_tables: assert minimum target size Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 76/81] netfilter: x_tables: add compat version of xt_check_entry_offsets Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 77/81] netfilter: x_tables: check standard target size too Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 78/81] netfilter: x_tables: check for bogus target offset Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 79/81] netfilter: x_tables: validate all offsets and sizes in a rule Greg Kroah-Hartman
2016-06-22 22:46 ` [PATCH 4.6 80/81] netfilter: x_tables: dont reject valid target size on some architectures Greg Kroah-Hartman
2016-06-23  4:52 ` [PATCH 4.6 00/87] 4.6.3-stable review -rc2 Greg Kroah-Hartman
2016-06-23 19:45   ` Guenter Roeck
2016-06-24 17:15     ` Greg Kroah-Hartman
2016-06-23 21:53   ` Shuah Khan
2016-06-24 17:14     ` Greg Kroah-Hartman
     [not found] ` <20160622223745.208652702@linuxfoundation.org>
2016-06-23  7:21   ` [PATCH 4.6 38/81] gpio: bail out silently on NULL descriptors Linus Walleij
2016-06-23  9:16     ` Hans de Goede
2016-06-24  2:50     ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160622223745.024867071@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=kailang@realtek.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).