alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* Fixed single output empty pin_sense issue for alc283
@ 2014-04-03  9:32 Kailang
  2014-04-03  9:49 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Kailang @ 2014-04-03  9:32 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

[-- Attachment #1: Type: text/plain, Size: 197 bytes --]

Hi Takashi,

Some machine with single output. It has only one HP out on it.
alc283_init and alc283_shutup will get empty hp_pin value.
I add the check for the attachment patch.
Thanks.

BR,
Kailang

[-- Attachment #2: 0000-solve-hp-pins-empty.patch --]
[-- Type: application/octet-stream, Size: 1391 bytes --]

>From bd51a4611d373c5e4895023cb658ae1371783d94 Mon Sep 17 00:00:00 2001
From: Kailang Yang <kailang@realtek.com>
Date: Thu, 3 Apr 2014 17:28:39 +0800
Subject: [PATCH] ALSA: hda/realtek - Fixed single output machine get empty hp
 sense

If it only has single output of HP out of machine.
The driver parser will copy hp_pins to line_out_pins.
hp_pins will empty for alc283_init and alc283_shutup functions.
This will cause not have value for hp_pin_sense.
Add check line_out_type code will solve it .

Signed-off-by: Kailang Yang <kailang@realtek.com>

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index d6e4230..cd8ca1d 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3026,6 +3026,11 @@ static void alc283_init(struct hda_codec *codec)
 	bool hp_pin_sense;
 	int val;
 
+	if (!spec->gen.autocfg.hp_outs) {
+		if (spec->gen.autocfg.line_out_type == AC_JACK_HP_OUT)
+			hp_pin = spec->gen.autocfg.line_out_pins[0];
+	}
+
 	alc283_restore_default_value(codec);
 
 	if (!hp_pin)
@@ -3062,6 +3067,11 @@ static void alc283_shutup(struct hda_codec *codec)
 	bool hp_pin_sense;
 	int val;
 
+	if (!spec->gen.autocfg.hp_outs) {
+		if (spec->gen.autocfg.line_out_type == AC_JACK_HP_OUT)
+			hp_pin = spec->gen.autocfg.line_out_pins[0];
+	}
+
 	if (!hp_pin) {
 		alc269_shutup(codec);
 		return;

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: Fixed single output empty pin_sense issue for alc283
  2014-04-03  9:32 Fixed single output empty pin_sense issue for alc283 Kailang
@ 2014-04-03  9:49 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2014-04-03  9:49 UTC (permalink / raw)
  To: Kailang; +Cc: alsa-devel

At Thu, 3 Apr 2014 17:32:52 +0800,
Kailang wrote:
> 
> Hi Takashi,
> 
> Some machine with single output. It has only one HP out on it.
> alc283_init and alc283_shutup will get empty hp_pin value.
> I add the check for the attachment patch.

Thanks, applied.


Takashi


> Thanks.
> 
> BR,
> Kailang
> [2 0000-solve-hp-pins-empty.patch <application/octet-stream (quoted-printable)>]
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-04-03  9:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-03  9:32 Fixed single output empty pin_sense issue for alc283 Kailang
2014-04-03  9:49 ` Takashi Iwai

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).