Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133071
b: refs/heads/master
c: 5e7b8e0
h: refs/heads/master
i:
  133069: 868d83e
  133067: 6264c75
  133063: 37a7587
  133055: 46c542a
v: v3
  • Loading branch information
Takashi Iwai committed Feb 23, 2009
1 parent 4e89c89 commit f799fdc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 346ff70fdbe9093947b9494fe714c89cafcceade
refs/heads/master: 5e7b8e0d87091ae21b291588817b5359a5e00795
3 changes: 2 additions & 1 deletion trunk/Documentation/sound/alsa/HD-Audio.txt
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,8 @@ user_pin_configs::
Shows the pin default config values to override the BIOS setup.
Writing this (with two numbers, NID and value) appends the new
value. The given will be used instead of the initial BIOS value at
the next reconfiguration time.
the next reconfiguration time. Note that this config will override
even the driver pin configs, too.
reconfig::
Triggers the codec re-configuration. When any value is written to
this file, the driver re-initialize and parses the codec tree
Expand Down
16 changes: 12 additions & 4 deletions trunk/sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,9 @@ int snd_hda_add_pincfg(struct hda_codec *codec, struct snd_array *list,
hda_nid_t nid, unsigned int cfg)
{
struct hda_pincfg *pin;
unsigned int oldcfg;

oldcfg = snd_hda_codec_get_pincfg(codec, nid);
pin = look_up_pincfg(codec, list, nid);
if (!pin) {
pin = snd_array_new(list);
Expand All @@ -748,7 +750,13 @@ int snd_hda_add_pincfg(struct hda_codec *codec, struct snd_array *list,
pin->nid = nid;
}
pin->cfg = cfg;
set_pincfg(codec, nid, cfg);

/* change only when needed; e.g. if the pincfg is already present
* in user_pins[], don't write it
*/
cfg = snd_hda_codec_get_pincfg(codec, nid);
if (oldcfg != cfg)
set_pincfg(codec, nid, cfg);
return 0;
}

Expand All @@ -764,14 +772,14 @@ unsigned int snd_hda_codec_get_pincfg(struct hda_codec *codec, hda_nid_t nid)
{
struct hda_pincfg *pin;

pin = look_up_pincfg(codec, &codec->driver_pins, nid);
if (pin)
return pin->cfg;
#ifdef CONFIG_SND_HDA_HWDEP
pin = look_up_pincfg(codec, &codec->user_pins, nid);
if (pin)
return pin->cfg;
#endif
pin = look_up_pincfg(codec, &codec->driver_pins, nid);
if (pin)
return pin->cfg;
pin = look_up_pincfg(codec, &codec->init_pins, nid);
if (pin)
return pin->cfg;
Expand Down

0 comments on commit f799fdc

Please sign in to comment.