All of lore.kernel.org
 help / color / mirror / Atom feed
* Got microphone working with SigmaTel STAC 9221 A1 on a Dell XPS M1210
@ 2007-06-09 23:37 Eran Guendelman
  2007-06-12 13:19 ` Takashi Iwai
  0 siblings, 1 reply; 6+ messages in thread
From: Eran Guendelman @ 2007-06-09 23:37 UTC (permalink / raw)
  To: alsa-devel, alsa-user

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

I installed SuSE 10.2 on my new XPS M1210 laptop and found that the 
microphone was not working (headphones and internal speakers worked 
fine).  I eventually got it working, and wanted to write an email 
describing how I did this.

The two main important steps (which I will describe in more detail 
below) were:
- Changing the default pin configurations ref922x_pin_configs in 
patch_sigmatel.c to values that were based on the windows driver's INI 
file but with one important tweak.
- Running the driver using the "model=ref" parameter so that the above 
modified pin configurations are used.

Note that it could be that my solution is overkill and there's actually 
a way to get this working with the unmodified alsa drivers...  But I did 
not find any such solutions (e.g. I've tried setting "model=ref", 
"model=3stack", "model=5stack", but none of those fixed the microphone). 
  In general, it seems that the solutions proposed on the internet to 
getting the SigmaTel codec working are very dependent on the exact type 
of system you've got...  So this will likely only work for a Dell XPS 
M1210.  Here is some more system info:

"lspci -v" gives this as my audio card:

00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High 
Definition Audio Controller (rev 01)
	Subsystem: Dell Unknown device 01d7
	Flags: bus master, fast devsel, latency 0, IRQ 233
	Memory at efffc000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: [50] Power Management version 2
	Capabilities: [60] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 
Enable-
	Capabilities: [70] Express Unknown type IRQ 0
	Capabilities: [100] Virtual Channel
	Capabilities: [130] Unknown (5)

My card uses the snd_hda_intel module, and the codec type (given by "cat 
/proc/asound/card0/codec#0") gives this information at the top:

Codec: SigmaTel STAC9221 A1
Address: 0
Vendor Id: 0x83847680
Subsystem Id: 0x102801d7
Revision Id: 0x103601

So here's what I did (taking many days and many wrong steps before 
arriving at this solution):

- I have a dual-boot system and installed the official DELL drivers for 
the sound card in Windows XP.  My goal was to find which INI file 
corresponded to my installed sound card, so I did the following:

	- Using Windows device manager, I looked at the properties for the 
SigmaTel codec driver and found that one of the property items had a 
string that included the substring

	VEN_8384&DEV_7680&SUBSYS_102801D7

	- The self-extracting DELL driver extracted files into 
c:\dell\drivers\r122161, and in the wdm subdirectory I searched for the 
above string and found that the files 92xxM.INI, Sthda.ini, and 
sthda64.ini all contained the above string and also had the suffix 
=92xxM8-2.ini appended to it.  This led me to deduce that the relevant 
file was 92xxm8-2.ini

	- This is an excerpt from 92xxm8-2.ini:

[HKR\Settings\pin\0A]
CfgDflt = dword: 0x0221121E
AltCfg = hex: 20,12,11,02
Action = hex: 80,00,87,00,81,0D
[HKR\Settings\pin\0B]
CfgDflt = dword: 0x408103FF
[HKR\Settings\pin\0C]
CfgDflt = dword: 0x0281123E
AltCfg = hex: 22,12,11,02,30,12,A1,02
Bias = hex: FF,04,02
Action: hex: 0A, 0C
[HKR\Settings\pin\0D]
CfgDflt = dword: 0x90100310
[HKR\Settings\pin\0E]
CfgDflt = dword: 0x408003F1
[HKR\Settings\pin\0F]
CfgDflt = dword: 0x0221122F
AltCfg = hex: 21,12,11,02
Action = hex: 80,00,87,00,81,0D
[HKR\Settings\pin\10]
CfgDflt = dword: 0x03451340
[HKR\Settings\pin\11]
CfgDflt = dword: 0x40C003F2
[HKR\Settings\pin\15]
CfgDflt = dword: 0x50A003F3
[HKR\Settings\pin\1B]
CfgDflt = dword: 0x405003F4

	- This will be useful later...  Now back to linux.

- I downloaded latest alsa-driver package (version 1.0.14).

- I edited alsa-kernel/pci/hda/patch_sigmatel.c, and replaced the 
contents of the ref922x_pin_configs array with the default pin 
configurations found in the INI file above WITH ONE IMPORTANT TWEAK. 
Specifically, this is my new array:

static unsigned int ref922x_pin_configs[10] = {
     0x0221121E, 0x408103FF, 0x02A1123E, 0x90100310,
     0x408003F1, 0x0221122F, 0x03451340, 0x40C003F2,
     0x50A003F3, 0x405003F4
};

- If you compare these numbers to the CfgDflt values from the Windows 
INI file above, you'll see that they match except that for the third 
value, instead of
	0x281123E
I use
	0x2A1123E

Here's why:  I figured out that pin complex 0x0c was my microphone jack 
(the right-most of the three jacks in the front of my laptop).  The 
0x281123E configuration indicates a "Line In at Ext Front" jack... 
Indeed, this jack can serve as a line in or mic in or even I believe as 
output to rear speakers.  But designating it as Line In by default seems 
to confuse the patch_sigmatel.c routines that set up the codec...  They 
assume it's just a line in jack and do not mark it as potential 
microphone input.  Changing the 8 to an A in the value designates it as 
"Mic at Ext Front", so the codec recognizes it as the microphone input 
for the card.  What ends up happening is that as a microphone input, the 
Pin-ctls for the pin gets assigned to 0x24, whereas when it just thinks 
it's a Line In the Pin-ctls gets set to 0x20.  Both designate an input, 
but the 4 in 0x24 seems to also give it a Voltage Reference Signal which 
I guess is important for microphone inputs.  (I don't fully understand 
most of this stuff... I've just been reading up about the HD Audio specs 
over the last few days).

- Build and install drivers using
	"./configure --with-cards=hda-intel --with-sequencer=yes; make; make 
install"

- Make sure the snd_hda_intel gets loaded with model=ref option.  You 
need to specify the ref model so that the pin configurations set up 
above are used.  Of course, the right way to do this would be to make a 
whole new model, but I didn't bother doing that in my quick hack. 
Anyway, in SuSE 10.2 you can set the model through YaST, or you can 
manually edit /etc/modprobe.d/sound and make sure model=ref is listed as 
one of the options in the "options snd-hda-intel  . . ." line

- Reset sound drivers.  (Best to just reset computer, but on SuSE 10.2 
it usually works if I do "/etc/init.d/alsasound reset")

- And that's basically it...  In the mixer (e.g. alsamixer) it's 
important to make sure the Capture channel has "CAPTUR" on and that it's 
at a high value, and that the Mux is at its max too.  It does not allow 
me to change "Input Source", but that's fine because the above 
essentially hard codes it to be Front Mic which is what I wanted.

I've attached the contents of /proc/asound/card0/codec#0 in its good 
(mic working) state.  The final path is
	0x0c (mic)
	-> 0x12 (audio selector, stereo amp-out; Mux in the mixer)
	-> 0x17 (audio selector, stereo amp-in; Capture in the mixer)
	-> 0x06 (audio input)

After searching on the internet, reading about HD Audio, and poking 
around the driver code, I do have a number of lingering questions I 
would be happy to have answered:

- Why does patch_sigmatel.c "fix" mux capture levels to 2?  The Mux 
(0x12) ends up in the path from the mic in jack to the audio in, so is 
it supposed to act as a Mic Boost or something?

- I noticed my headphone jacks (0x0a, 0x0f) have Pin-ctls set at 0xc0 
which is OUT HP (i.e. uses a low impedance amplifier for headphone 
output).  Would it damage my sound card or speakers if I connected these 
jacks to powered speakers or to an audio receiver (i.e. more 
traditionally connected to a Line Out)?

- Does the snd_hda_intel driver currently (or will it eventually) 
support dynamic switching so I can switch from the Mic In to Line In or 
to Rear Speakers Out, etc, just like in the Windows driver?

- Some solutions on the internet talked about creating an .asoundrc file 
to get the codec working...  I don't understand what that file is for 
and whether I need to tweak it at all...  But since I have a working 
solution without the file I guess I'm fine?

Thanks,

Eran.

P.S. Not subscribed, so please respond by email...


[-- Attachment #2: codec --]
[-- Type: text/plain, Size: 4397 bytes --]

Codec: SigmaTel STAC9221 A1
Address: 0
Vendor Id: 0x83847680
Subsystem Id: 0x102801d7
Revision Id: 0x103601
Default PCM:
    rates [0x7e0]: 44100 48000 88200 96000 176400 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Default Amp-In caps: ofs=0x00, nsteps=0x0e, stepsize=0x05, mute=1
Default Amp-Out caps: ofs=0x7f, nsteps=0x7f, stepsize=0x02, mute=1
Node 0x02 [Audio Output] wcaps 0xd0c05: Stereo Amp-Out
  Amp-Out caps: N/A
  Amp-Out vals:  [0x6b 0x6b]
  Power: 0x0
Node 0x03 [Audio Output] wcaps 0xd0c05: Stereo Amp-Out
  Amp-Out caps: N/A
  Amp-Out vals:  [0xff 0xff]
  Power: 0x0
Node 0x04 [Audio Output] wcaps 0xd0c05: Stereo Amp-Out
  Amp-Out caps: N/A
  Amp-Out vals:  [0xff 0xff]
  Power: 0x0
Node 0x05 [Audio Output] wcaps 0xd0c05: Stereo Amp-Out
  Amp-Out caps: N/A
  Amp-Out vals:  [0x66 0x6d]
  Power: 0x0
Node 0x06 [Audio Input] wcaps 0x1d0541: Stereo
  Power: 0x0
  Connection: 1
     0x17
Node 0x07 [Audio Input] wcaps 0x1d0541: Stereo
  Power: 0x0
  Connection: 1
     0x18
Node 0x08 [Audio Output] wcaps 0x40211: Stereo Digital
  PCM:
    rates [0x7e0]: 44100 48000 88200 96000 176400 192000
    bits [0xe]: 16 20 24
    formats [0x5]: PCM AC3
Node 0x09 [Audio Input] wcaps 0x140311: Stereo Digital
  PCM:
    rates [0x160]: 44100 48000 96000
    bits [0xe]: 16 20 24
    formats [0x5]: PCM AC3
  Connection: 1
     0x11
Node 0x0a [Pin Complex] wcaps 0x400181: Stereo
  Pincap 0x08173f: IN OUT HP Detect
  Pin Default 0x0221121e: [Jack] HP Out at Ext Front
    Conn = 1/8, Color = Black
  Pin-ctls: 0xc0: OUT HP
  Connection: 1
     0x02
Node 0x0b [Pin Complex] wcaps 0x400181: Stereo
  Pincap 0x081737: IN OUT Detect
  Pin Default 0x408103ff: [N/A] Line In at Ext N/A
    Conn = 1/8, Color = Unknown
  Pin-ctls: 0x20: IN
  Connection: 1
     0x04
Node 0x0c [Pin Complex] wcaps 0x400181: Stereo
  Pincap 0x081737: IN OUT Detect
  Pin Default 0x02a1123e: [Jack] Mic at Ext Front
    Conn = 1/8, Color = Black
  Pin-ctls: 0x24: IN
  Connection: 1
     0x03
Node 0x0d [Pin Complex] wcaps 0x400181: Stereo
  Pincap 0x08173f: IN OUT HP Detect
  Pin Default 0x90100310: [Fixed] Speaker at Int N/A
    Conn = Unknown, Color = Unknown
  Pin-ctls: 0x40: OUT
  Connection: 1
     0x02
Node 0x0e [Pin Complex] wcaps 0x400081: Stereo
  Pincap 0x0824: IN Detect
  Pin Default 0x408003f1: [N/A] Line In at Ext N/A
    Conn = Unknown, Color = Unknown
  Pin-ctls: 0x20: IN
Node 0x0f [Pin Complex] wcaps 0x400181: Stereo
  Pincap 0x0837: IN OUT Detect
  Pin Default 0x0221122f: [Jack] HP Out at Ext Front
    Conn = 1/8, Color = Black
  Pin-ctls: 0xc0: OUT HP
  Connection: 1
     0x05
Node 0x10 [Pin Complex] wcaps 0x400301: Stereo Digital
  Pincap 0x0810: OUT
  Pin Default 0x03451340: [Jack] SPDIF Out at Ext Left
    Conn = Optical, Color = Black
  Pin-ctls: 0x40: OUT
  Connection: 3
     0x08* 0x17 0x19
Node 0x11 [Pin Complex] wcaps 0x430681: Stereo Digital
  Pincap 0x0810024: IN EAPD Detect
  Pin Default 0x40c003f2: [N/A] SPDIF In at Ext N/A
    Conn = Unknown, Color = Unknown
  Pin-ctls: 0x00:
  Power: 0x0
Node 0x12 [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x00, nsteps=0x04, stepsize=0x27, mute=0
  Amp-Out vals:  [0x02 0x02]
  Connection: 7
     0x0e 0x15 0x0f 0x0b 0x0c* 0x0d 0x0a
Node 0x13 [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x00, nsteps=0x04, stepsize=0x27, mute=0
  Amp-Out vals:  [0x00 0x00]
  Connection: 7
     0x0e 0x15 0x0f 0x0b 0x0c* 0x0d 0x0a
Node 0x14 [Beep Generator Widget] wcaps 0x70000c: Mono Amp-Out
  Amp-Out caps: ofs=0x03, nsteps=0x03, stepsize=0x17, mute=0
  Amp-Out vals:  [0x00]
Node 0x15 [Pin Complex] wcaps 0x400001: Stereo
  Pincap 0x0820: IN
  Pin Default 0x50a003f3: [N/A] Mic at Int N/A
    Conn = Unknown, Color = Unknown
  Pin-ctls: 0x00:
Node 0x16 [Volume Knob Widget] wcaps 0x600000: Mono
Node 0x17 [Audio Selector] wcaps 0x300903: Stereo Amp-In
  Amp-In caps: N/A
  Amp-In vals:  [0x0e 0x0e]
  Connection: 1
     0x12
Node 0x18 [Audio Selector] wcaps 0x300903: Stereo Amp-In
  Amp-In caps: N/A
  Amp-In vals:  [0x80 0x80]
  Connection: 1
     0x13
Node 0x19 [Vendor Defined Widget] wcaps 0xf30201: Stereo Digital
Node 0x1a [Audio Output] wcaps 0x30201: Stereo Digital
Node 0x1b [Pin Complex] wcaps 0x400301: Stereo Digital
  Pincap 0x0810: OUT
  Pin Default 0x405003f4: [N/A] Digital Out at Ext N/A
    Conn = Unknown, Color = Unknown
  Pin-ctls: 0x00:
  Connection: 1
     0x1a

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

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: Got microphone working with SigmaTel STAC 9221 A1 on a Dell XPS M1210
  2007-06-09 23:37 Got microphone working with SigmaTel STAC 9221 A1 on a Dell XPS M1210 Eran Guendelman
@ 2007-06-12 13:19 ` Takashi Iwai
  2007-06-12 13:30   ` Takashi Iwai
  2007-06-13  6:49   ` Eran Guendelman
  0 siblings, 2 replies; 6+ messages in thread
From: Takashi Iwai @ 2007-06-12 13:19 UTC (permalink / raw)
  To: Eran Guendelman; +Cc: alsa-devel, alsa-user

At Sat, 09 Jun 2007 16:37:11 -0700,
Eran Guendelman wrote:
> 
> I installed SuSE 10.2 on my new XPS M1210 laptop and found that the 
> microphone was not working (headphones and internal speakers worked 
> fine).  I eventually got it working, and wanted to write an email 
> describing how I did this.
> 
> The two main important steps (which I will describe in more detail 
> below) were:
> - Changing the default pin configurations ref922x_pin_configs in 
> patch_sigmatel.c to values that were based on the windows driver's INI 
> file but with one important tweak.
> - Running the driver using the "model=ref" parameter so that the above 
> modified pin configurations are used.
> 
> Note that it could be that my solution is overkill and there's actually 
> a way to get this working with the unmodified alsa drivers...  But I did 
> not find any such solutions (e.g. I've tried setting "model=ref", 
> "model=3stack", "model=5stack", but none of those fixed the microphone). 

So, we need to add a new model.  Could you give the output of "lspci
-nv", too?  We need PCI SSID to identify the device.  Then I can write
a patch to try.


(snip)
> - Why does patch_sigmatel.c "fix" mux capture levels to 2?  The Mux 
> (0x12) ends up in the path from the mic in jack to the audio in, so is 
> it supposed to act as a Mic Boost or something?

The debug with intel macs revealed that a too high mux capture value
results in disablement of the recording functionality.  Thus, it's now
limited to 2, the highest value it accepted.


> - I noticed my headphone jacks (0x0a, 0x0f) have Pin-ctls set at 0xc0 
> which is OUT HP (i.e. uses a low impedance amplifier for headphone 
> output).  Would it damage my sound card or speakers if I connected these 
> jacks to powered speakers or to an audio receiver (i.e. more 
> traditionally connected to a Line Out)?

Practically, I don't think so.  This setup is normal over all
devices.


> - Does the snd_hda_intel driver currently (or will it eventually) 
> support dynamic switching so I can switch from the Mic In to Line In or 
> to Rear Speakers Out, etc, just like in the Windows driver?

Hm?  It should have already the switches, "Line In As Output" and "Mic
As Output"...


> - Some solutions on the internet talked about creating an .asoundrc file 
> to get the codec working...  I don't understand what that file is for 
> and whether I need to tweak it at all...  But since I have a working 
> solution without the file I guess I'm fine?

A rumor is a rumor.  asoundrc has nothing to do with the codec :)


thanks,

Takashi

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

* Re: Got microphone working with SigmaTel STAC 9221 A1 on a Dell XPS M1210
  2007-06-12 13:19 ` Takashi Iwai
@ 2007-06-12 13:30   ` Takashi Iwai
  2007-06-13  6:49   ` Eran Guendelman
  1 sibling, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2007-06-12 13:30 UTC (permalink / raw)
  To: Eran Guendelman; +Cc: alsa-devel, alsa-user

At Tue, 12 Jun 2007 15:19:02 +0200,
I wrote:
> 
> At Sat, 09 Jun 2007 16:37:11 -0700,
> Eran Guendelman wrote:
> > 
> > I installed SuSE 10.2 on my new XPS M1210 laptop and found that the 
> > microphone was not working (headphones and internal speakers worked 
> > fine).  I eventually got it working, and wanted to write an email 
> > describing how I did this.
> > 
> > The two main important steps (which I will describe in more detail 
> > below) were:
> > - Changing the default pin configurations ref922x_pin_configs in 
> > patch_sigmatel.c to values that were based on the windows driver's INI 
> > file but with one important tweak.
> > - Running the driver using the "model=ref" parameter so that the above 
> > modified pin configurations are used.
> > 
> > Note that it could be that my solution is overkill and there's actually 
> > a way to get this working with the unmodified alsa drivers...  But I did 
> > not find any such solutions (e.g. I've tried setting "model=ref", 
> > "model=3stack", "model=5stack", but none of those fixed the microphone). 
> 
> So, we need to add a new model.  Could you give the output of "lspci
> -nv", too?  We need PCI SSID to identify the device.  Then I can write
> a patch to try.

FYI, the below is a test patch I blindly pasted the ID you showed.
But, the codec SSID isn't always identical with PCI SSID, so please
check the output of "lspci -nv", and fix the value appropriately.


Takashi

diff -r 640ed49a540d Documentation/ALSA-Configuration.txt
--- a/Documentation/ALSA-Configuration.txt	Tue Jun 12 11:27:46 2007 +0200
+++ b/Documentation/ALSA-Configuration.txt	Tue Jun 12 15:25:44 2007 +0200
@@ -927,6 +927,7 @@ Prior to version 0.9.0rc4 options had a 
 	  ref		Reference board
 	  3stack	D945 3stack
 	  5stack	D945 5stack + SPDIF
+	  dell		Dell XPS M1210
 	  intel-mac-v1	Intel Mac Type 1
 	  intel-mac-v2	Intel Mac Type 2
 	  intel-mac-v3	Intel Mac Type 3
diff -r 640ed49a540d pci/hda/patch_sigmatel.c
--- a/pci/hda/patch_sigmatel.c	Tue Jun 12 11:27:46 2007 +0200
+++ b/pci/hda/patch_sigmatel.c	Tue Jun 12 15:25:13 2007 +0200
@@ -59,6 +59,7 @@ enum {
 	STAC_D945_REF,
 	STAC_D945GTP3,
 	STAC_D945GTP5,
+	STAC_922X_DELL,
 	STAC_INTEL_MAC_V1,
 	STAC_INTEL_MAC_V2,
 	STAC_INTEL_MAC_V3,
@@ -586,10 +587,17 @@ static unsigned int intel_mac_v5_pin_con
 	0x400000fc, 0x400000fb,
 };
 
+static unsigned int stac922x_dell_pin_configs[10] = {
+	0x0221121e, 0x408103ff, 0x02a1123e, 0x90100310,
+	0x408003f1, 0x0221122f, 0x03451340, 0x40c003f2,
+	0x50a003f3, 0x405003f4
+};
+
 static unsigned int *stac922x_brd_tbl[STAC_922X_MODELS] = {
 	[STAC_D945_REF] = ref922x_pin_configs,
 	[STAC_D945GTP3] = d945gtp3_pin_configs,
 	[STAC_D945GTP5] = d945gtp5_pin_configs,
+	[STAC_922X_DELL] = stac922x_dell_pin_configs,
 	[STAC_INTEL_MAC_V1] = intel_mac_v1_pin_configs,
 	[STAC_INTEL_MAC_V2] = intel_mac_v2_pin_configs,
 	[STAC_INTEL_MAC_V3] = intel_mac_v3_pin_configs,
@@ -608,6 +616,7 @@ static const char *stac922x_models[STAC_
 	[STAC_D945_REF]	= "ref",
 	[STAC_D945GTP5]	= "5stack",
 	[STAC_D945GTP3]	= "3stack",
+	[STAC_922X_DELL] = "dell",
 	[STAC_INTEL_MAC_V1] = "intel-mac-v1",
 	[STAC_INTEL_MAC_V2] = "intel-mac-v2",
 	[STAC_INTEL_MAC_V3] = "intel-mac-v3",
@@ -683,6 +692,9 @@ static struct snd_pci_quirk stac922x_cfg
 	/* Apple Mac Mini (early 2006) */
 	SND_PCI_QUIRK(0x8384, 0x7680,
 		      "Mac Mini", STAC_INTEL_MAC_V3),
+	/* Dell */
+	SND_PCI_QUIRK(0x1028, 0x01d7, "Dell XPS M1210", STAC_922X_DELL),
+
 	{} /* terminator */
 };

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

* Re: Got microphone working with SigmaTel STAC 9221 A1 on a Dell XPS M1210
  2007-06-12 13:19 ` Takashi Iwai
  2007-06-12 13:30   ` Takashi Iwai
@ 2007-06-13  6:49   ` Eran Guendelman
  2007-06-13 10:11     ` Takashi Iwai
  1 sibling, 1 reply; 6+ messages in thread
From: Eran Guendelman @ 2007-06-13  6:49 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel, alsa-user

> So, we need to add a new model.  Could you give the output of "lspci
> -nv", too?  We need PCI SSID to identify the device.  Then I can write
> a patch to try.

00:1b.0 Class 0403: 8086:27d8 (rev 01)
         Subsystem: 1028:01d7
         Flags: bus master, fast devsel, latency 0, IRQ 233
         Memory at efffc000 (64-bit, non-prefetchable) [size=16K]
         Capabilities: [50] Power Management version 2
         Capabilities: [60] Message Signalled Interrupts: Mask- 64bit+ 
Queue=0/0 Enable-
         Capabilities: [70] Express Unknown type IRQ 0
         Capabilities: [100] Virtual Channel
         Capabilities: [130] Unknown (5)

>> - Does the snd_hda_intel driver currently (or will it eventually) 
>> support dynamic switching so I can switch from the Mic In to Line In or 
>> to Rear Speakers Out, etc, just like in the Windows driver?
> 
> Hm?  It should have already the switches, "Line In As Output" and "Mic
> As Output"...

I did see those when I tried the 3stack mode, but in my current fix 
(modifying "ref" with my pin configs) I don't get such options in the 
mixer.  Any idea what I would need to do to get it to add these switches 
to the mixer?  This is the output from "amixer controls"

numid=8,iface=MIXER,name='Master Playback Switch'
numid=7,iface=MIXER,name='Master Playback Volume'
numid=13,iface=MIXER,name='PCM Playback Volume'
numid=6,iface=MIXER,name='Front Playback Switch'
numid=5,iface=MIXER,name='Front Playback Volume'
numid=3,iface=MIXER,name='Capture Switch'
numid=2,iface=MIXER,name='Capture Volume'
numid=9,iface=MIXER,name='IEC958 Playback Con Mask'
numid=10,iface=MIXER,name='IEC958 Playback Pro Mask'
numid=11,iface=MIXER,name='IEC958 Playback Default'
numid=12,iface=MIXER,name='IEC958 Playback Switch'
numid=14,iface=MIXER,name='Digital Capture Volume'
numid=1,iface=MIXER,name='Input Source'
numid=4,iface=MIXER,name='Mux Capture Volume'


Thanks.

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

* Re: Got microphone working with SigmaTel STAC 9221 A1 on a Dell XPS M1210
  2007-06-13  6:49   ` Eran Guendelman
@ 2007-06-13 10:11     ` Takashi Iwai
  2007-06-17  2:25       ` Eran Guendelman
  0 siblings, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2007-06-13 10:11 UTC (permalink / raw)
  To: Eran Guendelman; +Cc: alsa-devel, alsa-user

At Tue, 12 Jun 2007 23:49:23 -0700,
Eran Guendelman wrote:
> 
> > So, we need to add a new model.  Could you give the output of "lspci
> > -nv", too?  We need PCI SSID to identify the device.  Then I can write
> > a patch to try.
> 
> 00:1b.0 Class 0403: 8086:27d8 (rev 01)
>          Subsystem: 1028:01d7
>          Flags: bus master, fast devsel, latency 0, IRQ 233
>          Memory at efffc000 (64-bit, non-prefetchable) [size=16K]
>          Capabilities: [50] Power Management version 2
>          Capabilities: [60] Message Signalled Interrupts: Mask- 64bit+ 
> Queue=0/0 Enable-
>          Capabilities: [70] Express Unknown type IRQ 0
>          Capabilities: [100] Virtual Channel
>          Capabilities: [130] Unknown (5)

OK, looks fine.  Did you try my patch?


> >> - Does the snd_hda_intel driver currently (or will it eventually) 
> >> support dynamic switching so I can switch from the Mic In to Line In or 
> >> to Rear Speakers Out, etc, just like in the Windows driver?
> > 
> > Hm?  It should have already the switches, "Line In As Output" and "Mic
> > As Output"...
> 
> I did see those when I tried the 3stack mode, but in my current fix 
> (modifying "ref" with my pin configs) I don't get such options in the 
> mixer.  Any idea what I would need to do to get it to add these switches 
> to the mixer?  This is the output from "amixer controls"
> 
> numid=8,iface=MIXER,name='Master Playback Switch'
> numid=7,iface=MIXER,name='Master Playback Volume'
> numid=13,iface=MIXER,name='PCM Playback Volume'
> numid=6,iface=MIXER,name='Front Playback Switch'
> numid=5,iface=MIXER,name='Front Playback Volume'
> numid=3,iface=MIXER,name='Capture Switch'
> numid=2,iface=MIXER,name='Capture Volume'
> numid=9,iface=MIXER,name='IEC958 Playback Con Mask'
> numid=10,iface=MIXER,name='IEC958 Playback Pro Mask'
> numid=11,iface=MIXER,name='IEC958 Playback Default'
> numid=12,iface=MIXER,name='IEC958 Playback Switch'
> numid=14,iface=MIXER,name='Digital Capture Volume'
> numid=1,iface=MIXER,name='Input Source'
> numid=4,iface=MIXER,name='Mux Capture Volume'

Could you show the kernel message regarding pin detections (appearing
only when debug options is set)?
The mic/line-in output switches appear only when
	- line_outs are less than 3 (usually 1)
	- line and mic (not fmic or fline) inputs are found


Takashi

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

* Re: Got microphone working with SigmaTel STAC 9221 A1 on a Dell XPS M1210
  2007-06-13 10:11     ` Takashi Iwai
@ 2007-06-17  2:25       ` Eran Guendelman
  0 siblings, 0 replies; 6+ messages in thread
From: Eran Guendelman @ 2007-06-17  2:25 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel, alsa-user

Takashi Iwai wrote:
> At Tue, 12 Jun 2007 23:49:23 -0700,
> Eran Guendelman wrote:
>>> So, we need to add a new model.  Could you give the output of "lspci
>>> -nv", too?  We need PCI SSID to identify the device.  Then I can write
>>> a patch to try.
>> 00:1b.0 Class 0403: 8086:27d8 (rev 01)
>>          Subsystem: 1028:01d7
>>          Flags: bus master, fast devsel, latency 0, IRQ 233
>>          Memory at efffc000 (64-bit, non-prefetchable) [size=16K]
>>          Capabilities: [50] Power Management version 2
>>          Capabilities: [60] Message Signalled Interrupts: Mask- 64bit+ 
>> Queue=0/0 Enable-
>>          Capabilities: [70] Express Unknown type IRQ 0
>>          Capabilities: [100] Virtual Channel
>>          Capabilities: [130] Unknown (5)
> 
> OK, looks fine.  Did you try my patch?

Sorry for the delayed reply...
Yup, just tried it out and it works.  Thanks.


>>>> - Does the snd_hda_intel driver currently (or will it eventually) 
>>>> support dynamic switching so I can switch from the Mic In to Line In or 
>>>> to Rear Speakers Out, etc, just like in the Windows driver?
>>> Hm?  It should have already the switches, "Line In As Output" and "Mic
>>> As Output"...
>> I did see those when I tried the 3stack mode, but in my current fix 
>> (modifying "ref" with my pin configs) I don't get such options in the 
>> mixer.  Any idea what I would need to do to get it to add these switches 
>> to the mixer?  This is the output from "amixer controls"
>>
>> numid=8,iface=MIXER,name='Master Playback Switch'
>> numid=7,iface=MIXER,name='Master Playback Volume'
>> numid=13,iface=MIXER,name='PCM Playback Volume'
>> numid=6,iface=MIXER,name='Front Playback Switch'
>> numid=5,iface=MIXER,name='Front Playback Volume'
>> numid=3,iface=MIXER,name='Capture Switch'
>> numid=2,iface=MIXER,name='Capture Volume'
>> numid=9,iface=MIXER,name='IEC958 Playback Con Mask'
>> numid=10,iface=MIXER,name='IEC958 Playback Pro Mask'
>> numid=11,iface=MIXER,name='IEC958 Playback Default'
>> numid=12,iface=MIXER,name='IEC958 Playback Switch'
>> numid=14,iface=MIXER,name='Digital Capture Volume'
>> numid=1,iface=MIXER,name='Input Source'
>> numid=4,iface=MIXER,name='Mux Capture Volume'
> 
> Could you show the kernel message regarding pin detections (appearing
> only when debug options is set)?
> The mic/line-in output switches appear only when
> 	- line_outs are less than 3 (usually 1)
> 	- line and mic (not fmic or fline) inputs are found
> 

Well, maybe the problem is that it detects an fmic and not a mic.  This 
is because all I did was take the pin configs from the Windows INI 
(which originally made 0x0c be a Line In at Ext Front), and changed it 
from a Line In to a Mic, making it a Mic at Ext Front...  I'm assuming 
this makes it an fmic instead of a mic...  I don't really understand 
what the big diff between front and non-front is, but the jacks on the 
laptop are certainly on the front of the laptop if it's at all related 
to that...

Actually, even if I made it a non-front mic, it will fail to find a Line 
In anyway because I've effectively replaced it by a Mic, no?  So the 
test for having mic/line-in output switches will fail...

Anyway, here's the debug output when loading the driver:

ALSA /home/erang/install/alsa-driver-1.0.14/pci/hda/hda_codec.c:1810: 
hda_codec: model 'dell' is selected
ALSA 
/home/erang/install/alsa-driver-1.0.14/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:843: 
hda_codec: pin nid 0a pin config 0221121e
ALSA 
/home/erang/install/alsa-driver-1.0.14/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:843: 
hda_codec: pin nid 0b pin config 408103ff
ALSA 
/home/erang/install/alsa-driver-1.0.14/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:843: 
hda_codec: pin nid 0c pin config 02a1123e
ALSA 
/home/erang/install/alsa-driver-1.0.14/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:843: 
hda_codec: pin nid 0d pin config 90100310
ALSA 
/home/erang/install/alsa-driver-1.0.14/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:843: 
hda_codec: pin nid 0e pin config 408003f1
ALSA 
/home/erang/install/alsa-driver-1.0.14/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:843: 
hda_codec: pin nid 0f pin config 0221122f
ALSA 
/home/erang/install/alsa-driver-1.0.14/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:843: 
hda_codec: pin nid 10 pin config 03451340
ALSA 
/home/erang/install/alsa-driver-1.0.14/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:843: 
hda_codec: pin nid 11 pin config 40c003f2
ALSA 
/home/erang/install/alsa-driver-1.0.14/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:843: 
hda_codec: pin nid 15 pin config 50a003f3
ALSA 
/home/erang/install/alsa-driver-1.0.14/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:843: 
hda_codec: pin nid 1b pin config 405003f4
ALSA /home/erang/install/alsa-driver-1.0.14/pci/hda/hda_codec.c:2339: 
autoconfig: line_outs=1 (0xd/0x0/0x0/0x0/0x0)
ALSA /home/erang/install/alsa-driver-1.0.14/pci/hda/hda_codec.c:2343: 
  speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
ALSA /home/erang/install/alsa-driver-1.0.14/pci/hda/hda_codec.c:2347: 
  hp_outs=2 (0xa/0xf/0x0/0x0/0x0)
ALSA /home/erang/install/alsa-driver-1.0.14/pci/hda/hda_codec.c:2355: 
  inputs: mic=0x0, fmic=0xc, line=0x0, fline=0x0, cd=0x0, aux=0x0
ALSA 
/home/erang/install/alsa-driver-1.0.14/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:1153: 
stac92xx_add_dyn_out_pins: total dac count=4
ALSA 
/home/erang/install/alsa-driver-1.0.14/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:1264: 
dac_nids=1 (0x2/0x0/0x0/0x0/0x0)

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

end of thread, other threads:[~2007-06-17  2:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-09 23:37 Got microphone working with SigmaTel STAC 9221 A1 on a Dell XPS M1210 Eran Guendelman
2007-06-12 13:19 ` Takashi Iwai
2007-06-12 13:30   ` Takashi Iwai
2007-06-13  6:49   ` Eran Guendelman
2007-06-13 10:11     ` Takashi Iwai
2007-06-17  2:25       ` Eran Guendelman

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.