Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133088
b: refs/heads/master
c: f93d461
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Mar 2, 2009
1 parent cc8beda commit ddb152b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 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: d1f1af2dbf8207db590853a59bec465c4f68cfdc
refs/heads/master: f93d461bcde6ac3db542361c00a7e4167f88176d
14 changes: 10 additions & 4 deletions trunk/sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1434,7 +1434,6 @@ int snd_hda_ctl_add(struct hda_codec *codec, struct snd_kcontrol *kctl)
}
EXPORT_SYMBOL_HDA(snd_hda_ctl_add);

#ifdef CONFIG_SND_HDA_RECONFIG
/* Clear all controls assigned to the given codec */
void snd_hda_ctls_clear(struct hda_codec *codec)
{
Expand Down Expand Up @@ -1529,7 +1528,6 @@ int snd_hda_codec_reset(struct hda_codec *codec)
hda_unlock_devices(card);
return 0;
}
#endif /* CONFIG_SND_HDA_RECONFIG */

/* create a virtual master control and add slaves */
int snd_hda_add_vmaster(struct hda_codec *codec, char *name,
Expand Down Expand Up @@ -2392,8 +2390,16 @@ int /*__devinit*/ snd_hda_build_controls(struct hda_bus *bus)

list_for_each_entry(codec, &bus->codec_list, list) {
int err = snd_hda_codec_build_controls(codec);
if (err < 0)
return err;
if (err < 0) {
printk(KERN_ERR "hda_codec: cannot build controls"
"for #%d (error %d)\n", codec->addr, err);
err = snd_hda_codec_reset(codec);
if (err < 0) {
printk(KERN_ERR
"hda_codec: cannot revert codec\n");
return err;
}
}
}
return 0;
}
Expand Down

0 comments on commit ddb152b

Please sign in to comment.