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

Merge tag 'sound-3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
"Nothing serious but just a few regression fixes and quirk additions,
such as emu1010 firmware loading fixes, M-Audio AP192 SPDIF fix, and
HD-audio HDMI jack detection fix."

* tag 'sound-3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: emu10k1: Allow to switch hardware sampe rate on EMU
ALSA: hda - Enable beep for ASUS EeeBox EBP1501P
ALSA: emu10k1: Load firmware when it was already cached
ALSA: ice1724: M-Audio Audiophile192: Fix SPDIF input
ALSA: bt87x: Make load_all parameter working again
ALSA: emu10k1: Fix regression in emu1010 firmware loading
ALSA: hda - hdmi: Make jacks phantom, if they're not detectable

+57 -17
+17 -2
sound/pci/bt87x.c
··· 836 836 {0x7063, 0x2000}, /* pcHDTV HD-2000 TV */ 837 837 }; 838 838 839 + static struct pci_driver driver; 840 + 839 841 /* return the id of the card, or a negative value if it's blacklisted */ 840 842 static int snd_bt87x_detect_card(struct pci_dev *pci) 841 843 { ··· 964 962 { } 965 963 }; 966 964 967 - static struct pci_driver bt87x_driver = { 965 + static struct pci_driver driver = { 968 966 .name = KBUILD_MODNAME, 969 967 .id_table = snd_bt87x_ids, 970 968 .probe = snd_bt87x_probe, 971 969 .remove = snd_bt87x_remove, 972 970 }; 973 971 974 - module_pci_driver(bt87x_driver); 972 + static int __init alsa_card_bt87x_init(void) 973 + { 974 + if (load_all) 975 + driver.id_table = snd_bt87x_default_ids; 976 + return pci_register_driver(&driver); 977 + } 978 + 979 + static void __exit alsa_card_bt87x_exit(void) 980 + { 981 + pci_unregister_driver(&driver); 982 + } 983 + 984 + module_init(alsa_card_bt87x_init) 985 + module_exit(alsa_card_bt87x_exit)
+6
sound/pci/emu10k1/emu10k1_main.c
··· 862 862 filename, emu->firmware->size); 863 863 } 864 864 865 + err = snd_emu1010_load_firmware(emu); 866 + if (err != 0) { 867 + snd_printk(KERN_INFO "emu1010: Loading Firmware failed\n"); 868 + return err; 869 + } 870 + 865 871 /* ID, should read & 0x7f = 0x55 when FPGA programmed. */ 866 872 snd_emu1010_fpga_read(emu, EMU_HANA_ID, &reg); 867 873 if ((reg & 0x3f) != 0x15) {
+6 -2
sound/pci/emu10k1/emupcm.c
··· 1127 1127 struct snd_emu10k1_pcm *epcm; 1128 1128 struct snd_emu10k1_pcm_mixer *mix; 1129 1129 struct snd_pcm_runtime *runtime = substream->runtime; 1130 - int i, err; 1130 + int i, err, sample_rate; 1131 1131 1132 1132 epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); 1133 1133 if (epcm == NULL) ··· 1146 1146 kfree(epcm); 1147 1147 return err; 1148 1148 } 1149 - err = snd_pcm_hw_rule_noresample(runtime, 48000); 1149 + if (emu->card_capabilities->emu_model && emu->emu1010.internal_clock == 0) 1150 + sample_rate = 44100; 1151 + else 1152 + sample_rate = 48000; 1153 + err = snd_pcm_hw_rule_noresample(runtime, sample_rate); 1150 1154 if (err < 0) { 1151 1155 kfree(epcm); 1152 1156 return err;
+3
sound/pci/hda/patch_hdmi.c
··· 1640 1640 1641 1641 if (pcmdev > 0) 1642 1642 sprintf(hdmi_str + strlen(hdmi_str), ",pcm=%d", pcmdev); 1643 + if (!is_jack_detectable(codec, per_pin->pin_nid)) 1644 + strncat(hdmi_str, " Phantom", 1645 + sizeof(hdmi_str) - strlen(hdmi_str) - 1); 1643 1646 1644 1647 return snd_hda_jack_add_kctl(codec, per_pin->pin_nid, hdmi_str, 0); 1645 1648 }
+1
sound/pci/hda/patch_realtek.c
··· 928 928 static const struct snd_pci_quirk beep_white_list[] = { 929 929 SND_PCI_QUIRK(0x1043, 0x103c, "ASUS", 1), 930 930 SND_PCI_QUIRK(0x1043, 0x829f, "ASUS", 1), 931 + SND_PCI_QUIRK(0x1043, 0x8376, "EeePC", 1), 931 932 SND_PCI_QUIRK(0x1043, 0x83ce, "EeePC", 1), 932 933 SND_PCI_QUIRK(0x1043, 0x831a, "EeePC", 1), 933 934 SND_PCI_QUIRK(0x1043, 0x834a, "EeePC", 1),
+24 -13
sound/pci/ice1712/revo.c
··· 35 35 struct revo51_spec { 36 36 struct snd_i2c_device *dev; 37 37 struct snd_pt2258 *pt2258; 38 + struct ak4114 *ak4114; 38 39 }; 39 40 40 41 static void revo_i2s_mclk_changed(struct snd_ice1712 *ice) ··· 360 359 .cif = 0, 361 360 .data_mask = VT1724_REVO_CDOUT, 362 361 .clk_mask = VT1724_REVO_CCLK, 363 - .cs_mask = VT1724_REVO_CS0 | VT1724_REVO_CS1, 364 - .cs_addr = VT1724_REVO_CS1, 365 - .cs_none = VT1724_REVO_CS0 | VT1724_REVO_CS1, 362 + .cs_mask = VT1724_REVO_CS0 | VT1724_REVO_CS3, 363 + .cs_addr = VT1724_REVO_CS3, 364 + .cs_none = VT1724_REVO_CS0 | VT1724_REVO_CS3, 366 365 .add_flags = VT1724_REVO_CCLK, /* high at init */ 367 366 .mask_flags = 0, 368 367 }; ··· 373 372 * CCLK (pin 34) -- GPIO1 pin 51 (shared with AK4358) 374 373 * CSN (pin 35) -- GPIO7 pin 59 375 374 */ 376 - #define AK4114_ADDR 0x02 375 + #define AK4114_ADDR 0x00 377 376 378 377 static void write_data(struct snd_ice1712 *ice, unsigned int gpio, 379 378 unsigned int data, int idx) ··· 427 426 tmp = snd_ice1712_gpio_read(ice); 428 427 tmp |= VT1724_REVO_CCLK; /* high at init */ 429 428 tmp |= VT1724_REVO_CS0; 430 - tmp &= ~VT1724_REVO_CS1; 429 + tmp &= ~VT1724_REVO_CS3; 431 430 snd_ice1712_gpio_write(ice, tmp); 432 431 udelay(1); 433 432 return tmp; ··· 435 434 436 435 static void ap192_4wire_finish(struct snd_ice1712 *ice, unsigned int tmp) 437 436 { 438 - tmp |= VT1724_REVO_CS1; 437 + tmp |= VT1724_REVO_CS3; 439 438 tmp |= VT1724_REVO_CS0; 440 439 snd_ice1712_gpio_write(ice, tmp); 441 440 udelay(1); ··· 471 470 static int ap192_ak4114_init(struct snd_ice1712 *ice) 472 471 { 473 472 static const unsigned char ak4114_init_vals[] = { 474 - AK4114_RST | AK4114_PWN | AK4114_OCKS0 | AK4114_OCKS1, 473 + AK4114_RST | AK4114_PWN | AK4114_OCKS0, 475 474 AK4114_DIF_I24I2S, 476 475 AK4114_TX1E, 477 - AK4114_EFH_1024 | AK4114_DIT | AK4114_IPS(1), 476 + AK4114_EFH_1024 | AK4114_DIT | AK4114_IPS(0), 478 477 0, 479 478 0 480 479 }; 481 480 static const unsigned char ak4114_init_txcsb[] = { 482 481 0x41, 0x02, 0x2c, 0x00, 0x00 483 482 }; 484 - struct ak4114 *ak; 485 483 int err; 484 + 485 + struct revo51_spec *spec; 486 + spec = kzalloc(sizeof(*spec), GFP_KERNEL); 487 + if (!spec) 488 + return -ENOMEM; 489 + ice->spec = spec; 486 490 487 491 err = snd_ak4114_create(ice->card, 488 492 ap192_ak4114_read, 489 493 ap192_ak4114_write, 490 494 ak4114_init_vals, ak4114_init_txcsb, 491 - ice, &ak); 495 + ice, &spec->ak4114); 492 496 /* AK4114 in Revo cannot detect external rate correctly. 493 497 * No reason to stop capture stream due to incorrect checks */ 494 - ak->check_flags = AK4114_CHECK_NO_RATE; 498 + spec->ak4114->check_flags = AK4114_CHECK_NO_RATE; 495 499 496 500 return 0; /* error ignored; it's no fatal error */ 497 501 } ··· 568 562 ice); 569 563 if (err < 0) 570 564 return err; 565 + err = ap192_ak4114_init(ice); 566 + if (err < 0) 567 + return err; 571 568 572 569 /* unmute all codecs */ 573 570 snd_ice1712_gpio_write_bits(ice, VT1724_REVO_MUTE, ··· 584 575 585 576 static int revo_add_controls(struct snd_ice1712 *ice) 586 577 { 587 - struct revo51_spec *spec; 578 + struct revo51_spec *spec = ice->spec; 588 579 int err; 589 580 590 581 switch (ice->eeprom.subvendor) { ··· 606 597 err = snd_ice1712_akm4xxx_build_controls(ice); 607 598 if (err < 0) 608 599 return err; 609 - err = ap192_ak4114_init(ice); 600 + /* only capture SPDIF over AK4114 */ 601 + err = snd_ak4114_build(spec->ak4114, NULL, 602 + ice->pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream); 610 603 if (err < 0) 611 604 return err; 612 605 break;