diff options
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/Kconfig | 4 | ||||
-rw-r--r-- | sound/pci/hda/hda_beep.c | 1 | ||||
-rw-r--r-- | sound/pci/hda/hda_codec.c | 122 | ||||
-rw-r--r-- | sound/pci/hda/hda_codec.h | 3 | ||||
-rw-r--r-- | sound/pci/hda/hda_hwdep.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.c | 6 | ||||
-rw-r--r-- | sound/pci/hda/hda_local.h | 5 | ||||
-rw-r--r-- | sound/pci/hda/hda_proc.c | 3 | ||||
-rw-r--r-- | sound/pci/hda/patch_analog.c | 20 | ||||
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 14 | ||||
-rw-r--r-- | sound/pci/hda/patch_intelhdmi.c | 61 | ||||
-rw-r--r-- | sound/pci/hda/patch_nvhdmi.c | 4 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 28 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 226 | ||||
-rw-r--r-- | sound/pci/intel8x0.c | 2 | ||||
-rw-r--r-- | sound/pci/oxygen/virtuoso.c | 3 |
16 files changed, 384 insertions, 120 deletions
diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig index 6e3a1848447..82b9bddcdcd 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/hda/hda_beep.c b/sound/pci/hda/hda_beep.c index e00421c0d8b..960fd797038 100644 --- a/sound/pci/hda/hda_beep.c +++ b/sound/pci/hda/hda_beep.c | |||
@@ -135,7 +135,6 @@ void snd_hda_detach_beep_device(struct hda_codec *codec) | |||
135 | struct hda_beep *beep = codec->beep; | 135 | struct hda_beep *beep = codec->beep; |
136 | if (beep) { | 136 | if (beep) { |
137 | cancel_work_sync(&beep->beep_work); | 137 | cancel_work_sync(&beep->beep_work); |
138 | flush_scheduled_work(); | ||
139 | 138 | ||
140 | input_unregister_device(beep->dev); | 139 | input_unregister_device(beep->dev); |
141 | kfree(beep); | 140 | kfree(beep); |
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index e16cf63821a..d03f99298be 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -373,7 +373,7 @@ int snd_hda_queue_unsol_event(struct hda_bus *bus, u32 res, u32 res_ex) | |||
373 | unsol->queue[wp] = res; | 373 | unsol->queue[wp] = res; |
374 | unsol->queue[wp + 1] = res_ex; | 374 | unsol->queue[wp + 1] = res_ex; |
375 | 375 | ||
376 | schedule_work(&unsol->work); | 376 | queue_work(bus->workq, &unsol->work); |
377 | 377 | ||
378 | return 0; | 378 | return 0; |
379 | } | 379 | } |
@@ -437,15 +437,17 @@ static int snd_hda_bus_free(struct hda_bus *bus) | |||
437 | 437 | ||
438 | if (!bus) | 438 | if (!bus) |
439 | return 0; | 439 | return 0; |
440 | if (bus->unsol) { | 440 | if (bus->workq) |
441 | flush_scheduled_work(); | 441 | flush_workqueue(bus->workq); |
442 | if (bus->unsol) | ||
442 | kfree(bus->unsol); | 443 | kfree(bus->unsol); |
443 | } | ||
444 | list_for_each_entry_safe(codec, n, &bus->codec_list, list) { | 444 | list_for_each_entry_safe(codec, n, &bus->codec_list, list) { |
445 | snd_hda_codec_free(codec); | 445 | snd_hda_codec_free(codec); |
446 | } | 446 | } |
447 | if (bus->ops.private_free) | 447 | if (bus->ops.private_free) |
448 | bus->ops.private_free(bus); | 448 | bus->ops.private_free(bus); |
449 | if (bus->workq) | ||
450 | destroy_workqueue(bus->workq); | ||
449 | kfree(bus); | 451 | kfree(bus); |
450 | return 0; | 452 | return 0; |
451 | } | 453 | } |
@@ -514,6 +516,16 @@ int /*__devinit*/ snd_hda_bus_new(struct snd_card *card, | |||
514 | mutex_init(&bus->cmd_mutex); | 516 | mutex_init(&bus->cmd_mutex); |
515 | INIT_LIST_HEAD(&bus->codec_list); | 517 | INIT_LIST_HEAD(&bus->codec_list); |
516 | 518 | ||
519 | snprintf(bus->workq_name, sizeof(bus->workq_name), | ||
520 | "hd-audio%d", card->number); | ||
521 | bus->workq = create_singlethread_workqueue(bus->workq_name); | ||
522 | if (!bus->workq) { | ||
523 | snd_printk(KERN_ERR "cannot create workqueue %s\n", | ||
524 | bus->workq_name); | ||
525 | kfree(bus); | ||
526 | return -ENOMEM; | ||
527 | } | ||
528 | |||
517 | err = snd_device_new(card, SNDRV_DEV_BUS, bus, &dev_ops); | 529 | err = snd_device_new(card, SNDRV_DEV_BUS, bus, &dev_ops); |
518 | if (err < 0) { | 530 | if (err < 0) { |
519 | snd_hda_bus_free(bus); | 531 | snd_hda_bus_free(bus); |
@@ -684,7 +696,7 @@ static void snd_hda_codec_free(struct hda_codec *codec) | |||
684 | return; | 696 | return; |
685 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 697 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
686 | cancel_delayed_work(&codec->power_work); | 698 | cancel_delayed_work(&codec->power_work); |
687 | flush_scheduled_work(); | 699 | flush_workqueue(codec->bus->workq); |
688 | #endif | 700 | #endif |
689 | list_del(&codec->list); | 701 | list_del(&codec->list); |
690 | snd_array_free(&codec->mixers); | 702 | snd_array_free(&codec->mixers); |
@@ -735,6 +747,7 @@ int /*__devinit*/ snd_hda_codec_new(struct hda_bus *bus, unsigned int codec_addr | |||
735 | codec->bus = bus; | 747 | codec->bus = bus; |
736 | codec->addr = codec_addr; | 748 | codec->addr = codec_addr; |
737 | mutex_init(&codec->spdif_mutex); | 749 | mutex_init(&codec->spdif_mutex); |
750 | mutex_init(&codec->control_mutex); | ||
738 | init_hda_cache(&codec->amp_cache, sizeof(struct hda_amp_info)); | 751 | init_hda_cache(&codec->amp_cache, sizeof(struct hda_amp_info)); |
739 | init_hda_cache(&codec->cmd_cache, sizeof(struct hda_cache_head)); | 752 | init_hda_cache(&codec->cmd_cache, sizeof(struct hda_cache_head)); |
740 | snd_array_init(&codec->mixers, sizeof(struct snd_kcontrol *), 32); | 753 | snd_array_init(&codec->mixers, sizeof(struct snd_kcontrol *), 32); |
@@ -1272,7 +1285,7 @@ void snd_hda_codec_reset(struct hda_codec *codec) | |||
1272 | 1285 | ||
1273 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 1286 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
1274 | cancel_delayed_work(&codec->power_work); | 1287 | cancel_delayed_work(&codec->power_work); |
1275 | flush_scheduled_work(); | 1288 | flush_workqueue(codec->bus->workq); |
1276 | #endif | 1289 | #endif |
1277 | snd_hda_ctls_clear(codec); | 1290 | snd_hda_ctls_clear(codec); |
1278 | /* relase PCMs */ | 1291 | /* relase PCMs */ |
@@ -1418,12 +1431,12 @@ int snd_hda_mixer_bind_switch_get(struct snd_kcontrol *kcontrol, | |||
1418 | unsigned long pval; | 1431 | unsigned long pval; |
1419 | int err; | 1432 | int err; |
1420 | 1433 | ||
1421 | mutex_lock(&codec->spdif_mutex); /* reuse spdif_mutex */ | 1434 | mutex_lock(&codec->control_mutex); |
1422 | pval = kcontrol->private_value; | 1435 | pval = kcontrol->private_value; |
1423 | kcontrol->private_value = pval & ~AMP_VAL_IDX_MASK; /* index 0 */ | 1436 | kcontrol->private_value = pval & ~AMP_VAL_IDX_MASK; /* index 0 */ |
1424 | err = snd_hda_mixer_amp_switch_get(kcontrol, ucontrol); | 1437 | err = snd_hda_mixer_amp_switch_get(kcontrol, ucontrol); |
1425 | kcontrol->private_value = pval; | 1438 | kcontrol->private_value = pval; |
1426 | mutex_unlock(&codec->spdif_mutex); | 1439 | mutex_unlock(&codec->control_mutex); |
1427 | return err; | 1440 | return err; |
1428 | } | 1441 | } |
1429 | EXPORT_SYMBOL_HDA(snd_hda_mixer_bind_switch_get); | 1442 | EXPORT_SYMBOL_HDA(snd_hda_mixer_bind_switch_get); |
@@ -1435,7 +1448,7 @@ int snd_hda_mixer_bind_switch_put(struct snd_kcontrol *kcontrol, | |||
1435 | unsigned long pval; | 1448 | unsigned long pval; |
1436 | int i, indices, err = 0, change = 0; | 1449 | int i, indices, err = 0, change = 0; |
1437 | 1450 | ||
1438 | mutex_lock(&codec->spdif_mutex); /* reuse spdif_mutex */ | 1451 | mutex_lock(&codec->control_mutex); |
1439 | pval = kcontrol->private_value; | 1452 | pval = kcontrol->private_value; |
1440 | indices = (pval & AMP_VAL_IDX_MASK) >> AMP_VAL_IDX_SHIFT; | 1453 | indices = (pval & AMP_VAL_IDX_MASK) >> AMP_VAL_IDX_SHIFT; |
1441 | for (i = 0; i < indices; i++) { | 1454 | for (i = 0; i < indices; i++) { |
@@ -1447,7 +1460,7 @@ int snd_hda_mixer_bind_switch_put(struct snd_kcontrol *kcontrol, | |||
1447 | change |= err; | 1460 | change |= err; |
1448 | } | 1461 | } |
1449 | kcontrol->private_value = pval; | 1462 | kcontrol->private_value = pval; |
1450 | mutex_unlock(&codec->spdif_mutex); | 1463 | mutex_unlock(&codec->control_mutex); |
1451 | return err < 0 ? err : change; | 1464 | return err < 0 ? err : change; |
1452 | } | 1465 | } |
1453 | EXPORT_SYMBOL_HDA(snd_hda_mixer_bind_switch_put); | 1466 | EXPORT_SYMBOL_HDA(snd_hda_mixer_bind_switch_put); |
@@ -1462,12 +1475,12 @@ int snd_hda_mixer_bind_ctls_info(struct snd_kcontrol *kcontrol, | |||
1462 | struct hda_bind_ctls *c; | 1475 | struct hda_bind_ctls *c; |
1463 | int err; | 1476 | int err; |
1464 | 1477 | ||
1465 | mutex_lock(&codec->spdif_mutex); /* reuse spdif_mutex */ | 1478 | mutex_lock(&codec->control_mutex); |
1466 | c = (struct hda_bind_ctls *)kcontrol->private_value; | 1479 | c = (struct hda_bind_ctls *)kcontrol->private_value; |
1467 | kcontrol->private_value = *c->values; | 1480 | kcontrol->private_value = *c->values; |
1468 | err = c->ops->info(kcontrol, uinfo); | 1481 | err = c->ops->info(kcontrol, uinfo); |
1469 | kcontrol->private_value = (long)c; | 1482 | kcontrol->private_value = (long)c; |
1470 | mutex_unlock(&codec->spdif_mutex); | 1483 | mutex_unlock(&codec->control_mutex); |
1471 | return err; | 1484 | return err; |
1472 | } | 1485 | } |
1473 | EXPORT_SYMBOL_HDA(snd_hda_mixer_bind_ctls_info); | 1486 | EXPORT_SYMBOL_HDA(snd_hda_mixer_bind_ctls_info); |
@@ -1479,12 +1492,12 @@ int snd_hda_mixer_bind_ctls_get(struct snd_kcontrol *kcontrol, | |||
1479 | struct hda_bind_ctls *c; | 1492 | struct hda_bind_ctls *c; |
1480 | int err; | 1493 | int err; |
1481 | 1494 | ||
1482 | mutex_lock(&codec->spdif_mutex); /* reuse spdif_mutex */ | 1495 | mutex_lock(&codec->control_mutex); |
1483 | c = (struct hda_bind_ctls *)kcontrol->private_value; | 1496 | c = (struct hda_bind_ctls *)kcontrol->private_value; |
1484 | kcontrol->private_value = *c->values; | 1497 | kcontrol->private_value = *c->values; |
1485 | err = c->ops->get(kcontrol, ucontrol); | 1498 | err = c->ops->get(kcontrol, ucontrol); |
1486 | kcontrol->private_value = (long)c; | 1499 | kcontrol->private_value = (long)c; |
1487 | mutex_unlock(&codec->spdif_mutex); | 1500 | mutex_unlock(&codec->control_mutex); |
1488 | return err; | 1501 | return err; |
1489 | } | 1502 | } |
1490 | EXPORT_SYMBOL_HDA(snd_hda_mixer_bind_ctls_get); | 1503 | EXPORT_SYMBOL_HDA(snd_hda_mixer_bind_ctls_get); |
@@ -1497,7 +1510,7 @@ int snd_hda_mixer_bind_ctls_put(struct snd_kcontrol *kcontrol, | |||
1497 | unsigned long *vals; | 1510 | unsigned long *vals; |
1498 | int err = 0, change = 0; | 1511 | int err = 0, change = 0; |
1499 | 1512 | ||
1500 | mutex_lock(&codec->spdif_mutex); /* reuse spdif_mutex */ | 1513 | mutex_lock(&codec->control_mutex); |
1501 | c = (struct hda_bind_ctls *)kcontrol->private_value; | 1514 | c = (struct hda_bind_ctls *)kcontrol->private_value; |
1502 | for (vals = c->values; *vals; vals++) { | 1515 | for (vals = c->values; *vals; vals++) { |
1503 | kcontrol->private_value = *vals; | 1516 | kcontrol->private_value = *vals; |
@@ -1507,7 +1520,7 @@ int snd_hda_mixer_bind_ctls_put(struct snd_kcontrol *kcontrol, | |||
1507 | change |= err; | 1520 | change |= err; |
1508 | } | 1521 | } |
1509 | kcontrol->private_value = (long)c; | 1522 | kcontrol->private_value = (long)c; |
1510 | mutex_unlock(&codec->spdif_mutex); | 1523 | mutex_unlock(&codec->control_mutex); |
1511 | return err < 0 ? err : change; | 1524 | return err < 0 ? err : change; |
1512 | } | 1525 | } |
1513 | EXPORT_SYMBOL_HDA(snd_hda_mixer_bind_ctls_put); | 1526 | EXPORT_SYMBOL_HDA(snd_hda_mixer_bind_ctls_put); |
@@ -1519,12 +1532,12 @@ int snd_hda_mixer_bind_tlv(struct snd_kcontrol *kcontrol, int op_flag, | |||
1519 | struct hda_bind_ctls *c; | 1532 | struct hda_bind_ctls *c; |
1520 | int err; | 1533 | int err; |
1521 | 1534 | ||
1522 | mutex_lock(&codec->spdif_mutex); /* reuse spdif_mutex */ | 1535 | mutex_lock(&codec->control_mutex); |
1523 | c = (struct hda_bind_ctls *)kcontrol->private_value; | 1536 | c = (struct hda_bind_ctls *)kcontrol->private_value; |
1524 | kcontrol->private_value = *c->values; | 1537 | kcontrol->private_value = *c->values; |
1525 | err = c->ops->tlv(kcontrol, op_flag, size, tlv); | 1538 | err = c->ops->tlv(kcontrol, op_flag, size, tlv); |
1526 | kcontrol->private_value = (long)c; | 1539 | kcontrol->private_value = (long)c; |
1527 | mutex_unlock(&codec->spdif_mutex); | 1540 | mutex_unlock(&codec->control_mutex); |
1528 | return err; | 1541 | return err; |
1529 | } | 1542 | } |
1530 | EXPORT_SYMBOL_HDA(snd_hda_mixer_bind_tlv); | 1543 | EXPORT_SYMBOL_HDA(snd_hda_mixer_bind_tlv); |
@@ -2712,6 +2725,67 @@ int snd_hda_check_board_config(struct hda_codec *codec, | |||
2712 | EXPORT_SYMBOL_HDA(snd_hda_check_board_config); | 2725 | EXPORT_SYMBOL_HDA(snd_hda_check_board_config); |
2713 | 2726 | ||
2714 | /** | 2727 | /** |
2728 | * snd_hda_check_board_codec_sid_config - compare the current codec | ||
2729 | subsystem ID with the | ||
2730 | config table | ||
2731 | |||
2732 | This is important for Gateway notebooks with SB450 HDA Audio | ||
2733 | where the vendor ID of the PCI device is: | ||
2734 | ATI Technologies Inc SB450 HDA Audio [1002:437b] | ||
2735 | and the vendor/subvendor are found only at the codec. | ||
2736 | |||
2737 | * @codec: the HDA codec | ||
2738 | * @num_configs: number of config enums | ||
2739 | * @models: array of model name strings | ||
2740 | * @tbl: configuration table, terminated by null entries | ||
2741 | * | ||
2742 | * Compares the modelname or PCI subsystem id of the current codec with the | ||
2743 | * given configuration table. If a matching entry is found, returns its | ||
2744 | * config value (supposed to be 0 or positive). | ||
2745 | * | ||
2746 | * If no entries are matching, the function returns a negative value. | ||
2747 | */ | ||
2748 | int snd_hda_check_board_codec_sid_config(struct hda_codec *codec, | ||
2749 | int num_configs, const char **models, | ||
2750 | const struct snd_pci_quirk *tbl) | ||
2751 | { | ||
2752 | const struct snd_pci_quirk *q; | ||
2753 | |||
2754 | /* Search for codec ID */ | ||
2755 | for (q = tbl; q->subvendor; q++) { | ||
2756 | unsigned long vendorid = (q->subdevice) | (q->subvendor << 16); | ||
2757 | |||
2758 | if (vendorid == codec->subsystem_id) | ||
2759 | break; | ||
2760 | } | ||
2761 | |||
2762 | if (!q->subvendor) | ||
2763 | return -1; | ||
2764 | |||
2765 | tbl = q; | ||
2766 | |||
2767 | if (tbl->value >= 0 && tbl->value < num_configs) { | ||
2768 | #ifdef CONFIG_SND_DEBUG_DETECT | ||
2769 | char tmp[10]; | ||
2770 | const char *model = NULL; | ||
2771 | if (models) | ||
2772 | model = models[tbl->value]; | ||
2773 | if (!model) { | ||
2774 | sprintf(tmp, "#%d", tbl->value); | ||
2775 | model = tmp; | ||
2776 | } | ||
2777 | snd_printdd(KERN_INFO "hda_codec: model '%s' is selected " | ||
2778 | "for config %x:%x (%s)\n", | ||
2779 | model, tbl->subvendor, tbl->subdevice, | ||
2780 | (tbl->name ? tbl->name : "Unknown device")); | ||
2781 | #endif | ||
2782 | return tbl->value; | ||
2783 | } | ||
2784 | return -1; | ||
2785 | } | ||
2786 | EXPORT_SYMBOL_HDA(snd_hda_check_board_codec_sid_config); | ||
2787 | |||
2788 | /** | ||
2715 | * snd_hda_add_new_ctls - create controls from the array | 2789 | * snd_hda_add_new_ctls - create controls from the array |
2716 | * @codec: the HDA codec | 2790 | * @codec: the HDA codec |
2717 | * @knew: the array of struct snd_kcontrol_new | 2791 | * @knew: the array of struct snd_kcontrol_new |
@@ -2803,7 +2877,7 @@ void snd_hda_power_down(struct hda_codec *codec) | |||
2803 | return; | 2877 | return; |
2804 | if (power_save(codec)) { | 2878 | if (power_save(codec)) { |
2805 | codec->power_transition = 1; /* avoid reentrance */ | 2879 | codec->power_transition = 1; /* avoid reentrance */ |
2806 | schedule_delayed_work(&codec->power_work, | 2880 | queue_delayed_work(codec->bus->workq, &codec->power_work, |
2807 | msecs_to_jiffies(power_save(codec) * 1000)); | 2881 | msecs_to_jiffies(power_save(codec) * 1000)); |
2808 | } | 2882 | } |
2809 | } | 2883 | } |
@@ -3014,6 +3088,16 @@ int snd_hda_multi_out_dig_prepare(struct hda_codec *codec, | |||
3014 | } | 3088 | } |
3015 | EXPORT_SYMBOL_HDA(snd_hda_multi_out_dig_prepare); | 3089 | EXPORT_SYMBOL_HDA(snd_hda_multi_out_dig_prepare); |
3016 | 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 | |||
3017 | /* | 3101 | /* |
3018 | * release the digital out | 3102 | * release the digital out |
3019 | */ | 3103 | */ |
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index 729fc7642d7..09a332ada0c 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h | |||
@@ -614,6 +614,8 @@ 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]; | ||
618 | struct workqueue_struct *workq; /* common workqueue for codecs */ | ||
617 | 619 | ||
618 | /* assigned PCMs */ | 620 | /* assigned PCMs */ |
619 | DECLARE_BITMAP(pcm_dev_bits, SNDRV_PCM_DEVICES); | 621 | DECLARE_BITMAP(pcm_dev_bits, SNDRV_PCM_DEVICES); |
@@ -771,6 +773,7 @@ struct hda_codec { | |||
771 | struct hda_cache_rec cmd_cache; /* cache for other commands */ | 773 | struct hda_cache_rec cmd_cache; /* cache for other commands */ |
772 | 774 | ||
773 | struct mutex spdif_mutex; | 775 | struct mutex spdif_mutex; |
776 | struct mutex control_mutex; | ||
774 | unsigned int spdif_status; /* IEC958 status bits */ | 777 | unsigned int spdif_status; /* IEC958 status bits */ |
775 | unsigned short spdif_ctls; /* SPDIF control bits */ | 778 | unsigned short spdif_ctls; /* SPDIF control bits */ |
776 | unsigned int spdif_in_enable; /* SPDIF input enable? */ | 779 | unsigned int spdif_in_enable; /* SPDIF input enable? */ |
diff --git a/sound/pci/hda/hda_hwdep.c b/sound/pci/hda/hda_hwdep.c index 300ab407cf4..482fb0304ca 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 | /* |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index ad5df2ae6f7..f9603443f08 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -996,10 +996,11 @@ static irqreturn_t azx_interrupt(int irq, void *dev_id) | |||
996 | spin_unlock(&chip->reg_lock); | 996 | spin_unlock(&chip->reg_lock); |
997 | snd_pcm_period_elapsed(azx_dev->substream); | 997 | snd_pcm_period_elapsed(azx_dev->substream); |
998 | spin_lock(&chip->reg_lock); | 998 | spin_lock(&chip->reg_lock); |
999 | } else { | 999 | } else if (chip->bus && chip->bus->workq) { |
1000 | /* bogus IRQ, process it later */ | 1000 | /* bogus IRQ, process it later */ |
1001 | azx_dev->irq_pending = 1; | 1001 | azx_dev->irq_pending = 1; |
1002 | schedule_work(&chip->irq_pending_work); | 1002 | queue_work(chip->bus->workq, |
1003 | &chip->irq_pending_work); | ||
1003 | } | 1004 | } |
1004 | } | 1005 | } |
1005 | } | 1006 | } |
@@ -1741,7 +1742,6 @@ static void azx_clear_irq_pending(struct azx *chip) | |||
1741 | for (i = 0; i < chip->num_streams; i++) | 1742 | for (i = 0; i < chip->num_streams; i++) |
1742 | chip->azx_dev[i].irq_pending = 0; | 1743 | chip->azx_dev[i].irq_pending = 0; |
1743 | spin_unlock_irq(&chip->reg_lock); | 1744 | spin_unlock_irq(&chip->reg_lock); |
1744 | flush_scheduled_work(); | ||
1745 | } | 1745 | } |
1746 | 1746 | ||
1747 | static struct snd_pcm_ops azx_pcm_ops = { | 1747 | static struct snd_pcm_ops azx_pcm_ops = { |
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index 6f2fe0f9fdd..44f189cb97a 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, |
@@ -296,6 +298,9 @@ void snd_print_pcm_bits(int pcm, char *buf, int buflen); | |||
296 | int snd_hda_check_board_config(struct hda_codec *codec, int num_configs, | 298 | int snd_hda_check_board_config(struct hda_codec *codec, int num_configs, |
297 | const char **modelnames, | 299 | const char **modelnames, |
298 | const struct snd_pci_quirk *pci_list); | 300 | const struct snd_pci_quirk *pci_list); |
301 | int snd_hda_check_board_codec_sid_config(struct hda_codec *codec, | ||
302 | int num_configs, const char **models, | ||
303 | const struct snd_pci_quirk *tbl); | ||
299 | int snd_hda_add_new_ctls(struct hda_codec *codec, | 304 | int snd_hda_add_new_ctls(struct hda_codec *codec, |
300 | struct snd_kcontrol_new *knew); | 305 | struct snd_kcontrol_new *knew); |
301 | 306 | ||
diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c index 7ca66d65414..144b85276d5 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 26247cfe749..e48612323aa 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 = { |
@@ -3900,6 +3909,7 @@ static const char *ad1884a_models[AD1884A_MODELS] = { | |||
3900 | 3909 | ||
3901 | static struct snd_pci_quirk ad1884a_cfg_tbl[] = { | 3910 | static struct snd_pci_quirk ad1884a_cfg_tbl[] = { |
3902 | SND_PCI_QUIRK(0x103c, 0x3030, "HP", AD1884A_MOBILE), | 3911 | SND_PCI_QUIRK(0x103c, 0x3030, "HP", AD1884A_MOBILE), |
3912 | SND_PCI_QUIRK(0x103c, 0x3037, "HP 2230s", AD1884A_LAPTOP), | ||
3903 | SND_PCI_QUIRK(0x103c, 0x3056, "HP", AD1884A_MOBILE), | 3913 | SND_PCI_QUIRK(0x103c, 0x3056, "HP", AD1884A_MOBILE), |
3904 | SND_PCI_QUIRK(0x103c, 0x30e6, "HP 6730b", AD1884A_LAPTOP), | 3914 | SND_PCI_QUIRK(0x103c, 0x30e6, "HP 6730b", AD1884A_LAPTOP), |
3905 | SND_PCI_QUIRK(0x103c, 0x30e7, "HP EliteBook 8530p", AD1884A_LAPTOP), | 3915 | SND_PCI_QUIRK(0x103c, 0x30e7, "HP EliteBook 8530p", AD1884A_LAPTOP), |
@@ -4262,13 +4272,13 @@ static int patch_ad1882(struct hda_codec *codec) | |||
4262 | spec->num_adc_nids = ARRAY_SIZE(ad1882_adc_nids); | 4272 | spec->num_adc_nids = ARRAY_SIZE(ad1882_adc_nids); |
4263 | spec->adc_nids = ad1882_adc_nids; | 4273 | spec->adc_nids = ad1882_adc_nids; |
4264 | spec->capsrc_nids = ad1882_capsrc_nids; | 4274 | spec->capsrc_nids = ad1882_capsrc_nids; |
4265 | if (codec->vendor_id == 0x11d1882) | 4275 | if (codec->vendor_id == 0x11d41882) |
4266 | spec->input_mux = &ad1882_capture_source; | 4276 | spec->input_mux = &ad1882_capture_source; |
4267 | else | 4277 | else |
4268 | spec->input_mux = &ad1882a_capture_source; | 4278 | spec->input_mux = &ad1882a_capture_source; |
4269 | spec->num_mixers = 2; | 4279 | spec->num_mixers = 2; |
4270 | spec->mixers[0] = ad1882_base_mixers; | 4280 | spec->mixers[0] = ad1882_base_mixers; |
4271 | if (codec->vendor_id == 0x11d1882) | 4281 | if (codec->vendor_id == 0x11d41882) |
4272 | spec->mixers[1] = ad1882_loopback_mixers; | 4282 | spec->mixers[1] = ad1882_loopback_mixers; |
4273 | else | 4283 | else |
4274 | spec->mixers[1] = ad1882a_loopback_mixers; | 4284 | spec->mixers[1] = ad1882a_loopback_mixers; |
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 75de40aaab0..0177ef8f4c9 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 3564f4e4b74..fcc77fec448 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_nvhdmi.c b/sound/pci/hda/patch_nvhdmi.c index 0270fda0bda..d57d8132a06 100644 --- a/sound/pci/hda/patch_nvhdmi.c +++ b/sound/pci/hda/patch_nvhdmi.c | |||
@@ -160,14 +160,18 @@ static int patch_nvhdmi(struct hda_codec *codec) | |||
160 | */ | 160 | */ |
161 | static struct hda_codec_preset snd_hda_preset_nvhdmi[] = { | 161 | static struct hda_codec_preset snd_hda_preset_nvhdmi[] = { |
162 | { .id = 0x10de0002, .name = "MCP78 HDMI", .patch = patch_nvhdmi }, | 162 | { .id = 0x10de0002, .name = "MCP78 HDMI", .patch = patch_nvhdmi }, |
163 | { .id = 0x10de0006, .name = "MCP78 HDMI", .patch = patch_nvhdmi }, | ||
163 | { .id = 0x10de0007, .name = "MCP7A HDMI", .patch = patch_nvhdmi }, | 164 | { .id = 0x10de0007, .name = "MCP7A HDMI", .patch = patch_nvhdmi }, |
164 | { .id = 0x10de0067, .name = "MCP67 HDMI", .patch = patch_nvhdmi }, | 165 | { .id = 0x10de0067, .name = "MCP67 HDMI", .patch = patch_nvhdmi }, |
166 | { .id = 0x10de8001, .name = "MCP73 HDMI", .patch = patch_nvhdmi }, | ||
165 | {} /* terminator */ | 167 | {} /* terminator */ |
166 | }; | 168 | }; |
167 | 169 | ||
168 | MODULE_ALIAS("snd-hda-codec-id:10de0002"); | 170 | MODULE_ALIAS("snd-hda-codec-id:10de0002"); |
171 | MODULE_ALIAS("snd-hda-codec-id:10de0006"); | ||
169 | MODULE_ALIAS("snd-hda-codec-id:10de0007"); | 172 | MODULE_ALIAS("snd-hda-codec-id:10de0007"); |
170 | MODULE_ALIAS("snd-hda-codec-id:10de0067"); | 173 | MODULE_ALIAS("snd-hda-codec-id:10de0067"); |
174 | MODULE_ALIAS("snd-hda-codec-id:10de8001"); | ||
171 | 175 | ||
172 | MODULE_LICENSE("GPL"); | 176 | MODULE_LICENSE("GPL"); |
173 | MODULE_DESCRIPTION("Nvidia HDMI HD-audio codec"); | 177 | MODULE_DESCRIPTION("Nvidia HDMI HD-audio codec"); |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 9065ebf9c06..ed8fcbd6000 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); |
@@ -1502,11 +1504,11 @@ static int alc_cap_vol_info(struct snd_kcontrol *kcontrol, | |||
1502 | struct alc_spec *spec = codec->spec; | 1504 | struct alc_spec *spec = codec->spec; |
1503 | int err; | 1505 | int err; |
1504 | 1506 | ||
1505 | mutex_lock(&codec->spdif_mutex); /* reuse spdif_mutex */ | 1507 | mutex_lock(&codec->control_mutex); |
1506 | kcontrol->private_value = HDA_COMPOSE_AMP_VAL(spec->adc_nids[0], 3, 0, | 1508 | kcontrol->private_value = HDA_COMPOSE_AMP_VAL(spec->adc_nids[0], 3, 0, |
1507 | HDA_INPUT); | 1509 | HDA_INPUT); |
1508 | err = snd_hda_mixer_amp_volume_info(kcontrol, uinfo); | 1510 | err = snd_hda_mixer_amp_volume_info(kcontrol, uinfo); |
1509 | mutex_unlock(&codec->spdif_mutex); /* reuse spdif_mutex */ | 1511 | mutex_unlock(&codec->control_mutex); |
1510 | return err; | 1512 | return err; |
1511 | } | 1513 | } |
1512 | 1514 | ||
@@ -1517,11 +1519,11 @@ static int alc_cap_vol_tlv(struct snd_kcontrol *kcontrol, int op_flag, | |||
1517 | struct alc_spec *spec = codec->spec; | 1519 | struct alc_spec *spec = codec->spec; |
1518 | int err; | 1520 | int err; |
1519 | 1521 | ||
1520 | mutex_lock(&codec->spdif_mutex); /* reuse spdif_mutex */ | 1522 | mutex_lock(&codec->control_mutex); |
1521 | kcontrol->private_value = HDA_COMPOSE_AMP_VAL(spec->adc_nids[0], 3, 0, | 1523 | kcontrol->private_value = HDA_COMPOSE_AMP_VAL(spec->adc_nids[0], 3, 0, |
1522 | HDA_INPUT); | 1524 | HDA_INPUT); |
1523 | err = snd_hda_mixer_amp_tlv(kcontrol, op_flag, size, tlv); | 1525 | err = snd_hda_mixer_amp_tlv(kcontrol, op_flag, size, tlv); |
1524 | mutex_unlock(&codec->spdif_mutex); /* reuse spdif_mutex */ | 1526 | mutex_unlock(&codec->control_mutex); |
1525 | return err; | 1527 | return err; |
1526 | } | 1528 | } |
1527 | 1529 | ||
@@ -1537,11 +1539,11 @@ static int alc_cap_getput_caller(struct snd_kcontrol *kcontrol, | |||
1537 | unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); | 1539 | unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); |
1538 | int err; | 1540 | int err; |
1539 | 1541 | ||
1540 | mutex_lock(&codec->spdif_mutex); /* reuse spdif_mutex */ | 1542 | mutex_lock(&codec->control_mutex); |
1541 | kcontrol->private_value = HDA_COMPOSE_AMP_VAL(spec->adc_nids[adc_idx], | 1543 | kcontrol->private_value = HDA_COMPOSE_AMP_VAL(spec->adc_nids[adc_idx], |
1542 | 3, 0, HDA_INPUT); | 1544 | 3, 0, HDA_INPUT); |
1543 | err = func(kcontrol, ucontrol); | 1545 | err = func(kcontrol, ucontrol); |
1544 | mutex_unlock(&codec->spdif_mutex); /* reuse spdif_mutex */ | 1546 | mutex_unlock(&codec->control_mutex); |
1545 | return err; | 1547 | return err; |
1546 | } | 1548 | } |
1547 | 1549 | ||
@@ -7012,12 +7014,14 @@ 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; |
7017 | case 0x106b00a1: /* Macbook (might be wrong - PCI SSID?) */ | 7020 | case 0x106b00a1: /* Macbook (might be wrong - PCI SSID?) */ |
7018 | case 0x106b00a4: /* MacbookPro4,1 */ | 7021 | case 0x106b00a4: /* MacbookPro4,1 */ |
7019 | case 0x106b2c00: /* Macbook Pro rev3 */ | 7022 | case 0x106b2c00: /* Macbook Pro rev3 */ |
7020 | case 0x106b3600: /* Macbook 3.1 */ | 7023 | case 0x106b3600: /* Macbook 3.1 */ |
7024 | case 0x106b3800: /* MacbookPro4,1 - latter revision */ | ||
7021 | board_config = ALC885_MBP3; | 7025 | board_config = ALC885_MBP3; |
7022 | break; | 7026 | break; |
7023 | default: | 7027 | default: |
@@ -8461,6 +8465,10 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { | |||
8461 | SND_PCI_QUIRK(0x1025, 0x0121, "Acer Aspire 5920G", ALC883_ACER_ASPIRE), | 8465 | SND_PCI_QUIRK(0x1025, 0x0121, "Acer Aspire 5920G", ALC883_ACER_ASPIRE), |
8462 | SND_PCI_QUIRK(0x1025, 0x013e, "Acer Aspire 4930G", | 8466 | SND_PCI_QUIRK(0x1025, 0x013e, "Acer Aspire 4930G", |
8463 | ALC888_ACER_ASPIRE_4930G), | 8467 | ALC888_ACER_ASPIRE_4930G), |
8468 | SND_PCI_QUIRK(0x1025, 0x013f, "Acer Aspire 5930G", | ||
8469 | ALC888_ACER_ASPIRE_4930G), | ||
8470 | SND_PCI_QUIRK(0x1025, 0x015e, "Acer Aspire 6930G", | ||
8471 | ALC888_ACER_ASPIRE_4930G), | ||
8464 | SND_PCI_QUIRK(0x1025, 0, "Acer laptop", ALC883_ACER), /* default Acer */ | 8472 | SND_PCI_QUIRK(0x1025, 0, "Acer laptop", ALC883_ACER), /* default Acer */ |
8465 | SND_PCI_QUIRK(0x1028, 0x020d, "Dell Inspiron 530", ALC888_6ST_DELL), | 8473 | SND_PCI_QUIRK(0x1028, 0x020d, "Dell Inspiron 530", ALC888_6ST_DELL), |
8466 | SND_PCI_QUIRK(0x103c, 0x2a3d, "HP Pavillion", ALC883_6ST_DIG), | 8474 | SND_PCI_QUIRK(0x103c, 0x2a3d, "HP Pavillion", ALC883_6ST_DIG), |
@@ -8470,10 +8478,12 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { | |||
8470 | SND_PCI_QUIRK(0x103c, 0x2a66, "HP Acacia", ALC888_3ST_HP), | 8478 | SND_PCI_QUIRK(0x103c, 0x2a66, "HP Acacia", ALC888_3ST_HP), |
8471 | SND_PCI_QUIRK(0x1043, 0x1873, "Asus M90V", ALC888_ASUS_M90V), | 8479 | SND_PCI_QUIRK(0x1043, 0x1873, "Asus M90V", ALC888_ASUS_M90V), |
8472 | SND_PCI_QUIRK(0x1043, 0x8249, "Asus M2A-VM HDMI", ALC883_3ST_6ch_DIG), | 8480 | SND_PCI_QUIRK(0x1043, 0x8249, "Asus M2A-VM HDMI", ALC883_3ST_6ch_DIG), |
8481 | SND_PCI_QUIRK(0x1043, 0x8284, "Asus Z37E", ALC883_6ST_DIG), | ||
8473 | SND_PCI_QUIRK(0x1043, 0x82fe, "Asus P5Q-EM HDMI", ALC1200_ASUS_P5Q), | 8482 | SND_PCI_QUIRK(0x1043, 0x82fe, "Asus P5Q-EM HDMI", ALC1200_ASUS_P5Q), |
8474 | SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_ASUS_EEE1601), | 8483 | SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_ASUS_EEE1601), |
8475 | SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG), | 8484 | SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG), |
8476 | SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC883_6ST_DIG), | 8485 | SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC883_6ST_DIG), |
8486 | SND_PCI_QUIRK(0x1071, 0x8227, "Mitac 82801H", ALC883_MITAC), | ||
8477 | SND_PCI_QUIRK(0x1071, 0x8253, "Mitac 8252d", ALC883_MITAC), | 8487 | SND_PCI_QUIRK(0x1071, 0x8253, "Mitac 8252d", ALC883_MITAC), |
8478 | SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD), | 8488 | SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD), |
8479 | SND_PCI_QUIRK(0x10f1, 0x2350, "TYAN-S2350", ALC888_6ST_DELL), | 8489 | SND_PCI_QUIRK(0x10f1, 0x2350, "TYAN-S2350", ALC888_6ST_DELL), |
@@ -8508,6 +8518,8 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { | |||
8508 | SND_PCI_QUIRK(0x1558, 0, "Clevo laptop", ALC883_LAPTOP_EAPD), | 8518 | SND_PCI_QUIRK(0x1558, 0, "Clevo laptop", ALC883_LAPTOP_EAPD), |
8509 | SND_PCI_QUIRK(0x15d9, 0x8780, "Supermicro PDSBA", ALC883_3ST_6ch), | 8519 | SND_PCI_QUIRK(0x15d9, 0x8780, "Supermicro PDSBA", ALC883_3ST_6ch), |
8510 | SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_MEDION), | 8520 | SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_MEDION), |
8521 | SND_PCI_QUIRK(0x1734, 0x1107, "FSC AMILO Xi2550", | ||
8522 | ALC883_FUJITSU_PI2515), | ||
8511 | SND_PCI_QUIRK(0x1734, 0x1108, "Fujitsu AMILO Pi2515", ALC883_FUJITSU_PI2515), | 8523 | SND_PCI_QUIRK(0x1734, 0x1108, "Fujitsu AMILO Pi2515", ALC883_FUJITSU_PI2515), |
8512 | SND_PCI_QUIRK(0x1734, 0x113d, "Fujitsu AMILO Xa3530", | 8524 | SND_PCI_QUIRK(0x1734, 0x113d, "Fujitsu AMILO Xa3530", |
8513 | ALC888_FUJITSU_XA3530), | 8525 | ALC888_FUJITSU_XA3530), |
@@ -8522,6 +8534,8 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { | |||
8522 | SND_PCI_QUIRK(0x1991, 0x5625, "Haier W66", ALC883_HAIER_W66), | 8534 | SND_PCI_QUIRK(0x1991, 0x5625, "Haier W66", ALC883_HAIER_W66), |
8523 | SND_PCI_QUIRK(0x8086, 0x0001, "DG33BUC", ALC883_3ST_6ch_INTEL), | 8535 | SND_PCI_QUIRK(0x8086, 0x0001, "DG33BUC", ALC883_3ST_6ch_INTEL), |
8524 | SND_PCI_QUIRK(0x8086, 0x0002, "DG33FBC", ALC883_3ST_6ch_INTEL), | 8536 | SND_PCI_QUIRK(0x8086, 0x0002, "DG33FBC", ALC883_3ST_6ch_INTEL), |
8537 | SND_PCI_QUIRK(0x8086, 0x2503, "82801H", ALC883_MITAC), | ||
8538 | SND_PCI_QUIRK(0x8086, 0x0022, "DX58SO", ALC883_3ST_6ch_INTEL), | ||
8525 | SND_PCI_QUIRK(0x8086, 0xd601, "D102GGC", ALC883_3ST_6ch), | 8539 | SND_PCI_QUIRK(0x8086, 0xd601, "D102GGC", ALC883_3ST_6ch), |
8526 | {} | 8540 | {} |
8527 | }; | 8541 | }; |
@@ -10568,6 +10582,7 @@ static struct snd_pci_quirk alc262_cfg_tbl[] = { | |||
10568 | SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FUJITSU), | 10582 | SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FUJITSU), |
10569 | SND_PCI_QUIRK(0x144d, 0xc032, "Samsung Q1 Ultra", ALC262_ULTRA), | 10583 | SND_PCI_QUIRK(0x144d, 0xc032, "Samsung Q1 Ultra", ALC262_ULTRA), |
10570 | SND_PCI_QUIRK(0x144d, 0xc039, "Samsung Q1U EL", ALC262_ULTRA), | 10584 | SND_PCI_QUIRK(0x144d, 0xc039, "Samsung Q1U EL", ALC262_ULTRA), |
10585 | SND_PCI_QUIRK(0x144d, 0xc510, "Samsung Q45", ALC262_HIPPO), | ||
10571 | SND_PCI_QUIRK(0x17aa, 0x384e, "Lenovo 3000 y410", ALC262_LENOVO_3000), | 10586 | SND_PCI_QUIRK(0x17aa, 0x384e, "Lenovo 3000 y410", ALC262_LENOVO_3000), |
10572 | SND_PCI_QUIRK(0x17ff, 0x0560, "Benq ED8", ALC262_BENQ_ED8), | 10587 | SND_PCI_QUIRK(0x17ff, 0x0560, "Benq ED8", ALC262_BENQ_ED8), |
10573 | SND_PCI_QUIRK(0x17ff, 0x058d, "Benq T31-16", ALC262_BENQ_T31), | 10588 | SND_PCI_QUIRK(0x17ff, 0x058d, "Benq T31-16", ALC262_BENQ_T31), |
@@ -11689,6 +11704,7 @@ static struct snd_pci_quirk alc268_cfg_tbl[] = { | |||
11689 | SND_PCI_QUIRK(0x1025, 0x015b, "Acer Aspire One", | 11704 | SND_PCI_QUIRK(0x1025, 0x015b, "Acer Aspire One", |
11690 | ALC268_ACER_ASPIRE_ONE), | 11705 | ALC268_ACER_ASPIRE_ONE), |
11691 | SND_PCI_QUIRK(0x1028, 0x0253, "Dell OEM", ALC268_DELL), | 11706 | SND_PCI_QUIRK(0x1028, 0x0253, "Dell OEM", ALC268_DELL), |
11707 | SND_PCI_QUIRK(0x1028, 0x02b0, "Dell Inspiron Mini9", ALC268_DELL), | ||
11692 | SND_PCI_QUIRK(0x103c, 0x30cc, "TOSHIBA", ALC268_TOSHIBA), | 11708 | SND_PCI_QUIRK(0x103c, 0x30cc, "TOSHIBA", ALC268_TOSHIBA), |
11693 | SND_PCI_QUIRK(0x1043, 0x1205, "ASUS W7J", ALC268_3ST), | 11709 | SND_PCI_QUIRK(0x1043, 0x1205, "ASUS W7J", ALC268_3ST), |
11694 | SND_PCI_QUIRK(0x1179, 0xff10, "TOSHIBA A205", ALC268_TOSHIBA), | 11710 | SND_PCI_QUIRK(0x1179, 0xff10, "TOSHIBA A205", ALC268_TOSHIBA), |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 35b83dc6e19..8027edf3c8f 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -55,7 +55,8 @@ enum { | |||
55 | STAC_9200_DELL_M25, | 55 | STAC_9200_DELL_M25, |
56 | STAC_9200_DELL_M26, | 56 | STAC_9200_DELL_M26, |
57 | STAC_9200_DELL_M27, | 57 | STAC_9200_DELL_M27, |
58 | STAC_9200_GATEWAY, | 58 | STAC_9200_M4, |
59 | STAC_9200_M4_2, | ||
59 | STAC_9200_PANASONIC, | 60 | STAC_9200_PANASONIC, |
60 | STAC_9200_MODELS | 61 | STAC_9200_MODELS |
61 | }; | 62 | }; |
@@ -80,6 +81,7 @@ enum { | |||
80 | 81 | ||
81 | enum { | 82 | enum { |
82 | STAC_92HD83XXX_REF, | 83 | STAC_92HD83XXX_REF, |
84 | STAC_92HD83XXX_PWR_REF, | ||
83 | STAC_92HD83XXX_MODELS | 85 | STAC_92HD83XXX_MODELS |
84 | }; | 86 | }; |
85 | 87 | ||
@@ -89,14 +91,19 @@ enum { | |||
89 | STAC_DELL_M4_2, | 91 | STAC_DELL_M4_2, |
90 | STAC_DELL_M4_3, | 92 | STAC_DELL_M4_3, |
91 | STAC_HP_M4, | 93 | STAC_HP_M4, |
94 | STAC_HP_DV5, | ||
92 | STAC_92HD71BXX_MODELS | 95 | STAC_92HD71BXX_MODELS |
93 | }; | 96 | }; |
94 | 97 | ||
95 | enum { | 98 | enum { |
96 | STAC_925x_REF, | 99 | STAC_925x_REF, |
100 | STAC_M1, | ||
101 | STAC_M1_2, | ||
102 | STAC_M2, | ||
97 | STAC_M2_2, | 103 | STAC_M2_2, |
98 | STAC_MA6, | 104 | STAC_M3, |
99 | STAC_PA6, | 105 | STAC_M5, |
106 | STAC_M6, | ||
100 | STAC_925x_MODELS | 107 | STAC_925x_MODELS |
101 | }; | 108 | }; |
102 | 109 | ||
@@ -328,7 +335,11 @@ static hda_nid_t stac92hd83xxx_slave_dig_outs[2] = { | |||
328 | }; | 335 | }; |
329 | 336 | ||
330 | static unsigned int stac92hd83xxx_pwr_mapping[4] = { | 337 | static unsigned int stac92hd83xxx_pwr_mapping[4] = { |
331 | 0x03, 0x0c, 0x10, 0x40, | 338 | 0x03, 0x0c, 0x20, 0x40, |
339 | }; | ||
340 | |||
341 | static hda_nid_t stac92hd83xxx_amp_nids[1] = { | ||
342 | 0xc, | ||
332 | }; | 343 | }; |
333 | 344 | ||
334 | static hda_nid_t stac92hd71bxx_pwr_nids[3] = { | 345 | static hda_nid_t stac92hd71bxx_pwr_nids[3] = { |
@@ -831,10 +842,6 @@ static struct hda_verb stac92hd73xx_10ch_core_init[] = { | |||
831 | }; | 842 | }; |
832 | 843 | ||
833 | static struct hda_verb stac92hd83xxx_core_init[] = { | 844 | static struct hda_verb stac92hd83xxx_core_init[] = { |
834 | /* start of config #1 */ | ||
835 | { 0xe, AC_VERB_SET_CONNECT_SEL, 0x3}, | ||
836 | |||
837 | /* start of config #2 */ | ||
838 | { 0xa, AC_VERB_SET_CONNECT_SEL, 0x0}, | 845 | { 0xa, AC_VERB_SET_CONNECT_SEL, 0x0}, |
839 | { 0xb, AC_VERB_SET_CONNECT_SEL, 0x0}, | 846 | { 0xb, AC_VERB_SET_CONNECT_SEL, 0x0}, |
840 | { 0xd, AC_VERB_SET_CONNECT_SEL, 0x1}, | 847 | { 0xd, AC_VERB_SET_CONNECT_SEL, 0x1}, |
@@ -875,6 +882,8 @@ static struct hda_verb stac92hd71bxx_analog_core_init[] = { | |||
875 | static struct hda_verb stac925x_core_init[] = { | 882 | static struct hda_verb stac925x_core_init[] = { |
876 | /* set dac0mux for dac converter */ | 883 | /* set dac0mux for dac converter */ |
877 | { 0x06, AC_VERB_SET_CONNECT_SEL, 0x00}, | 884 | { 0x06, AC_VERB_SET_CONNECT_SEL, 0x00}, |
885 | /* mute the master volume */ | ||
886 | { 0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, | ||
878 | {} | 887 | {} |
879 | }; | 888 | }; |
880 | 889 | ||
@@ -1126,6 +1135,8 @@ static struct snd_kcontrol_new stac92hd71bxx_mixer[] = { | |||
1126 | }; | 1135 | }; |
1127 | 1136 | ||
1128 | 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), | ||
1129 | STAC_INPUT_SOURCE(1), | 1140 | STAC_INPUT_SOURCE(1), |
1130 | HDA_CODEC_VOLUME("Capture Volume", 0x09, 0, HDA_OUTPUT), | 1141 | HDA_CODEC_VOLUME("Capture Volume", 0x09, 0, HDA_OUTPUT), |
1131 | HDA_CODEC_MUTE("Capture Switch", 0x14, 0, HDA_OUTPUT), | 1142 | HDA_CODEC_MUTE("Capture Switch", 0x14, 0, HDA_OUTPUT), |
@@ -1334,7 +1345,16 @@ static unsigned int ref9200_pin_configs[8] = { | |||
1334 | 0x02a19020, 0x01a19021, 0x90100140, 0x01813122, | 1345 | 0x02a19020, 0x01a19021, 0x90100140, 0x01813122, |
1335 | }; | 1346 | }; |
1336 | 1347 | ||
1337 | /* | 1348 | static unsigned int gateway9200_m4_pin_configs[8] = { |
1349 | 0x400000fe, 0x404500f4, 0x400100f0, 0x90110010, | ||
1350 | 0x400100f1, 0x02a1902e, 0x500000f2, 0x500000f3, | ||
1351 | }; | ||
1352 | static unsigned int gateway9200_m4_2_pin_configs[8] = { | ||
1353 | 0x400000fe, 0x404500f4, 0x400100f0, 0x90110010, | ||
1354 | 0x400100f1, 0x02a1902e, 0x500000f2, 0x500000f3, | ||
1355 | }; | ||
1356 | |||
1357 | /* | ||
1338 | STAC 9200 pin configs for | 1358 | STAC 9200 pin configs for |
1339 | 102801A8 | 1359 | 102801A8 |
1340 | 102801DE | 1360 | 102801DE |
@@ -1464,6 +1484,8 @@ static unsigned int *stac9200_brd_tbl[STAC_9200_MODELS] = { | |||
1464 | [STAC_9200_DELL_M25] = dell9200_m25_pin_configs, | 1484 | [STAC_9200_DELL_M25] = dell9200_m25_pin_configs, |
1465 | [STAC_9200_DELL_M26] = dell9200_m26_pin_configs, | 1485 | [STAC_9200_DELL_M26] = dell9200_m26_pin_configs, |
1466 | [STAC_9200_DELL_M27] = dell9200_m27_pin_configs, | 1486 | [STAC_9200_DELL_M27] = dell9200_m27_pin_configs, |
1487 | [STAC_9200_M4] = gateway9200_m4_pin_configs, | ||
1488 | [STAC_9200_M4_2] = gateway9200_m4_2_pin_configs, | ||
1467 | [STAC_9200_PANASONIC] = ref9200_pin_configs, | 1489 | [STAC_9200_PANASONIC] = ref9200_pin_configs, |
1468 | }; | 1490 | }; |
1469 | 1491 | ||
@@ -1480,7 +1502,8 @@ static const char *stac9200_models[STAC_9200_MODELS] = { | |||
1480 | [STAC_9200_DELL_M25] = "dell-m25", | 1502 | [STAC_9200_DELL_M25] = "dell-m25", |
1481 | [STAC_9200_DELL_M26] = "dell-m26", | 1503 | [STAC_9200_DELL_M26] = "dell-m26", |
1482 | [STAC_9200_DELL_M27] = "dell-m27", | 1504 | [STAC_9200_DELL_M27] = "dell-m27", |
1483 | [STAC_9200_GATEWAY] = "gateway", | 1505 | [STAC_9200_M4] = "gateway-m4", |
1506 | [STAC_9200_M4_2] = "gateway-m4-2", | ||
1484 | [STAC_9200_PANASONIC] = "panasonic", | 1507 | [STAC_9200_PANASONIC] = "panasonic", |
1485 | }; | 1508 | }; |
1486 | 1509 | ||
@@ -1550,11 +1573,9 @@ static struct snd_pci_quirk stac9200_cfg_tbl[] = { | |||
1550 | /* Panasonic */ | 1573 | /* Panasonic */ |
1551 | SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-74", STAC_9200_PANASONIC), | 1574 | SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-74", STAC_9200_PANASONIC), |
1552 | /* Gateway machines needs EAPD to be set on resume */ | 1575 | /* Gateway machines needs EAPD to be set on resume */ |
1553 | SND_PCI_QUIRK(0x107b, 0x0205, "Gateway S-7110M", STAC_9200_GATEWAY), | 1576 | SND_PCI_QUIRK(0x107b, 0x0205, "Gateway S-7110M", STAC_9200_M4), |
1554 | SND_PCI_QUIRK(0x107b, 0x0317, "Gateway MT3423, MX341*", | 1577 | SND_PCI_QUIRK(0x107b, 0x0317, "Gateway MT3423, MX341*", STAC_9200_M4_2), |
1555 | STAC_9200_GATEWAY), | 1578 | SND_PCI_QUIRK(0x107b, 0x0318, "Gateway ML3019, MT3707", STAC_9200_M4_2), |
1556 | SND_PCI_QUIRK(0x107b, 0x0318, "Gateway ML3019, MT3707", | ||
1557 | STAC_9200_GATEWAY), | ||
1558 | /* OQO Mobile */ | 1579 | /* OQO Mobile */ |
1559 | SND_PCI_QUIRK(0x1106, 0x3288, "OQO Model 2", STAC_9200_OQO), | 1580 | SND_PCI_QUIRK(0x1106, 0x3288, "OQO Model 2", STAC_9200_OQO), |
1560 | {} /* terminator */ | 1581 | {} /* terminator */ |
@@ -1565,44 +1586,85 @@ static unsigned int ref925x_pin_configs[8] = { | |||
1565 | 0x90a70320, 0x02214210, 0x01019020, 0x9033032e, | 1586 | 0x90a70320, 0x02214210, 0x01019020, 0x9033032e, |
1566 | }; | 1587 | }; |
1567 | 1588 | ||
1568 | static unsigned int stac925x_MA6_pin_configs[8] = { | 1589 | static unsigned int stac925xM1_pin_configs[8] = { |
1569 | 0x40c003f0, 0x424503f2, 0x01813022, 0x02a19021, | 1590 | 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020, |
1570 | 0x90a70320, 0x90100211, 0x400003f1, 0x9033032e, | 1591 | 0x40a000f0, 0x90100210, 0x400003f1, 0x9033032e, |
1571 | }; | 1592 | }; |
1572 | 1593 | ||
1573 | static unsigned int stac925x_PA6_pin_configs[8] = { | 1594 | static unsigned int stac925xM1_2_pin_configs[8] = { |
1574 | 0x40c003f0, 0x424503f2, 0x01813022, 0x02a19021, | 1595 | 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020, |
1575 | 0x50a103f0, 0x90100211, 0x400003f1, 0x9033032e, | 1596 | 0x40a000f0, 0x90100210, 0x400003f1, 0x9033032e, |
1597 | }; | ||
1598 | |||
1599 | static unsigned int stac925xM2_pin_configs[8] = { | ||
1600 | 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020, | ||
1601 | 0x40a000f0, 0x90100210, 0x400003f1, 0x9033032e, | ||
1576 | }; | 1602 | }; |
1577 | 1603 | ||
1578 | static unsigned int stac925xM2_2_pin_configs[8] = { | 1604 | static unsigned int stac925xM2_2_pin_configs[8] = { |
1579 | 0x40c003f3, 0x424503f2, 0x04180011, 0x02a19020, | 1605 | 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020, |
1580 | 0x50a103f0, 0x90100212, 0x400003f1, 0x9033032e, | 1606 | 0x40a000f0, 0x90100210, 0x400003f1, 0x9033032e, |
1607 | }; | ||
1608 | |||
1609 | static unsigned int stac925xM3_pin_configs[8] = { | ||
1610 | 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020, | ||
1611 | 0x40a000f0, 0x90100210, 0x400003f1, 0x503303f3, | ||
1612 | }; | ||
1613 | |||
1614 | static unsigned int stac925xM5_pin_configs[8] = { | ||
1615 | 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020, | ||
1616 | 0x40a000f0, 0x90100210, 0x400003f1, 0x9033032e, | ||
1617 | }; | ||
1618 | |||
1619 | static unsigned int stac925xM6_pin_configs[8] = { | ||
1620 | 0x40c003f4, 0x424503f2, 0x400000f3, 0x02a19020, | ||
1621 | 0x40a000f0, 0x90100210, 0x400003f1, 0x90330320, | ||
1581 | }; | 1622 | }; |
1582 | 1623 | ||
1583 | static unsigned int *stac925x_brd_tbl[STAC_925x_MODELS] = { | 1624 | static unsigned int *stac925x_brd_tbl[STAC_925x_MODELS] = { |
1584 | [STAC_REF] = ref925x_pin_configs, | 1625 | [STAC_REF] = ref925x_pin_configs, |
1626 | [STAC_M1] = stac925xM1_pin_configs, | ||
1627 | [STAC_M1_2] = stac925xM1_2_pin_configs, | ||
1628 | [STAC_M2] = stac925xM2_pin_configs, | ||
1585 | [STAC_M2_2] = stac925xM2_2_pin_configs, | 1629 | [STAC_M2_2] = stac925xM2_2_pin_configs, |
1586 | [STAC_MA6] = stac925x_MA6_pin_configs, | 1630 | [STAC_M3] = stac925xM3_pin_configs, |
1587 | [STAC_PA6] = stac925x_PA6_pin_configs, | 1631 | [STAC_M5] = stac925xM5_pin_configs, |
1632 | [STAC_M6] = stac925xM6_pin_configs, | ||
1588 | }; | 1633 | }; |
1589 | 1634 | ||
1590 | static const char *stac925x_models[STAC_925x_MODELS] = { | 1635 | static const char *stac925x_models[STAC_925x_MODELS] = { |
1591 | [STAC_REF] = "ref", | 1636 | [STAC_REF] = "ref", |
1637 | [STAC_M1] = "m1", | ||
1638 | [STAC_M1_2] = "m1-2", | ||
1639 | [STAC_M2] = "m2", | ||
1592 | [STAC_M2_2] = "m2-2", | 1640 | [STAC_M2_2] = "m2-2", |
1593 | [STAC_MA6] = "m6", | 1641 | [STAC_M3] = "m3", |
1594 | [STAC_PA6] = "pa6", | 1642 | [STAC_M5] = "m5", |
1643 | [STAC_M6] = "m6", | ||
1644 | }; | ||
1645 | |||
1646 | static struct snd_pci_quirk stac925x_codec_id_cfg_tbl[] = { | ||
1647 | SND_PCI_QUIRK(0x107b, 0x0316, "Gateway M255", STAC_M2), | ||
1648 | SND_PCI_QUIRK(0x107b, 0x0366, "Gateway MP6954", STAC_M5), | ||
1649 | SND_PCI_QUIRK(0x107b, 0x0461, "Gateway NX560XL", STAC_M1), | ||
1650 | SND_PCI_QUIRK(0x107b, 0x0681, "Gateway NX860", STAC_M2), | ||
1651 | SND_PCI_QUIRK(0x107b, 0x0367, "Gateway MX6453", STAC_M1_2), | ||
1652 | /* Not sure about the brand name for those */ | ||
1653 | SND_PCI_QUIRK(0x107b, 0x0281, "Gateway mobile", STAC_M1), | ||
1654 | SND_PCI_QUIRK(0x107b, 0x0507, "Gateway mobile", STAC_M3), | ||
1655 | SND_PCI_QUIRK(0x107b, 0x0281, "Gateway mobile", STAC_M6), | ||
1656 | SND_PCI_QUIRK(0x107b, 0x0685, "Gateway mobile", STAC_M2_2), | ||
1657 | {} /* terminator */ | ||
1595 | }; | 1658 | }; |
1596 | 1659 | ||
1597 | static struct snd_pci_quirk stac925x_cfg_tbl[] = { | 1660 | static struct snd_pci_quirk stac925x_cfg_tbl[] = { |
1598 | /* SigmaTel reference board */ | 1661 | /* SigmaTel reference board */ |
1599 | SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, "DFI LanParty", STAC_REF), | 1662 | SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, "DFI LanParty", STAC_REF), |
1600 | SND_PCI_QUIRK(0x8384, 0x7632, "Stac9202 Reference Board", STAC_REF), | 1663 | SND_PCI_QUIRK(0x8384, 0x7632, "Stac9202 Reference Board", STAC_REF), |
1601 | SND_PCI_QUIRK(0x107b, 0x0316, "Gateway M255", STAC_REF), | 1664 | |
1602 | SND_PCI_QUIRK(0x107b, 0x0366, "Gateway MP6954", STAC_REF), | 1665 | /* Default table for unknown ID */ |
1603 | SND_PCI_QUIRK(0x107b, 0x0461, "Gateway NX560XL", STAC_MA6), | 1666 | SND_PCI_QUIRK(0x1002, 0x437b, "Gateway mobile", STAC_M2_2), |
1604 | SND_PCI_QUIRK(0x107b, 0x0681, "Gateway NX860", STAC_PA6), | 1667 | |
1605 | SND_PCI_QUIRK(0x1002, 0x437b, "Gateway MX6453", STAC_M2_2), | ||
1606 | {} /* terminator */ | 1668 | {} /* terminator */ |
1607 | }; | 1669 | }; |
1608 | 1670 | ||
@@ -1673,16 +1735,18 @@ static unsigned int ref92hd83xxx_pin_configs[14] = { | |||
1673 | 1735 | ||
1674 | static unsigned int *stac92hd83xxx_brd_tbl[STAC_92HD83XXX_MODELS] = { | 1736 | static unsigned int *stac92hd83xxx_brd_tbl[STAC_92HD83XXX_MODELS] = { |
1675 | [STAC_92HD83XXX_REF] = ref92hd83xxx_pin_configs, | 1737 | [STAC_92HD83XXX_REF] = ref92hd83xxx_pin_configs, |
1738 | [STAC_92HD83XXX_PWR_REF] = ref92hd83xxx_pin_configs, | ||
1676 | }; | 1739 | }; |
1677 | 1740 | ||
1678 | static const char *stac92hd83xxx_models[STAC_92HD83XXX_MODELS] = { | 1741 | static const char *stac92hd83xxx_models[STAC_92HD83XXX_MODELS] = { |
1679 | [STAC_92HD83XXX_REF] = "ref", | 1742 | [STAC_92HD83XXX_REF] = "ref", |
1743 | [STAC_92HD83XXX_PWR_REF] = "mic-ref", | ||
1680 | }; | 1744 | }; |
1681 | 1745 | ||
1682 | static struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = { | 1746 | static struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = { |
1683 | /* SigmaTel reference board */ | 1747 | /* SigmaTel reference board */ |
1684 | SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, | 1748 | SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, |
1685 | "DFI LanParty", STAC_92HD71BXX_REF), | 1749 | "DFI LanParty", STAC_92HD83XXX_REF), |
1686 | {} /* terminator */ | 1750 | {} /* terminator */ |
1687 | }; | 1751 | }; |
1688 | 1752 | ||
@@ -1716,6 +1780,7 @@ static unsigned int *stac92hd71bxx_brd_tbl[STAC_92HD71BXX_MODELS] = { | |||
1716 | [STAC_DELL_M4_2] = dell_m4_2_pin_configs, | 1780 | [STAC_DELL_M4_2] = dell_m4_2_pin_configs, |
1717 | [STAC_DELL_M4_3] = dell_m4_3_pin_configs, | 1781 | [STAC_DELL_M4_3] = dell_m4_3_pin_configs, |
1718 | [STAC_HP_M4] = NULL, | 1782 | [STAC_HP_M4] = NULL, |
1783 | [STAC_HP_DV5] = NULL, | ||
1719 | }; | 1784 | }; |
1720 | 1785 | ||
1721 | static const char *stac92hd71bxx_models[STAC_92HD71BXX_MODELS] = { | 1786 | static const char *stac92hd71bxx_models[STAC_92HD71BXX_MODELS] = { |
@@ -1724,6 +1789,7 @@ static const char *stac92hd71bxx_models[STAC_92HD71BXX_MODELS] = { | |||
1724 | [STAC_DELL_M4_2] = "dell-m4-2", | 1789 | [STAC_DELL_M4_2] = "dell-m4-2", |
1725 | [STAC_DELL_M4_3] = "dell-m4-3", | 1790 | [STAC_DELL_M4_3] = "dell-m4-3", |
1726 | [STAC_HP_M4] = "hp-m4", | 1791 | [STAC_HP_M4] = "hp-m4", |
1792 | [STAC_HP_DV5] = "hp-dv5", | ||
1727 | }; | 1793 | }; |
1728 | 1794 | ||
1729 | static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = { | 1795 | static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = { |
@@ -1733,9 +1799,15 @@ static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = { | |||
1733 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f2, | 1799 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f2, |
1734 | "HP dv5", STAC_HP_M4), | 1800 | "HP dv5", STAC_HP_M4), |
1735 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f4, | 1801 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f4, |
1736 | "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), | ||
1737 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30fc, | 1805 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30fc, |
1738 | "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), | ||
1809 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3603, | ||
1810 | "HP dv5", STAC_HP_DV5), | ||
1739 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x361a, | 1811 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x361a, |
1740 | "unknown HP", STAC_HP_M4), | 1812 | "unknown HP", STAC_HP_M4), |
1741 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0233, | 1813 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0233, |
@@ -2370,6 +2442,14 @@ static int stac92xx_dig_playback_pcm_prepare(struct hda_pcm_stream *hinfo, | |||
2370 | stream_tag, format, substream); | 2442 | stream_tag, format, substream); |
2371 | } | 2443 | } |
2372 | 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 | |||
2373 | 2453 | ||
2374 | /* | 2454 | /* |
2375 | * Analog capture callbacks | 2455 | * Analog capture callbacks |
@@ -2414,7 +2494,8 @@ static struct hda_pcm_stream stac92xx_pcm_digital_playback = { | |||
2414 | .ops = { | 2494 | .ops = { |
2415 | .open = stac92xx_dig_playback_pcm_open, | 2495 | .open = stac92xx_dig_playback_pcm_open, |
2416 | .close = stac92xx_dig_playback_pcm_close, | 2496 | .close = stac92xx_dig_playback_pcm_close, |
2417 | .prepare = stac92xx_dig_playback_pcm_prepare | 2497 | .prepare = stac92xx_dig_playback_pcm_prepare, |
2498 | .cleanup = stac92xx_dig_playback_pcm_cleanup | ||
2418 | }, | 2499 | }, |
2419 | }; | 2500 | }; |
2420 | 2501 | ||
@@ -2469,6 +2550,8 @@ static int stac92xx_build_pcms(struct hda_codec *codec) | |||
2469 | 2550 | ||
2470 | info->name = "STAC92xx Analog"; | 2551 | info->name = "STAC92xx Analog"; |
2471 | 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]; | ||
2472 | info->stream[SNDRV_PCM_STREAM_CAPTURE] = stac92xx_pcm_analog_capture; | 2555 | info->stream[SNDRV_PCM_STREAM_CAPTURE] = stac92xx_pcm_analog_capture; |
2473 | info->stream[SNDRV_PCM_STREAM_CAPTURE].nid = spec->adc_nids[0]; | 2556 | info->stream[SNDRV_PCM_STREAM_CAPTURE].nid = spec->adc_nids[0]; |
2474 | info->stream[SNDRV_PCM_STREAM_CAPTURE].substreams = spec->num_adcs; | 2557 | info->stream[SNDRV_PCM_STREAM_CAPTURE].substreams = spec->num_adcs; |
@@ -3506,13 +3589,12 @@ static int stac92xx_parse_auto_config(struct hda_codec *codec, hda_nid_t dig_out | |||
3506 | err = stac92xx_auto_fill_dac_nids(codec); | 3589 | err = stac92xx_auto_fill_dac_nids(codec); |
3507 | if (err < 0) | 3590 | if (err < 0) |
3508 | return err; | 3591 | return err; |
3592 | err = stac92xx_auto_create_multi_out_ctls(codec, | ||
3593 | &spec->autocfg); | ||
3594 | if (err < 0) | ||
3595 | return err; | ||
3509 | } | 3596 | } |
3510 | 3597 | ||
3511 | err = stac92xx_auto_create_multi_out_ctls(codec, &spec->autocfg); | ||
3512 | |||
3513 | if (err < 0) | ||
3514 | return err; | ||
3515 | |||
3516 | /* setup analog beep controls */ | 3598 | /* setup analog beep controls */ |
3517 | if (spec->anabeep_nid > 0) { | 3599 | if (spec->anabeep_nid > 0) { |
3518 | err = stac92xx_auto_create_beep_ctls(codec, | 3600 | err = stac92xx_auto_create_beep_ctls(codec, |
@@ -4163,8 +4245,19 @@ static void stac92xx_hp_detect(struct hda_codec *codec) | |||
4163 | continue; | 4245 | continue; |
4164 | if (presence) | 4246 | if (presence) |
4165 | stac92xx_set_pinctl(codec, cfg->hp_pins[i], val); | 4247 | stac92xx_set_pinctl(codec, cfg->hp_pins[i], val); |
4248 | #if 0 /* FIXME */ | ||
4249 | /* Resetting the pinctl like below may lead to (a sort of) regressions | ||
4250 | * on some devices since they use the HP pin actually for line/speaker | ||
4251 | * outs although the default pin config shows a different pin (that is | ||
4252 | * wrong and useless). | ||
4253 | * | ||
4254 | * So, it's basically a problem of default pin configs, likely a BIOS issue. | ||
4255 | * But, disabling the code below just works around it, and I'm too tired of | ||
4256 | * bug reports with such devices... | ||
4257 | */ | ||
4166 | else | 4258 | else |
4167 | stac92xx_reset_pinctl(codec, cfg->hp_pins[i], val); | 4259 | stac92xx_reset_pinctl(codec, cfg->hp_pins[i], val); |
4260 | #endif /* FIXME */ | ||
4168 | } | 4261 | } |
4169 | } | 4262 | } |
4170 | 4263 | ||
@@ -4390,7 +4483,8 @@ static int patch_stac9200(struct hda_codec *codec) | |||
4390 | spec->num_adcs = 1; | 4483 | spec->num_adcs = 1; |
4391 | spec->num_pwrs = 0; | 4484 | spec->num_pwrs = 0; |
4392 | 4485 | ||
4393 | if (spec->board_config == STAC_9200_GATEWAY || | 4486 | if (spec->board_config == STAC_9200_M4 || |
4487 | spec->board_config == STAC_9200_M4_2 || | ||
4394 | spec->board_config == STAC_9200_OQO) | 4488 | spec->board_config == STAC_9200_OQO) |
4395 | spec->init = stac9200_eapd_init; | 4489 | spec->init = stac9200_eapd_init; |
4396 | else | 4490 | else |
@@ -4408,6 +4502,12 @@ static int patch_stac9200(struct hda_codec *codec) | |||
4408 | return err; | 4502 | return err; |
4409 | } | 4503 | } |
4410 | 4504 | ||
4505 | /* CF-74 has no headphone detection, and the driver should *NOT* | ||
4506 | * do detection and HP/speaker toggle because the hardware does it. | ||
4507 | */ | ||
4508 | if (spec->board_config == STAC_9200_PANASONIC) | ||
4509 | spec->hp_detect = 0; | ||
4510 | |||
4411 | codec->patch_ops = stac92xx_patch_ops; | 4511 | codec->patch_ops = stac92xx_patch_ops; |
4412 | 4512 | ||
4413 | return 0; | 4513 | return 0; |
@@ -4425,12 +4525,22 @@ static int patch_stac925x(struct hda_codec *codec) | |||
4425 | codec->spec = spec; | 4525 | codec->spec = spec; |
4426 | spec->num_pins = ARRAY_SIZE(stac925x_pin_nids); | 4526 | spec->num_pins = ARRAY_SIZE(stac925x_pin_nids); |
4427 | spec->pin_nids = stac925x_pin_nids; | 4527 | spec->pin_nids = stac925x_pin_nids; |
4428 | spec->board_config = snd_hda_check_board_config(codec, STAC_925x_MODELS, | 4528 | |
4529 | /* Check first for codec ID */ | ||
4530 | spec->board_config = snd_hda_check_board_codec_sid_config(codec, | ||
4531 | STAC_925x_MODELS, | ||
4532 | stac925x_models, | ||
4533 | stac925x_codec_id_cfg_tbl); | ||
4534 | |||
4535 | /* Now checks for PCI ID, if codec ID is not found */ | ||
4536 | if (spec->board_config < 0) | ||
4537 | spec->board_config = snd_hda_check_board_config(codec, | ||
4538 | STAC_925x_MODELS, | ||
4429 | stac925x_models, | 4539 | stac925x_models, |
4430 | stac925x_cfg_tbl); | 4540 | stac925x_cfg_tbl); |
4431 | again: | 4541 | again: |
4432 | if (spec->board_config < 0) { | 4542 | if (spec->board_config < 0) { |
4433 | snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC925x," | 4543 | snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC925x," |
4434 | "using BIOS defaults\n"); | 4544 | "using BIOS defaults\n"); |
4435 | err = stac92xx_save_bios_config_regs(codec); | 4545 | err = stac92xx_save_bios_config_regs(codec); |
4436 | } else | 4546 | } else |
@@ -4658,7 +4768,9 @@ static struct hda_input_mux stac92hd83xxx_dmux = { | |||
4658 | static int patch_stac92hd83xxx(struct hda_codec *codec) | 4768 | static int patch_stac92hd83xxx(struct hda_codec *codec) |
4659 | { | 4769 | { |
4660 | struct sigmatel_spec *spec; | 4770 | struct sigmatel_spec *spec; |
4771 | hda_nid_t conn[STAC92HD83_DAC_COUNT + 1]; | ||
4661 | int err; | 4772 | int err; |
4773 | int num_dacs; | ||
4662 | 4774 | ||
4663 | spec = kzalloc(sizeof(*spec), GFP_KERNEL); | 4775 | spec = kzalloc(sizeof(*spec), GFP_KERNEL); |
4664 | if (spec == NULL) | 4776 | if (spec == NULL) |
@@ -4672,23 +4784,26 @@ static int patch_stac92hd83xxx(struct hda_codec *codec) | |||
4672 | spec->dmux_nids = stac92hd83xxx_dmux_nids; | 4784 | spec->dmux_nids = stac92hd83xxx_dmux_nids; |
4673 | spec->adc_nids = stac92hd83xxx_adc_nids; | 4785 | spec->adc_nids = stac92hd83xxx_adc_nids; |
4674 | spec->pwr_nids = stac92hd83xxx_pwr_nids; | 4786 | spec->pwr_nids = stac92hd83xxx_pwr_nids; |
4787 | spec->amp_nids = stac92hd83xxx_amp_nids; | ||
4675 | spec->pwr_mapping = stac92hd83xxx_pwr_mapping; | 4788 | spec->pwr_mapping = stac92hd83xxx_pwr_mapping; |
4676 | spec->num_pwrs = ARRAY_SIZE(stac92hd83xxx_pwr_nids); | 4789 | spec->num_pwrs = ARRAY_SIZE(stac92hd83xxx_pwr_nids); |
4677 | spec->multiout.dac_nids = spec->dac_nids; | 4790 | spec->multiout.dac_nids = spec->dac_nids; |
4678 | 4791 | ||
4679 | spec->init = stac92hd83xxx_core_init; | ||
4680 | switch (codec->vendor_id) { | ||
4681 | case 0x111d7605: | ||
4682 | break; | ||
4683 | default: | ||
4684 | spec->num_pwrs--; | ||
4685 | spec->init++; /* switch to config #2 */ | ||
4686 | } | ||
4687 | 4792 | ||
4793 | /* set port 0xe to select the last DAC | ||
4794 | */ | ||
4795 | num_dacs = snd_hda_get_connections(codec, 0x0e, | ||
4796 | conn, STAC92HD83_DAC_COUNT + 1) - 1; | ||
4797 | |||
4798 | snd_hda_codec_write_cache(codec, 0xe, 0, | ||
4799 | AC_VERB_SET_CONNECT_SEL, num_dacs); | ||
4800 | |||
4801 | spec->init = stac92hd83xxx_core_init; | ||
4688 | spec->mixer = stac92hd83xxx_mixer; | 4802 | spec->mixer = stac92hd83xxx_mixer; |
4689 | spec->num_pins = ARRAY_SIZE(stac92hd83xxx_pin_nids); | 4803 | spec->num_pins = ARRAY_SIZE(stac92hd83xxx_pin_nids); |
4690 | spec->num_dmuxes = ARRAY_SIZE(stac92hd83xxx_dmux_nids); | 4804 | spec->num_dmuxes = ARRAY_SIZE(stac92hd83xxx_dmux_nids); |
4691 | spec->num_adcs = ARRAY_SIZE(stac92hd83xxx_adc_nids); | 4805 | spec->num_adcs = ARRAY_SIZE(stac92hd83xxx_adc_nids); |
4806 | spec->num_amps = ARRAY_SIZE(stac92hd83xxx_amp_nids); | ||
4692 | spec->num_dmics = STAC92HD83XXX_NUM_DMICS; | 4807 | spec->num_dmics = STAC92HD83XXX_NUM_DMICS; |
4693 | spec->dinput_mux = &stac92hd83xxx_dmux; | 4808 | spec->dinput_mux = &stac92hd83xxx_dmux; |
4694 | spec->pin_nids = stac92hd83xxx_pin_nids; | 4809 | spec->pin_nids = stac92hd83xxx_pin_nids; |
@@ -4709,6 +4824,15 @@ again: | |||
4709 | return err; | 4824 | return err; |
4710 | } | 4825 | } |
4711 | 4826 | ||
4827 | switch (codec->vendor_id) { | ||
4828 | case 0x111d7604: | ||
4829 | case 0x111d7605: | ||
4830 | if (spec->board_config == STAC_92HD83XXX_PWR_REF) | ||
4831 | break; | ||
4832 | spec->num_pwrs = 0; | ||
4833 | break; | ||
4834 | } | ||
4835 | |||
4712 | err = stac92xx_parse_auto_config(codec, 0x1d, 0); | 4836 | err = stac92xx_parse_auto_config(codec, 0x1d, 0); |
4713 | if (!err) { | 4837 | if (!err) { |
4714 | if (spec->board_config < 0) { | 4838 | if (spec->board_config < 0) { |
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index 671ff65db02..608655e9275 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 98c6a8c65d8..6c870c12a17 100644 --- a/sound/pci/oxygen/virtuoso.c +++ b/sound/pci/oxygen/virtuoso.c | |||
@@ -676,7 +676,7 @@ static void xonar_hdav_uart_input(struct oxygen *chip) | |||
676 | if (chip->uart_input_count >= 2 && | 676 | if (chip->uart_input_count >= 2 && |
677 | chip->uart_input[chip->uart_input_count - 2] == 'O' && | 677 | chip->uart_input[chip->uart_input_count - 2] == 'O' && |
678 | chip->uart_input[chip->uart_input_count - 1] == 'K') { | 678 | chip->uart_input[chip->uart_input_count - 1] == 'K') { |
679 | printk(KERN_DEBUG "message from Xonar HDAV HDMI chip received:"); | 679 | printk(KERN_DEBUG "message from Xonar HDAV HDMI chip received:\n"); |
680 | print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, | 680 | print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, |
681 | chip->uart_input, chip->uart_input_count); | 681 | chip->uart_input, chip->uart_input_count); |
682 | chip->uart_input_count = 0; | 682 | chip->uart_input_count = 0; |
@@ -899,6 +899,7 @@ static const struct oxygen_model model_xonar_hdav = { | |||
899 | .dac_channels = 8, | 899 | .dac_channels = 8, |
900 | .dac_volume_min = 0x0f, | 900 | .dac_volume_min = 0x0f, |
901 | .dac_volume_max = 0xff, | 901 | .dac_volume_max = 0xff, |
902 | .misc_flags = OXYGEN_MISC_MIDI, | ||
902 | .function_flags = OXYGEN_FUNCTION_2WIRE, | 903 | .function_flags = OXYGEN_FUNCTION_2WIRE, |
903 | .dac_i2s_format = OXYGEN_I2S_FORMAT_LJUST, | 904 | .dac_i2s_format = OXYGEN_I2S_FORMAT_LJUST, |
904 | .adc_i2s_format = OXYGEN_I2S_FORMAT_LJUST, | 905 | .adc_i2s_format = OXYGEN_I2S_FORMAT_LJUST, |