All of lore.kernel.org
 help / color / mirror / Atom feed
* Fix for Asus G75 notebook subwoofer
@ 2012-10-31 16:49 Massimo Del Fedele
  2012-11-01  8:11 ` Raymond Yau
  2012-11-06  8:36 ` Takashi Iwai
  0 siblings, 2 replies; 24+ messages in thread
From: Massimo Del Fedele @ 2012-10-31 16:49 UTC (permalink / raw)
  To: alsa-devel

This code fixes surround path of asus G75; i'll drop here as a function to be called
before codec initialization (I did it in static int patch_vt2002P() ) because I don't
know how to detect the notebook and apply it only when needed (I'm new to alsa code).

/* Fixes for Asus G75 subwoofer
    pin 24 is marked as speaker by bios -- should mark as line
    pin 33 has a wrong connection to out-of-range nid #3e
*/
  static int fix_asus_g75_subwoofer(struct hda_codec *codec)
  {
	/* right connection to pin widget #33 */
	hda_nid_t conn[8] = {0x1c};
	unsigned int conf;
	
	/* Fix connection of pin widget #33 on VT1802p
	 * reported connection (33-1e) refers to non-existent widget #1e which in turn
	 * reports a connection to #1c; we skip nonexistent 1e widget landing directly
	 * on 1c one
	 */
  	snd_hda_override_conn_list(codec, 0x33, 1, conn);

	// pin 24 should be marked as line out pin (not speaker as in bios)
	// and as AC_JACK_PORT_COMPLEX connection to avoid to be taken by autoparser as a speaker
	conf = snd_hda_codec_get_pincfg(codec, 0x24);
	conf = conf & ~AC_DEFCFG_DEVICE;
	conf = (conf & ~AC_DEFCFG_PORT_CONN) | (AC_JACK_PORT_COMPLEX << AC_DEFCFG_PORT_CONN_SHIFT);
	snd_hda_codec_set_pincfg(codec, 0x24, conf);
	
	// pin 33 should be marked as line out pin (not speaker as in bios)
	// and as AC_JACK_PORT_COMPLEX, not AC_JACK_PORT_NONE as in bios
	conf = snd_hda_codec_get_pincfg(codec, 0x33);
	conf = conf & ~AC_DEFCFG_DEVICE;
	conf = (conf & ~AC_DEFCFG_PORT_CONN) | (AC_JACK_PORT_COMPLEX << AC_DEFCFG_PORT_CONN_SHIFT);
	snd_hda_codec_set_pincfg(codec, 0x33, conf);

	return 0;
}

I guess that the fix on NID #33 should be applied anyways on VT1802p, because by now it connects to a non-existing widget
(well, it does exist but is not documented and out of NID range; it should be a stereo-to-mono mixer).
BTW, also NID #34, which has 2 connections, has one of them to non-existing nid above; in my case it does no harm :

Widget #24 -- ANALOG STEREO PIN COMPLEX
	Input from widgets :  14 3e       <-- widget 3e is out of range, but connects to 1c widget
	Connection type : JACK
	Device          : LINE OUT
	Does NOT support unsolicited response
	Out amp  present
	In amp NOT present

Ciao

Max

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

end of thread, other threads:[~2012-11-07 17:13 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-31 16:49 Fix for Asus G75 notebook subwoofer Massimo Del Fedele
2012-11-01  8:11 ` Raymond Yau
2012-11-01 11:15   ` Massimo Del Fedele
2012-11-02  1:44     ` Raymond Yau
2012-11-02 14:57       ` Massimo Del Fedele
2012-11-03  0:37         ` Raymond Yau
2012-11-03  9:04           ` Massimo Del Fedele
2012-11-04  6:27         ` Raymond Yau
2012-11-04  9:31           ` Massimo Del Fedele
2012-11-07  0:50             ` Raymond Yau
2012-11-06  8:36 ` Takashi Iwai
2012-11-06  8:57   ` Massimo Del Fedele
2012-11-06  9:06     ` Takashi Iwai
2012-11-06 14:18       ` Massimo Del Fedele
2012-11-06 14:24         ` Takashi Iwai
2012-11-06 17:23           ` Massimo Del Fedele
2012-11-07  8:56             ` Takashi Iwai
2012-11-07  8:56             ` Takashi Iwai
2012-11-07 13:37               ` Massimo Del Fedele
2012-11-07 13:45                 ` Takashi Iwai
2012-11-07 15:51                   ` Massimo Del Fedele
2012-11-07 15:54                     ` Takashi Iwai
2012-11-07 17:02                       ` Massimo Del Fedele
2012-11-07 17:13                         ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.