aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2016-09-29 12:20:14 -0400
committerTakashi Iwai <tiwai@suse.de>2016-09-29 12:20:14 -0400
commit3383c5c395386ac8e258b1a324c72ce850b84a9e (patch)
tree4b017990c3496f3928852b4a047e00c8e410033f
parent8da08ca03b73593d5299893bf29fc08569c3fb5f (diff)
parent0eec880966e77bdbee0112989a2be67d92e39929 (diff)
Merge branch 'for-linus' into for-next
-rw-r--r--sound/pci/ali5451/ali5451.c2
-rw-r--r--sound/pci/hda/patch_conexant.c10
-rw-r--r--sound/pci/hda/patch_realtek.c4
-rw-r--r--sound/usb/mixer_quirks.c22
4 files changed, 32 insertions, 6 deletions
diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c
index 36470af7eda7..92b819e4f729 100644
--- a/sound/pci/ali5451/ali5451.c
+++ b/sound/pci/ali5451/ali5451.c
@@ -1408,6 +1408,7 @@ snd_ali_playback_pointer(struct snd_pcm_substream *substream)
1408 spin_unlock(&codec->reg_lock); 1408 spin_unlock(&codec->reg_lock);
1409 dev_dbg(codec->card->dev, "playback pointer returned cso=%xh.\n", cso); 1409 dev_dbg(codec->card->dev, "playback pointer returned cso=%xh.\n", cso);
1410 1410
1411 cso %= runtime->buffer_size;
1411 return cso; 1412 return cso;
1412} 1413}
1413 1414
@@ -1428,6 +1429,7 @@ static snd_pcm_uframes_t snd_ali_pointer(struct snd_pcm_substream *substream)
1428 cso = inw(ALI_REG(codec, ALI_CSO_ALPHA_FMS + 2)); 1429 cso = inw(ALI_REG(codec, ALI_CSO_ALPHA_FMS + 2));
1429 spin_unlock(&codec->reg_lock); 1430 spin_unlock(&codec->reg_lock);
1430 1431
1432 cso %= runtime->buffer_size;
1431 return cso; 1433 return cso;
1432} 1434}
1433 1435
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index 56fefbd85782..ed62748a6d55 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -261,6 +261,7 @@ enum {
261 CXT_FIXUP_HP_530, 261 CXT_FIXUP_HP_530,
262 CXT_FIXUP_CAP_MIX_AMP_5047, 262 CXT_FIXUP_CAP_MIX_AMP_5047,
263 CXT_FIXUP_MUTE_LED_EAPD, 263 CXT_FIXUP_MUTE_LED_EAPD,
264 CXT_FIXUP_HP_SPECTRE,
264}; 265};
265 266
266/* for hda_fixup_thinkpad_acpi() */ 267/* for hda_fixup_thinkpad_acpi() */
@@ -765,6 +766,14 @@ static const struct hda_fixup cxt_fixups[] = {
765 .type = HDA_FIXUP_FUNC, 766 .type = HDA_FIXUP_FUNC,
766 .v.func = cxt_fixup_mute_led_eapd, 767 .v.func = cxt_fixup_mute_led_eapd,
767 }, 768 },
769 [CXT_FIXUP_HP_SPECTRE] = {
770 .type = HDA_FIXUP_PINS,
771 .v.pins = (const struct hda_pintbl[]) {
772 /* enable NID 0x1d for the speaker on top */
773 { 0x1d, 0x91170111 },
774 { }
775 }
776 },
768}; 777};
769 778
770static const struct snd_pci_quirk cxt5045_fixups[] = { 779static const struct snd_pci_quirk cxt5045_fixups[] = {
@@ -814,6 +823,7 @@ static const struct snd_pci_quirk cxt5066_fixups[] = {
814 SND_PCI_QUIRK(0x1025, 0x0543, "Acer Aspire One 522", CXT_FIXUP_STEREO_DMIC), 823 SND_PCI_QUIRK(0x1025, 0x0543, "Acer Aspire One 522", CXT_FIXUP_STEREO_DMIC),
815 SND_PCI_QUIRK(0x1025, 0x054c, "Acer Aspire 3830TG", CXT_FIXUP_ASPIRE_DMIC), 824 SND_PCI_QUIRK(0x1025, 0x054c, "Acer Aspire 3830TG", CXT_FIXUP_ASPIRE_DMIC),
816 SND_PCI_QUIRK(0x1025, 0x054f, "Acer Aspire 4830T", CXT_FIXUP_ASPIRE_DMIC), 825 SND_PCI_QUIRK(0x1025, 0x054f, "Acer Aspire 4830T", CXT_FIXUP_ASPIRE_DMIC),
826 SND_PCI_QUIRK(0x103c, 0x8174, "HP Spectre x360", CXT_FIXUP_HP_SPECTRE),
817 SND_PCI_QUIRK(0x1043, 0x138d, "Asus", CXT_FIXUP_HEADPHONE_MIC_PIN), 827 SND_PCI_QUIRK(0x1043, 0x138d, "Asus", CXT_FIXUP_HEADPHONE_MIC_PIN),
818 SND_PCI_QUIRK(0x152d, 0x0833, "OLPC XO-1.5", CXT_FIXUP_OLPC_XO), 828 SND_PCI_QUIRK(0x152d, 0x0833, "OLPC XO-1.5", CXT_FIXUP_OLPC_XO),
819 SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400", CXT_PINCFG_LENOVO_TP410), 829 SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400", CXT_PINCFG_LENOVO_TP410),
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 1fe8750df8de..b58e8c76346a 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5855,6 +5855,10 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
5855 {0x14, 0x90170120}, 5855 {0x14, 0x90170120},
5856 {0x21, 0x02211030}), 5856 {0x21, 0x02211030}),
5857 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 5857 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
5858 {0x14, 0x90170110},
5859 {0x1b, 0x02011020},
5860 {0x21, 0x0221101f}),
5861 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
5858 {0x14, 0x90170130}, 5862 {0x14, 0x90170130},
5859 {0x1b, 0x01014020}, 5863 {0x1b, 0x01014020},
5860 {0x21, 0x0221103f}), 5864 {0x21, 0x0221103f}),
diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c
index f6c3bf79af9a..04991b009132 100644
--- a/sound/usb/mixer_quirks.c
+++ b/sound/usb/mixer_quirks.c
@@ -1831,6 +1831,7 @@ void snd_usb_mixer_rc_memory_change(struct usb_mixer_interface *mixer,
1831} 1831}
1832 1832
1833static void snd_dragonfly_quirk_db_scale(struct usb_mixer_interface *mixer, 1833static void snd_dragonfly_quirk_db_scale(struct usb_mixer_interface *mixer,
1834 struct usb_mixer_elem_info *cval,
1834 struct snd_kcontrol *kctl) 1835 struct snd_kcontrol *kctl)
1835{ 1836{
1836 /* Approximation using 10 ranges based on output measurement on hw v1.2. 1837 /* Approximation using 10 ranges based on output measurement on hw v1.2.
@@ -1848,10 +1849,19 @@ static void snd_dragonfly_quirk_db_scale(struct usb_mixer_interface *mixer,
1848 41, 50, TLV_DB_MINMAX_ITEM(-441, 0), 1849 41, 50, TLV_DB_MINMAX_ITEM(-441, 0),
1849 ); 1850 );
1850 1851
1851 usb_audio_info(mixer->chip, "applying DragonFly dB scale quirk\n"); 1852 if (cval->min == 0 && cval->max == 50) {
1852 kctl->tlv.p = scale; 1853 usb_audio_info(mixer->chip, "applying DragonFly dB scale quirk (0-50 variant)\n");
1853 kctl->vd[0].access |= SNDRV_CTL_ELEM_ACCESS_TLV_READ; 1854 kctl->tlv.p = scale;
1854 kctl->vd[0].access &= ~SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK; 1855 kctl->vd[0].access |= SNDRV_CTL_ELEM_ACCESS_TLV_READ;
1856 kctl->vd[0].access &= ~SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK;
1857
1858 } else if (cval->min == 0 && cval->max <= 1000) {
1859 /* Some other clearly broken DragonFly variant.
1860 * At least a 0..53 variant (hw v1.0) exists.
1861 */
1862 usb_audio_info(mixer->chip, "ignoring too narrow dB range on a DragonFly device");
1863 kctl->vd[0].access &= ~SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK;
1864 }
1855} 1865}
1856 1866
1857void snd_usb_mixer_fu_apply_quirk(struct usb_mixer_interface *mixer, 1867void snd_usb_mixer_fu_apply_quirk(struct usb_mixer_interface *mixer,
@@ -1860,8 +1870,8 @@ void snd_usb_mixer_fu_apply_quirk(struct usb_mixer_interface *mixer,
1860{ 1870{
1861 switch (mixer->chip->usb_id) { 1871 switch (mixer->chip->usb_id) {
1862 case USB_ID(0x21b4, 0x0081): /* AudioQuest DragonFly */ 1872 case USB_ID(0x21b4, 0x0081): /* AudioQuest DragonFly */
1863 if (unitid == 7 && cval->min == 0 && cval->max == 50) 1873 if (unitid == 7 && cval->control == UAC_FU_VOLUME)
1864 snd_dragonfly_quirk_db_scale(mixer, kctl); 1874 snd_dragonfly_quirk_db_scale(mixer, cval, kctl);
1865 break; 1875 break;
1866 } 1876 }
1867} 1877}