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

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: us122l: fix missing unlock in usb_stream_hwdep_vm_fault()
ALSA: hda - Fix quirk lists for realtek codecs
ALSA: hda - Add support of ALC272
ALSA: hda - Add ALC887 support
ALSA: hda - Add ALC1200 support
ALSA: hda - Fix PCI SSID of ASUS M90V
ALSA: hda - Add auto mic switch in realtek auto-probe mode
ALSA: Fix pxa2xx-ac97-lib.c compilation
ALSA: ASoC: Hide TLV320AIC26 configuration option for non-OpenFirwmare users
ALSA: hda: fix nid variable warning
ALSA: ASoC: Fix compile-time warning for tlv320aic23.c

+88 -39
+6 -6
sound/arm/pxa2xx-ac97-lib.c
··· 50 50 mutex_lock(&car_mutex); 51 51 52 52 /* set up primary or secondary codec space */ 53 - if ((cpu_is_pxa21x() || cpu_is_pxa25x()) && reg == AC97_GPIO_STATUS) 53 + if (cpu_is_pxa25x() && reg == AC97_GPIO_STATUS) 54 54 reg_addr = ac97->num ? &SMC_REG_BASE : &PMC_REG_BASE; 55 55 else 56 56 reg_addr = ac97->num ? &SAC_REG_BASE : &PAC_REG_BASE; ··· 90 90 mutex_lock(&car_mutex); 91 91 92 92 /* set up primary or secondary codec space */ 93 - if ((cpu_is_pxa21x() || cpu_is_pxa25x()) && reg == AC97_GPIO_STATUS) 93 + if (cpu_is_pxa25x() && reg == AC97_GPIO_STATUS) 94 94 reg_addr = ac97->num ? &SMC_REG_BASE : &PMC_REG_BASE; 95 95 else 96 96 reg_addr = ac97->num ? &SAC_REG_BASE : &PAC_REG_BASE; ··· 200 200 bool pxa2xx_ac97_try_warm_reset(struct snd_ac97 *ac97) 201 201 { 202 202 #ifdef CONFIG_PXA25x 203 - if (cpu_is_pxa21x() || cpu_is_pxa25x()) 203 + if (cpu_is_pxa25x()) 204 204 pxa_ac97_warm_pxa25x(); 205 205 else 206 206 #endif ··· 230 230 bool pxa2xx_ac97_try_cold_reset(struct snd_ac97 *ac97) 231 231 { 232 232 #ifdef CONFIG_PXA25x 233 - if (cpu_is_pxa21x() || cpu_is_pxa25x()) 233 + if (cpu_is_pxa25x()) 234 234 pxa_ac97_cold_pxa25x(); 235 235 else 236 236 #endif ··· 301 301 302 302 int pxa2xx_ac97_hw_resume(void) 303 303 { 304 - if (cpu_is_pxa21x() || cpu_is_pxa25x() || cpu_is_pxa27x()) { 304 + if (cpu_is_pxa25x() || cpu_is_pxa27x()) { 305 305 pxa_gpio_mode(GPIO31_SYNC_AC97_MD); 306 306 pxa_gpio_mode(GPIO30_SDATA_OUT_AC97_MD); 307 307 pxa_gpio_mode(GPIO28_BITCLK_AC97_MD); ··· 325 325 if (ret < 0) 326 326 goto err; 327 327 328 - if (cpu_is_pxa21x() || cpu_is_pxa25x() || cpu_is_pxa27x()) { 328 + if (cpu_is_pxa25x() || cpu_is_pxa27x()) { 329 329 pxa_gpio_mode(GPIO31_SYNC_AC97_MD); 330 330 pxa_gpio_mode(GPIO30_SDATA_OUT_AC97_MD); 331 331 pxa_gpio_mode(GPIO28_BITCLK_AC97_MD);
+68 -20
sound/pci/hda/patch_realtek.c
··· 822 822 spec->jack_present ? 0 : PIN_OUT); 823 823 } 824 824 825 + static void alc_mic_automute(struct hda_codec *codec) 826 + { 827 + struct alc_spec *spec = codec->spec; 828 + unsigned int present; 829 + unsigned int mic_nid = spec->autocfg.input_pins[AUTO_PIN_MIC]; 830 + unsigned int fmic_nid = spec->autocfg.input_pins[AUTO_PIN_FRONT_MIC]; 831 + unsigned int mix_nid = spec->capsrc_nids[0]; 832 + unsigned int capsrc_idx_mic, capsrc_idx_fmic; 833 + 834 + capsrc_idx_mic = mic_nid - 0x18; 835 + capsrc_idx_fmic = fmic_nid - 0x18; 836 + present = snd_hda_codec_read(codec, mic_nid, 0, 837 + AC_VERB_GET_PIN_SENSE, 0) & 0x80000000; 838 + snd_hda_codec_write(codec, mix_nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, 839 + 0x7000 | (capsrc_idx_mic << 8) | (present ? 0 : 0x80)); 840 + snd_hda_codec_write(codec, mix_nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, 841 + 0x7000 | (capsrc_idx_fmic << 8) | (present ? 0x80 : 0)); 842 + snd_hda_codec_amp_stereo(codec, 0x0b, HDA_INPUT, capsrc_idx_fmic, 843 + HDA_AMP_MUTE, present ? HDA_AMP_MUTE : 0); 844 + } 845 + 825 846 /* unsolicited event for HP jack sensing */ 826 847 static void alc_sku_unsol_event(struct hda_codec *codec, unsigned int res) 827 848 { ··· 850 829 res >>= 28; 851 830 else 852 831 res >>= 26; 853 - if (res != ALC880_HP_EVENT) 854 - return; 832 + if (res == ALC880_HP_EVENT) 833 + alc_sku_automute(codec); 855 834 835 + if (res == ALC880_MIC_EVENT) 836 + alc_mic_automute(codec); 837 + } 838 + 839 + static void alc_inithook(struct hda_codec *codec) 840 + { 856 841 alc_sku_automute(codec); 842 + alc_mic_automute(codec); 857 843 } 858 844 859 845 /* additional initialization for ALC888 variants */ ··· 1046 1018 else 1047 1019 return; 1048 1020 } 1021 + if (spec->autocfg.hp_pins[0]) 1022 + snd_hda_codec_write(codec, spec->autocfg.hp_pins[0], 0, 1023 + AC_VERB_SET_UNSOLICITED_ENABLE, 1024 + AC_USRSP_EN | ALC880_HP_EVENT); 1049 1025 1050 - snd_hda_codec_write(codec, spec->autocfg.hp_pins[0], 0, 1051 - AC_VERB_SET_UNSOLICITED_ENABLE, 1052 - AC_USRSP_EN | ALC880_HP_EVENT); 1026 + if (spec->autocfg.input_pins[AUTO_PIN_MIC] && 1027 + spec->autocfg.input_pins[AUTO_PIN_FRONT_MIC]) 1028 + snd_hda_codec_write(codec, 1029 + spec->autocfg.input_pins[AUTO_PIN_MIC], 0, 1030 + AC_VERB_SET_UNSOLICITED_ENABLE, 1031 + AC_USRSP_EN | ALC880_MIC_EVENT); 1053 1032 1054 1033 spec->unsol_event = alc_sku_unsol_event; 1055 1034 } ··· 3843 3808 alc880_auto_init_extra_out(codec); 3844 3809 alc880_auto_init_analog_input(codec); 3845 3810 if (spec->unsol_event) 3846 - alc_sku_automute(codec); 3811 + alc_inithook(codec); 3847 3812 } 3848 3813 3849 3814 /* ··· 5254 5219 alc260_auto_init_multi_out(codec); 5255 5220 alc260_auto_init_analog_input(codec); 5256 5221 if (spec->unsol_event) 5257 - alc_sku_automute(codec); 5222 + alc_inithook(codec); 5258 5223 } 5259 5224 5260 5225 #ifdef CONFIG_SND_HDA_POWER_SAVE ··· 6664 6629 alc882_auto_init_analog_input(codec); 6665 6630 alc882_auto_init_input_src(codec); 6666 6631 if (spec->unsol_event) 6667 - alc_sku_automute(codec); 6632 + alc_inithook(codec); 6668 6633 } 6669 6634 6670 6635 static int patch_alc883(struct hda_codec *codec); /* called in patch_alc882() */ ··· 8341 8306 SND_PCI_QUIRK(0x103c, 0x2a4f, "HP Samba", ALC888_3ST_HP), 8342 8307 SND_PCI_QUIRK(0x103c, 0x2a60, "HP Lucknow", ALC888_3ST_HP), 8343 8308 SND_PCI_QUIRK(0x103c, 0x2a61, "HP Nettle", ALC883_6ST_DIG), 8309 + SND_PCI_QUIRK(0x1043, 0x1873, "Asus M90V", ALC888_ASUS_M90V), 8344 8310 SND_PCI_QUIRK(0x1043, 0x8249, "Asus M2A-VM HDMI", ALC883_3ST_6ch_DIG), 8345 - SND_PCI_QUIRK(0x1043, 0x8317, "Asus M90V", ALC888_ASUS_M90V), 8346 8311 SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_ASUS_EEE1601), 8347 8312 SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG), 8348 8313 SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC883_6ST_DIG), ··· 8793 8758 alc883_auto_init_analog_input(codec); 8794 8759 alc883_auto_init_input_src(codec); 8795 8760 if (spec->unsol_event) 8796 - alc_sku_automute(codec); 8761 + alc_inithook(codec); 8797 8762 } 8798 8763 8799 8764 static int patch_alc883(struct hda_codec *codec) ··· 8837 8802 8838 8803 switch (codec->vendor_id) { 8839 8804 case 0x10ec0888: 8840 - spec->stream_name_analog = "ALC888 Analog"; 8841 - spec->stream_name_digital = "ALC888 Digital"; 8805 + if (codec->revision_id == 0x100101) { 8806 + spec->stream_name_analog = "ALC1200 Analog"; 8807 + spec->stream_name_digital = "ALC1200 Digital"; 8808 + } else { 8809 + spec->stream_name_analog = "ALC888 Analog"; 8810 + spec->stream_name_digital = "ALC888 Digital"; 8811 + } 8842 8812 break; 8843 8813 case 0x10ec0889: 8844 8814 spec->stream_name_analog = "ALC889 Analog"; ··· 10325 10285 alc262_auto_init_analog_input(codec); 10326 10286 alc262_auto_init_input_src(codec); 10327 10287 if (spec->unsol_event) 10328 - alc_sku_automute(codec); 10288 + alc_inithook(codec); 10329 10289 } 10330 10290 10331 10291 /* ··· 10383 10343 SND_PCI_QUIRK(0x104d, 0x9015, "Sony 0x9015", ALC262_SONY_ASSAMD), 10384 10344 SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1", 10385 10345 ALC262_TOSHIBA_RX1), 10386 - SND_PCI_QUIRK(0x1179, 0x0268, "Toshiba S06", ALC262_TOSHIBA_S06), 10346 + SND_PCI_QUIRK(0x1179, 0xff7b, "Toshiba S06", ALC262_TOSHIBA_S06), 10387 10347 SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu", ALC262_FUJITSU), 10388 10348 SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FUJITSU), 10389 10349 SND_PCI_QUIRK(0x144d, 0xc032, "Samsung Q1 Ultra", ALC262_ULTRA), ··· 11457 11417 alc268_auto_init_mono_speaker_out(codec); 11458 11418 alc268_auto_init_analog_input(codec); 11459 11419 if (spec->unsol_event) 11460 - alc_sku_automute(codec); 11420 + alc_inithook(codec); 11461 11421 } 11462 11422 11463 11423 /* ··· 12240 12200 alc269_auto_init_hp_out(codec); 12241 12201 alc269_auto_init_analog_input(codec); 12242 12202 if (spec->unsol_event) 12243 - alc_sku_automute(codec); 12203 + alc_inithook(codec); 12244 12204 } 12245 12205 12246 12206 /* ··· 13321 13281 alc861_auto_init_hp_out(codec); 13322 13282 alc861_auto_init_analog_input(codec); 13323 13283 if (spec->unsol_event) 13324 - alc_sku_automute(codec); 13284 + alc_inithook(codec); 13325 13285 } 13326 13286 13327 13287 #ifdef CONFIG_SND_HDA_POWER_SAVE ··· 14433 14393 alc861vd_auto_init_analog_input(codec); 14434 14394 alc861vd_auto_init_input_src(codec); 14435 14395 if (spec->unsol_event) 14436 - alc_sku_automute(codec); 14396 + alc_inithook(codec); 14437 14397 } 14438 14398 14439 14399 static int patch_alc861vd(struct hda_codec *codec) ··· 15707 15667 15708 15668 static struct snd_pci_quirk alc662_cfg_tbl[] = { 15709 15669 SND_PCI_QUIRK(0x1043, 0x1878, "ASUS M51VA", ALC663_ASUS_M51VA), 15710 - SND_PCI_QUIRK(0x1043, 0x19a3, "ASUS M51VA", ALC663_ASUS_G50V), 15670 + SND_PCI_QUIRK(0x1043, 0x19a3, "ASUS G50V", ALC663_ASUS_G50V), 15711 15671 SND_PCI_QUIRK(0x1043, 0x8290, "ASUS P5GC-MX", ALC662_3ST_6ch_DIG), 15712 15672 SND_PCI_QUIRK(0x1043, 0x82a1, "ASUS Eeepc", ALC662_ASUS_EEEPC_P701), 15713 15673 SND_PCI_QUIRK(0x1043, 0x82d1, "ASUS Eeepc EP20", ALC662_ASUS_EEEPC_EP20), ··· 15720 15680 SND_PCI_QUIRK(0x1043, 0x11d3, "ASUS NB", ALC663_ASUS_MODE1), 15721 15681 SND_PCI_QUIRK(0x1043, 0x1203, "ASUS NB", ALC663_ASUS_MODE1), 15722 15682 SND_PCI_QUIRK(0x1043, 0x19e3, "ASUS NB", ALC663_ASUS_MODE1), 15683 + SND_PCI_QUIRK(0x1043, 0x1993, "ASUS N20", ALC663_ASUS_MODE1), 15723 15684 SND_PCI_QUIRK(0x1043, 0x19c3, "ASUS F5Z/F6x", ALC662_ASUS_MODE2), 15724 15685 SND_PCI_QUIRK(0x1043, 0x1339, "ASUS NB", ALC662_ASUS_MODE2), 15725 15686 SND_PCI_QUIRK(0x1043, 0x1913, "ASUS NB", ALC662_ASUS_MODE2), ··· 16264 16223 alc662_auto_init_analog_input(codec); 16265 16224 alc662_auto_init_input_src(codec); 16266 16225 if (spec->unsol_event) 16267 - alc_sku_automute(codec); 16226 + alc_inithook(codec); 16268 16227 } 16269 16228 16270 16229 static int patch_alc662(struct hda_codec *codec) ··· 16309 16268 if (codec->vendor_id == 0x10ec0663) { 16310 16269 spec->stream_name_analog = "ALC663 Analog"; 16311 16270 spec->stream_name_digital = "ALC663 Digital"; 16271 + } else if (codec->vendor_id == 0x10ec0272) { 16272 + spec->stream_name_analog = "ALC272 Analog"; 16273 + spec->stream_name_digital = "ALC272 Digital"; 16312 16274 } else { 16313 16275 spec->stream_name_analog = "ALC662 Analog"; 16314 16276 spec->stream_name_digital = "ALC662 Digital"; ··· 16349 16305 { .id = 0x10ec0267, .name = "ALC267", .patch = patch_alc268 }, 16350 16306 { .id = 0x10ec0268, .name = "ALC268", .patch = patch_alc268 }, 16351 16307 { .id = 0x10ec0269, .name = "ALC269", .patch = patch_alc269 }, 16308 + { .id = 0x10ec0272, .name = "ALC272", .patch = patch_alc662 }, 16352 16309 { .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660", 16353 16310 .patch = patch_alc861 }, 16354 16311 { .id = 0x10ec0660, .name = "ALC660-VD", .patch = patch_alc861vd }, ··· 16368 16323 { .id = 0x10ec0885, .rev = 0x100103, .name = "ALC889A", 16369 16324 .patch = patch_alc882 }, /* should be patch_alc883() in future */ 16370 16325 { .id = 0x10ec0885, .name = "ALC885", .patch = patch_alc882 }, 16326 + { .id = 0x10ec0887, .name = "ALC887", .patch = patch_alc883 }, 16371 16327 { .id = 0x10ec0888, .name = "ALC888", .patch = patch_alc883 }, 16328 + { .id = 0x10ec0888, .rev = 0x100101, .name = "ALC1200", 16329 + .patch = patch_alc883 }, 16372 16330 { .id = 0x10ec0889, .name = "ALC889", .patch = patch_alc883 }, 16373 16331 {} /* terminator */ 16374 16332 };
+1 -1
sound/pci/hda/patch_sigmatel.c
··· 2816 2816 static const char *chname[4] = { 2817 2817 "Front", "Surround", NULL /*CLFE*/, "Side" 2818 2818 }; 2819 - hda_nid_t nid; 2819 + hda_nid_t nid = 0; 2820 2820 int i, err; 2821 2821 2822 2822 struct sigmatel_spec *spec = codec->spec;
+1 -1
sound/soc/codecs/Kconfig
··· 68 68 depends on I2C 69 69 70 70 config SND_SOC_TLV320AIC26 71 - tristate "TI TLV320AIC26 Codec support" 71 + tristate "TI TLV320AIC26 Codec support" if SND_SOC_OF_SIMPLE 72 72 depends on SPI 73 73 74 74 config SND_SOC_TLV320AIC3X
+5 -5
sound/soc/codecs/tlv320aic23.c
··· 84 84 unsigned int value) 85 85 { 86 86 87 - u8 data; 87 + u8 data[2]; 88 88 89 89 /* TLV320AIC23 has 7 bit address and 9 bits of data 90 90 * so we need to switch one data bit into reg and rest ··· 96 96 return -1; 97 97 } 98 98 99 - data = (reg << 1) | (value >> 8 & 0x01); 99 + data[0] = (reg << 1) | (value >> 8 & 0x01); 100 + data[1] = value & 0xff; 100 101 101 102 tlv320aic23_write_reg_cache(codec, reg, value); 102 103 103 - if (codec->hw_write(codec->control_data, data, 104 - (value & 0xff)) == 0) 104 + if (codec->hw_write(codec->control_data, data, 2) == 2) 105 105 return 0; 106 106 107 107 printk(KERN_ERR "%s cannot write %03x to register R%d\n", __func__, ··· 674 674 675 675 tlv320aic23_socdev = socdev; 676 676 #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) 677 - codec->hw_write = (hw_write_t) i2c_smbus_write_byte_data; 677 + codec->hw_write = (hw_write_t) i2c_master_send; 678 678 codec->hw_read = NULL; 679 679 ret = i2c_add_driver(&tlv320aic23_i2c_driver); 680 680 if (ret != 0)
+7 -6
sound/usb/usx2y/us122l.c
··· 118 118 void *vaddr; 119 119 struct us122l *us122l = area->vm_private_data; 120 120 struct usb_stream *s; 121 - int vm_f = VM_FAULT_SIGBUS; 122 121 123 122 mutex_lock(&us122l->mutex); 124 123 s = us122l->sk.s; 125 124 if (!s) 126 - goto out; 125 + goto unlock; 127 126 128 127 offset = vmf->pgoff << PAGE_SHIFT; 129 128 if (offset < PAGE_ALIGN(s->read_size)) ··· 130 131 else { 131 132 offset -= PAGE_ALIGN(s->read_size); 132 133 if (offset >= PAGE_ALIGN(s->write_size)) 133 - goto out; 134 + goto unlock; 134 135 135 136 vaddr = us122l->sk.write_page + offset; 136 137 } ··· 140 141 mutex_unlock(&us122l->mutex); 141 142 142 143 vmf->page = page; 143 - vm_f = 0; 144 - out: 145 - return vm_f; 144 + 145 + return 0; 146 + unlock: 147 + mutex_unlock(&us122l->mutex); 148 + return VM_FAULT_SIGBUS; 146 149 } 147 150 148 151 static void usb_stream_hwdep_vm_close(struct vm_area_struct *area)