Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Wu Fengguang <fengguang.wu@intel.com>
To: Paulo Cavalcanti <promac@gmail.com>
Cc: "Takashi Iwai" <tiwai@suse.de>,
	"Vedran Miletić" <rivanvx@gmail.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: idt blue jack patch
Date: Sat, 21 Feb 2009 10:56:39 +0800	[thread overview]
Message-ID: <20090221025639.GA8151@localhost> (raw)
In-Reply-To: <68720af30902201842u2d60dc99q7d2f2388491cdf6b@mail.gmail.com>

On Sat, Feb 21, 2009 at 04:42:00AM +0200, Paulo Cavalcanti wrote:
> 
> 
> On Fri, Feb 20, 2009 at 10:55 PM, Wu Fengguang <fengguang.wu@intel.com<mailto:fengguang.wu@intel.com>> wrote:
> On Fri, Feb 20, 2009 at 07:18:31PM +0200, Takashi Iwai wrote:
> > At Fri, 20 Feb 2009 09:00:01 +0800,
> > Wu Fengguang 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
> >
> >
> > Regarding the default pin configurations.
> > I made a series of patches to add the interface to change the default
> > pincfg values dynamically via hwdep sysfs.  The patches are found in
> > test/hda-pincfg branch of sound git tree
> >     git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git<http://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git>
> >
> > and included in the very latest alsa-driver-unstable snapshot
> >     ftp://ftp.kernel.org/pub/linux/kernel/people/tiwai/snapshot/alsa-driver-unstable-snapshot.tar.gz
> >
> > Basically, you can get / set the default pincfg values on the fly, and
> > trigger the codec reconfiguration after that.
> >
> > The init_pin_configs file shows the initial default pincfgs set by BIOS.
> >
> >       # cat /sys/class/sound/hwC0D0/init_pin_configs
> >       0x14 0x9993013f
> >       0x15 0x01014c10
> >       0x16 0x99030120
> >       0x18 0x01a19c30
> >       0x19 0x02a11c31
> >       0x1a 0x01813c32
> >       0x1b 0x02211c1f
> >       0x1c 0x99330133
> >       0x1d 0x411111f0
> >       0x1e 0x411111f0
> >       0x1f 0x411111f0
> >
> > Then, you can override the default value by writing to
> > override_pin_configs sysfs file.
> >
> >       # cat /sys/class/sound/hwC0D0/override_pin_configs
> >       # echo 0x1d 0x02a11c30 > /sys/class/sound/hwC0D0/override_pin_configs
> >       # cat /sys/class/sound/hwC0D0/override_pin_configs
> >       0x1d 0x02a11c30
> >
> > Note that this value won't appear in init_pin_configs.
> >
> > Also, there is another file, cur_pin_configs.  This contains the
> > pincfgs that are set by the driver explicitly.  For example,
> > the static pincfg table in patch_sigmatel.c appears here.
> >
> > Then you can trigger the codec reconfiguration by
> >
> >       # echo 1 > /sys/class/sound/hwC0D0/reconfig
> >
> > This will re-setup the driver based on the given pin configs.
> >
> > Unfortunately, in the current scenario, it can't override the static
> > pincfg table in the driver like in patch_sigmatel.c.  It's just for
> > fixing and BIOS setup.
> 
> If override_pin_configs cannot override the values in cur_pin_configs
> (or will it later?), then the name is kind of misleading.
> 
> How about the names bios_pin_configs, driver_pin_configs and user_pin_configs?
> 
> 
> 
> Having a tool for reconfiguring the pins seems to be the only hope
> for fixing the problems of all cards available out there.
> 
> However, I fixed my problem. The Dell Vostro 1400 (STAC9228) uses the model "dell-bios" by default. The problem is that plugging the headphones does not mute the speakers, and the digital mic does not work at all.
> 
> The model that works better is the "dell-3stack". But in this case there is no analog mic available (the digital mic works, but it is too low).
> 
> Comparing the codecs I realizaded that the problem was that
> the pin/node 0x0e (mic) was 0x01a19040 in the ref model and 0x01111212 in the del-3stack. Then I just switched their positions in the initialization, and voilá,
> I have an analog mic using the model I want, that is, del-3stack.

Paulo, have you tried the hda-verb? Or it won't work for you, so have
to modify the source code?

Thanks,
Fengguang

> Unfortunately, I know I did not contribute to anything. I just changed a codec
> to fit my needs, and maybe created a lot of noise tn the process.
> 
> Cheers,
> 
> and thanks for all the guidance I received.
> 
> 
> --- alsa-driver-1.0.19/alsa-kernel/pci/hda/patch_sigmatel.c     2009-01-19 09:08:58.000000000 -0200
> +++ alsa-driver-1.0.19-new/alsa-kernel/pci/hda/patch_sigmatel.c 2009-02-20 19:08:18.000000000 -0300
> @@ -2113,8 +2113,8 @@
>  };
> 
>  static unsigned int dell_3st_pin_configs[14] = {
> -       0x02211230, 0x02a11220, 0x01a19040, 0x01114210,
> -       0x01111212, 0x01116211, 0x01813050, 0x01112214,
> +       0x02211230, 0x02a11220, 0x01111212, 0x01114210,
> +       0x01a19040, 0x01116211, 0x01813050, 0x01112214,
>         0x403003fa, 0x90a60040, 0x90a60040, 0x404003fb,
>         0x40c003fc, 0x40000100
>  };
> 
> 
> 
> 
> --
> Paulo Roma Cavalcanti
> LCG - UFRJ
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2009-02-21  2:56 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
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 [this message]
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=20090221025639.GA8151@localhost \
    --to=fengguang.wu@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=promac@gmail.com \
    --cc=rivanvx@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox