Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'fix/hda' into topic/hda

+71 -51
+1
Documentation/sound/alsa/HD-Audio-Models.txt
··· 337 337 ref Reference board 338 338 mic-ref Reference board with power management for ports 339 339 dell-s14 Dell laptop 340 + dell-vostro-3500 Dell Vostro 3500 laptop 340 341 hp HP laptops with (inverted) mute-LED 341 342 hp-dv7-4000 HP dv-7 4000 342 343 auto BIOS setup (default)
-1
sound/pci/hda/patch_conexant.c
··· 3062 3062 SND_PCI_QUIRK(0x1043, 0x1993, "Asus U50F", CXT5066_ASUS), 3063 3063 SND_PCI_QUIRK(0x1179, 0xff1e, "Toshiba Satellite C650D", CXT5066_IDEAPAD), 3064 3064 SND_PCI_QUIRK(0x1179, 0xff50, "Toshiba Satellite P500-PSPGSC-01800T", CXT5066_OLPC_XO_1_5), 3065 - SND_PCI_QUIRK(0x1179, 0xffe0, "Toshiba Satellite Pro T130-15F", CXT5066_OLPC_XO_1_5), 3066 3065 SND_PCI_QUIRK(0x14f1, 0x0101, "Conexant Reference board", 3067 3066 CXT5066_LAPTOP), 3068 3067 SND_PCI_QUIRK(0x152d, 0x0833, "OLPC XO-1.5", CXT5066_OLPC_XO_1_5),
+11
sound/pci/hda/patch_sigmatel.c
··· 95 95 STAC_92HD83XXX_REF, 96 96 STAC_92HD83XXX_PWR_REF, 97 97 STAC_DELL_S14, 98 + STAC_DELL_VOSTRO_3500, 98 99 STAC_92HD83XXX_HP, 99 100 STAC_92HD83XXX_HP_cNB11_INTQUAD, 100 101 STAC_HP_DV7_4000, ··· 1660 1659 0x40f000f0, 0x40f000f0, 1661 1660 }; 1662 1661 1662 + static const unsigned int dell_vostro_3500_pin_configs[10] = { 1663 + 0x02a11020, 0x0221101f, 0x400000f0, 0x90170110, 1664 + 0x400000f1, 0x400000f2, 0x400000f3, 0x90a60160, 1665 + 0x400000f4, 0x400000f5, 1666 + }; 1667 + 1663 1668 static const unsigned int hp_dv7_4000_pin_configs[10] = { 1664 1669 0x03a12050, 0x0321201f, 0x40f000f0, 0x90170110, 1665 1670 0x40f000f0, 0x40f000f0, 0x90170110, 0xd5a30140, ··· 1682 1675 [STAC_92HD83XXX_REF] = ref92hd83xxx_pin_configs, 1683 1676 [STAC_92HD83XXX_PWR_REF] = ref92hd83xxx_pin_configs, 1684 1677 [STAC_DELL_S14] = dell_s14_pin_configs, 1678 + [STAC_DELL_VOSTRO_3500] = dell_vostro_3500_pin_configs, 1685 1679 [STAC_92HD83XXX_HP_cNB11_INTQUAD] = hp_cNB11_intquad_pin_configs, 1686 1680 [STAC_HP_DV7_4000] = hp_dv7_4000_pin_configs, 1687 1681 }; ··· 1692 1684 [STAC_92HD83XXX_REF] = "ref", 1693 1685 [STAC_92HD83XXX_PWR_REF] = "mic-ref", 1694 1686 [STAC_DELL_S14] = "dell-s14", 1687 + [STAC_DELL_VOSTRO_3500] = "dell-vostro-3500", 1695 1688 [STAC_92HD83XXX_HP] = "hp", 1696 1689 [STAC_92HD83XXX_HP_cNB11_INTQUAD] = "hp_cNB11_intquad", 1697 1690 [STAC_HP_DV7_4000] = "hp-dv7-4000", ··· 1706 1697 "DFI LanParty", STAC_92HD83XXX_REF), 1707 1698 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02ba, 1708 1699 "unknown Dell", STAC_DELL_S14), 1700 + SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x1028, 1701 + "Dell Vostro 3500", STAC_DELL_VOSTRO_3500), 1709 1702 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xff00, 0x3600, 1710 1703 "HP", STAC_92HD83XXX_HP), 1711 1704 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1656,
+59 -50
sound/usb/mixer.c
··· 765 765 * interface to ALSA control for feature/mixer units 766 766 */ 767 767 768 + /* volume control quirks */ 769 + static void volume_control_quirks(struct usb_mixer_elem_info *cval, 770 + struct snd_kcontrol *kctl) 771 + { 772 + switch (cval->mixer->chip->usb_id) { 773 + case USB_ID(0x0471, 0x0101): 774 + case USB_ID(0x0471, 0x0104): 775 + case USB_ID(0x0471, 0x0105): 776 + case USB_ID(0x0672, 0x1041): 777 + /* quirk for UDA1321/N101. 778 + * note that detection between firmware 2.1.1.7 (N101) 779 + * and later 2.1.1.21 is not very clear from datasheets. 780 + * I hope that the min value is -15360 for newer firmware --jk 781 + */ 782 + if (!strcmp(kctl->id.name, "PCM Playback Volume") && 783 + cval->min == -15616) { 784 + snd_printk(KERN_INFO 785 + "set volume quirk for UDA1321/N101 chip\n"); 786 + cval->max = -256; 787 + } 788 + break; 789 + 790 + case USB_ID(0x046d, 0x09a4): 791 + if (!strcmp(kctl->id.name, "Mic Capture Volume")) { 792 + snd_printk(KERN_INFO 793 + "set volume quirk for QuickCam E3500\n"); 794 + cval->min = 6080; 795 + cval->max = 8768; 796 + cval->res = 192; 797 + } 798 + break; 799 + 800 + case USB_ID(0x046d, 0x0808): 801 + case USB_ID(0x046d, 0x0809): 802 + case USB_ID(0x046d, 0x0991): 803 + /* Most audio usb devices lie about volume resolution. 804 + * Most Logitech webcams have res = 384. 805 + * Proboly there is some logitech magic behind this number --fishor 806 + */ 807 + if (!strcmp(kctl->id.name, "Mic Capture Volume")) { 808 + snd_printk(KERN_INFO 809 + "set resolution quirk: cval->res = 384\n"); 810 + cval->res = 384; 811 + } 812 + break; 813 + 814 + } 815 + } 816 + 768 817 /* 769 818 * retrieve the minimum and maximum values for the specified control 770 819 */ 771 - static int get_min_max(struct usb_mixer_elem_info *cval, int default_min) 820 + static int get_min_max_with_quirks(struct usb_mixer_elem_info *cval, 821 + int default_min, struct snd_kcontrol *kctl) 772 822 { 773 823 /* for failsafe */ 774 824 cval->min = default_min; ··· 894 844 cval->initialized = 1; 895 845 } 896 846 847 + if (kctl) 848 + volume_control_quirks(cval, kctl); 849 + 897 850 /* USB descriptions contain the dB scale in 1/256 dB unit 898 851 * while ALSA TLV contains in 1/100 dB unit 899 852 */ ··· 917 864 return 0; 918 865 } 919 866 867 + #define get_min_max(cval, def) get_min_max_with_quirks(cval, def, NULL) 920 868 921 869 /* get a feature/mixer unit info */ 922 870 static int mixer_ctl_feature_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) ··· 936 882 uinfo->value.integer.max = 1; 937 883 } else { 938 884 if (!cval->initialized) { 939 - get_min_max(cval, 0); 885 + get_min_max_with_quirks(cval, 0, kcontrol); 940 886 if (cval->initialized && cval->dBmin >= cval->dBmax) { 941 887 kcontrol->vd[0].access &= 942 888 ~(SNDRV_CTL_ELEM_ACCESS_TLV_READ | ··· 1099 1045 cval->ch_readonly = readonly_mask; 1100 1046 } 1101 1047 1102 - /* get min/max values */ 1103 - get_min_max(cval, 0); 1104 - 1105 1048 /* if all channels in the mask are marked read-only, make the control 1106 1049 * read-only. set_cur_mix_value() will check the mask again and won't 1107 1050 * issue write commands to read-only channels. */ ··· 1119 1068 if (! len && nameid) 1120 1069 len = snd_usb_copy_string_desc(state, nameid, 1121 1070 kctl->id.name, sizeof(kctl->id.name)); 1071 + 1072 + /* get min/max values */ 1073 + get_min_max_with_quirks(cval, 0, kctl); 1122 1074 1123 1075 switch (control) { 1124 1076 case UAC_FU_MUTE: ··· 1170 1116 strlcpy(kctl->id.name, audio_feature_info[control-1].name, 1171 1117 sizeof(kctl->id.name)); 1172 1118 break; 1173 - } 1174 - 1175 - /* volume control quirks */ 1176 - switch (state->chip->usb_id) { 1177 - case USB_ID(0x0471, 0x0101): 1178 - case USB_ID(0x0471, 0x0104): 1179 - case USB_ID(0x0471, 0x0105): 1180 - case USB_ID(0x0672, 0x1041): 1181 - /* quirk for UDA1321/N101. 1182 - * note that detection between firmware 2.1.1.7 (N101) 1183 - * and later 2.1.1.21 is not very clear from datasheets. 1184 - * I hope that the min value is -15360 for newer firmware --jk 1185 - */ 1186 - if (!strcmp(kctl->id.name, "PCM Playback Volume") && 1187 - cval->min == -15616) { 1188 - snd_printk(KERN_INFO 1189 - "set volume quirk for UDA1321/N101 chip\n"); 1190 - cval->max = -256; 1191 - } 1192 - break; 1193 - 1194 - case USB_ID(0x046d, 0x09a4): 1195 - if (!strcmp(kctl->id.name, "Mic Capture Volume")) { 1196 - snd_printk(KERN_INFO 1197 - "set volume quirk for QuickCam E3500\n"); 1198 - cval->min = 6080; 1199 - cval->max = 8768; 1200 - cval->res = 192; 1201 - } 1202 - break; 1203 - 1204 - case USB_ID(0x046d, 0x0808): 1205 - case USB_ID(0x046d, 0x0809): 1206 - case USB_ID(0x046d, 0x0991): 1207 - /* Most audio usb devices lie about volume resolution. 1208 - * Most Logitech webcams have res = 384. 1209 - * Proboly there is some logitech magic behind this number --fishor 1210 - */ 1211 - if (!strcmp(kctl->id.name, "Mic Capture Volume")) { 1212 - snd_printk(KERN_INFO 1213 - "set resolution quirk: cval->res = 384\n"); 1214 - cval->res = 384; 1215 - } 1216 - break; 1217 - 1218 1119 } 1219 1120 1220 1121 range = (cval->max - cval->min) / cval->res;