[alsa-devel] [HDA Intel/STAC92xx] mic not working (retasking?)...
With both 2.6.20 and 2.6.22 kernels on Ubuntu 7.04 on my Sony Vaio SZ240, I'm unable to get my mic connector working at any cost.
Well, almost...reading from /dev/dsp, I do see a minute change from 127 for 126 or 128 if I tap my external mic. This would imply the jack-retasking feature of this darn STAC chipset, right?
How can I change the jack retasking with the Intel HDA drivers or get further insight into this problem?
Thanks in advance, Daniel
--- [1]
$ lspci -s0:1b.0 00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
$ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: Intel [HDA Intel], device 0: STAC92xx Analog [STAC92xx Analog] Subdevices: 1/1 Subdevice #0: subdevice #0
$ arecord -l **** List of CAPTURE Hardware Devices **** card 0: Intel [HDA Intel], device 0: STAC92xx Analog [STAC92xx Analog] Subdevices: 2/2 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1
$ amixer info Card default 'Intel'/'HDA Intel at 0xde400000 irq 22' Mixer name : 'SigmaTel CXD9872RD/K' Components : 'HDA:83847661 HDA:14f12bfa' Controls : 6 Simple ctrls : 5
$ amixer controls numid=2,iface=MIXER,name='Master Playback Switch' numid=1,iface=MIXER,name='Master Playback Volume' numid=6,iface=MIXER,name='PCM Playback Volume' numid=5,iface=MIXER,name='Capture Source' numid=4,iface=MIXER,name='Capture Switch' numid=3,iface=MIXER,name='Capture Volume'
$ amixer scontrols Simple mixer control 'Master',0 Simple mixer control 'PCM',0 Simple mixer control 'Line',0 Simple mixer control 'Mic',0 Simple mixer control 'Capture',0
$ amixer contents numid=2,iface=MIXER,name='Master Playback Switch' ; type=BOOLEAN,access=rw------,values=2 : values=on,on numid=1,iface=MIXER,name='Master Playback Volume' ; type=INTEGER,access=rw------,values=2,min=0,max=127,step=0 : values=66,66 numid=6,iface=MIXER,name='PCM Playback Volume' ; type=INTEGER,access=rw---RW-,values=2,min=0,max=255,step=0 : values=230,230 | dBscale-min=-51.00dB,step=0.20dB,mute=0 numid=5,iface=MIXER,name='Capture Source' ; type=ENUMERATED,access=rw------,values=1,items=2 ; Item #0 'Line' ; Item #1 'Mic' : values=1 numid=4,iface=MIXER,name='Capture Switch' ; type=BOOLEAN,access=rw------,values=2 : values=on,on numid=3,iface=MIXER,name='Capture Volume' ; type=INTEGER,access=rw---R--,values=2,min=0,max=15,step=0 : values=15,15 | dBscale-min=0.00dB,step=1.50dB,mute=0
At Wed, 27 Jun 2007 21:28:43 +0100, Daniel J Blueman wrote:
With both 2.6.20 and 2.6.22 kernels on Ubuntu 7.04 on my Sony Vaio SZ240, I'm unable to get my mic connector working at any cost.
Well, almost...reading from /dev/dsp, I do see a minute change from 127 for 126 or 128 if I tap my external mic. This would imply the jack-retasking feature of this darn STAC chipset, right?
How can I change the jack retasking with the Intel HDA drivers or get further insight into this problem?
First, show the contents of /proc/asound/card0/codec#* files...
Takashi
Thanks in advance, Daniel
--- [1]
$ lspci -s0:1b.0 00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
$ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: Intel [HDA Intel], device 0: STAC92xx Analog [STAC92xx Analog] Subdevices: 1/1 Subdevice #0: subdevice #0
$ arecord -l **** List of CAPTURE Hardware Devices **** card 0: Intel [HDA Intel], device 0: STAC92xx Analog [STAC92xx Analog] Subdevices: 2/2 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1
$ amixer info Card default 'Intel'/'HDA Intel at 0xde400000 irq 22' Mixer name : 'SigmaTel CXD9872RD/K' Components : 'HDA:83847661 HDA:14f12bfa' Controls : 6 Simple ctrls : 5
$ amixer controls numid=2,iface=MIXER,name='Master Playback Switch' numid=1,iface=MIXER,name='Master Playback Volume' numid=6,iface=MIXER,name='PCM Playback Volume' numid=5,iface=MIXER,name='Capture Source' numid=4,iface=MIXER,name='Capture Switch' numid=3,iface=MIXER,name='Capture Volume'
$ amixer scontrols Simple mixer control 'Master',0 Simple mixer control 'PCM',0 Simple mixer control 'Line',0 Simple mixer control 'Mic',0 Simple mixer control 'Capture',0
$ amixer contents numid=2,iface=MIXER,name='Master Playback Switch' ; type=BOOLEAN,access=rw------,values=2 : values=on,on numid=1,iface=MIXER,name='Master Playback Volume' ; type=INTEGER,access=rw------,values=2,min=0,max=127,step=0 : values=66,66 numid=6,iface=MIXER,name='PCM Playback Volume' ; type=INTEGER,access=rw---RW-,values=2,min=0,max=255,step=0 : values=230,230 | dBscale-min=-51.00dB,step=0.20dB,mute=0 numid=5,iface=MIXER,name='Capture Source' ; type=ENUMERATED,access=rw------,values=1,items=2 ; Item #0 'Line' ; Item #1 'Mic' : values=1 numid=4,iface=MIXER,name='Capture Switch' ; type=BOOLEAN,access=rw------,values=2 : values=on,on numid=3,iface=MIXER,name='Capture Volume' ; type=INTEGER,access=rw---R--,values=2,min=0,max=15,step=0 : values=15,15 | dBscale-min=0.00dB,step=1.50dB,mute=0 -- Daniel J Blueman _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Hi Takashi San,
On 30/06/07, Takashi Iwai tiwai@suse.de wrote:
At Wed, 27 Jun 2007 21:28:43 +0100, Daniel J Blueman wrote:
With both 2.6.20 and 2.6.22 kernels on Ubuntu 7.04 on my Sony Vaio SZ240, I'm unable to get my mic connector working at any cost.
Well, almost...reading from /dev/dsp, I do see a minute change from 127 for 126 or 128 if I tap my external mic. This would imply the jack-retasking feature of this darn STAC chipset, right?
How can I change the jack retasking with the Intel HDA drivers or get further insight into this problem?
First, show the contents of /proc/asound/card0/codec#* files...
Firstly, thank you for replying; the only related cases I've been able to find on the internet suggest to use the 'model=vaio' option to the snd-hda-intel module, but this does not help.
The information you requested, and a little more is:
# cat /proc/asound/card0/codec#0 Codec: SigmaTel CXD9872RD/K Address: 0 Vendor Id: 0x83847661 Subsystem Id: 0x104d0700 Revision Id: 0x104201 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=0x0f, 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: [0x6c 0x6c] 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: [0x6c 0x6c] Power: 0x0 Node 0x06 [Audio Input] wcaps 0x1d0541: Stereo Power: 0x0 Connection: 1 0x07 Node 0x07 [Audio Selector] wcaps 0x300903: Stereo Amp-In Amp-In caps: N/A Amp-In vals: [0x00 0x00] Connection: 1 0x0e Node 0x08 [Audio Input] wcaps 0x1d0541: Stereo Power: 0x0 Connection: 1 0x09 Node 0x09 [Audio Selector] wcaps 0x300903: Stereo Amp-In Amp-In caps: N/A Amp-In vals: [0x0f 0x0f] Connection: 1 0x15 Node 0x0a [Pin Complex] wcaps 0x400181: Stereo Pincap 0x08173c: IN OUT HP Detect Pin Default 0x03211030: [Jack] HP Out at Ext Left Conn = 1/8, Color = Black Pin-ctls: 0xc0: OUT HP Connection: 1 0x02 Node 0x0b [Pin Complex] wcaps 0x400181: Stereo Pincap 0x0814: OUT Detect Pin Default 0x40f000fb: [N/A] Other at Ext N/A Conn = Unknown, Color = Unknown Pin-ctls: 0x00: Connection: 1 0x04 Node 0x0c [Pin Complex] wcaps 0x400181: Stereo Pincap 0x0814: OUT Detect Pin Default 0x40f000fc: [N/A] Other at Ext N/A Conn = Unknown, Color = Unknown Pin-ctls: 0x00: Connection: 1 0x03 Node 0x0d [Pin Complex] wcaps 0x400181: Stereo Pincap 0x08173c: IN OUT HP Detect Pin Default 0x03a1502e: [Jack] Mic at Ext Left Conn = 1/8, Color = Red Pin-ctls: 0x24: IN Connection: 1 0x02 Node 0x0e [Pin Complex] wcaps 0x400081: Stereo Pincap 0x0824: IN Detect Pin Default 0x50370060: [N/A] CD at Int N/A Conn = Analog, Color = Unknown Pin-ctls: 0x20: IN Node 0x0f [Pin Complex] wcaps 0x400181: Stereo Pincap 0x0814: OUT Detect Pin Default 0x90171010: [Fixed] Speaker at Int N/A Conn = Analog, Color = Black Pin-ctls: 0x40: OUT Connection: 1 0x05 Node 0x10 [Audio Output] wcaps 0x40211: Stereo Digital PCM: rates [0x3e0]: 44100 48000 88200 96000 176400 bits [0xe]: 16 20 24 formats [0x5]: PCM AC3 Node 0x11 [Pin Complex] wcaps 0x400301: Stereo Digital Pincap 0x0810: OUT Pin Default 0x40f000fd: [N/A] Other at Ext N/A Conn = Unknown, Color = Unknown Pin-ctls: 0x00: Connection: 2 0x10* 0x09 Node 0x12 [Audio Input] wcaps 0x140311: Stereo Digital PCM: rates [0x160]: 44100 48000 96000 bits [0xe]: 16 20 24 formats [0x5]: PCM AC3 Connection: 1 0x13 Node 0x13 [Pin Complex] wcaps 0x440381: Stereo Digital Pincap 0x0834: IN OUT Detect Pin Default 0x40f000fe: [N/A] Other at Ext N/A Conn = Unknown, Color = Unknown Pin-ctls: 0x00: Connection: 1 0x18 Node 0x14 [Pin Complex] wcaps 0x400001: Stereo Pincap 0x0820: IN Pin Default 0x90a71020: [Fixed] Mic at Int N/A Conn = Analog, Color = Black Pin-ctls: 0x20: IN Node 0x15 [Audio Selector] wcaps 0x30010d: Stereo Amp-Out Amp-Out caps: ofs=0x00, nsteps=0x04, stepsize=0x27, mute=1 Amp-Out vals: [0x00 0x00] Connection: 4 0x0a 0x0d 0x14* 0x02 Node 0x16 [Beep Generator Widget] wcaps 0x70000c: Mono Amp-Out Amp-Out caps: ofs=0x03, nsteps=0x03, stepsize=0x17, mute=0 Amp-Out vals: [0x00] Node 0x17 [Volume Knob Widget] wcaps 0x600000: Mono Node 0x18 [Audio Output] wcaps 0x40201: Stereo Digital
# cat /proc/asound/card0/codec#1 Codec: Conexant ID 2bfa Address: 1 Vendor Id: 0x14f12bfa Subsystem Id: 0x104d0200 Revision Id: 0x90000
# cat /proc/asound/card0/pcm0c/info card: 0 device: 0 subdevice: 0 stream: CAPTURE id: STAC92xx Analog name: STAC92xx Analog subname: subdevice #0 class: 0 subclass: 0 subdevices_count: 2 subdevices_avail: 2
# cat /proc/asound/card0/pcm0c/sub0/info card: 0 device: 0 subdevice: 0 stream: CAPTURE id: STAC92xx Analog name: STAC92xx Analog subname: subdevice #0 class: 0 subclass: 0 subdevices_count: 2 subdevices_avail: 2
# cat /proc/asound/card0/pcm0c/sub1/info card: 0 device: 0 subdevice: 1 stream: CAPTURE id: STAC92xx Analog name: STAC92xx Analog subname: subdevice #1 class: 0 subclass: 0 subdevices_count: 2 subdevices_avail: 2
Thanks again! Daniel
At Sat, 30 Jun 2007 22:07:13 +0100, Daniel J Blueman wrote:
Hi Takashi San,
On 30/06/07, Takashi Iwai tiwai@suse.de wrote:
At Wed, 27 Jun 2007 21:28:43 +0100, Daniel J Blueman wrote:
With both 2.6.20 and 2.6.22 kernels on Ubuntu 7.04 on my Sony Vaio SZ240, I'm unable to get my mic connector working at any cost.
Well, almost...reading from /dev/dsp, I do see a minute change from 127 for 126 or 128 if I tap my external mic. This would imply the jack-retasking feature of this darn STAC chipset, right?
How can I change the jack retasking with the Intel HDA drivers or get further insight into this problem?
First, show the contents of /proc/asound/card0/codec#* files...
Firstly, thank you for replying; the only related cases I've been able to find on the internet suggest to use the 'model=vaio' option to the snd-hda-intel module, but this does not help.
Try the patch below, choose "Line" as the capture source (if you want a mic-input jack -- for the built-in mic, chooes "Mic"), and raise the newly added "Capture Boost" volume.
Takashi
diff -r 054dc7195722 pci/hda/patch_sigmatel.c --- a/pci/hda/patch_sigmatel.c Mon Jul 02 16:03:12 2007 +0200 +++ b/pci/hda/patch_sigmatel.c Mon Jul 02 16:24:39 2007 +0200 @@ -2423,6 +2423,7 @@ static struct snd_kcontrol_new vaio_mixe .get = stac92xx_mux_enum_get, .put = stac92xx_mux_enum_put, }, + HDA_CODEC_MUTE("Capture Boost Volume", 0x15, 0, HDA_OUTPUT), {} };
Hi Takashi,
On 02/07/07, Takashi Iwai tiwai@suse.de wrote:
Daniel J Blueman wrote:
With both 2.6.20 and 2.6.22 kernels on Ubuntu 7.04 on my Sony Vaio SZ240, I'm unable to get my mic connector working at any cost.
[snip]
How can I change the jack retasking with the Intel HDA drivers or get further insight into this problem?
First, show the contents of /proc/asound/card0/codec#* files...
Firstly, thank you for replying; the only related cases I've been able to find on the internet suggest to use the 'model=vaio' option to the snd-hda-intel module, but this does not help.
Try the patch below, choose "Line" as the capture source (if you want a mic-input jack -- for the built-in mic, chooes "Mic"), and raise the newly added "Capture Boost" volume.
Firstly, thank you for your time and help.
I have discovered the bug preventing me using the external mic socket before: in the mixer, the user has to select the [internal] mic input, then re-select the line-in (actually external mic) input; reading from (eg) /dev/dsp while changing this, the output suddenly is as expected when the line-in is re-selected.
Since we've got started, where should I look for the 'before' and 'after' state to compare to see into this?
This behaviour is reproducible with both 2.6.20 and 2.6.22-rc7.
Many thanks! Daniel
At Mon, 2 Jul 2007 23:39:14 +0100, Daniel J Blueman wrote:
Hi Takashi,
On 02/07/07, Takashi Iwai tiwai@suse.de wrote:
Daniel J Blueman wrote:
With both 2.6.20 and 2.6.22 kernels on Ubuntu 7.04 on my Sony Vaio SZ240, I'm unable to get my mic connector working at any cost.
[snip]
How can I change the jack retasking with the Intel HDA drivers or get further insight into this problem?
First, show the contents of /proc/asound/card0/codec#* files...
Firstly, thank you for replying; the only related cases I've been able to find on the internet suggest to use the 'model=vaio' option to the snd-hda-intel module, but this does not help.
Try the patch below, choose "Line" as the capture source (if you want a mic-input jack -- for the built-in mic, chooes "Mic"), and raise the newly added "Capture Boost" volume.
Firstly, thank you for your time and help.
I have discovered the bug preventing me using the external mic socket before: in the mixer, the user has to select the [internal] mic input, then re-select the line-in (actually external mic) input; reading from (eg) /dev/dsp while changing this, the output suddenly is as expected when the line-in is re-selected.
Could you elaborate? What do yo mean "output" here, and what did you expect?
Since we've got started, where should I look for the 'before' and 'after' state to compare to see into this?
Yes, comparing the codec dump file would be helpful.
Takashi
On 03/07/07, Takashi Iwai tiwai@suse.de wrote:
At Mon, 2 Jul 2007 23:39:14 +0100, Daniel J Blueman wrote:
With both 2.6.20 and 2.6.22 kernels on Ubuntu 7.04 on my Sony Vaio SZ240, I'm unable to get my mic connector working at any cost.
First, show the contents of /proc/asound/card0/codec#* files...
[snip]
I have discovered the bug preventing me using the external mic socket before: in the mixer, the user has to select the [internal] mic input, then re-select the line-in (actually external mic) input; reading from (eg) /dev/dsp while changing this, the output suddenly is as expected when the line-in is re-selected.
Could you elaborate? What do yo mean "output" here, and what did you expect?
Looking at what is printed from the command 'cat /dev/dsp', what is shown changes when I de-select 'line-in' and then reselect it. Let me know if you're still unclear.
Since we've got started, where should I look for the 'before' and 'after' state to compare to see into this?
Yes, comparing the codec dump file would be helpful.
Changing from the initial mixer state of 'Line-in' being selected to 'Microphone' does not change anything in the /proc/asound/card0/codec#{0,1} files. After, changing the input back to 'Line-in' does show a change [1] (which we'd expect).
My interpretation of this is that (in the initial state) the STAC registers are set to record from the internal mic (which doesn't actually exist; there is a tiny amount of crosstalk) and the mixer settings ALSA reports show the line-in/external mic selected [2].
I've been looking at patch_stac9872() and it does seem the CXD9872RD_VAIO path is being taken [3]. I'll enable the debug messages; perhaps the BIOS is storing some bad defaults?
Where can you suggest to look, or what to check?
Thanks again, Daniel
--- [1]
--- codec0-before 2007-07-03 19:10:13.000000000 +0100 +++ codec0-after 2007-07-03 19:10:32.000000000 +0100 @@ -118,7 +118,7 @@ Node 0x15 [Audio Selector] wcaps 0x30010d: Stereo Amp-Out Amp-Out caps: ofs=0x00, nsteps=0x04, stepsize=0x27, mute=1 Amp-Out vals: [0x00 0x00] Connection: 4 - 0x0a 0x0d 0x14* 0x02 + 0x0a 0x0d* 0x14 0x02 Node 0x16 [Beep Generator Widget] wcaps 0x70000c: Mono Amp-Out Amp-Out caps: ofs=0x03, nsteps=0x03, stepsize=0x17, mute=0 Amp-Out vals: [0x00]
--- [2]
$ amixer scontents [snip] Simple mixer control 'Line',0 Capabilities: cswitch cswitch-joined cswitch-exclusive Capture exclusive group: 0 Capture channels: Mono Mono: Capture [on] Simple mixer control 'Mic',0 Capabilities: cswitch cswitch-joined cswitch-exclusive Capture exclusive group: 0 Capture channels: Mono Mono: Capture [off] [snip]
--- [3]
$ lspci -vvns 00:1b.0 00:1b.0 0403: 8086:27d8 (rev 02) Subsystem: 104d:81e6 ...
At Wed, 4 Jul 2007 00:12:46 +0100, Daniel J Blueman wrote:
On 03/07/07, Takashi Iwai tiwai@suse.de wrote:
At Mon, 2 Jul 2007 23:39:14 +0100, Daniel J Blueman wrote:
> With both 2.6.20 and 2.6.22 kernels on Ubuntu 7.04 on my Sony Vaio > SZ240, I'm unable to get my mic connector working at any cost.
First, show the contents of /proc/asound/card0/codec#* files...
[snip]
I have discovered the bug preventing me using the external mic socket before: in the mixer, the user has to select the [internal] mic input, then re-select the line-in (actually external mic) input; reading from (eg) /dev/dsp while changing this, the output suddenly is as expected when the line-in is re-selected.
Could you elaborate? What do yo mean "output" here, and what did you expect?
Looking at what is printed from the command 'cat /dev/dsp', what is shown changes when I de-select 'line-in' and then reselect it. Let me know if you're still unclear.
Since we've got started, where should I look for the 'before' and 'after' state to compare to see into this?
Yes, comparing the codec dump file would be helpful.
Changing from the initial mixer state of 'Line-in' being selected to 'Microphone' does not change anything in the /proc/asound/card0/codec#{0,1} files. After, changing the input back to 'Line-in' does show a change [1] (which we'd expect).
My interpretation of this is that (in the initial state) the STAC registers are set to record from the internal mic (which doesn't actually exist; there is a tiny amount of crosstalk) and the mixer settings ALSA reports show the line-in/external mic selected [2].
The problem sounds like a mismatch of initialization verb and the internal mixer state. If it's the case, the patch below should fix, then.
Takashi
diff -r 523aa7d0e49d pci/hda/patch_sigmatel.c --- a/pci/hda/patch_sigmatel.c Wed Jul 04 10:35:29 2007 +0200 +++ b/pci/hda/patch_sigmatel.c Wed Jul 04 14:38:39 2007 +0200 @@ -2337,7 +2337,7 @@ static struct hda_verb vaio_init[] = { {0x0d, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, /* Mic? (<- 0x2) */ {0x0e, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN }, /* CD */ {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, /* Mic? */ - {0x15, AC_VERB_SET_CONNECT_SEL, 0x2}, /* mic-sel: 0a,0d,14,02 */ + {0x15, AC_VERB_SET_CONNECT_SEL, 0x1}, /* mic-sel: 0a,0d,14,02 */ {0x02, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, /* HP */ {0x05, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, /* Speaker */ {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, /* capture sw/vol -> 0x8 */ @@ -2353,7 +2353,7 @@ static struct hda_verb vaio_ar_init[] = {0x0e, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN }, /* CD */ /* {0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },*/ /* Optical Out */ {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, /* Mic? */ - {0x15, AC_VERB_SET_CONNECT_SEL, 0x2}, /* mic-sel: 0a,0d,14,02 */ + {0x15, AC_VERB_SET_CONNECT_SEL, 0x1}, /* mic-sel: 0a,0d,14,02 */ {0x02, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, /* HP */ {0x05, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, /* Speaker */ /* {0x10, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},*/ /* Optical Out */
Hi Takashi,
Daniel J Blueman wrote:
> > With both 2.6.20 and 2.6.22 kernels on Ubuntu 7.04 on my Sony Vaio > > SZ240, I'm unable to get my mic connector working at any cost. > > First, show the contents of /proc/asound/card0/codec#* files...
[snip]
I have discovered the bug preventing me using the external mic socket before: in the mixer, the user has to select the [internal] mic input, then re-select the line-in (actually external mic) input; reading from (eg) /dev/dsp while changing this, the output suddenly is as expected when the line-in is re-selected.
Could you elaborate? What do yo mean "output" here, and what did you expect?
Looking at what is printed from the command 'cat /dev/dsp', what is shown changes when I de-select 'line-in' and then reselect it. Let me know if you're still unclear.
Since we've got started, where should I look for the 'before' and 'after' state to compare to see into this?
Yes, comparing the codec dump file would be helpful.
Changing from the initial mixer state of 'Line-in' being selected to 'Microphone' does not change anything in the /proc/asound/card0/codec#{0,1} files. After, changing the input back to 'Line-in' does show a change [1] (which we'd expect).
My interpretation of this is that (in the initial state) the STAC registers are set to record from the internal mic (which doesn't actually exist; there is a tiny amount of crosstalk) and the mixer settings ALSA reports show the line-in/external mic selected [2].
The problem sounds like a mismatch of initialization verb and the internal mixer state. If it's the case, the patch below should fix, then.
This does indeed squarely address the problem I was having, and is a good fix here!
The 'Line in' and 'Mic' inputs are a little confusing still. Do you think it's worth having 'Line/Mic in' or just 'External'?
As there is no internal mic on this model the 'Mic' input is the opposite of what needs selecting. Is there any way we can address this at the same too? Perhaps 'Int mic' or similar would clarify it.
Thank you again for your support and I hope your patch makes it to mainline soon, Daniel
diff -r 523aa7d0e49d pci/hda/patch_sigmatel.c --- a/pci/hda/patch_sigmatel.c Wed Jul 04 10:35:29 2007 +0200 +++ b/pci/hda/patch_sigmatel.c Wed Jul 04 14:38:39 2007 +0200 @@ -2337,7 +2337,7 @@ static struct hda_verb vaio_init[] = { {0x0d, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, /* Mic? (<- 0x2) */ {0x0e, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN }, /* CD */ {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, /* Mic? */
{0x15, AC_VERB_SET_CONNECT_SEL, 0x2}, /* mic-sel: 0a,0d,14,02 */
{0x15, AC_VERB_SET_CONNECT_SEL, 0x1}, /* mic-sel: 0a,0d,14,02 */ {0x02, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, /* HP */ {0x05, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, /* Speaker */ {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, /* capture sw/vol -> 0x8 */
@@ -2353,7 +2353,7 @@ static struct hda_verb vaio_ar_init[] = {0x0e, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN }, /* CD */ /* {0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },*/ /* Optical Out */ {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, /* Mic? */
{0x15, AC_VERB_SET_CONNECT_SEL, 0x2}, /* mic-sel: 0a,0d,14,02 */
{0x15, AC_VERB_SET_CONNECT_SEL, 0x1}, /* mic-sel: 0a,0d,14,02 */ {0x02, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, /* HP */ {0x05, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, /* Speaker */
/* {0x10, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},*/ /* Optical Out */
At Thu, 5 Jul 2007 00:19:53 +0100, Daniel J Blueman wrote:
Hi Takashi,
Daniel J Blueman wrote:
> > > With both 2.6.20 and 2.6.22 kernels on Ubuntu 7.04 on my Sony Vaio > > > SZ240, I'm unable to get my mic connector working at any cost. > > > > First, show the contents of /proc/asound/card0/codec#* files...
[snip]
I have discovered the bug preventing me using the external mic socket before: in the mixer, the user has to select the [internal] mic input, then re-select the line-in (actually external mic) input; reading from (eg) /dev/dsp while changing this, the output suddenly is as expected when the line-in is re-selected.
Could you elaborate? What do yo mean "output" here, and what did you expect?
Looking at what is printed from the command 'cat /dev/dsp', what is shown changes when I de-select 'line-in' and then reselect it. Let me know if you're still unclear.
Since we've got started, where should I look for the 'before' and 'after' state to compare to see into this?
Yes, comparing the codec dump file would be helpful.
Changing from the initial mixer state of 'Line-in' being selected to 'Microphone' does not change anything in the /proc/asound/card0/codec#{0,1} files. After, changing the input back to 'Line-in' does show a change [1] (which we'd expect).
My interpretation of this is that (in the initial state) the STAC registers are set to record from the internal mic (which doesn't actually exist; there is a tiny amount of crosstalk) and the mixer settings ALSA reports show the line-in/external mic selected [2].
The problem sounds like a mismatch of initialization verb and the internal mixer state. If it's the case, the patch below should fix, then.
This does indeed squarely address the problem I was having, and is a good fix here!
The 'Line in' and 'Mic' inputs are a little confusing still. Do you think it's worth having 'Line/Mic in' or just 'External'?
As there is no internal mic on this model the 'Mic' input is the opposite of what needs selecting. Is there any way we can address this at the same too? Perhaps 'Int mic' or similar would clarify it.
OK, that makes sense. I'll fix them, too.
BTW, does the "Capture Boost" volume by the earlier patch have any influence on the record quality?
Takashi
On 05/07/07, Takashi Iwai tiwai@suse.de wrote:
At Thu, 5 Jul 2007 00:19:53 +0100, Daniel J Blueman wrote:
Hi Takashi,
Daniel J Blueman wrote:
> > > > With both 2.6.20 and 2.6.22 kernels on Ubuntu 7.04 on my Sony Vaio > > > > SZ240, I'm unable to get my mic connector working at any cost. > > > > > > First, show the contents of /proc/asound/card0/codec#* files...
[snip]
I have discovered the bug preventing me using the external mic socket before: in the mixer, the user has to select the [internal] mic input, then re-select the line-in (actually external mic) input; reading from (eg) /dev/dsp while changing this, the output suddenly is as expected when the line-in is re-selected.
Could you elaborate? What do yo mean "output" here, and what did you expect?
Looking at what is printed from the command 'cat /dev/dsp', what is shown changes when I de-select 'line-in' and then reselect it. Let me know if you're still unclear.
Since we've got started, where should I look for the 'before' and 'after' state to compare to see into this?
Yes, comparing the codec dump file would be helpful.
Changing from the initial mixer state of 'Line-in' being selected to 'Microphone' does not change anything in the /proc/asound/card0/codec#{0,1} files. After, changing the input back to 'Line-in' does show a change [1] (which we'd expect).
My interpretation of this is that (in the initial state) the STAC registers are set to record from the internal mic (which doesn't actually exist; there is a tiny amount of crosstalk) and the mixer settings ALSA reports show the line-in/external mic selected [2].
The problem sounds like a mismatch of initialization verb and the internal mixer state. If it's the case, the patch below should fix, then.
This does indeed squarely address the problem I was having, and is a good fix here!
The 'Line in' and 'Mic' inputs are a little confusing still. Do you think it's worth having 'Line/Mic in' or just 'External'?
As there is no internal mic on this model the 'Mic' input is the opposite of what needs selecting. Is there any way we can address this at the same too? Perhaps 'Int mic' or similar would clarify it.
OK, that makes sense. I'll fix them, too.
BTW, does the "Capture Boost" volume by the earlier patch have any influence on the record quality?
I didn't apply that patch, but will get back to you on this tonight.
Thanks, Daniel
On 05/07/07, Daniel J Blueman daniel.blueman@gmail.com wrote:
> > > > > With both 2.6.20 and 2.6.22 kernels on Ubuntu 7.04 on my Sony Vaio > > > > > SZ240, I'm unable to get my mic connector working at any cost. > > > > > > > > First, show the contents of /proc/asound/card0/codec#* files...
[snip]
> I have discovered the bug preventing me using the external mic socket > before: in the mixer, the user has to select the [internal] mic input, > then re-select the line-in (actually external mic) input; reading from > (eg) /dev/dsp while changing this, the output suddenly is as expected > when the line-in is re-selected.
Could you elaborate? What do yo mean "output" here, and what did you expect?
Looking at what is printed from the command 'cat /dev/dsp', what is shown changes when I de-select 'line-in' and then reselect it. Let me know if you're still unclear.
> Since we've got started, where should I look for the 'before' and > 'after' state to compare to see into this?
Yes, comparing the codec dump file would be helpful.
Changing from the initial mixer state of 'Line-in' being selected to 'Microphone' does not change anything in the /proc/asound/card0/codec#{0,1} files. After, changing the input back to 'Line-in' does show a change [1] (which we'd expect).
My interpretation of this is that (in the initial state) the STAC registers are set to record from the internal mic (which doesn't actually exist; there is a tiny amount of crosstalk) and the mixer settings ALSA reports show the line-in/external mic selected [2].
The problem sounds like a mismatch of initialization verb and the internal mixer state. If it's the case, the patch below should fix, then.
This does indeed squarely address the problem I was having, and is a good fix here!
The 'Line in' and 'Mic' inputs are a little confusing still. Do you think it's worth having 'Line/Mic in' or just 'External'?
As there is no internal mic on this model the 'Mic' input is the opposite of what needs selecting. Is there any way we can address this at the same too? Perhaps 'Int mic' or similar would clarify it.
OK, that makes sense. I'll fix them, too.
BTW, does the "Capture Boost" volume by the earlier patch have any influence on the record quality?
I didn't apply that patch, but will get back to you on this tonight.
I added the new 'Capture Boost Volume' control to both structures [1] and see it in amixer [2], however I'm not able to tweak it in alsamixer or gnome-volume-control. The external mic input is already pretty crisp (with a good mic) both without and with these changes, and at the recording levels I'd expect.
Let me know if you need further information etc.
Thanks again, Daniel
--- [1]
static struct snd_kcontrol_new vaio_mixer static struct snd_kcontrol_new vaio_ar_mixer
--- [2]
$ amixer contents numid=2,iface=MIXER,name='Master Playback Switch' ; type=BOOLEAN,access=rw------,values=2 : values=on,on numid=1,iface=MIXER,name='Master Playback Volume' ; type=INTEGER,access=rw------,values=2,min=0,max=127,step=0 : values=114,114 numid=7,iface=MIXER,name='PCM Playback Volume' ; type=INTEGER,access=rw---RW-,values=2,min=0,max=255,step=0 : values=238,238 | dBscale-min=-51.00dB,step=0.20dB,mute=0 numid=5,iface=MIXER,name='Capture Source' ; type=ENUMERATED,access=rw------,values=1,items=2 ; Item #0 'Line' ; Item #1 'Mic' : values=0 numid=6,iface=MIXER,name='Capture Boost Volume' ; type=BOOLEAN,access=rw------,values=2 : values=on,on numid=4,iface=MIXER,name='Capture Switch' ; type=BOOLEAN,access=rw------,values=2 : values=on,on numid=3,iface=MIXER,name='Capture Volume' ; type=INTEGER,access=rw---R--,values=2,min=0,max=15,step=0 : values=15,15 | dBscale-min=0.00dB,step=1.50dB,mute=0
At Fri, 6 Jul 2007 00:19:29 +0100, Daniel J Blueman wrote:
On 05/07/07, Daniel J Blueman daniel.blueman@gmail.com wrote:
> > > > > > With both 2.6.20 and 2.6.22 kernels on Ubuntu 7.04 on my Sony Vaio > > > > > > SZ240, I'm unable to get my mic connector working at any cost. > > > > > > > > > > First, show the contents of /proc/asound/card0/codec#* files... [snip] > > I have discovered the bug preventing me using the external mic socket > > before: in the mixer, the user has to select the [internal] mic input, > > then re-select the line-in (actually external mic) input; reading from > > (eg) /dev/dsp while changing this, the output suddenly is as expected > > when the line-in is re-selected. > > Could you elaborate? What do yo mean "output" here, and what did you > expect?
Looking at what is printed from the command 'cat /dev/dsp', what is shown changes when I de-select 'line-in' and then reselect it. Let me know if you're still unclear.
> > Since we've got started, where should I look for the 'before' and > > 'after' state to compare to see into this? > > Yes, comparing the codec dump file would be helpful.
Changing from the initial mixer state of 'Line-in' being selected to 'Microphone' does not change anything in the /proc/asound/card0/codec#{0,1} files. After, changing the input back to 'Line-in' does show a change [1] (which we'd expect).
My interpretation of this is that (in the initial state) the STAC registers are set to record from the internal mic (which doesn't actually exist; there is a tiny amount of crosstalk) and the mixer settings ALSA reports show the line-in/external mic selected [2].
The problem sounds like a mismatch of initialization verb and the internal mixer state. If it's the case, the patch below should fix, then.
This does indeed squarely address the problem I was having, and is a good fix here!
The 'Line in' and 'Mic' inputs are a little confusing still. Do you think it's worth having 'Line/Mic in' or just 'External'?
As there is no internal mic on this model the 'Mic' input is the opposite of what needs selecting. Is there any way we can address this at the same too? Perhaps 'Int mic' or similar would clarify it.
OK, that makes sense. I'll fix them, too.
BTW, does the "Capture Boost" volume by the earlier patch have any influence on the record quality?
I didn't apply that patch, but will get back to you on this tonight.
I added the new 'Capture Boost Volume' control to both structures [1] and see it in amixer [2], however I'm not able to tweak it in alsamixer or gnome-volume-control. The external mic input is already pretty crisp (with a good mic) both without and with these changes, and at the recording levels I'd expect.
My bad, the patch was wrong. Please try the one below instead.
Takashi
diff -r 1b353155ccc4 pci/hda/patch_sigmatel.c --- a/pci/hda/patch_sigmatel.c Fri Jul 06 12:27:25 2007 +0200 +++ b/pci/hda/patch_sigmatel.c Fri Jul 06 12:37:45 2007 +0200 @@ -2430,6 +2430,7 @@ static struct snd_kcontrol_new vaio_mixe .get = stac92xx_mux_enum_get, .put = stac92xx_mux_enum_put, }, + HDA_CODEC_VOLUME("Capture Boost Volume", 0x15, 0, HDA_OUTPUT), {} };
On 05/07/07, Daniel J Blueman daniel.blueman@gmail.com wrote:
> > > > > > > With both 2.6.20 and 2.6.22 kernels on Ubuntu 7.04 on my Sony Vaio > > > > > > > SZ240, I'm unable to get my mic connector working at any cost. > > > > > > > > > > > > First, show the contents of /proc/asound/card0/codec#* files... > [snip] > > > I have discovered the bug preventing me using the external mic socket > > > before: in the mixer, the user has to select the [internal] mic input, > > > then re-select the line-in (actually external mic) input; reading from > > > (eg) /dev/dsp while changing this, the output suddenly is as expected > > > when the line-in is re-selected. > > > > Could you elaborate? What do yo mean "output" here, and what did you > > expect? > > Looking at what is printed from the command 'cat /dev/dsp', what is > shown changes when I de-select 'line-in' and then reselect it. Let me > know if you're still unclear. > > > > Since we've got started, where should I look for the 'before' and > > > 'after' state to compare to see into this? > > > > Yes, comparing the codec dump file would be helpful. > > Changing from the initial mixer state of 'Line-in' being selected to > 'Microphone' does not change anything in the > /proc/asound/card0/codec#{0,1} files. After, changing the input back > to 'Line-in' does show a change [1] (which we'd expect). > > My interpretation of this is that (in the initial state) the STAC > registers are set to record from the internal mic (which doesn't > actually exist; there is a tiny amount of crosstalk) and the mixer > settings ALSA reports show the line-in/external mic selected [2].
The problem sounds like a mismatch of initialization verb and the internal mixer state. If it's the case, the patch below should fix, then.
This does indeed squarely address the problem I was having, and is a good fix here!
The 'Line in' and 'Mic' inputs are a little confusing still. Do you think it's worth having 'Line/Mic in' or just 'External'?
As there is no internal mic on this model the 'Mic' input is the opposite of what needs selecting. Is there any way we can address this at the same too? Perhaps 'Int mic' or similar would clarify it.
OK, that makes sense. I'll fix them, too.
BTW, does the "Capture Boost" volume by the earlier patch have any influence on the record quality?
I didn't apply that patch, but will get back to you on this tonight.
I added the new 'Capture Boost Volume' control to both structures [1] and see it in amixer [2], however I'm not able to tweak it in alsamixer or gnome-volume-control. The external mic input is already pretty crisp (with a good mic) both without and with these changes, and at the recording levels I'd expect.
My bad, the patch was wrong. Please try the one below instead.
With the new patch, anything above Capture Boost at zero resulted in the microphone signal saturating and being clipped; the levels I were seeing without the Capture Boost patch applied seemed optimal.
Thanks again, Daniel
You can type "cat /proc/asound/card0/codec#* > codec.txt" for each state, changing the name of "codec.txt" each time. When you make a change in alsamixer (or any other audio mixer), the change will be reflected here.
Tobin
On Mon, 2007-07-02 at 23:39 +0100, Daniel J Blueman wrote:
Hi Takashi,
On 02/07/07, Takashi Iwai tiwai@suse.de wrote:
Daniel J Blueman wrote:
With both 2.6.20 and 2.6.22 kernels on Ubuntu 7.04 on my Sony Vaio SZ240, I'm unable to get my mic connector working at any cost.
[snip]
How can I change the jack retasking with the Intel HDA drivers or get further insight into this problem?
First, show the contents of /proc/asound/card0/codec#* files...
Firstly, thank you for replying; the only related cases I've been able to find on the internet suggest to use the 'model=vaio' option to the snd-hda-intel module, but this does not help.
Try the patch below, choose "Line" as the capture source (if you want a mic-input jack -- for the built-in mic, chooes "Mic"), and raise the newly added "Capture Boost" volume.
Firstly, thank you for your time and help.
I have discovered the bug preventing me using the external mic socket before: in the mixer, the user has to select the [internal] mic input, then re-select the line-in (actually external mic) input; reading from (eg) /dev/dsp while changing this, the output suddenly is as expected when the line-in is re-selected.
Since we've got started, where should I look for the 'before' and 'after' state to compare to see into this?
This behaviour is reproducible with both 2.6.20 and 2.6.22-rc7.
Many thanks! Daniel
participants (3)
-
Daniel J Blueman
-
Takashi Iwai
-
Tobin Davis