From: Wu Fengguang <fengguang.wu@intel.com>
To: Paulo Cavalcanti <promac@gmail.com>
Cc: Takashi Iwai <tiwai@suse.de>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: idt blue jack patch
Date: Fri, 20 Feb 2009 22:31:20 +0800 [thread overview]
Message-ID: <20090220143120.GA9795@localhost> (raw)
In-Reply-To: <68720af30902200616q645a8c5dy12e0ecf56af1da3b@mail.gmail.com>
On Fri, Feb 20, 2009 at 04:16:52PM +0200, Paulo Cavalcanti wrote:
>
>
> On Fri, Feb 20, 2009 at 8:20 AM, Wu Fengguang <fengguang.wu@intel.com<mailto:fengguang.wu@intel.com>> wrote:
> On Fri, Feb 20, 2009 at 12:15:16PM +0200, Paulo Cavalcanti wrote:
> >
> >
> > On Thu, Feb 19, 2009 at 10:00 PM, Wu Fengguang <fengguang.wu@intel.com<mailto:fengguang.wu@intel.com><mailto:fengguang.wu@intel.com<mailto:fengguang.wu@intel.com>>> wrote:
> > Hi Tobin,
> >
> > Here are the Linux and WinXP pin configurations.
> > Both Linux and WinXP configure node 0x0c as an output pin.
> >
> > However the driver seems to be offering three schemes:
> >
> > scheme desc 0xC dev
> > ------------------------------------------------------
> > IDS_CONFIG_OPEN Speaker_Side/LineIn
> > IDS_CONFIG_51 LineIn
> > IDS_CONFIG_71 Speaker_Side
> >
> > Paulo, maybe you can run these commands to switch between
> > linein/lineout modes:
> >
> > # wget http://www.kernel.org/pub/linux/kernel/people/tiwai/misc/hda-verb-0.3.tar.bz2
> >
> > # set PIN_IN mode
> > hda-verb /dev/snd/hwC0D2 0x0c SET_PIN_WIDGET_CONTROL 0x20
> >
> > # set PIN_OUT mode
> > hda-verb /dev/snd/hwC0D2 0x0c SET_PIN_WIDGET_CONTROL 0x40
> >
> > Thanks,
> > Fengguang
> > ---
> >
> > /proc/asound/card0/codec\#2
> >
> > Codec: IDT 92HD73E1X5
> > Address: 2
> > Vendor Id: 0x111d7676
> > Subsystem Id: 0x80865002
> > Revision Id: 0x100202
> >
> >
> > AUD_allOS_6033.2_PV_IDTGUI_v124/WDM/WinXP/Sthda.ini
> >
> > # sthda.INI
> > [Models]
> > ...
> > HDAUDIO\FUNC_01&VEN_111D&DEV_7676&SUBSYS_80865002=I73E-EL2.INI
> > ...
> >
> >
> > AUD_allOS_6033.2_PV_IDTGUI_v124/WDM/WinXP/I73E-EL2.INI
> >
> > [HKR\Settings\Pin\0C]
> > CfgDflt = dword: 0x01113214
> > AltCfg = hex: 5E,32,81,01
> > AssignedDAC = hex: 0x18
> >
> >
> > /proc/asound/card0/codec\#2
> >
> > Node 0x0c [Pin Complex] wcaps 0x400183: Stereo Amp-In
> > Amp-In caps: N/A
> > Amp-In vals: [0x00 0x00]
> > Pincap 0x00001737: IN OUT Detect Trigger ImpSense
> > Vref caps: HIZ 50 GRD 80
> > Pin Default 0x01113014: [Jack] Speaker at Ext Rear
> > Conn = 1/8, Color = Blue
> > DefAssociation = 0x1, Sequence = 0x4
> > Pin-ctls: 0x40: OUT VREF_HIZ
> > Unsolicited: tag=04, enabled=1
> > Connection: 6
> > 0x15 0x16 0x17 0x18* 0x19 0x1e
> >
> >
> > Thanks a lot, Fengguang.
> >
> > The other models for this codec are for Dell computers.
> > Probably, all of then will behave the same way, right?
>
> I guess the hda-verb commands will work for all IN/OUT configurable pins.
>
> > I still have a question. I see that you changed Pin Default 0x01113014,
> > for 0x01813021, in the driver for having LineIn.
> > Also, Pin-ctls: 0x40 should provide the pin as an output. The Node is 0x0c.
> >
> > Therefore,
> >
> > # set PIN_OUT mode
> > hda-verb /dev/snd/hwC0D2 0x0c SET_PIN_WIDGET_CONTROL 0x40
> >
> > makes sense.
> >
> > But how would I know that 0x20 would turn the pin 0x0c into LineIn?
> >
> > # set PIN_IN mode
> > hda-verb /dev/snd/hwC0D2 0x0c SET_PIN_WIDGET_CONTROL 0x20
>
> ALSA defined the following values according to the HDA spec:
>
> /* Pin widget control - 8bit */
> #define AC_PINCTL_IN_EN (1<<5)
> #define AC_PINCTL_OUT_EN (1<<6)
> #define AC_PINCTL_HP_EN (1<<7)
>
> #define PIN_IN (AC_PINCTL_IN_EN)
> #define PIN_OUT (AC_PINCTL_OUT_EN)
> #define PIN_HP (AC_PINCTL_OUT_EN | AC_PINCTL_HP_EN)
>
> So PIN_OUT=0x40 and PIN_IN=0x20.
>
> > I am asking because I have a Dell laptop (Vostro 1400) where the external mic
> > works when I use model=ref (and I loose the speakers in this case), but not
> > when I use model=dell-3stack. If I could figure out how to switch
> > the pin using hda-verb in this case, would solve my problems when using skype.
>
> You can locate the external mic pin in /proc/asound/card0/codec#* and
> feed its node id to the hda-verb command. It should work the same way.
>
> This is from model=ref. I can see it defines Line In as the
> pin 0xe (exactly the jack marked as mic in the Vostro 1400).
> This is how it should be.
>
But you pasted info for 0x0c instead of 0xe below...
Would you provide the full codec file?
> Node 0x0c [Pin Complex] wcaps 0x400181: Stereo
> Pincap 0x00001737: IN OUT Detect Trigger ImpSense
> Vref caps: HIZ 50 GRD 80
> Pin Default 0x0181304e: [Jack] Line In at Ext Rear
> Conn = 1/8, Color = Blue
> DefAssociation = 0x4, Sequence = 0xe
> Pin-ctls: 0x20: IN VREF_HIZ
> Unsolicited: tag=04, enabled=1
> Connection: 1
> 0x03
>
> ----------------------------------
>
> This is from model=dell-3stack. There is no Line In defined. This
> is the problem....
>
>
> Node 0x10 [Pin Complex] wcaps 0x400181: Stereo
> Pincap 0x00000037: IN OUT Detect Trigger ImpSense
> Pin Default 0x01813050: [Jack] Line In at Ext Rear
> Conn = 1/8, Color = Blue
> DefAssociation = 0x5, Sequence = 0x0
> Pin-ctls: 0x20: IN
> Unsolicited: tag=04, enabled=1
> Connection: 1
> 0x04
>
>
> The question is: how can I use hda-verb to make pin 0xe
> be an input pin (0x20), the way it were when using model = ref?
Where is Node 0x0e? You didn't paste Node 0x0e info, but 0x0c and 0x10.
> set PIN_IN mode:
> hda-verb /dev/snd/hwC0D0 0x0c SET_PIN_WIDGET_CONTROL 0x20
>
> The node is 0x0c, but I am not sure if it is that simple.
It's trivial to try it out, its harmless anyway :)
You only have to replace 0x0c with your mic node.
Thanks,
Fengguang
next prev parent reply other threads:[~2009-02-20 14:31 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-16 9:13 idt blue jack patch Paulo Cavalcanti
2009-02-16 10:55 ` Takashi Iwai
2009-02-18 2:04 ` Paulo Cavalcanti
2009-02-18 6:50 ` Takashi Iwai
2009-02-18 9:04 ` Paulo Cavalcanti
2009-02-18 9:44 ` Vedran Miletić
2009-02-18 15:24 ` Takashi Iwai
2009-02-19 3:02 ` Wu Fengguang
2009-02-19 3:22 ` Tobin Davis
2009-02-19 9:37 ` Takashi Iwai
2009-02-20 1:00 ` Wu Fengguang
2009-02-20 10:15 ` Paulo Cavalcanti
2009-02-20 11:20 ` Wu Fengguang
2009-02-20 14:16 ` Paulo Cavalcanti
2009-02-20 14:31 ` Wu Fengguang [this message]
2009-02-20 16:07 ` Paulo Cavalcanti
2009-02-21 1:05 ` Wu Fengguang
2009-02-20 17:18 ` Takashi Iwai
2009-02-21 1:42 ` Wu Fengguang
2009-02-21 16:28 ` Takashi Iwai
2009-02-23 8:54 ` Takashi Iwai
2009-02-23 9:53 ` Wu Fengguang
2009-02-23 10:21 ` Takashi Iwai
2009-02-23 12:58 ` Wu Fengguang
2009-02-23 13:00 ` Takashi Iwai
2009-02-23 16:15 ` Takashi Iwai
2009-02-24 2:30 ` Wu Fengguang
2009-02-21 1:55 ` Wu Fengguang
2009-02-21 2:42 ` Paulo Cavalcanti
2009-02-21 2:56 ` Wu Fengguang
2009-02-21 3:12 ` Paulo Cavalcanti
2009-02-21 16:28 ` Takashi Iwai
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=20090220143120.GA9795@localhost \
--to=fengguang.wu@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=promac@gmail.com \
--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 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.