[alsa-devel] PATCH: ALSA - hda - Add support for Dell E6400 docking station

Christian Hergert christian.hergert at gmail.com
Tue Nov 17 21:17:59 CET 2009


On Tue, Nov 17, 2009 at 1:37 AM, Takashi Iwai <tiwai at suse.de> wrote:
>
> At Mon, 16 Nov 2009 15:20:32 -0800,
> Christian Hergert wrote:
> >
> > Hi,
> >
> > I made a patch to fix bug 4657[1] on the tracker.  I'm fairly certain that
> > it isn't the correct approach but would like some feedback on what that
> > would be.
> >
> > The power-mappings in patch_sigmatel.c seem to allow you to flip multiple
> > bits.  In the case of the Dell docking station, you need to enable some bits
> > while disabling others.  Therefore, instead of using the power mappings I
> > just hacked in a quick check to work for the hardware I have on hand.  If
> > there is a proper way to fix this that I have missed, I'll be more than
> > happy to fix the patch appropriately.
> >
> > [1] https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4657
>
> The jack detection of the docking station is already there, but it seems
> just a missing call to toggle the power-map.
>
> How about the patch below?
>
>
> thanks,
>
> Takashi
>
> ---
> diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
> index 7f76a97..bd9a2dd 100644
> --- a/sound/pci/hda/patch_sigmatel.c
> +++ b/sound/pci/hda/patch_sigmatel.c
> @@ -4396,10 +4396,12 @@ static void stac92xx_set_pinctl(struct hda_codec *codec, hda_nid_t nid,
>                pin_ctl &= ~(AC_PINCTL_IN_EN | AC_PINCTL_OUT_EN);
>
>        pin_ctl |= flag;
> -       if (old_ctl != pin_ctl)
> +       if (old_ctl != pin_ctl) {
>                snd_hda_codec_write_cache(codec, nid, 0,
>                                          AC_VERB_SET_PIN_WIDGET_CONTROL,
>                                          pin_ctl);
> +               stac_toggle_power_map(codec, nid, 1);
> +       }
>  }
>
>  static void stac92xx_reset_pinctl(struct hda_codec *codec, hda_nid_t nid,
> @@ -4407,10 +4409,12 @@ static void stac92xx_reset_pinctl(struct hda_codec *codec, hda_nid_t nid,
>  {
>        unsigned int pin_ctl = snd_hda_codec_read(codec, nid,
>                        0, AC_VERB_GET_PIN_WIDGET_CONTROL, 0x00);
> -       if (pin_ctl & flag)
> +       if (pin_ctl & flag) {
>                snd_hda_codec_write_cache(codec, nid, 0,
>                                          AC_VERB_SET_PIN_WIDGET_CONTROL,
>                                          pin_ctl & ~flag);
> +               stac_toggle_power_map(codec, nid, 0);
> +       }
>  }
>
>  static int get_pin_presence(struct hda_codec *codec, hda_nid_t nid)

I tried this on top of 2.6.31.4 and, unfortunately, it did not solve
the problem.  I'll investigate a bit to figure out why.

-- Christian


More information about the Alsa-devel mailing list