diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-27 15:23:34 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-27 15:23:34 -0500 |
commit | 30acd906b02470e7eb346401de966a33864d9af4 (patch) | |
tree | dff22c3357387970a674beccf2e6679e901f8ff7 | |
parent | 7bf2fbcdf5300d8b19fa36e37b5bcd8326c95c1d (diff) | |
parent | d0ec95fe6a8d9c7da6f9ff885cecbe7e328e2a2e (diff) |
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
-rw-r--r-- | sound/pci/bt87x.c | 19 | ||||
-rw-r--r-- | sound/pci/emu10k1/emu10k1_main.c | 6 | ||||
-rw-r--r-- | sound/pci/emu10k1/emupcm.c | 8 | ||||
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 3 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 1 | ||||
-rw-r--r-- | sound/pci/ice1712/revo.c | 37 |
6 files changed, 57 insertions, 17 deletions
diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c index cdd100dae855..9febe5509748 100644 --- a/sound/pci/bt87x.c +++ b/sound/pci/bt87x.c | |||
@@ -836,6 +836,8 @@ static struct { | |||
836 | {0x7063, 0x2000}, /* pcHDTV HD-2000 TV */ | 836 | {0x7063, 0x2000}, /* pcHDTV HD-2000 TV */ |
837 | }; | 837 | }; |
838 | 838 | ||
839 | static struct pci_driver driver; | ||
840 | |||
839 | /* return the id of the card, or a negative value if it's blacklisted */ | 841 | /* return the id of the card, or a negative value if it's blacklisted */ |
840 | static int snd_bt87x_detect_card(struct pci_dev *pci) | 842 | static int snd_bt87x_detect_card(struct pci_dev *pci) |
841 | { | 843 | { |
@@ -962,11 +964,24 @@ static DEFINE_PCI_DEVICE_TABLE(snd_bt87x_default_ids) = { | |||
962 | { } | 964 | { } |
963 | }; | 965 | }; |
964 | 966 | ||
965 | static struct pci_driver bt87x_driver = { | 967 | static struct pci_driver driver = { |
966 | .name = KBUILD_MODNAME, | 968 | .name = KBUILD_MODNAME, |
967 | .id_table = snd_bt87x_ids, | 969 | .id_table = snd_bt87x_ids, |
968 | .probe = snd_bt87x_probe, | 970 | .probe = snd_bt87x_probe, |
969 | .remove = snd_bt87x_remove, | 971 | .remove = snd_bt87x_remove, |
970 | }; | 972 | }; |
971 | 973 | ||
972 | module_pci_driver(bt87x_driver); | 974 | static int __init alsa_card_bt87x_init(void) |
975 | { | ||
976 | if (load_all) | ||
977 | driver.id_table = snd_bt87x_default_ids; | ||
978 | return pci_register_driver(&driver); | ||
979 | } | ||
980 | |||
981 | static void __exit alsa_card_bt87x_exit(void) | ||
982 | { | ||
983 | pci_unregister_driver(&driver); | ||
984 | } | ||
985 | |||
986 | module_init(alsa_card_bt87x_init) | ||
987 | module_exit(alsa_card_bt87x_exit) | ||
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c index a7c296a36a17..e6b016693240 100644 --- a/sound/pci/emu10k1/emu10k1_main.c +++ b/sound/pci/emu10k1/emu10k1_main.c | |||
@@ -862,6 +862,12 @@ static int snd_emu10k1_emu1010_init(struct snd_emu10k1 *emu) | |||
862 | filename, emu->firmware->size); | 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 | /* ID, should read & 0x7f = 0x55 when FPGA programmed. */ | 871 | /* ID, should read & 0x7f = 0x55 when FPGA programmed. */ |
866 | snd_emu1010_fpga_read(emu, EMU_HANA_ID, ®); | 872 | snd_emu1010_fpga_read(emu, EMU_HANA_ID, ®); |
867 | if ((reg & 0x3f) != 0x15) { | 873 | if ((reg & 0x3f) != 0x15) { |
diff --git a/sound/pci/emu10k1/emupcm.c b/sound/pci/emu10k1/emupcm.c index 748a286277eb..5ae1d045bdcb 100644 --- a/sound/pci/emu10k1/emupcm.c +++ b/sound/pci/emu10k1/emupcm.c | |||
@@ -1127,7 +1127,7 @@ static int snd_emu10k1_playback_open(struct snd_pcm_substream *substream) | |||
1127 | struct snd_emu10k1_pcm *epcm; | 1127 | struct snd_emu10k1_pcm *epcm; |
1128 | struct snd_emu10k1_pcm_mixer *mix; | 1128 | struct snd_emu10k1_pcm_mixer *mix; |
1129 | struct snd_pcm_runtime *runtime = substream->runtime; | 1129 | struct snd_pcm_runtime *runtime = substream->runtime; |
1130 | int i, err; | 1130 | int i, err, sample_rate; |
1131 | 1131 | ||
1132 | epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); | 1132 | epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); |
1133 | if (epcm == NULL) | 1133 | if (epcm == NULL) |
@@ -1146,7 +1146,11 @@ static int snd_emu10k1_playback_open(struct snd_pcm_substream *substream) | |||
1146 | kfree(epcm); | 1146 | kfree(epcm); |
1147 | return err; | 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 | if (err < 0) { | 1154 | if (err < 0) { |
1151 | kfree(epcm); | 1155 | kfree(epcm); |
1152 | return err; | 1156 | return err; |
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 21425fb51fe0..78e1827d0a95 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
@@ -1640,6 +1640,9 @@ static int generic_hdmi_build_jack(struct hda_codec *codec, int pin_idx) | |||
1640 | 1640 | ||
1641 | if (pcmdev > 0) | 1641 | if (pcmdev > 0) |
1642 | sprintf(hdmi_str + strlen(hdmi_str), ",pcm=%d", pcmdev); | 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 | return snd_hda_jack_add_kctl(codec, per_pin->pin_nid, hdmi_str, 0); | 1647 | return snd_hda_jack_add_kctl(codec, per_pin->pin_nid, hdmi_str, 0); |
1645 | } | 1648 | } |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 61478fd82565..2d4237bc0d8e 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -928,6 +928,7 @@ static int alc_codec_rename_from_preset(struct hda_codec *codec) | |||
928 | static const struct snd_pci_quirk beep_white_list[] = { | 928 | static const struct snd_pci_quirk beep_white_list[] = { |
929 | SND_PCI_QUIRK(0x1043, 0x103c, "ASUS", 1), | 929 | SND_PCI_QUIRK(0x1043, 0x103c, "ASUS", 1), |
930 | SND_PCI_QUIRK(0x1043, 0x829f, "ASUS", 1), | 930 | SND_PCI_QUIRK(0x1043, 0x829f, "ASUS", 1), |
931 | SND_PCI_QUIRK(0x1043, 0x8376, "EeePC", 1), | ||
931 | SND_PCI_QUIRK(0x1043, 0x83ce, "EeePC", 1), | 932 | SND_PCI_QUIRK(0x1043, 0x83ce, "EeePC", 1), |
932 | SND_PCI_QUIRK(0x1043, 0x831a, "EeePC", 1), | 933 | SND_PCI_QUIRK(0x1043, 0x831a, "EeePC", 1), |
933 | SND_PCI_QUIRK(0x1043, 0x834a, "EeePC", 1), | 934 | SND_PCI_QUIRK(0x1043, 0x834a, "EeePC", 1), |
diff --git a/sound/pci/ice1712/revo.c b/sound/pci/ice1712/revo.c index 7641080a9b5d..1112ec1953be 100644 --- a/sound/pci/ice1712/revo.c +++ b/sound/pci/ice1712/revo.c | |||
@@ -35,6 +35,7 @@ | |||
35 | struct revo51_spec { | 35 | struct revo51_spec { |
36 | struct snd_i2c_device *dev; | 36 | struct snd_i2c_device *dev; |
37 | struct snd_pt2258 *pt2258; | 37 | struct snd_pt2258 *pt2258; |
38 | struct ak4114 *ak4114; | ||
38 | }; | 39 | }; |
39 | 40 | ||
40 | static void revo_i2s_mclk_changed(struct snd_ice1712 *ice) | 41 | static void revo_i2s_mclk_changed(struct snd_ice1712 *ice) |
@@ -359,9 +360,9 @@ static struct snd_ak4xxx_private akm_ap192_priv = { | |||
359 | .cif = 0, | 360 | .cif = 0, |
360 | .data_mask = VT1724_REVO_CDOUT, | 361 | .data_mask = VT1724_REVO_CDOUT, |
361 | .clk_mask = VT1724_REVO_CCLK, | 362 | .clk_mask = VT1724_REVO_CCLK, |
362 | .cs_mask = VT1724_REVO_CS0 | VT1724_REVO_CS1, | 363 | .cs_mask = VT1724_REVO_CS0 | VT1724_REVO_CS3, |
363 | .cs_addr = VT1724_REVO_CS1, | 364 | .cs_addr = VT1724_REVO_CS3, |
364 | .cs_none = VT1724_REVO_CS0 | VT1724_REVO_CS1, | 365 | .cs_none = VT1724_REVO_CS0 | VT1724_REVO_CS3, |
365 | .add_flags = VT1724_REVO_CCLK, /* high at init */ | 366 | .add_flags = VT1724_REVO_CCLK, /* high at init */ |
366 | .mask_flags = 0, | 367 | .mask_flags = 0, |
367 | }; | 368 | }; |
@@ -372,7 +373,7 @@ static struct snd_ak4xxx_private akm_ap192_priv = { | |||
372 | * CCLK (pin 34) -- GPIO1 pin 51 (shared with AK4358) | 373 | * CCLK (pin 34) -- GPIO1 pin 51 (shared with AK4358) |
373 | * CSN (pin 35) -- GPIO7 pin 59 | 374 | * CSN (pin 35) -- GPIO7 pin 59 |
374 | */ | 375 | */ |
375 | #define AK4114_ADDR 0x02 | 376 | #define AK4114_ADDR 0x00 |
376 | 377 | ||
377 | static void write_data(struct snd_ice1712 *ice, unsigned int gpio, | 378 | static void write_data(struct snd_ice1712 *ice, unsigned int gpio, |
378 | unsigned int data, int idx) | 379 | unsigned int data, int idx) |
@@ -426,7 +427,7 @@ static unsigned int ap192_4wire_start(struct snd_ice1712 *ice) | |||
426 | tmp = snd_ice1712_gpio_read(ice); | 427 | tmp = snd_ice1712_gpio_read(ice); |
427 | tmp |= VT1724_REVO_CCLK; /* high at init */ | 428 | tmp |= VT1724_REVO_CCLK; /* high at init */ |
428 | tmp |= VT1724_REVO_CS0; | 429 | tmp |= VT1724_REVO_CS0; |
429 | tmp &= ~VT1724_REVO_CS1; | 430 | tmp &= ~VT1724_REVO_CS3; |
430 | snd_ice1712_gpio_write(ice, tmp); | 431 | snd_ice1712_gpio_write(ice, tmp); |
431 | udelay(1); | 432 | udelay(1); |
432 | return tmp; | 433 | return tmp; |
@@ -434,7 +435,7 @@ static unsigned int ap192_4wire_start(struct snd_ice1712 *ice) | |||
434 | 435 | ||
435 | static void ap192_4wire_finish(struct snd_ice1712 *ice, unsigned int tmp) | 436 | static void ap192_4wire_finish(struct snd_ice1712 *ice, unsigned int tmp) |
436 | { | 437 | { |
437 | tmp |= VT1724_REVO_CS1; | 438 | tmp |= VT1724_REVO_CS3; |
438 | tmp |= VT1724_REVO_CS0; | 439 | tmp |= VT1724_REVO_CS0; |
439 | snd_ice1712_gpio_write(ice, tmp); | 440 | snd_ice1712_gpio_write(ice, tmp); |
440 | udelay(1); | 441 | udelay(1); |
@@ -470,27 +471,32 @@ static unsigned char ap192_ak4114_read(void *private_data, unsigned char addr) | |||
470 | static int ap192_ak4114_init(struct snd_ice1712 *ice) | 471 | static int ap192_ak4114_init(struct snd_ice1712 *ice) |
471 | { | 472 | { |
472 | static const unsigned char ak4114_init_vals[] = { | 473 | static const unsigned char ak4114_init_vals[] = { |
473 | AK4114_RST | AK4114_PWN | AK4114_OCKS0 | AK4114_OCKS1, | 474 | AK4114_RST | AK4114_PWN | AK4114_OCKS0, |
474 | AK4114_DIF_I24I2S, | 475 | AK4114_DIF_I24I2S, |
475 | AK4114_TX1E, | 476 | AK4114_TX1E, |
476 | AK4114_EFH_1024 | AK4114_DIT | AK4114_IPS(1), | 477 | AK4114_EFH_1024 | AK4114_DIT | AK4114_IPS(0), |
477 | 0, | 478 | 0, |
478 | 0 | 479 | 0 |
479 | }; | 480 | }; |
480 | static const unsigned char ak4114_init_txcsb[] = { | 481 | static const unsigned char ak4114_init_txcsb[] = { |
481 | 0x41, 0x02, 0x2c, 0x00, 0x00 | 482 | 0x41, 0x02, 0x2c, 0x00, 0x00 |
482 | }; | 483 | }; |
483 | struct ak4114 *ak; | ||
484 | int err; | 484 | int err; |
485 | 485 | ||
486 | struct revo51_spec *spec; | ||
487 | spec = kzalloc(sizeof(*spec), GFP_KERNEL); | ||
488 | if (!spec) | ||
489 | return -ENOMEM; | ||
490 | ice->spec = spec; | ||
491 | |||
486 | err = snd_ak4114_create(ice->card, | 492 | err = snd_ak4114_create(ice->card, |
487 | ap192_ak4114_read, | 493 | ap192_ak4114_read, |
488 | ap192_ak4114_write, | 494 | ap192_ak4114_write, |
489 | ak4114_init_vals, ak4114_init_txcsb, | 495 | ak4114_init_vals, ak4114_init_txcsb, |
490 | ice, &ak); | 496 | ice, &spec->ak4114); |
491 | /* AK4114 in Revo cannot detect external rate correctly. | 497 | /* AK4114 in Revo cannot detect external rate correctly. |
492 | * No reason to stop capture stream due to incorrect checks */ | 498 | * No reason to stop capture stream due to incorrect checks */ |
493 | ak->check_flags = AK4114_CHECK_NO_RATE; | 499 | spec->ak4114->check_flags = AK4114_CHECK_NO_RATE; |
494 | 500 | ||
495 | return 0; /* error ignored; it's no fatal error */ | 501 | return 0; /* error ignored; it's no fatal error */ |
496 | } | 502 | } |
@@ -562,6 +568,9 @@ static int revo_init(struct snd_ice1712 *ice) | |||
562 | ice); | 568 | ice); |
563 | if (err < 0) | 569 | if (err < 0) |
564 | return err; | 570 | return err; |
571 | err = ap192_ak4114_init(ice); | ||
572 | if (err < 0) | ||
573 | return err; | ||
565 | 574 | ||
566 | /* unmute all codecs */ | 575 | /* unmute all codecs */ |
567 | snd_ice1712_gpio_write_bits(ice, VT1724_REVO_MUTE, | 576 | snd_ice1712_gpio_write_bits(ice, VT1724_REVO_MUTE, |
@@ -575,7 +584,7 @@ static int revo_init(struct snd_ice1712 *ice) | |||
575 | 584 | ||
576 | static int revo_add_controls(struct snd_ice1712 *ice) | 585 | static int revo_add_controls(struct snd_ice1712 *ice) |
577 | { | 586 | { |
578 | struct revo51_spec *spec; | 587 | struct revo51_spec *spec = ice->spec; |
579 | int err; | 588 | int err; |
580 | 589 | ||
581 | switch (ice->eeprom.subvendor) { | 590 | switch (ice->eeprom.subvendor) { |
@@ -597,7 +606,9 @@ static int revo_add_controls(struct snd_ice1712 *ice) | |||
597 | err = snd_ice1712_akm4xxx_build_controls(ice); | 606 | err = snd_ice1712_akm4xxx_build_controls(ice); |
598 | if (err < 0) | 607 | if (err < 0) |
599 | return err; | 608 | return err; |
600 | err = ap192_ak4114_init(ice); | 609 | /* only capture SPDIF over AK4114 */ |
610 | err = snd_ak4114_build(spec->ak4114, NULL, | ||
611 | ice->pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream); | ||
601 | if (err < 0) | 612 | if (err < 0) |
602 | return err; | 613 | return err; |
603 | break; | 614 | break; |