[alsa-devel] Strange findings about the microphone in SigmaTel STAC9221 A1

Ivan N. Zlatev contact at i-nz.net
Tue May 15 19:11:58 CEST 2007


I was wrong about _vref. Output %X of pincap  and returned vref as
follows on modprobe:

hda_codec: STAC922x, Apple subsys_id=106b1700
ALSA /root/tmp/alsa-driver-1.0.14rc4/pci/hda/hda_codec.c:2270:
autoconfig: line_outs=1 (0xd/0x0/0x0/0x0/0x0)
ALSA /root/tmp/alsa-driver-1.0.14rc4/pci/hda/hda_codec.c:2274:
speaker_outs=1 (0xc/0x0/0x0/0x0/0x0)
ALSA /root/tmp/alsa-driver-1.0.14rc4/pci/hda/hda_codec.c:2278:
hp_outs=1 (0xa/0x0/0x0/0x0/0x0)
ALSA /root/tmp/alsa-driver-1.0.14rc4/pci/hda/hda_codec.c:2286:
inputs: mic=0xb, fmic=0xe, line=0xf, fline=0x0, cd=0x0, aux=0x0
17 - AC_PINCTL_VREF_80
0 - AC_PINCTL_VREF_0
17 - AC_PINCTL_VREF_80

> Could you check the connection of node 0x12 at the very beginning?
> I guess it's not 0x0b.

Node 0x12 [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

> Then try to add model=macbook or model=macbook-pro-v2.  Now iMac has
> its own pin setting (corresponding to model=imac-intel).

I am on an intel imac. Also I wanted to mention that I have manged to
get hold of the pin configs supplied by apple for windows for all
apple systems. I mailed them last month to the list. I don't honestly
know if they could be of any use to you. For example according to them
for my codec subsystem's the pin config is:

[HKR\Settings\Pin\0A]
CfgDflt = dword: 0x0121E21F
Action = hex: 01,0A,81,0C,81,10,85,51,05,21
[HKR\Settings\Pin\0B]
CfgDflt = dword: 0x90A7012E
[HKR\Settings\Pin\0C]
CfgDflt = dword: 0x9017E110
[HKR\Settings\Pin\0D]
CfgDflt = dword: 0x400000FD
[HKR\Settings\Pin\0E]
CfgDflt = dword: 0x400000FE
Action = hex: 01,10,81,0A,81,0C
[HKR\Settings\Pin\0F]
CfgDflt = dword: 0x0181E020
Action = hex: 09,0F
[HKR\Settings\Pin\10]
CfgDflt = dword: 0x1145E230
[HKR\Settings\Pin\11]
CfgDflt = dword: 0x11C5E240
[HKR\Settings\Pin\15]
CfgDflt = dword: 0x400000FC
[HKR\Settings\Pin\1B]
CfgDflt = dword: 0x400000FB
[HKR\Settings\GPIO]
00                                   = hex: 85
01                                   = hex: 82

This in comparison to the current imac-intel pinconfig

static unsigned int imac_intel_pin_configs[10] = {
	0x0121e230, 0x90a70120, 0x9017e110, 0x400000fe,
	0x400000fd, 0x0181e021, 0x1145e040, 0x400000fa,
	0x400000fc, 0x400000fb,
};

My mail on the archive with the pinconfigs is
http://mailman.alsa-project.org/pipermail/alsa-devel/2007-April/000731.html

I have tried using this pinconfig with rc4 and the input is set okay,
but I still need to set capture to 0. A major issue is that there is
no sound with this pinconfig. This is the output of modprobe:

ALSA /root/tmp/alsa-driver-1.0.14rc4/pci/hda/hda_codec.c:1795:
hda_codec: model 'imac-intel' is selected
ALSA /root/tmp/alsa-driver-1.0.14rc4/pci/hda/hda_codec.c:2270:
autoconfig: line_outs=0 (0x0/0x0/0x0/0x0/0x0)
ALSA /root/tmp/alsa-driver-1.0.14rc4/pci/hda/hda_codec.c:2274:
speaker_outs=1 (0xc/0x0/0x0/0x0/0x0)
ALSA /root/tmp/alsa-driver-1.0.14rc4/pci/hda/hda_codec.c:2278:
hp_outs=1 (0xa/0x0/0x0/0x0/0x0)
ALSA /root/tmp/alsa-driver-1.0.14rc4/pci/hda/hda_codec.c:2286:
inputs: mic=0xb, fmic=0x0, line=0xf, fline=0x0, cd=0x0, aux=0x0
17 - AC_PINCTL_VREF_80
17 - AC_PINCTL_VREF_80

I have attached the initial codec info after modprobing with the
pinconfig from apple.

> What happens if you use different values for "Capture Volume" and
> "Capture Mux Volume"?

There seems to be a proportional dependancy. If I increase caption vol
by 1 and lower capture mux vol by 1 it will record (not 100% sure on
the 1 to 1 factor here).

Else, recording doesn't work if I change capture volume to something >
0. This is the change in the codec:

Node 0x17 [Audio Selector] wcaps 0x300903: Stereo Amp-In
   Amp-In caps: N/A
-  Amp-In vals:  [0x00 0x00]
+  Amp-In vals:  [0x0e 0x0e]
   Connection: 1
      0x12

I can provide you a root ssh account on the machine if you want?
-- 
Ivan N. Zlatev

Web: http://www.i-nZ.net
"It's all some kind of whacked out conspiracy."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: codec-apple-pinconfig
Type: application/octet-stream
Size: 4400 bytes
Desc: not available
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20070515/85309fd1/attachment.dll 


More information about the Alsa-devel mailing list