alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: "Ivan N. Zlatev" <contact@i-nz.net>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: Strange findings about the microphone in SigmaTel STAC9221 A1
Date: Sat, 19 May 2007 21:28:31 +0100	[thread overview]
Message-ID: <3db1ec7f0705191328i6c40366w196c278b1ebaca7a@mail.gmail.com> (raw)
In-Reply-To: <s5hveeqkqd2.wl%tiwai@suse.de>

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

> - Build the latest driver with your pingconfig patch.

Patch, which adds an "intel-imac-20" pinconfig attached.

> - Unload the driver module.
> - Remove /etc/asound.state (or whatever alsactl stores -- the path is
>   depending on distro)
> - Load the module again; at this state, mixers are muted
> - Get the first codec dump here once

initial-codec attached.

> - Unmute the playbacks as usual.  Check playback.
Playback works.

> - Turn on only "Capture Switch".  Don't adjust "Capture Volume" and
>   "Mux Capture Volume" if they are zero.
>   Test recording once here.  Get codec dump again.

Recording doesn't work. Codec diff:

 Node 0x02 [Audio Output] wcaps 0xd0c05: Stereo Amp-Out
   Amp-Out caps: N/A
-  Amp-Out vals:  [0x7f 0x7f]
+  Amp-Out vals:  [0xff 0xff]
   Power: 0x0
 Node 0x03 [Audio Output] wcaps 0xd0c05: Stereo Amp-Out
   Amp-Out caps: N/A
-  Amp-Out vals:  [0x7f 0x7f]
+  Amp-Out vals:  [0xff 0xff]
   Power: 0x0
 Node 0x04 [Audio Output] wcaps 0xd0c05: Stereo Amp-Out
   Amp-Out caps: N/A
-  Amp-Out vals:  [0x7f 0x7f]
+  Amp-Out vals:  [0xff 0xff]
   Power: 0x0
 Node 0x05 [Audio Output] wcaps 0xd0c05: Stereo Amp-Out
   Amp-Out caps: N/A
-  Amp-Out vals:  [0x7f 0x7f]
+  Amp-Out vals:  [0xff 0xff]
   Power: 0x0

> - If not working, try resetting the input source.
>   Test recording.  Get codec dump.

Reseting the input source doesn't result a difference in the codec
info and recording still doesn't work.

> - Raise "Capture Volume".  Test recording, get codec dump.

After this recording works! Woho! :-)

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

> - Raise "Mux Capture Volume".  Test recording, get codec dump.

For the sake of the test I have also umuted and increased Mux, which
results the following diff and a non-working recording

 Node 0x12 [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
   Amp-Out caps: ofs=0x00, nsteps=0x04, stepsize=0x27, mute=0
-  Amp-Out vals:  [0x04 0x04]
+  Amp-Out vals:  [0x00 0x00]
   Connection: 7
      0x0e 0x15 0x0f 0x0b* 0x0c 0x0d 0x0a


Regards.
-- 
Ivan N. Zlatev

Web: http://www.i-nZ.net
"It's all some kind of whacked out conspiracy."

[-- Attachment #2: initial-codec --]
[-- Type: application/octet-stream, Size: 4401 bytes --]

Codec: SigmaTel STAC9221 A1
Address: 0
Vendor Id: 0x83847680
Subsystem Id: 0x106b1700
Revision Id: 0x103401
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:  [0xff 0xff]
  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:  [0xff 0xff]
  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 0x0121e21f: [Jack] HP Out at Ext Rear
    Conn = 1/8, Color = White
  Pin-ctls: 0xc0: OUT HP
  Connection: 1
     0x02
Node 0x0b [Pin Complex] wcaps 0x400181: Stereo
  Pincap 0x081737: IN OUT Detect
  Pin Default 0x90a7012e: [Fixed] Mic at Int N/A
    Conn = Analog, Color = Unknown
  Pin-ctls: 0x24: IN
  Connection: 1
     0x04
Node 0x0c [Pin Complex] wcaps 0x400181: Stereo
  Pincap 0x081737: IN OUT Detect
  Pin Default 0x9017e110: [Fixed] Speaker at Int N/A
    Conn = Analog, Color = White
  Pin-ctls: 0x00:
  Connection: 1
     0x03
Node 0x0d [Pin Complex] wcaps 0x400181: Stereo
  Pincap 0x08173f: IN OUT HP Detect
  Pin Default 0x400000fd: [N/A] Line Out at Ext 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 0x400000fe: [N/A] Line Out 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 0x0181e020: [Jack] Line In at Ext Rear
    Conn = 1/8, Color = White
  Pin-ctls: 0x20: IN
  Connection: 1
     0x05
Node 0x10 [Pin Complex] wcaps 0x400301: Stereo Digital
  Pincap 0x0810: OUT
  Pin Default 0x1145e230: [Jack] SPDIF Out at Int Rear
    Conn = Optical, Color = White
  Pin-ctls: 0x40: OUT
  Connection: 3
     0x08* 0x17 0x19
Node 0x11 [Pin Complex] wcaps 0x430681: Stereo Digital
  Pincap 0x0810024: IN EAPD Detect
  Pin Default 0x11c5e240: [Jack] SPDIF In at Int Rear
    Conn = Optical, Color = White
  Pin-ctls: 0x20: IN
  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:  [0x00 0x00]
  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 0x400000fc: [N/A] Line Out at Ext 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:  [0x80 0x80]
  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 0x400000fb: [N/A] Line Out at Ext N/A
    Conn = Unknown, Color = Unknown
  Pin-ctls: 0x00:
  Connection: 1
     0x1a

[-- Attachment #3: imac20_alsa.patch --]
[-- Type: text/x-diff, Size: 1611 bytes --]

diff -r be73500bd42a pci/hda/patch_sigmatel.c
--- a/pci/hda/patch_sigmatel.c	Sat May 19 17:21:04 2007 +0200
+++ b/pci/hda/patch_sigmatel.c	Fri May 18 20:48:01 2007 +0100
@@ -64,6 +64,7 @@ enum {
 	STAC_MACBOOK_PRO_V1,
 	STAC_MACBOOK_PRO_V2,
 	STAC_IMAC_INTEL,
+	STAC_IMAC_INTEL_20,
 	STAC_922X_MODELS
 };
 
@@ -567,6 +568,12 @@ static unsigned int imac_intel_pin_confi
 	0x400000fc, 0x400000fb,
 };
 
+static unsigned int imac_intel_20_pin_configs[10] = {
+	0x0121E21F, 0x90A7012E, 0x9017E110, 0x400000FD,
+	0x400000FE, 0x0181E020, 0x1145E230, 0x11C5E240,
+	0x400000FC, 0x400000FB,
+};
+
 static unsigned int *stac922x_brd_tbl[STAC_922X_MODELS] = {
 	[STAC_D945_REF] = ref922x_pin_configs,
 	[STAC_D945GTP3] = d945gtp3_pin_configs,
@@ -576,6 +583,7 @@ static unsigned int *stac922x_brd_tbl[ST
 	[STAC_MACBOOK_PRO_V1] = macbook_pro_v1_pin_configs,
 	[STAC_MACBOOK_PRO_V2] = macbook_pro_v2_pin_configs,
 	[STAC_IMAC_INTEL] = imac_intel_pin_configs,
+	[STAC_IMAC_INTEL_20] = imac_intel_20_pin_configs,
 };
 
 static const char *stac922x_models[STAC_922X_MODELS] = {
@@ -587,6 +595,7 @@ static const char *stac922x_models[STAC_
 	[STAC_MACBOOK_PRO_V1]	= "macbook-pro-v1",
 	[STAC_MACBOOK_PRO_V2]	= "macbook-pro",
 	[STAC_IMAC_INTEL] = "imac-intel",
+	[STAC_IMAC_INTEL_20] = "imac-intel-20",
 };
 
 static struct snd_pci_quirk stac922x_cfg_tbl[] = {
@@ -2022,6 +2031,9 @@ static int patch_stac922x(struct hda_cod
 		case 0x106b0700: /* Intel-based iMac */
 			spec->board_config = STAC_IMAC_INTEL;
 			break;
+		case 0x106b1700: /* Intel iMac 20 */
+			spec->board_config = STAC_IMAC_INTEL_20;
+			break;
 		}
 	}
 

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

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

  reply	other threads:[~2007-05-19 20:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-11  9:48 Strange findings about the microphone in SigmaTel STAC9221 A1 Ivan N. Zlatev
2007-05-15 12:26 ` Takashi Iwai
2007-05-15 14:41   ` Ivan N. Zlatev
2007-05-15 15:06     ` Takashi Iwai
2007-05-15 17:11       ` Ivan N. Zlatev
2007-05-15 17:23         ` Ivan N. Zlatev
2007-05-18 17:12         ` Takashi Iwai
2007-05-19 20:28           ` Ivan N. Zlatev [this message]
2007-05-19 21:23             ` Ivan N. Zlatev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3db1ec7f0705191328i6c40366w196c278b1ebaca7a@mail.gmail.com \
    --to=contact@i-nz.net \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).