diff options
| -rw-r--r-- | sound/pci/hda/patch_hdmi.c | 4 | ||||
| -rw-r--r-- | sound/pci/hda/patch_realtek.c | 1 | ||||
| -rw-r--r-- | sound/usb/card.c | 12 | ||||
| -rw-r--r-- | sound/usb/card.h | 1 | ||||
| -rw-r--r-- | sound/usb/endpoint.c | 15 | ||||
| -rw-r--r-- | sound/usb/pcm.c | 5 | ||||
| -rw-r--r-- | sound/usb/usbaudio.h | 1 |
7 files changed, 30 insertions, 9 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 0cb5b89cd0c8..1edbb9c47c2d 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
| @@ -1127,8 +1127,10 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec, | |||
| 1127 | AMP_OUT_UNMUTE); | 1127 | AMP_OUT_UNMUTE); |
| 1128 | 1128 | ||
| 1129 | eld = &per_pin->sink_eld; | 1129 | eld = &per_pin->sink_eld; |
| 1130 | if (!eld->monitor_present) | 1130 | if (!eld->monitor_present) { |
| 1131 | hdmi_set_channel_count(codec, per_pin->cvt_nid, channels); | ||
| 1131 | return; | 1132 | return; |
| 1133 | } | ||
| 1132 | 1134 | ||
| 1133 | if (!non_pcm && per_pin->chmap_set) | 1135 | if (!non_pcm && per_pin->chmap_set) |
| 1134 | ca = hdmi_manual_channel_allocation(channels, per_pin->chmap); | 1136 | ca = hdmi_manual_channel_allocation(channels, per_pin->chmap); |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index c1952c910339..5f7c765391f1 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
| @@ -4622,6 +4622,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
| 4622 | SND_PCI_QUIRK(0x1028, 0x0668, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE), | 4622 | SND_PCI_QUIRK(0x1028, 0x0668, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE), |
| 4623 | SND_PCI_QUIRK(0x1028, 0x0669, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE), | 4623 | SND_PCI_QUIRK(0x1028, 0x0669, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE), |
| 4624 | SND_PCI_QUIRK(0x1028, 0x0674, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), | 4624 | SND_PCI_QUIRK(0x1028, 0x0674, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), |
| 4625 | SND_PCI_QUIRK(0x1028, 0x067e, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), | ||
| 4625 | SND_PCI_QUIRK(0x1028, 0x067f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), | 4626 | SND_PCI_QUIRK(0x1028, 0x067f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), |
| 4626 | SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), | 4627 | SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), |
| 4627 | SND_PCI_QUIRK(0x1028, 0x15cd, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), | 4628 | SND_PCI_QUIRK(0x1028, 0x15cd, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), |
diff --git a/sound/usb/card.c b/sound/usb/card.c index 893d5a1afc3c..c3b5b7dca1c3 100644 --- a/sound/usb/card.c +++ b/sound/usb/card.c | |||
| @@ -651,7 +651,7 @@ int snd_usb_autoresume(struct snd_usb_audio *chip) | |||
| 651 | int err = -ENODEV; | 651 | int err = -ENODEV; |
| 652 | 652 | ||
| 653 | down_read(&chip->shutdown_rwsem); | 653 | down_read(&chip->shutdown_rwsem); |
| 654 | if (chip->probing) | 654 | if (chip->probing && chip->in_pm) |
| 655 | err = 0; | 655 | err = 0; |
| 656 | else if (!chip->shutdown) | 656 | else if (!chip->shutdown) |
| 657 | err = usb_autopm_get_interface(chip->pm_intf); | 657 | err = usb_autopm_get_interface(chip->pm_intf); |
| @@ -663,7 +663,7 @@ int snd_usb_autoresume(struct snd_usb_audio *chip) | |||
| 663 | void snd_usb_autosuspend(struct snd_usb_audio *chip) | 663 | void snd_usb_autosuspend(struct snd_usb_audio *chip) |
| 664 | { | 664 | { |
| 665 | down_read(&chip->shutdown_rwsem); | 665 | down_read(&chip->shutdown_rwsem); |
| 666 | if (!chip->shutdown && !chip->probing) | 666 | if (!chip->shutdown && !chip->probing && !chip->in_pm) |
| 667 | usb_autopm_put_interface(chip->pm_intf); | 667 | usb_autopm_put_interface(chip->pm_intf); |
| 668 | up_read(&chip->shutdown_rwsem); | 668 | up_read(&chip->shutdown_rwsem); |
| 669 | } | 669 | } |
| @@ -695,8 +695,9 @@ static int usb_audio_suspend(struct usb_interface *intf, pm_message_t message) | |||
| 695 | chip->autosuspended = 1; | 695 | chip->autosuspended = 1; |
| 696 | } | 696 | } |
| 697 | 697 | ||
| 698 | list_for_each_entry(mixer, &chip->mixer_list, list) | 698 | if (chip->num_suspended_intf == 1) |
| 699 | snd_usb_mixer_suspend(mixer); | 699 | list_for_each_entry(mixer, &chip->mixer_list, list) |
| 700 | snd_usb_mixer_suspend(mixer); | ||
| 700 | 701 | ||
| 701 | return 0; | 702 | return 0; |
| 702 | } | 703 | } |
| @@ -711,6 +712,8 @@ static int __usb_audio_resume(struct usb_interface *intf, bool reset_resume) | |||
| 711 | return 0; | 712 | return 0; |
| 712 | if (--chip->num_suspended_intf) | 713 | if (--chip->num_suspended_intf) |
| 713 | return 0; | 714 | return 0; |
| 715 | |||
| 716 | chip->in_pm = 1; | ||
| 714 | /* | 717 | /* |
| 715 | * ALSA leaves material resumption to user space | 718 | * ALSA leaves material resumption to user space |
| 716 | * we just notify and restart the mixers | 719 | * we just notify and restart the mixers |
| @@ -726,6 +729,7 @@ static int __usb_audio_resume(struct usb_interface *intf, bool reset_resume) | |||
| 726 | chip->autosuspended = 0; | 729 | chip->autosuspended = 0; |
| 727 | 730 | ||
| 728 | err_out: | 731 | err_out: |
| 732 | chip->in_pm = 0; | ||
| 729 | return err; | 733 | return err; |
| 730 | } | 734 | } |
| 731 | 735 | ||
diff --git a/sound/usb/card.h b/sound/usb/card.h index 9867ab866857..97acb906acc2 100644 --- a/sound/usb/card.h +++ b/sound/usb/card.h | |||
| @@ -92,6 +92,7 @@ struct snd_usb_endpoint { | |||
| 92 | unsigned int curframesize; /* current packet size in frames (for capture) */ | 92 | unsigned int curframesize; /* current packet size in frames (for capture) */ |
| 93 | unsigned int syncmaxsize; /* sync endpoint packet size */ | 93 | unsigned int syncmaxsize; /* sync endpoint packet size */ |
| 94 | unsigned int fill_max:1; /* fill max packet size always */ | 94 | unsigned int fill_max:1; /* fill max packet size always */ |
| 95 | unsigned int udh01_fb_quirk:1; /* corrupted feedback data */ | ||
| 95 | unsigned int datainterval; /* log_2 of data packet interval */ | 96 | unsigned int datainterval; /* log_2 of data packet interval */ |
| 96 | unsigned int syncinterval; /* P for adaptive mode, 0 otherwise */ | 97 | unsigned int syncinterval; /* P for adaptive mode, 0 otherwise */ |
| 97 | unsigned char silence_value; | 98 | unsigned char silence_value; |
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c index e70a87e0d9fe..289f582c9130 100644 --- a/sound/usb/endpoint.c +++ b/sound/usb/endpoint.c | |||
| @@ -471,6 +471,10 @@ struct snd_usb_endpoint *snd_usb_add_endpoint(struct snd_usb_audio *chip, | |||
| 471 | ep->syncinterval = 3; | 471 | ep->syncinterval = 3; |
| 472 | 472 | ||
| 473 | ep->syncmaxsize = le16_to_cpu(get_endpoint(alts, 1)->wMaxPacketSize); | 473 | ep->syncmaxsize = le16_to_cpu(get_endpoint(alts, 1)->wMaxPacketSize); |
| 474 | |||
| 475 | if (chip->usb_id == USB_ID(0x0644, 0x8038) /* TEAC UD-H01 */ && | ||
| 476 | ep->syncmaxsize == 4) | ||
| 477 | ep->udh01_fb_quirk = 1; | ||
| 474 | } | 478 | } |
| 475 | 479 | ||
| 476 | list_add_tail(&ep->list, &chip->ep_list); | 480 | list_add_tail(&ep->list, &chip->ep_list); |
| @@ -1105,7 +1109,16 @@ void snd_usb_handle_sync_urb(struct snd_usb_endpoint *ep, | |||
| 1105 | if (f == 0) | 1109 | if (f == 0) |
| 1106 | return; | 1110 | return; |
| 1107 | 1111 | ||
| 1108 | if (unlikely(ep->freqshift == INT_MIN)) { | 1112 | if (unlikely(sender->udh01_fb_quirk)) { |
| 1113 | /* | ||
| 1114 | * The TEAC UD-H01 firmware sometimes changes the feedback value | ||
| 1115 | * by +/- 0x1.0000. | ||
| 1116 | */ | ||
| 1117 | if (f < ep->freqn - 0x8000) | ||
| 1118 | f += 0x10000; | ||
| 1119 | else if (f > ep->freqn + 0x8000) | ||
| 1120 | f -= 0x10000; | ||
| 1121 | } else if (unlikely(ep->freqshift == INT_MIN)) { | ||
| 1109 | /* | 1122 | /* |
| 1110 | * The first time we see a feedback value, determine its format | 1123 | * The first time we see a feedback value, determine its format |
| 1111 | * by shifting it left or right until it matches the nominal | 1124 | * by shifting it left or right until it matches the nominal |
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c index 131336d40492..c62a1659106d 100644 --- a/sound/usb/pcm.c +++ b/sound/usb/pcm.c | |||
| @@ -1501,9 +1501,8 @@ static void retire_playback_urb(struct snd_usb_substream *subs, | |||
| 1501 | * The error should be lower than 2ms since the estimate relies | 1501 | * The error should be lower than 2ms since the estimate relies |
| 1502 | * on two reads of a counter updated every ms. | 1502 | * on two reads of a counter updated every ms. |
| 1503 | */ | 1503 | */ |
| 1504 | if (printk_ratelimit() && | 1504 | if (abs(est_delay - subs->last_delay) * 1000 > runtime->rate * 2) |
| 1505 | abs(est_delay - subs->last_delay) * 1000 > runtime->rate * 2) | 1505 | dev_dbg_ratelimited(&subs->dev->dev, |
| 1506 | dev_dbg(&subs->dev->dev, | ||
| 1507 | "delay: estimated %d, actual %d\n", | 1506 | "delay: estimated %d, actual %d\n", |
| 1508 | est_delay, subs->last_delay); | 1507 | est_delay, subs->last_delay); |
| 1509 | 1508 | ||
diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h index 25c4c7e217de..91d0380431b4 100644 --- a/sound/usb/usbaudio.h +++ b/sound/usb/usbaudio.h | |||
| @@ -40,6 +40,7 @@ struct snd_usb_audio { | |||
| 40 | struct rw_semaphore shutdown_rwsem; | 40 | struct rw_semaphore shutdown_rwsem; |
| 41 | unsigned int shutdown:1; | 41 | unsigned int shutdown:1; |
| 42 | unsigned int probing:1; | 42 | unsigned int probing:1; |
| 43 | unsigned int in_pm:1; | ||
| 43 | unsigned int autosuspended:1; | 44 | unsigned int autosuspended:1; |
| 44 | unsigned int txfr_quirk:1; /* Subframe boundaries on transfers */ | 45 | unsigned int txfr_quirk:1; /* Subframe boundaries on transfers */ |
| 45 | 46 | ||
