[alsa-devel] patch for Dell 1210 which using stac9221 codec

zhejiang zhe.jiang at intel.com
Fri Nov 9 05:53:50 CET 2007


On Thu, 2007-11-08 at 05:48 +0100, Takashi Iwai wrote:
> At Thu, 08 Nov 2007 15:06:22 +0800,
> zhejiang wrote:
> > 
> > Hi,Takashi:
> > 
> > Is there any new states about this patch?
> > Maybe I can ask the reporter to help to test it.
> 
> Your patch looks almost fine, but I need your sign-off to merge to the
> upstream (as it's no trivial fix).  Give the following explicitly to
> agree the general patch management (see
> $LINUX_KERNEL/Documentation/SubmittingPatches for details).
> 
Thanks!
Here is my sign-off:


Signed-off-by: Jiang Zhe <zhe.jiang at intel.com>

> So far, three patches are pending:
> 
> - fix for pincfg
> - hack to swap hp and line-outs at probe
> - fix for speaker-off via mic-jack plug (which I'd need a bit more
>   review, though)
> 
> Of course, the test of the patch with the original reporter is
> important.
> 

I will ask the reporter to help to test the patch.

> 
> thanks,
> 
> Takashi
> 
> 
> > 
> > Thanks!
> > 
> > 
> > On Wed, 2007-10-31 at 16:39 +0800, Takashi Iwai wrote:
> > > At Wed, 31 Oct 2007 16:49:44 +0800,
> > > zhejiang wrote:
> > > >
> > > > On Tue, 2007-10-30 at 14:53 +0100, Takashi Iwai wrote:
> > > > > At Tue, 30 Oct 2007 17:05:55 +0800,
> > > > > zhejiang wrote:
> > > > > >
> > > > > > The stac92xx_auto_create_multi_out_ctls() create controls
> > > according to
> > > > > > cfg->line_outs. This patch seems to leave the cfg->line_outs
> > > unchanged.
> > > > > > It will be 1 . So I think that we need to modify
> > > > > > stac92xx_auto_create_multi_out_ctls(),let it to use the right
> > > line_outs.
> > > > >
> > > > > Right, then it might be actually easier to swap line_outs and
> > > hp_outs
> > > > > before and after as you suggested...
> > > > >
> > > > >
> > > > > Takashi
> > > >
> > > > So,we should patch the patch_sigmatel.c like that?
> > > 
> > > Yes, that's what I meant (almost same change I did in my local tree :)
> > > I'm going to split this to two pieces, the change of m82 pin config
> > > and the hack for multi-HP outs (also my last change to autocfg
> > > parser).
> > > 
> > > Anyway, could you give your sign-off?  Then I'll apply the patches to
> > > the HG tree for better testing.
> > > 
> > > 
> > > Thanks,
> > > 
> > > Takashi
> > > 
> > > >
> > > > Thanks!
> > > >
> > > > diff -Nur
> > > a/alsa-driver-hg20071031/alsa-kernel/pci/hda/patch_sigmatel.c
> > > > b/alsa-driver-hg20071031/alsa-kernel/pci/hda/patch_sigmatel.c
> > > > --- a/alsa-driver-hg20071031/alsa-kernel/pci/hda/patch_sigmatel.c
> > > > 2007-10-23 08:00:10.000000000 +0800
> > > > +++ b/alsa-driver-hg20071031/alsa-kernel/pci/hda/patch_sigmatel.c
> > > > 2007-10-31 16:15:38.000000000 +0800
> > > > @@ -884,8 +884,8 @@
> > > >      102801D7 (Dell XPS M1210)
> > > >  */
> > > >  static unsigned int dell_922x_m82_pin_configs[10] = {
> > > > -     0x0221121f, 0x408103ff, 0x02111212, 0x90100310,
> > > > -     0x408003f1, 0x02111211, 0x03451340, 0x40c003f2,
> > > > +     0x02211211, 0x408103ff, 0x02a1123e, 0x90100310,
> > > > +     0x408003f1, 0x0221121f, 0x03451340, 0x40c003f2,
> > > >       0x508003f3, 0x405003f4,
> > > >  };
> > > > 
> > > > @@ -2088,6 +2088,7 @@
> > > >  {
> > > >       struct sigmatel_spec *spec = codec->spec;
> > > >       int err;
> > > > +     int hp_speaker_swap = 0;
> > > > 
> > > >       if ((err = snd_hda_parse_pin_def_config(codec,
> > > >                                               &spec->autocfg,
> > > > @@ -2096,6 +2097,18 @@
> > > >       if (! spec->autocfg.line_outs)
> > > >               return 0; /* can't find valid pin config */
> > > > 
> > > > +     if (spec->autocfg.line_out_type == AUTO_PIN_SPEAKER_OUT &&
> > > > +        spec->autocfg.hp_outs > 1) {
> > > > +             /*Copy hp_outs to line_outs, backup line_outs in
> > > speaker_outs*/
> > > > +             memcpy(spec->autocfg.speaker_pins,
> > > spec->autocfg.line_out_pins,
> > > > +                            sizeof(spec->autocfg.line_out_pins));
> > > > +             spec->autocfg.speaker_outs = spec->autocfg.line_outs;
> > > > +             memcpy(spec->autocfg.line_out_pins,
> > > spec->autocfg.hp_pins,
> > > > +                            sizeof(spec->autocfg.hp_pins));
> > > > +             spec->autocfg.line_outs = spec->autocfg.hp_outs;
> > > > +             hp_speaker_swap = 1;
> > > > +     }
> > > > +
> > > >       if ((err = stac92xx_add_dyn_out_pins(codec, &spec->autocfg)) <
> > > 0)
> > > >               return err;
> > > >       if (spec->multiout.num_dacs == 0)
> > > > @@ -2107,6 +2120,18 @@
> > > >       if (err < 0)
> > > >               return err;
> > > > 
> > > > +     if (hp_speaker_swap == 1) {
> > > > +             /*Restore the hp_outs and line_outs*/
> > > > +             memcpy(spec->autocfg.hp_pins,
> > > spec->autocfg.line_out_pins,
> > > > +                            sizeof(spec->autocfg.line_out_pins));
> > > > +             spec->autocfg.hp_outs = spec->autocfg.line_outs;
> > > > +             memcpy(spec->autocfg.line_out_pins,
> > > spec->autocfg.speaker_pins,
> > > > +                            sizeof(spec->autocfg.speaker_pins));
> > > > +             spec->autocfg.line_outs = spec->autocfg.speaker_outs;
> > > > +             memset(spec->autocfg.speaker_pins, 0,
> > > > sizeof(spec->autocfg.speaker_pins));
> > > > +             spec->autocfg.speaker_outs = 0;
> > > > +     }
> > > > +
> > > >       err = stac92xx_auto_create_hp_ctls(codec, &spec->autocfg);
> > > > 
> > > >       if (err < 0)
> > > >
> > > 
> > > 
> > 


More information about the Alsa-devel mailing list