diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-03-17 04:28:13 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-03-17 04:28:13 -0400 |
commit | 37ba1b62836d2440980cf553c49556393b05c6cd (patch) | |
tree | 3bbd9b76117d484d5a624db1b2b9ec0181c7ff55 /sound | |
parent | 1713c0d508fbbb42aa5f90039195e5ac31a50625 (diff) | |
parent | dde332b660cf0bc2baaba678b52768a0fb6e6da2 (diff) |
Merge branch 'fix/opl3sa2-suspend' into topic/isa-misc
Diffstat (limited to 'sound')
38 files changed, 257 insertions, 160 deletions
diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c index 89096e811a4b..772901e41ecb 100644 --- a/sound/arm/aaci.c +++ b/sound/arm/aaci.c | |||
@@ -90,7 +90,7 @@ static void aaci_ac97_write(struct snd_ac97 *ac97, unsigned short reg, | |||
90 | */ | 90 | */ |
91 | do { | 91 | do { |
92 | v = readl(aaci->base + AACI_SLFR); | 92 | v = readl(aaci->base + AACI_SLFR); |
93 | } while ((v & (SLFR_1TXB|SLFR_2TXB)) && timeout--); | 93 | } while ((v & (SLFR_1TXB|SLFR_2TXB)) && --timeout); |
94 | 94 | ||
95 | if (!timeout) | 95 | if (!timeout) |
96 | dev_err(&aaci->dev->dev, | 96 | dev_err(&aaci->dev->dev, |
@@ -126,7 +126,7 @@ static unsigned short aaci_ac97_read(struct snd_ac97 *ac97, unsigned short reg) | |||
126 | */ | 126 | */ |
127 | do { | 127 | do { |
128 | v = readl(aaci->base + AACI_SLFR); | 128 | v = readl(aaci->base + AACI_SLFR); |
129 | } while ((v & SLFR_1TXB) && timeout--); | 129 | } while ((v & SLFR_1TXB) && --timeout); |
130 | 130 | ||
131 | if (!timeout) { | 131 | if (!timeout) { |
132 | dev_err(&aaci->dev->dev, "timeout on slot 1 TX busy\n"); | 132 | dev_err(&aaci->dev->dev, "timeout on slot 1 TX busy\n"); |
@@ -147,7 +147,7 @@ static unsigned short aaci_ac97_read(struct snd_ac97 *ac97, unsigned short reg) | |||
147 | do { | 147 | do { |
148 | cond_resched(); | 148 | cond_resched(); |
149 | v = readl(aaci->base + AACI_SLFR) & (SLFR_1RXV|SLFR_2RXV); | 149 | v = readl(aaci->base + AACI_SLFR) & (SLFR_1RXV|SLFR_2RXV); |
150 | } while ((v != (SLFR_1RXV|SLFR_2RXV)) && timeout--); | 150 | } while ((v != (SLFR_1RXV|SLFR_2RXV)) && --timeout); |
151 | 151 | ||
152 | if (!timeout) { | 152 | if (!timeout) { |
153 | dev_err(&aaci->dev->dev, "timeout on RX valid\n"); | 153 | dev_err(&aaci->dev->dev, "timeout on RX valid\n"); |
diff --git a/sound/core/jack.c b/sound/core/jack.c index dd4a12dc09aa..077a85262c1c 100644 --- a/sound/core/jack.c +++ b/sound/core/jack.c | |||
@@ -47,7 +47,7 @@ static int snd_jack_dev_register(struct snd_device *device) | |||
47 | int err; | 47 | int err; |
48 | 48 | ||
49 | snprintf(jack->name, sizeof(jack->name), "%s %s", | 49 | snprintf(jack->name, sizeof(jack->name), "%s %s", |
50 | card->longname, jack->id); | 50 | card->shortname, jack->id); |
51 | jack->input_dev->name = jack->name; | 51 | jack->input_dev->name = jack->name; |
52 | 52 | ||
53 | /* Default to the sound card device. */ | 53 | /* Default to the sound card device. */ |
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index e17836680f49..0a1798eafb0b 100644 --- a/sound/core/oss/pcm_oss.c +++ b/sound/core/oss/pcm_oss.c | |||
@@ -1767,7 +1767,7 @@ static int snd_pcm_oss_get_formats(struct snd_pcm_oss_file *pcm_oss_file) | |||
1767 | AFMT_S8 | AFMT_U16_LE | | 1767 | AFMT_S8 | AFMT_U16_LE | |
1768 | AFMT_U16_BE | | 1768 | AFMT_U16_BE | |
1769 | AFMT_S32_LE | AFMT_S32_BE | | 1769 | AFMT_S32_LE | AFMT_S32_BE | |
1770 | AFMT_S24_LE | AFMT_S24_LE | | 1770 | AFMT_S24_LE | AFMT_S24_BE | |
1771 | AFMT_S24_PACKED; | 1771 | AFMT_S24_PACKED; |
1772 | params = kmalloc(sizeof(*params), GFP_KERNEL); | 1772 | params = kmalloc(sizeof(*params), GFP_KERNEL); |
1773 | if (!params) | 1773 | if (!params) |
diff --git a/sound/core/oss/rate.c b/sound/core/oss/rate.c index a466443c4a26..2fa9299a440d 100644 --- a/sound/core/oss/rate.c +++ b/sound/core/oss/rate.c | |||
@@ -157,7 +157,7 @@ static void resample_shrink(struct snd_pcm_plugin *plugin, | |||
157 | while (dst_frames1 > 0) { | 157 | while (dst_frames1 > 0) { |
158 | S1 = S2; | 158 | S1 = S2; |
159 | if (src_frames1-- > 0) { | 159 | if (src_frames1-- > 0) { |
160 | S1 = *src; | 160 | S2 = *src; |
161 | src += src_step; | 161 | src += src_step; |
162 | } | 162 | } |
163 | if (pos & ~R_MASK) { | 163 | if (pos & ~R_MASK) { |
diff --git a/sound/drivers/mtpav.c b/sound/drivers/mtpav.c index 5b89c0883d60..48b64e6b2670 100644 --- a/sound/drivers/mtpav.c +++ b/sound/drivers/mtpav.c | |||
@@ -706,7 +706,6 @@ static int __devinit snd_mtpav_probe(struct platform_device *dev) | |||
706 | mtp_card->card = card; | 706 | mtp_card->card = card; |
707 | mtp_card->irq = -1; | 707 | mtp_card->irq = -1; |
708 | mtp_card->share_irq = 0; | 708 | mtp_card->share_irq = 0; |
709 | mtp_card->inmidiport = 0xffffffff; | ||
710 | mtp_card->inmidistate = 0; | 709 | mtp_card->inmidistate = 0; |
711 | mtp_card->outmidihwport = 0xffffffff; | 710 | mtp_card->outmidihwport = 0xffffffff; |
712 | init_timer(&mtp_card->timer); | 711 | init_timer(&mtp_card->timer); |
@@ -719,6 +718,8 @@ static int __devinit snd_mtpav_probe(struct platform_device *dev) | |||
719 | if (err < 0) | 718 | if (err < 0) |
720 | goto __error; | 719 | goto __error; |
721 | 720 | ||
721 | mtp_card->inmidiport = mtp_card->num_ports + MTPAV_PIDX_BROADCAST; | ||
722 | |||
722 | err = snd_mtpav_get_ISA(mtp_card); | 723 | err = snd_mtpav_get_ISA(mtp_card); |
723 | if (err < 0) | 724 | if (err < 0) |
724 | goto __error; | 725 | goto __error; |
diff --git a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c index 19b2d0420a26..3f0b877bc8b5 100644 --- a/sound/isa/opl3sa2.c +++ b/sound/isa/opl3sa2.c | |||
@@ -554,21 +554,27 @@ static int __devinit snd_opl3sa2_mixer(struct snd_card *card) | |||
554 | #ifdef CONFIG_PM | 554 | #ifdef CONFIG_PM |
555 | static int snd_opl3sa2_suspend(struct snd_card *card, pm_message_t state) | 555 | static int snd_opl3sa2_suspend(struct snd_card *card, pm_message_t state) |
556 | { | 556 | { |
557 | struct snd_opl3sa2 *chip = card->private_data; | 557 | if (card) { |
558 | struct snd_opl3sa2 *chip = card->private_data; | ||
558 | 559 | ||
559 | snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); | 560 | snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); |
560 | chip->wss->suspend(chip->wss); | 561 | chip->wss->suspend(chip->wss); |
561 | /* power down */ | 562 | /* power down */ |
562 | snd_opl3sa2_write(chip, OPL3SA2_PM_CTRL, OPL3SA2_PM_D3); | 563 | snd_opl3sa2_write(chip, OPL3SA2_PM_CTRL, OPL3SA2_PM_D3); |
564 | } | ||
563 | 565 | ||
564 | return 0; | 566 | return 0; |
565 | } | 567 | } |
566 | 568 | ||
567 | static int snd_opl3sa2_resume(struct snd_card *card) | 569 | static int snd_opl3sa2_resume(struct snd_card *card) |
568 | { | 570 | { |
569 | struct snd_opl3sa2 *chip = card->private_data; | 571 | struct snd_opl3sa2 *chip; |
570 | int i; | 572 | int i; |
571 | 573 | ||
574 | if (!card) | ||
575 | return 0; | ||
576 | |||
577 | chip = card->private_data; | ||
572 | /* power up */ | 578 | /* power up */ |
573 | snd_opl3sa2_write(chip, OPL3SA2_PM_CTRL, OPL3SA2_PM_D0); | 579 | snd_opl3sa2_write(chip, OPL3SA2_PM_CTRL, OPL3SA2_PM_D0); |
574 | 580 | ||
diff --git a/sound/oss/dmasound/dmasound_atari.c b/sound/oss/dmasound/dmasound_atari.c index 57d9f154c88b..38931f2f6967 100644 --- a/sound/oss/dmasound/dmasound_atari.c +++ b/sound/oss/dmasound/dmasound_atari.c | |||
@@ -847,23 +847,23 @@ static int __init AtaIrqInit(void) | |||
847 | of events. So all we need to keep the music playing is | 847 | of events. So all we need to keep the music playing is |
848 | to provide the sound hardware with new data upon | 848 | to provide the sound hardware with new data upon |
849 | an interrupt from timer A. */ | 849 | an interrupt from timer A. */ |
850 | mfp.tim_ct_a = 0; /* ++roman: Stop timer before programming! */ | 850 | st_mfp.tim_ct_a = 0; /* ++roman: Stop timer before programming! */ |
851 | mfp.tim_dt_a = 1; /* Cause interrupt after first event. */ | 851 | st_mfp.tim_dt_a = 1; /* Cause interrupt after first event. */ |
852 | mfp.tim_ct_a = 8; /* Turn on event counting. */ | 852 | st_mfp.tim_ct_a = 8; /* Turn on event counting. */ |
853 | /* Register interrupt handler. */ | 853 | /* Register interrupt handler. */ |
854 | if (request_irq(IRQ_MFP_TIMA, AtaInterrupt, IRQ_TYPE_SLOW, "DMA sound", | 854 | if (request_irq(IRQ_MFP_TIMA, AtaInterrupt, IRQ_TYPE_SLOW, "DMA sound", |
855 | AtaInterrupt)) | 855 | AtaInterrupt)) |
856 | return 0; | 856 | return 0; |
857 | mfp.int_en_a |= 0x20; /* Turn interrupt on. */ | 857 | st_mfp.int_en_a |= 0x20; /* Turn interrupt on. */ |
858 | mfp.int_mk_a |= 0x20; | 858 | st_mfp.int_mk_a |= 0x20; |
859 | return 1; | 859 | return 1; |
860 | } | 860 | } |
861 | 861 | ||
862 | #ifdef MODULE | 862 | #ifdef MODULE |
863 | static void AtaIrqCleanUp(void) | 863 | static void AtaIrqCleanUp(void) |
864 | { | 864 | { |
865 | mfp.tim_ct_a = 0; /* stop timer */ | 865 | st_mfp.tim_ct_a = 0; /* stop timer */ |
866 | mfp.int_en_a &= ~0x20; /* turn interrupt off */ | 866 | st_mfp.int_en_a &= ~0x20; /* turn interrupt off */ |
867 | free_irq(IRQ_MFP_TIMA, AtaInterrupt); | 867 | free_irq(IRQ_MFP_TIMA, AtaInterrupt); |
868 | } | 868 | } |
869 | #endif /* MODULE */ | 869 | #endif /* MODULE */ |
@@ -1599,7 +1599,7 @@ static int __init dmasound_atari_init(void) | |||
1599 | is_falcon = 0; | 1599 | is_falcon = 0; |
1600 | } else | 1600 | } else |
1601 | return -ENODEV; | 1601 | return -ENODEV; |
1602 | if ((mfp.int_en_a & mfp.int_mk_a & 0x20) == 0) | 1602 | if ((st_mfp.int_en_a & st_mfp.int_mk_a & 0x20) == 0) |
1603 | return dmasound_init(); | 1603 | return dmasound_init(); |
1604 | else { | 1604 | else { |
1605 | printk("DMA sound driver: Timer A interrupt already in use\n"); | 1605 | printk("DMA sound driver: Timer A interrupt already in use\n"); |
diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig index 6e3a1848447c..82b9bddcdcd6 100644 --- a/sound/pci/Kconfig +++ b/sound/pci/Kconfig | |||
@@ -744,8 +744,8 @@ config SND_VIRTUOSO | |||
744 | select SND_OXYGEN_LIB | 744 | select SND_OXYGEN_LIB |
745 | help | 745 | help |
746 | Say Y here to include support for sound cards based on the | 746 | Say Y here to include support for sound cards based on the |
747 | Asus AV100/AV200 chips, i.e., Xonar D1, DX, D2, D2X and | 747 | Asus AV100/AV200 chips, i.e., Xonar D1, DX, D2 and D2X. |
748 | HDAV1.3 (Deluxe). | 748 | Support for the HDAV1.3 (Deluxe) is very experimental. |
749 | 749 | ||
750 | To compile this driver as a module, choose M here: the module | 750 | To compile this driver as a module, choose M here: the module |
751 | will be called snd-virtuoso. | 751 | will be called snd-virtuoso. |
diff --git a/sound/pci/aw2/aw2-alsa.c b/sound/pci/aw2/aw2-alsa.c index 3f00ddf450f8..c7c54e7748e9 100644 --- a/sound/pci/aw2/aw2-alsa.c +++ b/sound/pci/aw2/aw2-alsa.c | |||
@@ -165,7 +165,7 @@ module_param_array(enable, bool, NULL, 0444); | |||
165 | MODULE_PARM_DESC(enable, "Enable Audiowerk2 soundcard."); | 165 | MODULE_PARM_DESC(enable, "Enable Audiowerk2 soundcard."); |
166 | 166 | ||
167 | static struct pci_device_id snd_aw2_ids[] = { | 167 | static struct pci_device_id snd_aw2_ids[] = { |
168 | {PCI_VENDOR_ID_SAA7146, PCI_DEVICE_ID_SAA7146, PCI_ANY_ID, PCI_ANY_ID, | 168 | {PCI_VENDOR_ID_SAA7146, PCI_DEVICE_ID_SAA7146, 0, 0, |
169 | 0, 0, 0}, | 169 | 0, 0, 0}, |
170 | {0} | 170 | {0} |
171 | }; | 171 | }; |
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c index 7958006a1d66..101a1c13a20d 100644 --- a/sound/pci/emu10k1/emu10k1_main.c +++ b/sound/pci/emu10k1/emu10k1_main.c | |||
@@ -1528,6 +1528,7 @@ static struct snd_emu_chip_details emu_chip_details[] = { | |||
1528 | .ca0151_chip = 1, | 1528 | .ca0151_chip = 1, |
1529 | .spk71 = 1, | 1529 | .spk71 = 1, |
1530 | .spdif_bug = 1, | 1530 | .spdif_bug = 1, |
1531 | .invert_shared_spdif = 1, /* digital/analog switch swapped */ | ||
1531 | .ac97_chip = 1} , | 1532 | .ac97_chip = 1} , |
1532 | {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10021102, | 1533 | {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10021102, |
1533 | .driver = "Audigy2", .name = "SB Audigy 2 Platinum [SB0240P]", | 1534 | .driver = "Audigy2", .name = "SB Audigy 2 Platinum [SB0240P]", |
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index b7bba7dc7cf1..d03f99298be9 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -487,7 +487,6 @@ int /*__devinit*/ snd_hda_bus_new(struct snd_card *card, | |||
487 | { | 487 | { |
488 | struct hda_bus *bus; | 488 | struct hda_bus *bus; |
489 | int err; | 489 | int err; |
490 | char qname[8]; | ||
491 | static struct snd_device_ops dev_ops = { | 490 | static struct snd_device_ops dev_ops = { |
492 | .dev_register = snd_hda_bus_dev_register, | 491 | .dev_register = snd_hda_bus_dev_register, |
493 | .dev_free = snd_hda_bus_dev_free, | 492 | .dev_free = snd_hda_bus_dev_free, |
@@ -517,10 +516,12 @@ int /*__devinit*/ snd_hda_bus_new(struct snd_card *card, | |||
517 | mutex_init(&bus->cmd_mutex); | 516 | mutex_init(&bus->cmd_mutex); |
518 | INIT_LIST_HEAD(&bus->codec_list); | 517 | INIT_LIST_HEAD(&bus->codec_list); |
519 | 518 | ||
520 | snprintf(qname, sizeof(qname), "hda%d", card->number); | 519 | snprintf(bus->workq_name, sizeof(bus->workq_name), |
521 | bus->workq = create_workqueue(qname); | 520 | "hd-audio%d", card->number); |
521 | bus->workq = create_singlethread_workqueue(bus->workq_name); | ||
522 | if (!bus->workq) { | 522 | if (!bus->workq) { |
523 | snd_printk(KERN_ERR "cannot create workqueue %s\n", qname); | 523 | snd_printk(KERN_ERR "cannot create workqueue %s\n", |
524 | bus->workq_name); | ||
524 | kfree(bus); | 525 | kfree(bus); |
525 | return -ENOMEM; | 526 | return -ENOMEM; |
526 | } | 527 | } |
@@ -3087,6 +3088,16 @@ int snd_hda_multi_out_dig_prepare(struct hda_codec *codec, | |||
3087 | } | 3088 | } |
3088 | EXPORT_SYMBOL_HDA(snd_hda_multi_out_dig_prepare); | 3089 | EXPORT_SYMBOL_HDA(snd_hda_multi_out_dig_prepare); |
3089 | 3090 | ||
3091 | int snd_hda_multi_out_dig_cleanup(struct hda_codec *codec, | ||
3092 | struct hda_multi_out *mout) | ||
3093 | { | ||
3094 | mutex_lock(&codec->spdif_mutex); | ||
3095 | cleanup_dig_out_stream(codec, mout->dig_out_nid); | ||
3096 | mutex_unlock(&codec->spdif_mutex); | ||
3097 | return 0; | ||
3098 | } | ||
3099 | EXPORT_SYMBOL_HDA(snd_hda_multi_out_dig_cleanup); | ||
3100 | |||
3090 | /* | 3101 | /* |
3091 | * release the digital out | 3102 | * release the digital out |
3092 | */ | 3103 | */ |
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index 5810ef588402..09a332ada0c6 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h | |||
@@ -614,6 +614,7 @@ struct hda_bus { | |||
614 | 614 | ||
615 | /* unsolicited event queue */ | 615 | /* unsolicited event queue */ |
616 | struct hda_bus_unsolicited *unsol; | 616 | struct hda_bus_unsolicited *unsol; |
617 | char workq_name[16]; | ||
617 | struct workqueue_struct *workq; /* common workqueue for codecs */ | 618 | struct workqueue_struct *workq; /* common workqueue for codecs */ |
618 | 619 | ||
619 | /* assigned PCMs */ | 620 | /* assigned PCMs */ |
diff --git a/sound/pci/hda/hda_hwdep.c b/sound/pci/hda/hda_hwdep.c index 300ab407cf42..4ae51dcb81af 100644 --- a/sound/pci/hda/hda_hwdep.c +++ b/sound/pci/hda/hda_hwdep.c | |||
@@ -175,7 +175,7 @@ static int reconfig_codec(struct hda_codec *codec) | |||
175 | err = snd_hda_codec_build_controls(codec); | 175 | err = snd_hda_codec_build_controls(codec); |
176 | if (err < 0) | 176 | if (err < 0) |
177 | return err; | 177 | return err; |
178 | return 0; | 178 | return snd_card_register(codec->bus->card); |
179 | } | 179 | } |
180 | 180 | ||
181 | /* | 181 | /* |
@@ -277,18 +277,19 @@ static ssize_t init_verbs_store(struct device *dev, | |||
277 | { | 277 | { |
278 | struct snd_hwdep *hwdep = dev_get_drvdata(dev); | 278 | struct snd_hwdep *hwdep = dev_get_drvdata(dev); |
279 | struct hda_codec *codec = hwdep->private_data; | 279 | struct hda_codec *codec = hwdep->private_data; |
280 | char *p; | 280 | struct hda_verb *v; |
281 | struct hda_verb verb, *v; | 281 | int nid, verb, param; |
282 | 282 | ||
283 | verb.nid = simple_strtoul(buf, &p, 0); | 283 | if (sscanf(buf, "%i %i %i", &nid, &verb, ¶m) != 3) |
284 | verb.verb = simple_strtoul(p, &p, 0); | 284 | return -EINVAL; |
285 | verb.param = simple_strtoul(p, &p, 0); | 285 | if (!nid || !verb) |
286 | if (!verb.nid || !verb.verb || !verb.param) | ||
287 | return -EINVAL; | 286 | return -EINVAL; |
288 | v = snd_array_new(&codec->init_verbs); | 287 | v = snd_array_new(&codec->init_verbs); |
289 | if (!v) | 288 | if (!v) |
290 | return -ENOMEM; | 289 | return -ENOMEM; |
291 | *v = verb; | 290 | v->nid = nid; |
291 | v->verb = verb; | ||
292 | v->param = param; | ||
292 | return count; | 293 | return count; |
293 | } | 294 | } |
294 | 295 | ||
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 11e791b965f6..5e909e0da04b 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -1947,16 +1947,13 @@ static int azx_suspend(struct pci_dev *pci, pm_message_t state) | |||
1947 | return 0; | 1947 | return 0; |
1948 | } | 1948 | } |
1949 | 1949 | ||
1950 | static int azx_resume_early(struct pci_dev *pci) | ||
1951 | { | ||
1952 | return pci_restore_state(pci); | ||
1953 | } | ||
1954 | |||
1955 | static int azx_resume(struct pci_dev *pci) | 1950 | static int azx_resume(struct pci_dev *pci) |
1956 | { | 1951 | { |
1957 | struct snd_card *card = pci_get_drvdata(pci); | 1952 | struct snd_card *card = pci_get_drvdata(pci); |
1958 | struct azx *chip = card->private_data; | 1953 | struct azx *chip = card->private_data; |
1959 | 1954 | ||
1955 | pci_set_power_state(pci, PCI_D0); | ||
1956 | pci_restore_state(pci); | ||
1960 | if (pci_enable_device(pci) < 0) { | 1957 | if (pci_enable_device(pci) < 0) { |
1961 | printk(KERN_ERR "hda-intel: pci_enable_device failed, " | 1958 | printk(KERN_ERR "hda-intel: pci_enable_device failed, " |
1962 | "disabling device\n"); | 1959 | "disabling device\n"); |
@@ -2098,6 +2095,8 @@ static struct snd_pci_quirk probe_mask_list[] __devinitdata = { | |||
2098 | SND_PCI_QUIRK(0x1028, 0x20ac, "Dell Studio Desktop", 0x01), | 2095 | SND_PCI_QUIRK(0x1028, 0x20ac, "Dell Studio Desktop", 0x01), |
2099 | /* including bogus ALC268 in slot#2 that conflicts with ALC888 */ | 2096 | /* including bogus ALC268 in slot#2 that conflicts with ALC888 */ |
2100 | SND_PCI_QUIRK(0x17c0, 0x4085, "Medion MD96630", 0x01), | 2097 | SND_PCI_QUIRK(0x17c0, 0x4085, "Medion MD96630", 0x01), |
2098 | /* conflict of ALC268 in slot#3 (digital I/O); a temporary fix */ | ||
2099 | SND_PCI_QUIRK(0x1179, 0xff00, "Toshiba laptop", 0x03), | ||
2101 | {} | 2100 | {} |
2102 | }; | 2101 | }; |
2103 | 2102 | ||
@@ -2468,7 +2467,6 @@ static struct pci_driver driver = { | |||
2468 | .remove = __devexit_p(azx_remove), | 2467 | .remove = __devexit_p(azx_remove), |
2469 | #ifdef CONFIG_PM | 2468 | #ifdef CONFIG_PM |
2470 | .suspend = azx_suspend, | 2469 | .suspend = azx_suspend, |
2471 | .resume_early = azx_resume_early, | ||
2472 | .resume = azx_resume, | 2470 | .resume = azx_resume, |
2473 | #endif | 2471 | #endif |
2474 | }; | 2472 | }; |
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index 1dd8716c387f..44f189cb97ae 100644 --- a/sound/pci/hda/hda_local.h +++ b/sound/pci/hda/hda_local.h | |||
@@ -251,6 +251,8 @@ int snd_hda_multi_out_dig_prepare(struct hda_codec *codec, | |||
251 | unsigned int stream_tag, | 251 | unsigned int stream_tag, |
252 | unsigned int format, | 252 | unsigned int format, |
253 | struct snd_pcm_substream *substream); | 253 | struct snd_pcm_substream *substream); |
254 | int snd_hda_multi_out_dig_cleanup(struct hda_codec *codec, | ||
255 | struct hda_multi_out *mout); | ||
254 | int snd_hda_multi_out_analog_open(struct hda_codec *codec, | 256 | int snd_hda_multi_out_analog_open(struct hda_codec *codec, |
255 | struct hda_multi_out *mout, | 257 | struct hda_multi_out *mout, |
256 | struct snd_pcm_substream *substream, | 258 | struct snd_pcm_substream *substream, |
diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c index 7ca66d654148..144b85276d5a 100644 --- a/sound/pci/hda/hda_proc.c +++ b/sound/pci/hda/hda_proc.c | |||
@@ -399,7 +399,8 @@ static void print_conn_list(struct snd_info_buffer *buffer, | |||
399 | { | 399 | { |
400 | int c, curr = -1; | 400 | int c, curr = -1; |
401 | 401 | ||
402 | if (conn_len > 1 && wid_type != AC_WID_AUD_MIX) | 402 | if (conn_len > 1 && wid_type != AC_WID_AUD_MIX && |
403 | wid_type != AC_WID_VOL_KNB) | ||
403 | curr = snd_hda_codec_read(codec, nid, 0, | 404 | curr = snd_hda_codec_read(codec, nid, 0, |
404 | AC_VERB_GET_CONNECT_SEL, 0); | 405 | AC_VERB_GET_CONNECT_SEL, 0); |
405 | snd_iprintf(buffer, " Connection: %d\n", conn_len); | 406 | snd_iprintf(buffer, " Connection: %d\n", conn_len); |
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 2e7371ec2e23..e48612323aa0 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -275,6 +275,14 @@ static int ad198x_dig_playback_pcm_prepare(struct hda_pcm_stream *hinfo, | |||
275 | format, substream); | 275 | format, substream); |
276 | } | 276 | } |
277 | 277 | ||
278 | static int ad198x_dig_playback_pcm_cleanup(struct hda_pcm_stream *hinfo, | ||
279 | struct hda_codec *codec, | ||
280 | struct snd_pcm_substream *substream) | ||
281 | { | ||
282 | struct ad198x_spec *spec = codec->spec; | ||
283 | return snd_hda_multi_out_dig_cleanup(codec, &spec->multiout); | ||
284 | } | ||
285 | |||
278 | /* | 286 | /* |
279 | * Analog capture | 287 | * Analog capture |
280 | */ | 288 | */ |
@@ -333,7 +341,8 @@ static struct hda_pcm_stream ad198x_pcm_digital_playback = { | |||
333 | .ops = { | 341 | .ops = { |
334 | .open = ad198x_dig_playback_pcm_open, | 342 | .open = ad198x_dig_playback_pcm_open, |
335 | .close = ad198x_dig_playback_pcm_close, | 343 | .close = ad198x_dig_playback_pcm_close, |
336 | .prepare = ad198x_dig_playback_pcm_prepare | 344 | .prepare = ad198x_dig_playback_pcm_prepare, |
345 | .cleanup = ad198x_dig_playback_pcm_cleanup | ||
337 | }, | 346 | }, |
338 | }; | 347 | }; |
339 | 348 | ||
@@ -1885,8 +1894,8 @@ static hda_nid_t ad1988_capsrc_nids[3] = { | |||
1885 | #define AD1988_SPDIF_OUT_HDMI 0x0b | 1894 | #define AD1988_SPDIF_OUT_HDMI 0x0b |
1886 | #define AD1988_SPDIF_IN 0x07 | 1895 | #define AD1988_SPDIF_IN 0x07 |
1887 | 1896 | ||
1888 | static hda_nid_t ad1989b_slave_dig_outs[2] = { | 1897 | static hda_nid_t ad1989b_slave_dig_outs[] = { |
1889 | AD1988_SPDIF_OUT, AD1988_SPDIF_OUT_HDMI | 1898 | AD1988_SPDIF_OUT, AD1988_SPDIF_OUT_HDMI, 0 |
1890 | }; | 1899 | }; |
1891 | 1900 | ||
1892 | static struct hda_input_mux ad1988_6stack_capture_source = { | 1901 | static struct hda_input_mux ad1988_6stack_capture_source = { |
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 75de40aaab0a..0177ef8f4c9e 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -347,6 +347,7 @@ static int conexant_mux_enum_put(struct snd_kcontrol *kcontrol, | |||
347 | &spec->cur_mux[adc_idx]); | 347 | &spec->cur_mux[adc_idx]); |
348 | } | 348 | } |
349 | 349 | ||
350 | #ifdef CONFIG_SND_JACK | ||
350 | static int conexant_add_jack(struct hda_codec *codec, | 351 | static int conexant_add_jack(struct hda_codec *codec, |
351 | hda_nid_t nid, int type) | 352 | hda_nid_t nid, int type) |
352 | { | 353 | { |
@@ -394,7 +395,6 @@ static void conexant_report_jack(struct hda_codec *codec, hda_nid_t nid) | |||
394 | 395 | ||
395 | static int conexant_init_jacks(struct hda_codec *codec) | 396 | static int conexant_init_jacks(struct hda_codec *codec) |
396 | { | 397 | { |
397 | #ifdef CONFIG_SND_JACK | ||
398 | struct conexant_spec *spec = codec->spec; | 398 | struct conexant_spec *spec = codec->spec; |
399 | int i; | 399 | int i; |
400 | 400 | ||
@@ -422,10 +422,19 @@ static int conexant_init_jacks(struct hda_codec *codec) | |||
422 | ++hv; | 422 | ++hv; |
423 | } | 423 | } |
424 | } | 424 | } |
425 | #endif | ||
426 | return 0; | 425 | return 0; |
427 | 426 | ||
428 | } | 427 | } |
428 | #else | ||
429 | static inline void conexant_report_jack(struct hda_codec *codec, hda_nid_t nid) | ||
430 | { | ||
431 | } | ||
432 | |||
433 | static inline int conexant_init_jacks(struct hda_codec *codec) | ||
434 | { | ||
435 | return 0; | ||
436 | } | ||
437 | #endif | ||
429 | 438 | ||
430 | static int conexant_init(struct hda_codec *codec) | 439 | static int conexant_init(struct hda_codec *codec) |
431 | { | 440 | { |
@@ -1566,6 +1575,7 @@ static struct snd_pci_quirk cxt5047_cfg_tbl[] = { | |||
1566 | SND_PCI_QUIRK(0x103c, 0x30a5, "HP DV5200T/DV8000T", CXT5047_LAPTOP_HP), | 1575 | SND_PCI_QUIRK(0x103c, 0x30a5, "HP DV5200T/DV8000T", CXT5047_LAPTOP_HP), |
1567 | SND_PCI_QUIRK(0x103c, 0x30b2, "HP DV2000T/DV3000T", CXT5047_LAPTOP), | 1576 | SND_PCI_QUIRK(0x103c, 0x30b2, "HP DV2000T/DV3000T", CXT5047_LAPTOP), |
1568 | SND_PCI_QUIRK(0x103c, 0x30b5, "HP DV2000Z", CXT5047_LAPTOP), | 1577 | SND_PCI_QUIRK(0x103c, 0x30b5, "HP DV2000Z", CXT5047_LAPTOP), |
1578 | SND_PCI_QUIRK(0x103c, 0x30cf, "HP DV6700", CXT5047_LAPTOP), | ||
1569 | SND_PCI_QUIRK(0x1179, 0xff31, "Toshiba P100", CXT5047_LAPTOP_EAPD), | 1579 | SND_PCI_QUIRK(0x1179, 0xff31, "Toshiba P100", CXT5047_LAPTOP_EAPD), |
1570 | {} | 1580 | {} |
1571 | }; | 1581 | }; |
diff --git a/sound/pci/hda/patch_intelhdmi.c b/sound/pci/hda/patch_intelhdmi.c index 3564f4e4b74c..fcc77fec4487 100644 --- a/sound/pci/hda/patch_intelhdmi.c +++ b/sound/pci/hda/patch_intelhdmi.c | |||
@@ -49,11 +49,6 @@ static struct hda_verb pinout_enable_verb[] = { | |||
49 | {} /* terminator */ | 49 | {} /* terminator */ |
50 | }; | 50 | }; |
51 | 51 | ||
52 | static struct hda_verb pinout_disable_verb[] = { | ||
53 | {PIN_NID, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x00}, | ||
54 | {} | ||
55 | }; | ||
56 | |||
57 | static struct hda_verb unsolicited_response_verb[] = { | 52 | static struct hda_verb unsolicited_response_verb[] = { |
58 | {PIN_NID, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | | 53 | {PIN_NID, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | |
59 | INTEL_HDMI_EVENT_TAG}, | 54 | INTEL_HDMI_EVENT_TAG}, |
@@ -248,10 +243,6 @@ static void hdmi_write_dip_byte(struct hda_codec *codec, hda_nid_t nid, | |||
248 | 243 | ||
249 | static void hdmi_enable_output(struct hda_codec *codec) | 244 | static void hdmi_enable_output(struct hda_codec *codec) |
250 | { | 245 | { |
251 | /* Enable Audio InfoFrame Transmission */ | ||
252 | hdmi_set_dip_index(codec, PIN_NID, 0x0, 0x0); | ||
253 | snd_hda_codec_write(codec, PIN_NID, 0, AC_VERB_SET_HDMI_DIP_XMIT, | ||
254 | AC_DIPXMIT_BEST); | ||
255 | /* Unmute */ | 246 | /* Unmute */ |
256 | if (get_wcaps(codec, PIN_NID) & AC_WCAP_OUT_AMP) | 247 | if (get_wcaps(codec, PIN_NID) & AC_WCAP_OUT_AMP) |
257 | snd_hda_codec_write(codec, PIN_NID, 0, | 248 | snd_hda_codec_write(codec, PIN_NID, 0, |
@@ -260,17 +251,24 @@ static void hdmi_enable_output(struct hda_codec *codec) | |||
260 | snd_hda_sequence_write(codec, pinout_enable_verb); | 251 | snd_hda_sequence_write(codec, pinout_enable_verb); |
261 | } | 252 | } |
262 | 253 | ||
263 | static void hdmi_disable_output(struct hda_codec *codec) | 254 | /* |
255 | * Enable Audio InfoFrame Transmission | ||
256 | */ | ||
257 | static void hdmi_start_infoframe_trans(struct hda_codec *codec) | ||
264 | { | 258 | { |
265 | snd_hda_sequence_write(codec, pinout_disable_verb); | 259 | hdmi_set_dip_index(codec, PIN_NID, 0x0, 0x0); |
266 | if (get_wcaps(codec, PIN_NID) & AC_WCAP_OUT_AMP) | 260 | snd_hda_codec_write(codec, PIN_NID, 0, AC_VERB_SET_HDMI_DIP_XMIT, |
267 | snd_hda_codec_write(codec, PIN_NID, 0, | 261 | AC_DIPXMIT_BEST); |
268 | AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); | 262 | } |
269 | 263 | ||
270 | /* | 264 | /* |
271 | * FIXME: noises may arise when playing music after reloading the | 265 | * Disable Audio InfoFrame Transmission |
272 | * kernel module, until the next X restart or monitor repower. | 266 | */ |
273 | */ | 267 | static void hdmi_stop_infoframe_trans(struct hda_codec *codec) |
268 | { | ||
269 | hdmi_set_dip_index(codec, PIN_NID, 0x0, 0x0); | ||
270 | snd_hda_codec_write(codec, PIN_NID, 0, AC_VERB_SET_HDMI_DIP_XMIT, | ||
271 | AC_DIPXMIT_DISABLE); | ||
274 | } | 272 | } |
275 | 273 | ||
276 | static int hdmi_get_channel_count(struct hda_codec *codec) | 274 | static int hdmi_get_channel_count(struct hda_codec *codec) |
@@ -368,11 +366,16 @@ static void hdmi_fill_audio_infoframe(struct hda_codec *codec, | |||
368 | struct hdmi_audio_infoframe *ai) | 366 | struct hdmi_audio_infoframe *ai) |
369 | { | 367 | { |
370 | u8 *params = (u8 *)ai; | 368 | u8 *params = (u8 *)ai; |
369 | u8 sum = 0; | ||
371 | int i; | 370 | int i; |
372 | 371 | ||
373 | hdmi_debug_dip_size(codec); | 372 | hdmi_debug_dip_size(codec); |
374 | hdmi_clear_dip_buffers(codec); /* be paranoid */ | 373 | hdmi_clear_dip_buffers(codec); /* be paranoid */ |
375 | 374 | ||
375 | for (i = 0; i < sizeof(ai); i++) | ||
376 | sum += params[i]; | ||
377 | ai->checksum = - sum; | ||
378 | |||
376 | hdmi_set_dip_index(codec, PIN_NID, 0x0, 0x0); | 379 | hdmi_set_dip_index(codec, PIN_NID, 0x0, 0x0); |
377 | for (i = 0; i < sizeof(ai); i++) | 380 | for (i = 0; i < sizeof(ai); i++) |
378 | hdmi_write_dip_byte(codec, PIN_NID, params[i]); | 381 | hdmi_write_dip_byte(codec, PIN_NID, params[i]); |
@@ -419,14 +422,18 @@ static int hdmi_setup_channel_allocation(struct hda_codec *codec, | |||
419 | /* | 422 | /* |
420 | * CA defaults to 0 for basic stereo audio | 423 | * CA defaults to 0 for basic stereo audio |
421 | */ | 424 | */ |
422 | if (!eld->eld_ver) | ||
423 | return 0; | ||
424 | if (!eld->spk_alloc) | ||
425 | return 0; | ||
426 | if (channels <= 2) | 425 | if (channels <= 2) |
427 | return 0; | 426 | return 0; |
428 | 427 | ||
429 | /* | 428 | /* |
429 | * HDMI sink's ELD info cannot always be retrieved for now, e.g. | ||
430 | * in console or for audio devices. Assume the highest speakers | ||
431 | * configuration, to _not_ prohibit multi-channel audio playback. | ||
432 | */ | ||
433 | if (!eld->spk_alloc) | ||
434 | eld->spk_alloc = 0xffff; | ||
435 | |||
436 | /* | ||
430 | * expand ELD's speaker allocation mask | 437 | * expand ELD's speaker allocation mask |
431 | * | 438 | * |
432 | * ELD tells the speaker mask in a compact(paired) form, | 439 | * ELD tells the speaker mask in a compact(paired) form, |
@@ -485,6 +492,7 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec, | |||
485 | hdmi_setup_channel_mapping(codec, &ai); | 492 | hdmi_setup_channel_mapping(codec, &ai); |
486 | 493 | ||
487 | hdmi_fill_audio_infoframe(codec, &ai); | 494 | hdmi_fill_audio_infoframe(codec, &ai); |
495 | hdmi_start_infoframe_trans(codec); | ||
488 | } | 496 | } |
489 | 497 | ||
490 | 498 | ||
@@ -562,7 +570,7 @@ static int intel_hdmi_playback_pcm_close(struct hda_pcm_stream *hinfo, | |||
562 | { | 570 | { |
563 | struct intel_hdmi_spec *spec = codec->spec; | 571 | struct intel_hdmi_spec *spec = codec->spec; |
564 | 572 | ||
565 | hdmi_disable_output(codec); | 573 | hdmi_stop_infoframe_trans(codec); |
566 | 574 | ||
567 | return snd_hda_multi_out_dig_close(codec, &spec->multiout); | 575 | return snd_hda_multi_out_dig_close(codec, &spec->multiout); |
568 | } | 576 | } |
@@ -582,8 +590,6 @@ static int intel_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo, | |||
582 | 590 | ||
583 | hdmi_setup_audio_infoframe(codec, substream); | 591 | hdmi_setup_audio_infoframe(codec, substream); |
584 | 592 | ||
585 | hdmi_enable_output(codec); | ||
586 | |||
587 | return 0; | 593 | return 0; |
588 | } | 594 | } |
589 | 595 | ||
@@ -628,8 +634,7 @@ static int intel_hdmi_build_controls(struct hda_codec *codec) | |||
628 | 634 | ||
629 | static int intel_hdmi_init(struct hda_codec *codec) | 635 | static int intel_hdmi_init(struct hda_codec *codec) |
630 | { | 636 | { |
631 | /* disable audio output as early as possible */ | 637 | hdmi_enable_output(codec); |
632 | hdmi_disable_output(codec); | ||
633 | 638 | ||
634 | snd_hda_sequence_write(codec, unsolicited_response_verb); | 639 | snd_hda_sequence_write(codec, unsolicited_response_verb); |
635 | 640 | ||
@@ -679,6 +684,7 @@ static struct hda_codec_preset snd_hda_preset_intelhdmi[] = { | |||
679 | { .id = 0x80862801, .name = "G45 DEVBLC", .patch = patch_intel_hdmi }, | 684 | { .id = 0x80862801, .name = "G45 DEVBLC", .patch = patch_intel_hdmi }, |
680 | { .id = 0x80862802, .name = "G45 DEVCTG", .patch = patch_intel_hdmi }, | 685 | { .id = 0x80862802, .name = "G45 DEVCTG", .patch = patch_intel_hdmi }, |
681 | { .id = 0x80862803, .name = "G45 DEVELK", .patch = patch_intel_hdmi }, | 686 | { .id = 0x80862803, .name = "G45 DEVELK", .patch = patch_intel_hdmi }, |
687 | { .id = 0x80862804, .name = "G45 DEVIBX", .patch = patch_intel_hdmi }, | ||
682 | { .id = 0x10951392, .name = "SiI1392 HDMI", .patch = patch_intel_hdmi }, | 688 | { .id = 0x10951392, .name = "SiI1392 HDMI", .patch = patch_intel_hdmi }, |
683 | {} /* terminator */ | 689 | {} /* terminator */ |
684 | }; | 690 | }; |
@@ -687,6 +693,7 @@ MODULE_ALIAS("snd-hda-codec-id:808629fb"); | |||
687 | MODULE_ALIAS("snd-hda-codec-id:80862801"); | 693 | MODULE_ALIAS("snd-hda-codec-id:80862801"); |
688 | MODULE_ALIAS("snd-hda-codec-id:80862802"); | 694 | MODULE_ALIAS("snd-hda-codec-id:80862802"); |
689 | MODULE_ALIAS("snd-hda-codec-id:80862803"); | 695 | MODULE_ALIAS("snd-hda-codec-id:80862803"); |
696 | MODULE_ALIAS("snd-hda-codec-id:80862804"); | ||
690 | MODULE_ALIAS("snd-hda-codec-id:10951392"); | 697 | MODULE_ALIAS("snd-hda-codec-id:10951392"); |
691 | 698 | ||
692 | MODULE_LICENSE("GPL"); | 699 | MODULE_LICENSE("GPL"); |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 82dd08431970..6c26afcb8262 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -1037,6 +1037,7 @@ do_sku: | |||
1037 | case 0x10ec0267: | 1037 | case 0x10ec0267: |
1038 | case 0x10ec0268: | 1038 | case 0x10ec0268: |
1039 | case 0x10ec0269: | 1039 | case 0x10ec0269: |
1040 | case 0x10ec0272: | ||
1040 | case 0x10ec0660: | 1041 | case 0x10ec0660: |
1041 | case 0x10ec0662: | 1042 | case 0x10ec0662: |
1042 | case 0x10ec0663: | 1043 | case 0x10ec0663: |
@@ -1065,6 +1066,7 @@ do_sku: | |||
1065 | case 0x10ec0882: | 1066 | case 0x10ec0882: |
1066 | case 0x10ec0883: | 1067 | case 0x10ec0883: |
1067 | case 0x10ec0885: | 1068 | case 0x10ec0885: |
1069 | case 0x10ec0887: | ||
1068 | case 0x10ec0889: | 1070 | case 0x10ec0889: |
1069 | snd_hda_codec_write(codec, 0x20, 0, | 1071 | snd_hda_codec_write(codec, 0x20, 0, |
1070 | AC_VERB_SET_COEF_INDEX, 7); | 1072 | AC_VERB_SET_COEF_INDEX, 7); |
@@ -7012,12 +7014,15 @@ static int patch_alc882(struct hda_codec *codec) | |||
7012 | break; | 7014 | break; |
7013 | case 0x106b1000: /* iMac 24 */ | 7015 | case 0x106b1000: /* iMac 24 */ |
7014 | case 0x106b2800: /* AppleTV */ | 7016 | case 0x106b2800: /* AppleTV */ |
7017 | case 0x106b3e00: /* iMac 24 Aluminium */ | ||
7015 | board_config = ALC885_IMAC24; | 7018 | board_config = ALC885_IMAC24; |
7016 | break; | 7019 | break; |
7020 | case 0x106b00a0: /* MacBookPro3,1 - Another revision */ | ||
7017 | case 0x106b00a1: /* Macbook (might be wrong - PCI SSID?) */ | 7021 | case 0x106b00a1: /* Macbook (might be wrong - PCI SSID?) */ |
7018 | case 0x106b00a4: /* MacbookPro4,1 */ | 7022 | case 0x106b00a4: /* MacbookPro4,1 */ |
7019 | case 0x106b2c00: /* Macbook Pro rev3 */ | 7023 | case 0x106b2c00: /* Macbook Pro rev3 */ |
7020 | case 0x106b3600: /* Macbook 3.1 */ | 7024 | case 0x106b3600: /* Macbook 3.1 */ |
7025 | case 0x106b3800: /* MacbookPro4,1 - latter revision */ | ||
7021 | board_config = ALC885_MBP3; | 7026 | board_config = ALC885_MBP3; |
7022 | break; | 7027 | break; |
7023 | default: | 7028 | default: |
@@ -8465,6 +8470,8 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { | |||
8465 | ALC888_ACER_ASPIRE_4930G), | 8470 | ALC888_ACER_ASPIRE_4930G), |
8466 | SND_PCI_QUIRK(0x1025, 0x015e, "Acer Aspire 6930G", | 8471 | SND_PCI_QUIRK(0x1025, 0x015e, "Acer Aspire 6930G", |
8467 | ALC888_ACER_ASPIRE_4930G), | 8472 | ALC888_ACER_ASPIRE_4930G), |
8473 | SND_PCI_QUIRK(0x1025, 0x0166, "Acer Aspire 6530G", | ||
8474 | ALC888_ACER_ASPIRE_4930G), | ||
8468 | SND_PCI_QUIRK(0x1025, 0, "Acer laptop", ALC883_ACER), /* default Acer */ | 8475 | SND_PCI_QUIRK(0x1025, 0, "Acer laptop", ALC883_ACER), /* default Acer */ |
8469 | SND_PCI_QUIRK(0x1028, 0x020d, "Dell Inspiron 530", ALC888_6ST_DELL), | 8476 | SND_PCI_QUIRK(0x1028, 0x020d, "Dell Inspiron 530", ALC888_6ST_DELL), |
8470 | SND_PCI_QUIRK(0x103c, 0x2a3d, "HP Pavillion", ALC883_6ST_DIG), | 8477 | SND_PCI_QUIRK(0x103c, 0x2a3d, "HP Pavillion", ALC883_6ST_DIG), |
@@ -8474,10 +8481,12 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { | |||
8474 | SND_PCI_QUIRK(0x103c, 0x2a66, "HP Acacia", ALC888_3ST_HP), | 8481 | SND_PCI_QUIRK(0x103c, 0x2a66, "HP Acacia", ALC888_3ST_HP), |
8475 | SND_PCI_QUIRK(0x1043, 0x1873, "Asus M90V", ALC888_ASUS_M90V), | 8482 | SND_PCI_QUIRK(0x1043, 0x1873, "Asus M90V", ALC888_ASUS_M90V), |
8476 | SND_PCI_QUIRK(0x1043, 0x8249, "Asus M2A-VM HDMI", ALC883_3ST_6ch_DIG), | 8483 | SND_PCI_QUIRK(0x1043, 0x8249, "Asus M2A-VM HDMI", ALC883_3ST_6ch_DIG), |
8484 | SND_PCI_QUIRK(0x1043, 0x8284, "Asus Z37E", ALC883_6ST_DIG), | ||
8477 | SND_PCI_QUIRK(0x1043, 0x82fe, "Asus P5Q-EM HDMI", ALC1200_ASUS_P5Q), | 8485 | SND_PCI_QUIRK(0x1043, 0x82fe, "Asus P5Q-EM HDMI", ALC1200_ASUS_P5Q), |
8478 | SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_ASUS_EEE1601), | 8486 | SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_ASUS_EEE1601), |
8479 | SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG), | 8487 | SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG), |
8480 | SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC883_6ST_DIG), | 8488 | SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC883_6ST_DIG), |
8489 | SND_PCI_QUIRK(0x1071, 0x8227, "Mitac 82801H", ALC883_MITAC), | ||
8481 | SND_PCI_QUIRK(0x1071, 0x8253, "Mitac 8252d", ALC883_MITAC), | 8490 | SND_PCI_QUIRK(0x1071, 0x8253, "Mitac 8252d", ALC883_MITAC), |
8482 | SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD), | 8491 | SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD), |
8483 | SND_PCI_QUIRK(0x10f1, 0x2350, "TYAN-S2350", ALC888_6ST_DELL), | 8492 | SND_PCI_QUIRK(0x10f1, 0x2350, "TYAN-S2350", ALC888_6ST_DELL), |
@@ -8512,6 +8521,8 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { | |||
8512 | SND_PCI_QUIRK(0x1558, 0, "Clevo laptop", ALC883_LAPTOP_EAPD), | 8521 | SND_PCI_QUIRK(0x1558, 0, "Clevo laptop", ALC883_LAPTOP_EAPD), |
8513 | SND_PCI_QUIRK(0x15d9, 0x8780, "Supermicro PDSBA", ALC883_3ST_6ch), | 8522 | SND_PCI_QUIRK(0x15d9, 0x8780, "Supermicro PDSBA", ALC883_3ST_6ch), |
8514 | SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_MEDION), | 8523 | SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_MEDION), |
8524 | SND_PCI_QUIRK(0x1734, 0x1107, "FSC AMILO Xi2550", | ||
8525 | ALC883_FUJITSU_PI2515), | ||
8515 | SND_PCI_QUIRK(0x1734, 0x1108, "Fujitsu AMILO Pi2515", ALC883_FUJITSU_PI2515), | 8526 | SND_PCI_QUIRK(0x1734, 0x1108, "Fujitsu AMILO Pi2515", ALC883_FUJITSU_PI2515), |
8516 | SND_PCI_QUIRK(0x1734, 0x113d, "Fujitsu AMILO Xa3530", | 8527 | SND_PCI_QUIRK(0x1734, 0x113d, "Fujitsu AMILO Xa3530", |
8517 | ALC888_FUJITSU_XA3530), | 8528 | ALC888_FUJITSU_XA3530), |
@@ -8526,6 +8537,7 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { | |||
8526 | SND_PCI_QUIRK(0x1991, 0x5625, "Haier W66", ALC883_HAIER_W66), | 8537 | SND_PCI_QUIRK(0x1991, 0x5625, "Haier W66", ALC883_HAIER_W66), |
8527 | SND_PCI_QUIRK(0x8086, 0x0001, "DG33BUC", ALC883_3ST_6ch_INTEL), | 8538 | SND_PCI_QUIRK(0x8086, 0x0001, "DG33BUC", ALC883_3ST_6ch_INTEL), |
8528 | SND_PCI_QUIRK(0x8086, 0x0002, "DG33FBC", ALC883_3ST_6ch_INTEL), | 8539 | SND_PCI_QUIRK(0x8086, 0x0002, "DG33FBC", ALC883_3ST_6ch_INTEL), |
8540 | SND_PCI_QUIRK(0x8086, 0x2503, "82801H", ALC883_MITAC), | ||
8529 | SND_PCI_QUIRK(0x8086, 0x0022, "DX58SO", ALC883_3ST_6ch_INTEL), | 8541 | SND_PCI_QUIRK(0x8086, 0x0022, "DX58SO", ALC883_3ST_6ch_INTEL), |
8530 | SND_PCI_QUIRK(0x8086, 0xd601, "D102GGC", ALC883_3ST_6ch), | 8542 | SND_PCI_QUIRK(0x8086, 0xd601, "D102GGC", ALC883_3ST_6ch), |
8531 | {} | 8543 | {} |
@@ -10545,6 +10557,7 @@ static struct snd_pci_quirk alc262_cfg_tbl[] = { | |||
10545 | SND_PCI_QUIRK(0x103c, 0x1309, "HP xw4*00", ALC262_HP_BPC), | 10557 | SND_PCI_QUIRK(0x103c, 0x1309, "HP xw4*00", ALC262_HP_BPC), |
10546 | SND_PCI_QUIRK(0x103c, 0x130a, "HP xw6*00", ALC262_HP_BPC), | 10558 | SND_PCI_QUIRK(0x103c, 0x130a, "HP xw6*00", ALC262_HP_BPC), |
10547 | SND_PCI_QUIRK(0x103c, 0x130b, "HP xw8*00", ALC262_HP_BPC), | 10559 | SND_PCI_QUIRK(0x103c, 0x130b, "HP xw8*00", ALC262_HP_BPC), |
10560 | SND_PCI_QUIRK(0x103c, 0x170b, "HP xw*", ALC262_HP_BPC), | ||
10548 | SND_PCI_QUIRK(0x103c, 0x2800, "HP D7000", ALC262_HP_BPC_D7000_WL), | 10561 | SND_PCI_QUIRK(0x103c, 0x2800, "HP D7000", ALC262_HP_BPC_D7000_WL), |
10549 | SND_PCI_QUIRK(0x103c, 0x2801, "HP D7000", ALC262_HP_BPC_D7000_WF), | 10562 | SND_PCI_QUIRK(0x103c, 0x2801, "HP D7000", ALC262_HP_BPC_D7000_WF), |
10550 | SND_PCI_QUIRK(0x103c, 0x2802, "HP D7000", ALC262_HP_BPC_D7000_WL), | 10563 | SND_PCI_QUIRK(0x103c, 0x2802, "HP D7000", ALC262_HP_BPC_D7000_WL), |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index c39deebb588f..6094344fb223 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -81,6 +81,7 @@ enum { | |||
81 | 81 | ||
82 | enum { | 82 | enum { |
83 | STAC_92HD83XXX_REF, | 83 | STAC_92HD83XXX_REF, |
84 | STAC_92HD83XXX_PWR_REF, | ||
84 | STAC_92HD83XXX_MODELS | 85 | STAC_92HD83XXX_MODELS |
85 | }; | 86 | }; |
86 | 87 | ||
@@ -334,7 +335,7 @@ static hda_nid_t stac92hd83xxx_slave_dig_outs[2] = { | |||
334 | }; | 335 | }; |
335 | 336 | ||
336 | static unsigned int stac92hd83xxx_pwr_mapping[4] = { | 337 | static unsigned int stac92hd83xxx_pwr_mapping[4] = { |
337 | 0x03, 0x0c, 0x10, 0x40, | 338 | 0x03, 0x0c, 0x20, 0x40, |
338 | }; | 339 | }; |
339 | 340 | ||
340 | static hda_nid_t stac92hd83xxx_amp_nids[1] = { | 341 | static hda_nid_t stac92hd83xxx_amp_nids[1] = { |
@@ -841,10 +842,6 @@ static struct hda_verb stac92hd73xx_10ch_core_init[] = { | |||
841 | }; | 842 | }; |
842 | 843 | ||
843 | static struct hda_verb stac92hd83xxx_core_init[] = { | 844 | static struct hda_verb stac92hd83xxx_core_init[] = { |
844 | /* start of config #1 */ | ||
845 | { 0xe, AC_VERB_SET_CONNECT_SEL, 0x3}, | ||
846 | |||
847 | /* start of config #2 */ | ||
848 | { 0xa, AC_VERB_SET_CONNECT_SEL, 0x0}, | 845 | { 0xa, AC_VERB_SET_CONNECT_SEL, 0x0}, |
849 | { 0xb, AC_VERB_SET_CONNECT_SEL, 0x0}, | 846 | { 0xb, AC_VERB_SET_CONNECT_SEL, 0x0}, |
850 | { 0xd, AC_VERB_SET_CONNECT_SEL, 0x1}, | 847 | { 0xd, AC_VERB_SET_CONNECT_SEL, 0x1}, |
@@ -885,8 +882,8 @@ static struct hda_verb stac92hd71bxx_analog_core_init[] = { | |||
885 | static struct hda_verb stac925x_core_init[] = { | 882 | static struct hda_verb stac925x_core_init[] = { |
886 | /* set dac0mux for dac converter */ | 883 | /* set dac0mux for dac converter */ |
887 | { 0x06, AC_VERB_SET_CONNECT_SEL, 0x00}, | 884 | { 0x06, AC_VERB_SET_CONNECT_SEL, 0x00}, |
888 | /* unmute and set max the selector */ | 885 | /* mute the master volume */ |
889 | { 0x0e, AC_VERB_SET_AMP_GAIN_MUTE, 0xb01f }, | 886 | { 0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, |
890 | {} | 887 | {} |
891 | }; | 888 | }; |
892 | 889 | ||
@@ -1138,6 +1135,8 @@ static struct snd_kcontrol_new stac92hd71bxx_mixer[] = { | |||
1138 | }; | 1135 | }; |
1139 | 1136 | ||
1140 | static struct snd_kcontrol_new stac925x_mixer[] = { | 1137 | static struct snd_kcontrol_new stac925x_mixer[] = { |
1138 | HDA_CODEC_VOLUME("Master Playback Volume", 0x0e, 0, HDA_OUTPUT), | ||
1139 | HDA_CODEC_MUTE("Master Playback Switch", 0x0e, 0, HDA_OUTPUT), | ||
1141 | STAC_INPUT_SOURCE(1), | 1140 | STAC_INPUT_SOURCE(1), |
1142 | HDA_CODEC_VOLUME("Capture Volume", 0x09, 0, HDA_OUTPUT), | 1141 | HDA_CODEC_VOLUME("Capture Volume", 0x09, 0, HDA_OUTPUT), |
1143 | HDA_CODEC_MUTE("Capture Switch", 0x14, 0, HDA_OUTPUT), | 1142 | HDA_CODEC_MUTE("Capture Switch", 0x14, 0, HDA_OUTPUT), |
@@ -1208,7 +1207,7 @@ static const char *slave_vols[] = { | |||
1208 | "LFE Playback Volume", | 1207 | "LFE Playback Volume", |
1209 | "Side Playback Volume", | 1208 | "Side Playback Volume", |
1210 | "Headphone Playback Volume", | 1209 | "Headphone Playback Volume", |
1211 | "Headphone Playback Volume", | 1210 | "Headphone2 Playback Volume", |
1212 | "Speaker Playback Volume", | 1211 | "Speaker Playback Volume", |
1213 | "External Speaker Playback Volume", | 1212 | "External Speaker Playback Volume", |
1214 | "Speaker2 Playback Volume", | 1213 | "Speaker2 Playback Volume", |
@@ -1222,7 +1221,7 @@ static const char *slave_sws[] = { | |||
1222 | "LFE Playback Switch", | 1221 | "LFE Playback Switch", |
1223 | "Side Playback Switch", | 1222 | "Side Playback Switch", |
1224 | "Headphone Playback Switch", | 1223 | "Headphone Playback Switch", |
1225 | "Headphone Playback Switch", | 1224 | "Headphone2 Playback Switch", |
1226 | "Speaker Playback Switch", | 1225 | "Speaker Playback Switch", |
1227 | "External Speaker Playback Switch", | 1226 | "External Speaker Playback Switch", |
1228 | "Speaker2 Playback Switch", | 1227 | "Speaker2 Playback Switch", |
@@ -1736,10 +1735,12 @@ static unsigned int ref92hd83xxx_pin_configs[14] = { | |||
1736 | 1735 | ||
1737 | static unsigned int *stac92hd83xxx_brd_tbl[STAC_92HD83XXX_MODELS] = { | 1736 | static unsigned int *stac92hd83xxx_brd_tbl[STAC_92HD83XXX_MODELS] = { |
1738 | [STAC_92HD83XXX_REF] = ref92hd83xxx_pin_configs, | 1737 | [STAC_92HD83XXX_REF] = ref92hd83xxx_pin_configs, |
1738 | [STAC_92HD83XXX_PWR_REF] = ref92hd83xxx_pin_configs, | ||
1739 | }; | 1739 | }; |
1740 | 1740 | ||
1741 | static const char *stac92hd83xxx_models[STAC_92HD83XXX_MODELS] = { | 1741 | static const char *stac92hd83xxx_models[STAC_92HD83XXX_MODELS] = { |
1742 | [STAC_92HD83XXX_REF] = "ref", | 1742 | [STAC_92HD83XXX_REF] = "ref", |
1743 | [STAC_92HD83XXX_PWR_REF] = "mic-ref", | ||
1743 | }; | 1744 | }; |
1744 | 1745 | ||
1745 | static struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = { | 1746 | static struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = { |
@@ -1798,9 +1799,13 @@ static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = { | |||
1798 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f2, | 1799 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f2, |
1799 | "HP dv5", STAC_HP_M4), | 1800 | "HP dv5", STAC_HP_M4), |
1800 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f4, | 1801 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f4, |
1801 | "HP dv7", STAC_HP_M4), | 1802 | "HP dv7", STAC_HP_DV5), |
1803 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f7, | ||
1804 | "HP dv4", STAC_HP_DV5), | ||
1802 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30fc, | 1805 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30fc, |
1803 | "HP dv7", STAC_HP_M4), | 1806 | "HP dv7", STAC_HP_M4), |
1807 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3600, | ||
1808 | "HP dv5", STAC_HP_DV5), | ||
1804 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3603, | 1809 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3603, |
1805 | "HP dv5", STAC_HP_DV5), | 1810 | "HP dv5", STAC_HP_DV5), |
1806 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x361a, | 1811 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x361a, |
@@ -2437,6 +2442,14 @@ static int stac92xx_dig_playback_pcm_prepare(struct hda_pcm_stream *hinfo, | |||
2437 | stream_tag, format, substream); | 2442 | stream_tag, format, substream); |
2438 | } | 2443 | } |
2439 | 2444 | ||
2445 | static int stac92xx_dig_playback_pcm_cleanup(struct hda_pcm_stream *hinfo, | ||
2446 | struct hda_codec *codec, | ||
2447 | struct snd_pcm_substream *substream) | ||
2448 | { | ||
2449 | struct sigmatel_spec *spec = codec->spec; | ||
2450 | return snd_hda_multi_out_dig_cleanup(codec, &spec->multiout); | ||
2451 | } | ||
2452 | |||
2440 | 2453 | ||
2441 | /* | 2454 | /* |
2442 | * Analog capture callbacks | 2455 | * Analog capture callbacks |
@@ -2481,7 +2494,8 @@ static struct hda_pcm_stream stac92xx_pcm_digital_playback = { | |||
2481 | .ops = { | 2494 | .ops = { |
2482 | .open = stac92xx_dig_playback_pcm_open, | 2495 | .open = stac92xx_dig_playback_pcm_open, |
2483 | .close = stac92xx_dig_playback_pcm_close, | 2496 | .close = stac92xx_dig_playback_pcm_close, |
2484 | .prepare = stac92xx_dig_playback_pcm_prepare | 2497 | .prepare = stac92xx_dig_playback_pcm_prepare, |
2498 | .cleanup = stac92xx_dig_playback_pcm_cleanup | ||
2485 | }, | 2499 | }, |
2486 | }; | 2500 | }; |
2487 | 2501 | ||
@@ -2536,6 +2550,8 @@ static int stac92xx_build_pcms(struct hda_codec *codec) | |||
2536 | 2550 | ||
2537 | info->name = "STAC92xx Analog"; | 2551 | info->name = "STAC92xx Analog"; |
2538 | info->stream[SNDRV_PCM_STREAM_PLAYBACK] = stac92xx_pcm_analog_playback; | 2552 | info->stream[SNDRV_PCM_STREAM_PLAYBACK] = stac92xx_pcm_analog_playback; |
2553 | info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid = | ||
2554 | spec->multiout.dac_nids[0]; | ||
2539 | info->stream[SNDRV_PCM_STREAM_CAPTURE] = stac92xx_pcm_analog_capture; | 2555 | info->stream[SNDRV_PCM_STREAM_CAPTURE] = stac92xx_pcm_analog_capture; |
2540 | info->stream[SNDRV_PCM_STREAM_CAPTURE].nid = spec->adc_nids[0]; | 2556 | info->stream[SNDRV_PCM_STREAM_CAPTURE].nid = spec->adc_nids[0]; |
2541 | info->stream[SNDRV_PCM_STREAM_CAPTURE].substreams = spec->num_adcs; | 2557 | info->stream[SNDRV_PCM_STREAM_CAPTURE].substreams = spec->num_adcs; |
@@ -3500,6 +3516,7 @@ static int stac92xx_parse_auto_config(struct hda_codec *codec, hda_nid_t dig_out | |||
3500 | if (! spec->autocfg.line_outs) | 3516 | if (! spec->autocfg.line_outs) |
3501 | return 0; /* can't find valid pin config */ | 3517 | return 0; /* can't find valid pin config */ |
3502 | 3518 | ||
3519 | #if 0 /* FIXME: temporarily disabled */ | ||
3503 | /* If we have no real line-out pin and multiple hp-outs, HPs should | 3520 | /* If we have no real line-out pin and multiple hp-outs, HPs should |
3504 | * be set up as multi-channel outputs. | 3521 | * be set up as multi-channel outputs. |
3505 | */ | 3522 | */ |
@@ -3519,6 +3536,7 @@ static int stac92xx_parse_auto_config(struct hda_codec *codec, hda_nid_t dig_out | |||
3519 | spec->autocfg.line_out_type = AUTO_PIN_HP_OUT; | 3536 | spec->autocfg.line_out_type = AUTO_PIN_HP_OUT; |
3520 | spec->autocfg.hp_outs = 0; | 3537 | spec->autocfg.hp_outs = 0; |
3521 | } | 3538 | } |
3539 | #endif /* FIXME: temporarily disabled */ | ||
3522 | if (spec->autocfg.mono_out_pin) { | 3540 | if (spec->autocfg.mono_out_pin) { |
3523 | int dir = get_wcaps(codec, spec->autocfg.mono_out_pin) & | 3541 | int dir = get_wcaps(codec, spec->autocfg.mono_out_pin) & |
3524 | (AC_WCAP_OUT_AMP | AC_WCAP_IN_AMP); | 3542 | (AC_WCAP_OUT_AMP | AC_WCAP_IN_AMP); |
@@ -3573,13 +3591,12 @@ static int stac92xx_parse_auto_config(struct hda_codec *codec, hda_nid_t dig_out | |||
3573 | err = stac92xx_auto_fill_dac_nids(codec); | 3591 | err = stac92xx_auto_fill_dac_nids(codec); |
3574 | if (err < 0) | 3592 | if (err < 0) |
3575 | return err; | 3593 | return err; |
3594 | err = stac92xx_auto_create_multi_out_ctls(codec, | ||
3595 | &spec->autocfg); | ||
3596 | if (err < 0) | ||
3597 | return err; | ||
3576 | } | 3598 | } |
3577 | 3599 | ||
3578 | err = stac92xx_auto_create_multi_out_ctls(codec, &spec->autocfg); | ||
3579 | |||
3580 | if (err < 0) | ||
3581 | return err; | ||
3582 | |||
3583 | /* setup analog beep controls */ | 3600 | /* setup analog beep controls */ |
3584 | if (spec->anabeep_nid > 0) { | 3601 | if (spec->anabeep_nid > 0) { |
3585 | err = stac92xx_auto_create_beep_ctls(codec, | 3602 | err = stac92xx_auto_create_beep_ctls(codec, |
@@ -4753,7 +4770,9 @@ static struct hda_input_mux stac92hd83xxx_dmux = { | |||
4753 | static int patch_stac92hd83xxx(struct hda_codec *codec) | 4770 | static int patch_stac92hd83xxx(struct hda_codec *codec) |
4754 | { | 4771 | { |
4755 | struct sigmatel_spec *spec; | 4772 | struct sigmatel_spec *spec; |
4773 | hda_nid_t conn[STAC92HD83_DAC_COUNT + 1]; | ||
4756 | int err; | 4774 | int err; |
4775 | int num_dacs; | ||
4757 | 4776 | ||
4758 | spec = kzalloc(sizeof(*spec), GFP_KERNEL); | 4777 | spec = kzalloc(sizeof(*spec), GFP_KERNEL); |
4759 | if (spec == NULL) | 4778 | if (spec == NULL) |
@@ -4772,15 +4791,16 @@ static int patch_stac92hd83xxx(struct hda_codec *codec) | |||
4772 | spec->num_pwrs = ARRAY_SIZE(stac92hd83xxx_pwr_nids); | 4791 | spec->num_pwrs = ARRAY_SIZE(stac92hd83xxx_pwr_nids); |
4773 | spec->multiout.dac_nids = spec->dac_nids; | 4792 | spec->multiout.dac_nids = spec->dac_nids; |
4774 | 4793 | ||
4775 | spec->init = stac92hd83xxx_core_init; | ||
4776 | switch (codec->vendor_id) { | ||
4777 | case 0x111d7605: | ||
4778 | break; | ||
4779 | default: | ||
4780 | spec->num_pwrs--; | ||
4781 | spec->init++; /* switch to config #2 */ | ||
4782 | } | ||
4783 | 4794 | ||
4795 | /* set port 0xe to select the last DAC | ||
4796 | */ | ||
4797 | num_dacs = snd_hda_get_connections(codec, 0x0e, | ||
4798 | conn, STAC92HD83_DAC_COUNT + 1) - 1; | ||
4799 | |||
4800 | snd_hda_codec_write_cache(codec, 0xe, 0, | ||
4801 | AC_VERB_SET_CONNECT_SEL, num_dacs); | ||
4802 | |||
4803 | spec->init = stac92hd83xxx_core_init; | ||
4784 | spec->mixer = stac92hd83xxx_mixer; | 4804 | spec->mixer = stac92hd83xxx_mixer; |
4785 | spec->num_pins = ARRAY_SIZE(stac92hd83xxx_pin_nids); | 4805 | spec->num_pins = ARRAY_SIZE(stac92hd83xxx_pin_nids); |
4786 | spec->num_dmuxes = ARRAY_SIZE(stac92hd83xxx_dmux_nids); | 4806 | spec->num_dmuxes = ARRAY_SIZE(stac92hd83xxx_dmux_nids); |
@@ -4806,6 +4826,15 @@ again: | |||
4806 | return err; | 4826 | return err; |
4807 | } | 4827 | } |
4808 | 4828 | ||
4829 | switch (codec->vendor_id) { | ||
4830 | case 0x111d7604: | ||
4831 | case 0x111d7605: | ||
4832 | if (spec->board_config == STAC_92HD83XXX_PWR_REF) | ||
4833 | break; | ||
4834 | spec->num_pwrs = 0; | ||
4835 | break; | ||
4836 | } | ||
4837 | |||
4809 | err = stac92xx_parse_auto_config(codec, 0x1d, 0); | 4838 | err = stac92xx_parse_auto_config(codec, 0x1d, 0); |
4810 | if (!err) { | 4839 | if (!err) { |
4811 | if (spec->board_config < 0) { | 4840 | if (spec->board_config < 0) { |
@@ -4962,7 +4991,7 @@ again: | |||
4962 | case STAC_DELL_M4_3: | 4991 | case STAC_DELL_M4_3: |
4963 | spec->num_dmics = 1; | 4992 | spec->num_dmics = 1; |
4964 | spec->num_smuxes = 0; | 4993 | spec->num_smuxes = 0; |
4965 | spec->num_dmuxes = 0; | 4994 | spec->num_dmuxes = 1; |
4966 | break; | 4995 | break; |
4967 | default: | 4996 | default: |
4968 | spec->num_dmics = STAC92HD71BXX_NUM_DMICS; | 4997 | spec->num_dmics = STAC92HD71BXX_NUM_DMICS; |
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index 19d3391e229f..e900cdc84849 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c | |||
@@ -617,7 +617,7 @@ static int snd_intel8x0_ali_codec_semaphore(struct intel8x0 *chip) | |||
617 | int time = 100; | 617 | int time = 100; |
618 | if (chip->buggy_semaphore) | 618 | if (chip->buggy_semaphore) |
619 | return 0; /* just ignore ... */ | 619 | return 0; /* just ignore ... */ |
620 | while (time-- && (igetdword(chip, ICHREG(ALI_CAS)) & ALI_CAS_SEM_BUSY)) | 620 | while (--time && (igetdword(chip, ICHREG(ALI_CAS)) & ALI_CAS_SEM_BUSY)) |
621 | udelay(1); | 621 | udelay(1); |
622 | if (! time && ! chip->in_ac97_init) | 622 | if (! time && ! chip->in_ac97_init) |
623 | snd_printk(KERN_WARNING "ali_codec_semaphore timeout\n"); | 623 | snd_printk(KERN_WARNING "ali_codec_semaphore timeout\n"); |
diff --git a/sound/pci/oxygen/virtuoso.c b/sound/pci/oxygen/virtuoso.c index e9e829e83d7a..6c870c12a177 100644 --- a/sound/pci/oxygen/virtuoso.c +++ b/sound/pci/oxygen/virtuoso.c | |||
@@ -26,7 +26,7 @@ | |||
26 | * SPI 0 -> 1st PCM1796 (front) | 26 | * SPI 0 -> 1st PCM1796 (front) |
27 | * SPI 1 -> 2nd PCM1796 (surround) | 27 | * SPI 1 -> 2nd PCM1796 (surround) |
28 | * SPI 2 -> 3rd PCM1796 (center/LFE) | 28 | * SPI 2 -> 3rd PCM1796 (center/LFE) |
29 | * SPI 4 -> 4th PCM1796 (back) and EEPROM self-destruct (do not use!) | 29 | * SPI 4 -> 4th PCM1796 (back) |
30 | * | 30 | * |
31 | * GPIO 2 -> M0 of CS5381 | 31 | * GPIO 2 -> M0 of CS5381 |
32 | * GPIO 3 -> M1 of CS5381 | 32 | * GPIO 3 -> M1 of CS5381 |
@@ -207,12 +207,6 @@ static void xonar_gpio_changed(struct oxygen *chip); | |||
207 | static inline void pcm1796_write_spi(struct oxygen *chip, unsigned int codec, | 207 | static inline void pcm1796_write_spi(struct oxygen *chip, unsigned int codec, |
208 | u8 reg, u8 value) | 208 | u8 reg, u8 value) |
209 | { | 209 | { |
210 | /* | ||
211 | * We don't want to do writes on SPI 4 because the EEPROM, which shares | ||
212 | * the same pin, might get confused and broken. We'd better take care | ||
213 | * that the driver works with the default register values ... | ||
214 | */ | ||
215 | #if 0 | ||
216 | /* maps ALSA channel pair number to SPI output */ | 210 | /* maps ALSA channel pair number to SPI output */ |
217 | static const u8 codec_map[4] = { | 211 | static const u8 codec_map[4] = { |
218 | 0, 1, 2, 4 | 212 | 0, 1, 2, 4 |
@@ -223,7 +217,6 @@ static inline void pcm1796_write_spi(struct oxygen *chip, unsigned int codec, | |||
223 | (codec_map[codec] << OXYGEN_SPI_CODEC_SHIFT) | | 217 | (codec_map[codec] << OXYGEN_SPI_CODEC_SHIFT) | |
224 | OXYGEN_SPI_CEN_LATCH_CLOCK_HI, | 218 | OXYGEN_SPI_CEN_LATCH_CLOCK_HI, |
225 | (reg << 8) | value); | 219 | (reg << 8) | value); |
226 | #endif | ||
227 | } | 220 | } |
228 | 221 | ||
229 | static inline void pcm1796_write_i2c(struct oxygen *chip, unsigned int codec, | 222 | static inline void pcm1796_write_i2c(struct oxygen *chip, unsigned int codec, |
@@ -683,7 +676,7 @@ static void xonar_hdav_uart_input(struct oxygen *chip) | |||
683 | if (chip->uart_input_count >= 2 && | 676 | if (chip->uart_input_count >= 2 && |
684 | chip->uart_input[chip->uart_input_count - 2] == 'O' && | 677 | chip->uart_input[chip->uart_input_count - 2] == 'O' && |
685 | chip->uart_input[chip->uart_input_count - 1] == 'K') { | 678 | chip->uart_input[chip->uart_input_count - 1] == 'K') { |
686 | printk(KERN_DEBUG "message from Xonar HDAV HDMI chip received:"); | 679 | printk(KERN_DEBUG "message from Xonar HDAV HDMI chip received:\n"); |
687 | print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, | 680 | print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, |
688 | chip->uart_input, chip->uart_input_count); | 681 | chip->uart_input, chip->uart_input_count); |
689 | chip->uart_input_count = 0; | 682 | chip->uart_input_count = 0; |
@@ -757,9 +750,6 @@ static const DECLARE_TLV_DB_SCALE(cs4362a_db_scale, -12700, 100, 0); | |||
757 | 750 | ||
758 | static int xonar_d2_control_filter(struct snd_kcontrol_new *template) | 751 | static int xonar_d2_control_filter(struct snd_kcontrol_new *template) |
759 | { | 752 | { |
760 | if (!strncmp(template->name, "Master Playback ", 16)) | ||
761 | /* disable volume/mute because they would require SPI writes */ | ||
762 | return 1; | ||
763 | if (!strncmp(template->name, "CD Capture ", 11)) | 753 | if (!strncmp(template->name, "CD Capture ", 11)) |
764 | /* CD in is actually connected to the video in pin */ | 754 | /* CD in is actually connected to the video in pin */ |
765 | template->private_value ^= AC97_CD ^ AC97_VIDEO; | 755 | template->private_value ^= AC97_CD ^ AC97_VIDEO; |
@@ -850,8 +840,9 @@ static const struct oxygen_model model_xonar_d2 = { | |||
850 | .dac_volume_min = 0x0f, | 840 | .dac_volume_min = 0x0f, |
851 | .dac_volume_max = 0xff, | 841 | .dac_volume_max = 0xff, |
852 | .misc_flags = OXYGEN_MISC_MIDI, | 842 | .misc_flags = OXYGEN_MISC_MIDI, |
853 | .function_flags = OXYGEN_FUNCTION_SPI, | 843 | .function_flags = OXYGEN_FUNCTION_SPI | |
854 | .dac_i2s_format = OXYGEN_I2S_FORMAT_I2S, | 844 | OXYGEN_FUNCTION_ENABLE_SPI_4_5, |
845 | .dac_i2s_format = OXYGEN_I2S_FORMAT_LJUST, | ||
855 | .adc_i2s_format = OXYGEN_I2S_FORMAT_LJUST, | 846 | .adc_i2s_format = OXYGEN_I2S_FORMAT_LJUST, |
856 | }; | 847 | }; |
857 | 848 | ||
@@ -908,6 +899,7 @@ static const struct oxygen_model model_xonar_hdav = { | |||
908 | .dac_channels = 8, | 899 | .dac_channels = 8, |
909 | .dac_volume_min = 0x0f, | 900 | .dac_volume_min = 0x0f, |
910 | .dac_volume_max = 0xff, | 901 | .dac_volume_max = 0xff, |
902 | .misc_flags = OXYGEN_MISC_MIDI, | ||
911 | .function_flags = OXYGEN_FUNCTION_2WIRE, | 903 | .function_flags = OXYGEN_FUNCTION_2WIRE, |
912 | .dac_i2s_format = OXYGEN_I2S_FORMAT_LJUST, | 904 | .dac_i2s_format = OXYGEN_I2S_FORMAT_LJUST, |
913 | .adc_i2s_format = OXYGEN_I2S_FORMAT_LJUST, | 905 | .adc_i2s_format = OXYGEN_I2S_FORMAT_LJUST, |
diff --git a/sound/pci/pcxhr/pcxhr.h b/sound/pci/pcxhr/pcxhr.h index 84131a916c92..69d87dee6995 100644 --- a/sound/pci/pcxhr/pcxhr.h +++ b/sound/pci/pcxhr/pcxhr.h | |||
@@ -97,12 +97,12 @@ struct pcxhr_mgr { | |||
97 | int capture_chips; | 97 | int capture_chips; |
98 | int fw_file_set; | 98 | int fw_file_set; |
99 | int firmware_num; | 99 | int firmware_num; |
100 | int is_hr_stereo:1; | 100 | unsigned int is_hr_stereo:1; |
101 | int board_has_aes1:1; /* if 1 board has AES1 plug and SRC */ | 101 | unsigned int board_has_aes1:1; /* if 1 board has AES1 plug and SRC */ |
102 | int board_has_analog:1; /* if 0 the board is digital only */ | 102 | unsigned int board_has_analog:1; /* if 0 the board is digital only */ |
103 | int board_has_mic:1; /* if 1 the board has microphone input */ | 103 | unsigned int board_has_mic:1; /* if 1 the board has microphone input */ |
104 | int board_aes_in_192k:1;/* if 1 the aes input plugs do support 192kHz */ | 104 | unsigned int board_aes_in_192k:1;/* if 1 the aes input plugs do support 192kHz */ |
105 | int mono_capture:1; /* if 1 the board does mono capture */ | 105 | unsigned int mono_capture:1; /* if 1 the board does mono capture */ |
106 | 106 | ||
107 | struct snd_dma_buffer hostport; | 107 | struct snd_dma_buffer hostport; |
108 | 108 | ||
diff --git a/sound/soc/atmel/atmel-pcm.c b/sound/soc/atmel/atmel-pcm.c index 1fac5efd285b..3dcdc4e3cfa0 100644 --- a/sound/soc/atmel/atmel-pcm.c +++ b/sound/soc/atmel/atmel-pcm.c | |||
@@ -44,8 +44,6 @@ | |||
44 | #include <sound/pcm_params.h> | 44 | #include <sound/pcm_params.h> |
45 | #include <sound/soc.h> | 45 | #include <sound/soc.h> |
46 | 46 | ||
47 | #include <mach/hardware.h> | ||
48 | |||
49 | #include "atmel-pcm.h" | 47 | #include "atmel-pcm.h" |
50 | 48 | ||
51 | 49 | ||
diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c index c5d67900d666..ff0054b76502 100644 --- a/sound/soc/atmel/atmel_ssc_dai.c +++ b/sound/soc/atmel/atmel_ssc_dai.c | |||
@@ -10,7 +10,7 @@ | |||
10 | * Based on at91-ssc.c by | 10 | * Based on at91-ssc.c by |
11 | * Frank Mandarino <fmandarino@endrelia.com> | 11 | * Frank Mandarino <fmandarino@endrelia.com> |
12 | * Based on pxa2xx Platform drivers by | 12 | * Based on pxa2xx Platform drivers by |
13 | * Liam Girdwood <liam.girdwood@wolfsonmicro.com> | 13 | * Liam Girdwood <lrg@slimlogic.co.uk> |
14 | * | 14 | * |
15 | * This program is free software; you can redistribute it and/or modify | 15 | * This program is free software; you can redistribute it and/or modify |
16 | * it under the terms of the GNU General Public License as published by | 16 | * it under the terms of the GNU General Public License as published by |
diff --git a/sound/soc/atmel/atmel_ssc_dai.h b/sound/soc/atmel/atmel_ssc_dai.h index a828746e8a2f..391135f9c6c1 100644 --- a/sound/soc/atmel/atmel_ssc_dai.h +++ b/sound/soc/atmel/atmel_ssc_dai.h | |||
@@ -10,7 +10,7 @@ | |||
10 | * Based on at91-ssc.c by | 10 | * Based on at91-ssc.c by |
11 | * Frank Mandarino <fmandarino@endrelia.com> | 11 | * Frank Mandarino <fmandarino@endrelia.com> |
12 | * Based on pxa2xx Platform drivers by | 12 | * Based on pxa2xx Platform drivers by |
13 | * Liam Girdwood <liam.girdwood@wolfsonmicro.com> | 13 | * Liam Girdwood <lrg@slimlogic.co.uk> |
14 | * | 14 | * |
15 | * This program is free software; you can redistribute it and/or modify | 15 | * This program is free software; you can redistribute it and/or modify |
16 | * it under the terms of the GNU General Public License as published by | 16 | * it under the terms of the GNU General Public License as published by |
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index b47a749c5ea2..aea0cb72d80a 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c | |||
@@ -165,10 +165,13 @@ static int snd_soc_dapm_put_volsw_aic3x(struct snd_kcontrol *kcontrol, | |||
165 | struct snd_ctl_elem_value *ucontrol) | 165 | struct snd_ctl_elem_value *ucontrol) |
166 | { | 166 | { |
167 | struct snd_soc_dapm_widget *widget = snd_kcontrol_chip(kcontrol); | 167 | struct snd_soc_dapm_widget *widget = snd_kcontrol_chip(kcontrol); |
168 | int reg = kcontrol->private_value & 0xff; | 168 | struct soc_mixer_control *mc = |
169 | int shift = (kcontrol->private_value >> 8) & 0x0f; | 169 | (struct soc_mixer_control *)kcontrol->private_value; |
170 | int mask = (kcontrol->private_value >> 16) & 0xff; | 170 | unsigned int reg = mc->reg; |
171 | int invert = (kcontrol->private_value >> 24) & 0x01; | 171 | unsigned int shift = mc->shift; |
172 | int max = mc->max; | ||
173 | unsigned int mask = (1 << fls(max)) - 1; | ||
174 | unsigned int invert = mc->invert; | ||
172 | unsigned short val, val_mask; | 175 | unsigned short val, val_mask; |
173 | int ret; | 176 | int ret; |
174 | struct snd_soc_dapm_path *path; | 177 | struct snd_soc_dapm_path *path; |
diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c index e3989d406f54..35d99750c383 100644 --- a/sound/soc/codecs/wm8350.c +++ b/sound/soc/codecs/wm8350.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2007, 2008 Wolfson Microelectronics PLC. | 4 | * Copyright (C) 2007, 2008 Wolfson Microelectronics PLC. |
5 | * | 5 | * |
6 | * Author: Liam Girdwood <lg@opensource.wolfsonmicro.com> | 6 | * Author: Liam Girdwood <lrg@slimlogic.co.uk> |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c index 6c21b50c9375..77620ab98756 100644 --- a/sound/soc/codecs/wm8753.c +++ b/sound/soc/codecs/wm8753.c | |||
@@ -1451,7 +1451,14 @@ static const struct snd_soc_dai wm8753_all_dai[] = { | |||
1451 | }, | 1451 | }, |
1452 | }; | 1452 | }; |
1453 | 1453 | ||
1454 | struct snd_soc_dai wm8753_dai[2]; | 1454 | struct snd_soc_dai wm8753_dai[] = { |
1455 | { | ||
1456 | .name = "WM8753 DAI 0", | ||
1457 | }, | ||
1458 | { | ||
1459 | .name = "WM8753 DAI 1", | ||
1460 | }, | ||
1461 | }; | ||
1455 | EXPORT_SYMBOL_GPL(wm8753_dai); | 1462 | EXPORT_SYMBOL_GPL(wm8753_dai); |
1456 | 1463 | ||
1457 | static void wm8753_set_dai_mode(struct snd_soc_codec *codec, unsigned int mode) | 1464 | static void wm8753_set_dai_mode(struct snd_soc_codec *codec, unsigned int mode) |
diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c index 5b5afc144478..a5731faa150c 100644 --- a/sound/soc/codecs/wm8990.c +++ b/sound/soc/codecs/wm8990.c | |||
@@ -2,8 +2,7 @@ | |||
2 | * wm8990.c -- WM8990 ALSA Soc Audio driver | 2 | * wm8990.c -- WM8990 ALSA Soc Audio driver |
3 | * | 3 | * |
4 | * Copyright 2008 Wolfson Microelectronics PLC. | 4 | * Copyright 2008 Wolfson Microelectronics PLC. |
5 | * Author: Liam Girdwood | 5 | * Author: Liam Girdwood <lrg@slimlogic.co.uk> |
6 | * lg@opensource.wolfsonmicro.com or linux@wolfsonmicro.com | ||
7 | * | 6 | * |
8 | * This program is free software; you can redistribute it and/or modify it | 7 | * This program is free software; you can redistribute it and/or modify it |
9 | * under the terms of the GNU General Public License as published by the | 8 | * under the terms of the GNU General Public License as published by the |
@@ -177,7 +176,9 @@ static int wm899x_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol, | |||
177 | struct snd_ctl_elem_value *ucontrol) | 176 | struct snd_ctl_elem_value *ucontrol) |
178 | { | 177 | { |
179 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 178 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); |
180 | int reg = kcontrol->private_value & 0xff; | 179 | struct soc_mixer_control *mc = |
180 | (struct soc_mixer_control *)kcontrol->private_value; | ||
181 | int reg = mc->reg; | ||
181 | int ret; | 182 | int ret; |
182 | u16 val; | 183 | u16 val; |
183 | 184 | ||
diff --git a/sound/soc/fsl/mpc8610_hpcd.c b/sound/soc/fsl/mpc8610_hpcd.c index bcec3f60bad9..acf39a646b2f 100644 --- a/sound/soc/fsl/mpc8610_hpcd.c +++ b/sound/soc/fsl/mpc8610_hpcd.c | |||
@@ -183,16 +183,6 @@ static struct snd_soc_ops mpc8610_hpcd_ops = { | |||
183 | }; | 183 | }; |
184 | 184 | ||
185 | /** | 185 | /** |
186 | * mpc8610_hpcd_machine: ASoC machine data | ||
187 | */ | ||
188 | static struct snd_soc_card mpc8610_hpcd_machine = { | ||
189 | .probe = mpc8610_hpcd_machine_probe, | ||
190 | .remove = mpc8610_hpcd_machine_remove, | ||
191 | .name = "MPC8610 HPCD", | ||
192 | .num_links = 1, | ||
193 | }; | ||
194 | |||
195 | /** | ||
196 | * mpc8610_hpcd_probe: OF probe function for the fabric driver | 186 | * mpc8610_hpcd_probe: OF probe function for the fabric driver |
197 | * | 187 | * |
198 | * This function gets called when an SSI node is found in the device tree. | 188 | * This function gets called when an SSI node is found in the device tree. |
@@ -455,7 +445,11 @@ static int mpc8610_hpcd_probe(struct of_device *ofdev, | |||
455 | machine_data->dai.codec_dai = &cs4270_dai; /* The codec_dai we want */ | 445 | machine_data->dai.codec_dai = &cs4270_dai; /* The codec_dai we want */ |
456 | machine_data->dai.ops = &mpc8610_hpcd_ops; | 446 | machine_data->dai.ops = &mpc8610_hpcd_ops; |
457 | 447 | ||
458 | mpc8610_hpcd_machine.dai_link = &machine_data->dai; | 448 | machine_data->machine.probe = mpc8610_hpcd_machine_probe; |
449 | machine_data->machine.remove = mpc8610_hpcd_machine_remove; | ||
450 | machine_data->machine.name = "MPC8610 HPCD"; | ||
451 | machine_data->machine.num_links = 1; | ||
452 | machine_data->machine.dai_link = &machine_data->dai; | ||
459 | 453 | ||
460 | /* Allocate a new audio platform device structure */ | 454 | /* Allocate a new audio platform device structure */ |
461 | sound_device = platform_device_alloc("soc-audio", -1); | 455 | sound_device = platform_device_alloc("soc-audio", -1); |
@@ -465,7 +459,7 @@ static int mpc8610_hpcd_probe(struct of_device *ofdev, | |||
465 | goto error; | 459 | goto error; |
466 | } | 460 | } |
467 | 461 | ||
468 | machine_data->sound_devdata.card = &mpc8610_hpcd_machine; | 462 | machine_data->sound_devdata.card = &machine_data->machine; |
469 | machine_data->sound_devdata.codec_dev = &soc_codec_device_cs4270; | 463 | machine_data->sound_devdata.codec_dev = &soc_codec_device_cs4270; |
470 | machine_data->machine.platform = &fsl_soc_platform; | 464 | machine_data->machine.platform = &fsl_soc_platform; |
471 | 465 | ||
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index ec5e18a78758..05dd5abcddf4 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c | |||
@@ -302,6 +302,10 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, | |||
302 | regs->spcr1 |= RINTM(3); | 302 | regs->spcr1 |= RINTM(3); |
303 | regs->rcr2 |= RFIG; | 303 | regs->rcr2 |= RFIG; |
304 | regs->xcr2 |= XFIG; | 304 | regs->xcr2 |= XFIG; |
305 | if (cpu_is_omap2430() || cpu_is_omap34xx()) { | ||
306 | regs->xccr = DXENDLY(1) | XDMAEN; | ||
307 | regs->rccr = RFULL_CYCLE | RDMAEN; | ||
308 | } | ||
305 | 309 | ||
306 | switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { | 310 | switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { |
307 | case SND_SOC_DAIFMT_I2S: | 311 | case SND_SOC_DAIFMT_I2S: |
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index b0362dfd5b71..dd3bb2933762 100644 --- a/sound/soc/omap/omap-pcm.c +++ b/sound/soc/omap/omap-pcm.c | |||
@@ -175,9 +175,10 @@ static int omap_pcm_trigger(struct snd_pcm_substream *substream, int cmd) | |||
175 | { | 175 | { |
176 | struct snd_pcm_runtime *runtime = substream->runtime; | 176 | struct snd_pcm_runtime *runtime = substream->runtime; |
177 | struct omap_runtime_data *prtd = runtime->private_data; | 177 | struct omap_runtime_data *prtd = runtime->private_data; |
178 | unsigned long flags; | ||
178 | int ret = 0; | 179 | int ret = 0; |
179 | 180 | ||
180 | spin_lock_irq(&prtd->lock); | 181 | spin_lock_irqsave(&prtd->lock, flags); |
181 | switch (cmd) { | 182 | switch (cmd) { |
182 | case SNDRV_PCM_TRIGGER_START: | 183 | case SNDRV_PCM_TRIGGER_START: |
183 | case SNDRV_PCM_TRIGGER_RESUME: | 184 | case SNDRV_PCM_TRIGGER_RESUME: |
@@ -195,7 +196,7 @@ static int omap_pcm_trigger(struct snd_pcm_substream *substream, int cmd) | |||
195 | default: | 196 | default: |
196 | ret = -EINVAL; | 197 | ret = -EINVAL; |
197 | } | 198 | } |
198 | spin_unlock_irq(&prtd->lock); | 199 | spin_unlock_irqrestore(&prtd->lock, flags); |
199 | 200 | ||
200 | return ret; | 201 | return ret; |
201 | } | 202 | } |
diff --git a/sound/soc/omap/sdp3430.c b/sound/soc/omap/sdp3430.c index ad97836818b1..e226fa75669c 100644 --- a/sound/soc/omap/sdp3430.c +++ b/sound/soc/omap/sdp3430.c | |||
@@ -91,7 +91,7 @@ static struct snd_soc_dai_link sdp3430_dai = { | |||
91 | }; | 91 | }; |
92 | 92 | ||
93 | /* Audio machine driver */ | 93 | /* Audio machine driver */ |
94 | static struct snd_soc_machine snd_soc_machine_sdp3430 = { | 94 | static struct snd_soc_card snd_soc_sdp3430 = { |
95 | .name = "SDP3430", | 95 | .name = "SDP3430", |
96 | .platform = &omap_soc_platform, | 96 | .platform = &omap_soc_platform, |
97 | .dai_link = &sdp3430_dai, | 97 | .dai_link = &sdp3430_dai, |
@@ -100,7 +100,7 @@ static struct snd_soc_machine snd_soc_machine_sdp3430 = { | |||
100 | 100 | ||
101 | /* Audio subsystem */ | 101 | /* Audio subsystem */ |
102 | static struct snd_soc_device sdp3430_snd_devdata = { | 102 | static struct snd_soc_device sdp3430_snd_devdata = { |
103 | .machine = &snd_soc_machine_sdp3430, | 103 | .card = &snd_soc_sdp3430, |
104 | .codec_dev = &soc_codec_dev_twl4030, | 104 | .codec_dev = &soc_codec_dev_twl4030, |
105 | }; | 105 | }; |
106 | 106 | ||
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 55fdb4abb179..ec3f8bb4b51d 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -1385,7 +1385,10 @@ int snd_soc_init_card(struct snd_soc_device *socdev) | |||
1385 | 1385 | ||
1386 | mutex_lock(&codec->mutex); | 1386 | mutex_lock(&codec->mutex); |
1387 | #ifdef CONFIG_SND_SOC_AC97_BUS | 1387 | #ifdef CONFIG_SND_SOC_AC97_BUS |
1388 | if (ac97) { | 1388 | /* Only instantiate AC97 if not already done by the adaptor |
1389 | * for the generic AC97 subsystem. | ||
1390 | */ | ||
1391 | if (ac97 && strcmp(codec->name, "AC97") != 0) { | ||
1389 | ret = soc_ac97_dev_register(codec); | 1392 | ret = soc_ac97_dev_register(codec); |
1390 | if (ret < 0) { | 1393 | if (ret < 0) { |
1391 | printk(KERN_ERR "asoc: AC97 device register failed\n"); | 1394 | printk(KERN_ERR "asoc: AC97 device register failed\n"); |
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index c709b9563226..19e37451c216 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c | |||
@@ -2524,7 +2524,6 @@ static int parse_audio_format_rates(struct snd_usb_audio *chip, struct audioform | |||
2524 | * build the rate table and bitmap flags | 2524 | * build the rate table and bitmap flags |
2525 | */ | 2525 | */ |
2526 | int r, idx; | 2526 | int r, idx; |
2527 | unsigned int nonzero_rates = 0; | ||
2528 | 2527 | ||
2529 | fp->rate_table = kmalloc(sizeof(int) * nr_rates, GFP_KERNEL); | 2528 | fp->rate_table = kmalloc(sizeof(int) * nr_rates, GFP_KERNEL); |
2530 | if (fp->rate_table == NULL) { | 2529 | if (fp->rate_table == NULL) { |
@@ -2532,24 +2531,27 @@ static int parse_audio_format_rates(struct snd_usb_audio *chip, struct audioform | |||
2532 | return -1; | 2531 | return -1; |
2533 | } | 2532 | } |
2534 | 2533 | ||
2535 | fp->nr_rates = nr_rates; | 2534 | fp->nr_rates = 0; |
2536 | fp->rate_min = fp->rate_max = combine_triple(&fmt[8]); | 2535 | fp->rate_min = fp->rate_max = 0; |
2537 | for (r = 0, idx = offset + 1; r < nr_rates; r++, idx += 3) { | 2536 | for (r = 0, idx = offset + 1; r < nr_rates; r++, idx += 3) { |
2538 | unsigned int rate = combine_triple(&fmt[idx]); | 2537 | unsigned int rate = combine_triple(&fmt[idx]); |
2538 | if (!rate) | ||
2539 | continue; | ||
2539 | /* C-Media CM6501 mislabels its 96 kHz altsetting */ | 2540 | /* C-Media CM6501 mislabels its 96 kHz altsetting */ |
2540 | if (rate == 48000 && nr_rates == 1 && | 2541 | if (rate == 48000 && nr_rates == 1 && |
2541 | chip->usb_id == USB_ID(0x0d8c, 0x0201) && | 2542 | (chip->usb_id == USB_ID(0x0d8c, 0x0201) || |
2543 | chip->usb_id == USB_ID(0x0d8c, 0x0102)) && | ||
2542 | fp->altsetting == 5 && fp->maxpacksize == 392) | 2544 | fp->altsetting == 5 && fp->maxpacksize == 392) |
2543 | rate = 96000; | 2545 | rate = 96000; |
2544 | fp->rate_table[r] = rate; | 2546 | fp->rate_table[fp->nr_rates] = rate; |
2545 | nonzero_rates |= rate; | 2547 | if (!fp->rate_min || rate < fp->rate_min) |
2546 | if (rate < fp->rate_min) | ||
2547 | fp->rate_min = rate; | 2548 | fp->rate_min = rate; |
2548 | else if (rate > fp->rate_max) | 2549 | if (!fp->rate_max || rate > fp->rate_max) |
2549 | fp->rate_max = rate; | 2550 | fp->rate_max = rate; |
2550 | fp->rates |= snd_pcm_rate_to_rate_bit(rate); | 2551 | fp->rates |= snd_pcm_rate_to_rate_bit(rate); |
2552 | fp->nr_rates++; | ||
2551 | } | 2553 | } |
2552 | if (!nonzero_rates) { | 2554 | if (!fp->nr_rates) { |
2553 | hwc_debug("All rates were zero. Skipping format!\n"); | 2555 | hwc_debug("All rates were zero. Skipping format!\n"); |
2554 | return -1; | 2556 | return -1; |
2555 | } | 2557 | } |
@@ -2966,6 +2968,7 @@ static int create_fixed_stream_quirk(struct snd_usb_audio *chip, | |||
2966 | return -EINVAL; | 2968 | return -EINVAL; |
2967 | } | 2969 | } |
2968 | alts = &iface->altsetting[fp->altset_idx]; | 2970 | alts = &iface->altsetting[fp->altset_idx]; |
2971 | fp->maxpacksize = le16_to_cpu(get_endpoint(alts, 0)->wMaxPacketSize); | ||
2969 | usb_set_interface(chip->dev, fp->iface, 0); | 2972 | usb_set_interface(chip->dev, fp->iface, 0); |
2970 | init_usb_pitch(chip->dev, fp->iface, alts, fp); | 2973 | init_usb_pitch(chip->dev, fp->iface, alts, fp); |
2971 | init_usb_sample_rate(chip->dev, fp->iface, alts, fp, fp->rate_max); | 2974 | init_usb_sample_rate(chip->dev, fp->iface, alts, fp, fp->rate_max); |
diff --git a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c index 320641ab5be7..26bad373fe65 100644 --- a/sound/usb/usbmidi.c +++ b/sound/usb/usbmidi.c | |||
@@ -1625,6 +1625,7 @@ static int snd_usbmidi_create_endpoints_midiman(struct snd_usb_midi* umidi, | |||
1625 | } | 1625 | } |
1626 | 1626 | ||
1627 | ep_info.out_ep = get_endpoint(hostif, 2)->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK; | 1627 | ep_info.out_ep = get_endpoint(hostif, 2)->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK; |
1628 | ep_info.out_interval = 0; | ||
1628 | ep_info.out_cables = endpoint->out_cables & 0x5555; | 1629 | ep_info.out_cables = endpoint->out_cables & 0x5555; |
1629 | err = snd_usbmidi_out_endpoint_create(umidi, &ep_info, &umidi->endpoints[0]); | 1630 | err = snd_usbmidi_out_endpoint_create(umidi, &ep_info, &umidi->endpoints[0]); |
1630 | if (err < 0) | 1631 | if (err < 0) |