All of lore.kernel.org
 help / color / mirror / Atom feed
* [Hda-intel] Toshiba U205 / HP nx6320 whitepaper
@ 2006-10-21 16:42 Ali Shah
  2006-10-21 19:00 ` Tobin Davis
  0 siblings, 1 reply; 2+ messages in thread
From: Ali Shah @ 2006-10-21 16:42 UTC (permalink / raw)
  To: alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 1067 bytes --]

Hey guys,
I am new to alsa development and I am in the midst of trying to debug the
sound on my Toshiba Satellite u205 (no sound of the speakers, very very
quiet sound of the headphone jack- it is an AD1981 chipset). My initial
assumption is that the internal amplifier is not kicking in to boost the
sound. So I have been reading the source code for the HP nx6320 patch to
understand ALSA better and I was wondering if anyone would know if I could
find the whitepaper for the chipset that the nx6320 uses (so i can figure
out why certain structures are coded the way they are).
So far I have tried to define new volume and mute definitions in the
snd_kcontrol_new ad1981_mixers[] ranging from 0x00 to 0x15 to "guess and
check" if i can some how raise the volume or unmute the amplifier out.
However there is something wrong with this approach that is not working and
I am not familiar with alsa enough to figure out why :).
Attached is the results of #cat /proc/asound/card0/codec#0 for my codec, if
anyone has any hints as to how to proceed please let me know!
Ali

[-- Attachment #1.2: Type: text/html, Size: 1098 bytes --]

[-- Attachment #2: codec#0.txt --]
[-- Type: text/plain, Size: 5997 bytes --]

Codec: Analog Devices AD1981
Address: 0
Vendor Id: 0x11d41981
Subsystem Id: 0x11790311
Revision Id: 0x100200
Default PCM: rates 0x07f, bits 0x0e, types 0x1
Default Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
Default Amp-Out caps: ofs=0x3d, nsteps=0x3f, stepsize=0x05, mute=1
Node 0x02 [Audio Output] wcaps 0x30311: Stereo Digital
  PCM: rates 0x060, bits 0x02, types 0x5
  Connection: 2
     0x01* 0x04
Node 0x03 [Audio Output] wcaps 0x441: Stereo
  Power: 0x0
Node 0x04 [Audio Input] wcaps 0x100511: Stereo
  PCM: rates 0x07f, bits 0x06, types 0x1
  Power: 0x0
  Connection: 1
     0x15
Node 0x05 [Pin Complex] wcaps 0x400187: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00] [0x00 0x00]
  Amp-Out caps: ofs=0x3d, nsteps=0x3f, stepsize=0x05, mute=1
  Amp-Out vals:  [0x3f 0x3f]
  Pincap 0x081173f: IN OUT HP EAPD Detect
  Pin Default 0x90170110: [Fixed] Speaker at Int N/A
    Conn = Analog, Color = Unknown
  Pin-ctls: 0x40: OUT
  Connection: 2
     0x03 0x0e*
Node 0x06 [Pin Complex] wcaps 0x400185: Stereo Amp-Out
  Amp-Out caps: ofs=0x3d, nsteps=0x3f, stepsize=0x05, mute=1
  Amp-Out vals:  [0x3f 0x3f]
  Pincap 0x081f: OUT HP Detect
  Pin Default 0x0221101f: [Jack] HP Out at Ext Front
    Conn = 1/8, Color = Black
  Pin-ctls: 0xc0: OUT HP
  Connection: 2
     0x03 0x0e*
Node 0x07 [Pin Complex] wcaps 0x400104: Mono Amp-Out
  Amp-Out caps: ofs=0x3d, nsteps=0x3f, stepsize=0x05, mute=1
  Amp-Out vals:  [0xbf]
  Pincap 0x0810: OUT
  Pin Default 0x40f000fe: [N/A] Other at Ext N/A
    Conn = Unknown, Color = Unknown
  Pin-ctls: 0x40: OUT
  Connection: 1
     0x0f
Node 0x08 [Pin Complex] wcaps 0x400083: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals: 
  Pincap 0x081727: IN Detect
  Pin Default 0x02a11020: [Jack] Mic at Ext Front
    Conn = 1/8, Color = Black
  Pin-ctls: 0x24: IN
Node 0x09 [Pin Complex] wcaps 0x400187: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00] [0x00 0x00]
  Amp-Out caps: ofs=0x3d, nsteps=0x3f, stepsize=0x05, mute=1
  Amp-Out vals:  [0x3f 0x3f]
  Pincap 0x081737: IN OUT Detect
  Pin Default 0x40f000fd: [N/A] Other at Ext N/A
    Conn = Unknown, Color = Unknown
  Pin-ctls: 0x20: IN
  Connection: 2
     0x03* 0x0e
Node 0x0a [Pin Complex] wcaps 0x400301: Stereo Digital
  Pincap 0x0810: OUT
  Pin Default 0x40f000fc: [N/A] Other at Ext N/A
    Conn = Unknown, Color = Unknown
  Pin-ctls: 0x40: OUT
  Connection: 1
     0x02
Node 0x0b [Audio Selector] wcaps 0x300101: Stereo
  Connection: 6
     0x03 0x0c 0x09 0x0e* 0x05 0x18
Node 0x0c [Audio Mixer] wcaps 0x200101: Stereo
  Connection: 2
     0x1e 0x1f
Node 0x0d [Audio Selector] wcaps 0x30010c: Mono Amp-Out
  Amp-Out caps: ofs=0x0f, nsteps=0x0f, stepsize=0x0b, mute=1
  Amp-Out vals:  [0x0f]
  Connection: 2
     0x10* 0x16
Node 0x0e [Audio Mixer] wcaps 0x200101: Stereo
  Connection: 8
     0x0d 0x11 0x12 0x13 0x1a 0x1b 0x1c 0x1d
Node 0x0f [Audio Mixer] wcaps 0x200100: Mono
  Connection: 1
     0x0b
Node 0x10 [Beep Generator Widget] wcaps 0x700000: Mono
Node 0x11 [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-Out vals:  [0x1f 0x1f]
  Connection: 1
     0x03
Node 0x12 [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-Out vals:  [0x80 0x80]
  Connection: 1
     0x08
Node 0x13 [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-Out vals:  [0x80 0x80]
  Connection: 1
     0x09
Node 0x14 [Power Widget] wcaps 0x500500: Mono
  Power: 0x0
  Connection: 13
     0x0d* 0x0e 0x0f 0x10 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1d
Node 0x15 [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x00, nsteps=0x0f, stepsize=0x05, mute=1
  Amp-Out vals:  [0x0f 0x0f]
  Connection: 8
     0x0c 0x09 0x0e* 0x0f 0x19 0x05 0x18 0x17
Node 0x16 [Pin Complex] wcaps 0x400000: Mono
  Pincap 0x0820: IN
  Pin Default 0x90f70150: [Fixed] Other at Int N/A
    Conn = Analog, Color = Unknown
  Pin-ctls: 0x20: IN
Node 0x17 [Pin Complex] wcaps 0x400081: Stereo
  Pincap 0x0827: IN Detect
  Pin Default 0x40f000fb: [N/A] Other at Ext N/A
    Conn = Unknown, Color = Unknown
  Pin-ctls: 0x20: IN
Node 0x18 [Pin Complex] wcaps 0x400187: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x03 0x03] [0x03 0x03]
  Amp-Out caps: ofs=0x3d, nsteps=0x3f, stepsize=0x05, mute=1
  Amp-Out vals:  [0x3f 0x3f]
  Pincap 0x081737: IN OUT Detect
  Pin Default 0x92a7012e: [Fixed] Mic at Int Front
    Conn = Analog, Color = Unknown
  Pin-ctls: 0x24: IN
  Connection: 2
     0x03* 0x0e
Node 0x19 [Pin Complex] wcaps 0x400001: Stereo
  Pincap 0x0820: IN
  Pin Default 0x40f000fa: [N/A] Other at Ext N/A
    Conn = Unknown, Color = Unknown
  Pin-ctls: 0x20: IN
Node 0x1a [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-Out vals:  [0x1f 0x1f]
  Connection: 1
     0x05
Node 0x1b [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-Out vals:  [0x80 0x80]
  Connection: 1
     0x17
Node 0x1c [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-Out vals:  [0x80 0x80]
  Connection: 1
     0x18
Node 0x1d [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-Out vals:  [0x80 0x80]
  Connection: 1
     0x19
Node 0x1e [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Connection: 1
     0x08
Node 0x1f [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Connection: 1
     0x18

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

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

[-- Attachment #4: Type: text/plain, Size: 161 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-devel

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

* Re: [Hda-intel] Toshiba U205 / HP nx6320 whitepaper
  2006-10-21 16:42 [Hda-intel] Toshiba U205 / HP nx6320 whitepaper Ali Shah
@ 2006-10-21 19:00 ` Tobin Davis
  0 siblings, 0 replies; 2+ messages in thread
From: Tobin Davis @ 2006-10-21 19:00 UTC (permalink / raw)
  To: Ali Shah; +Cc: alsa-devel

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

Here's a wild guess.  The HP patch code implies that the eapd bit
function is reversed.  This patch should change that behavior to logical
norm.  Test it with "model=toshiba" and let me know if there is any
improvement.  If it works, I'll add your device id and submit an
official patch.

Also, post the output from "lspci -s 0:1b -vn", as this will give us the
proper sub-vendor and sub-device id's for the driver.

Tobin

On Sat, 2006-10-21 at 12:42 -0400, Ali Shah wrote:
> Hey guys, 
> I am new to alsa development and I am in the midst of trying to debug
> the sound on my Toshiba Satellite u205 (no sound of the speakers, very
> very quiet sound of the headphone jack- it is an AD1981 chipset). My
> initial assumption is that the internal amplifier is not kicking in to
> boost the sound. So I have been reading the source code for the HP
> nx6320 patch to understand ALSA better and I was wondering if anyone
> would know if I could find the whitepaper for the chipset that the
> nx6320 uses (so i can figure out why certain structures are coded the
> way they are). 
> So far I have tried to define new volume and mute definitions in the
> snd_kcontrol_new ad1981_mixers[] ranging from 0x00 to 0x15 to "guess
> and check" if i can some how raise the volume or unmute the amplifier
> out. However there is something wrong with this approach that is not
> working and I am not familiar with alsa enough to figure out why :). 
> Attached is the results of #cat /proc/asound/card0/codec#0 for my
> codec, if anyone has any hints as to how to proceed please let me
> know!
> Ali
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________ Alsa-devel mailing list Alsa-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-devel
-- 
Tobin Davis <tdavis@dsl-only.net>

[-- Attachment #2: toshiba-analog-test1.patch --]
[-- Type: text/x-patch, Size: 2315 bytes --]

diff -r d7fe584f7395 pci/hda/patch_analog.c
--- a/pci/hda/patch_analog.c	Thu Oct 19 20:35:56 2006 +0200
+++ b/pci/hda/patch_analog.c	Sat Oct 21 11:29:12 2006 -0700
@@ -1346,6 +1346,15 @@ static int ad1981_hp_init(struct hda_cod
 	return 0;
 }
 
+/* configuration for Toshiba Laptops */
+static struct hda_verb ad1981_toshiba_init_verbs[] = {
+	{0x05, AC_VERB_SET_EAPD_BTLENABLE, 0x01 }, /* default on */
+	/* pin sensing on HP and Mic jacks */
+	{0x06, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | AD1981_HP_EVENT},
+	{0x08, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | AD1981_MIC_EVENT},
+	{}
+};
+
 /* configuration for Lenovo Thinkpad T60 */
 static struct snd_kcontrol_new ad1981_thinkpad_mixers[] = {
 	HDA_CODEC_VOLUME("Master Playback Volume", 0x05, 0x0, HDA_OUTPUT),
@@ -1386,12 +1395,17 @@ static struct hda_input_mux ad1981_think
 	},
 };
 
-/* models */
-enum { AD1981_BASIC, AD1981_HP, AD1981_THINKPAD };
+/* AD1981 models */
+enum {  AD1981_BASIC,
+	AD1981_HP,
+	AD1981_THINKPAD,
+	AD1981_TOSHIBA };
 
 static struct hda_board_config ad1981_cfg_tbl[] = {
+	/* Basic AD1981 Configuration */
+	{ .modelname = "basic", .config = AD1981_BASIC },
+	/* All HP models */
 	{ .modelname = "hp", .config = AD1981_HP },
-	/* All HP models */
 	{ .pci_subvendor = 0x103c, .config = AD1981_HP },
 	{ .pci_subvendor = 0x30b0, .pci_subdevice = 0x103c,
 	  .config = AD1981_HP }, /* HP nx6320 (reversed SSID, H/W bug) */
@@ -1400,7 +1414,8 @@ static struct hda_board_config ad1981_cf
 	{ .pci_subvendor = 0x17aa, .config = AD1981_THINKPAD },
 	{ .pci_subvendor = 0x1014, .pci_subdevice = 0x0597,
 	  .config = AD1981_THINKPAD }, /* Z60m/t */
-	{ .modelname = "basic", .config = AD1981_BASIC },
+	/* Toshiba Laptops */
+	{ .modelname="toshiba", .config = AD1981_TOSHIBA },
 	{}
 };
 
@@ -1449,8 +1464,16 @@ static int patch_ad1981(struct hda_codec
 		spec->mixers[0] = ad1981_thinkpad_mixers;
 		spec->input_mux = &ad1981_thinkpad_capture_source;
 		break;
+	case AD1981_TOSHIBA:
+		spec->mixers[0] = ad1981_hp_mixers;
+		spec->num_init_verbs = 2;
+		spec->init_verbs[1] = ad1981_toshiba_init_verbs;
+		spec->multiout.dig_out_nid = 0;
+		spec->input_mux = &ad1981_hp_capture_source;
+		codec->patch_ops.init = ad1981_hp_init;
+		codec->patch_ops.unsol_event = ad1981_hp_unsol_event;
+		break;
 	}
-
 	return 0;
 }
 

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

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

[-- Attachment #4: Type: text/plain, Size: 161 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-devel

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

end of thread, other threads:[~2006-10-21 19:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-21 16:42 [Hda-intel] Toshiba U205 / HP nx6320 whitepaper Ali Shah
2006-10-21 19:00 ` Tobin Davis

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.