Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15952
b: refs/heads/master
c: 9f146bb
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed Jan 3, 2006
1 parent d64cb85 commit 956cac0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 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: d2a6d7dc757da6b57d77bd8b460cf4faa9fd152d
refs/heads/master: 9f146bb6e68610ab2b62c76e7485900545515613
8 changes: 6 additions & 2 deletions trunk/sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,9 @@ static int init_unsol_queue(struct hda_bus *bus)
{
struct hda_bus_unsolicited *unsol;

if (bus->unsol) /* already initialized */
return 0;

unsol = kzalloc(sizeof(*unsol), GFP_KERNEL);
if (! unsol) {
snd_printk(KERN_ERR "hda_codec: can't allocate unsolicited queue\n");
Expand Down Expand Up @@ -373,8 +376,6 @@ int snd_hda_bus_new(snd_card_t *card, const struct hda_bus_template *temp,
init_MUTEX(&bus->cmd_mutex);
INIT_LIST_HEAD(&bus->codec_list);

init_unsol_queue(bus);

if ((err = snd_device_new(card, SNDRV_DEV_BUS, bus, &dev_ops)) < 0) {
snd_hda_bus_free(bus);
return err;
Expand Down Expand Up @@ -540,6 +541,9 @@ int snd_hda_codec_new(struct hda_bus *bus, unsigned int codec_addr,
return err;
}

if (codec->patch_ops.unsol_event)
init_unsol_queue(bus);

snd_hda_codec_proc_new(codec);

sprintf(component, "HDA:%08x", codec->vendor_id);
Expand Down

0 comments on commit 956cac0

Please sign in to comment.