mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
Sound fixes for 3.9-rc1
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. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iQIcBAABAgAGBQJRLiMZAAoJEGwxgFQ9KSmk8qgQALJy1QUNBagzzLtgNzYOOMYz 86XWBUnd+Ef+LS6RIYGHkxSImRDqITU+y/khF+96f2D4qAAlOPxZcx2yDYC0a/K9 pUNdv+NHWTrOlt5DFZmPMaVqwsxwW3KR1VJsr/+zPD1VzdnuHbLNxhdioyMkWYNm daSEm/VvE74QTGxfXwsy0QbX3c064MXDHZjDFBacON1W/rnqaqfXLUBloMbhqusa qfXNVWGhuQdrPzQ6LxDZ6Uk0yHlQCkOqCDs6KbdomzI1yHEMrdeq78DQY+Oh/DY4 ruDPLnqzbGzyg8fljvW0+V9aM8VjFOpBk35E1srVAjO/Dqo7C2nfI9wjVOJmkVIZ e/tajibccnB68iY+AQMEQpuVLbEaGBdNccgepOq/ZJjyY3qfU0dL3tEQfGbxBXx8 Jmsmz/L7P7n/0Wxk6zd+GcFc0I7BkPFaIDYe7smfhxMPS72bxAyPlG1+iBdThDJ3 aSgWGVxG/spObyVUFNjXgyO4mVdu/LZJ1g/41023TUG3cetCJKZ2UHp6q4/V5TzU JVsBUwco49+hcCg6X05DMKhQ5Bx9txhPpRlNsPr7wNPEzBYt0cGlJxITca2NCnIG p18wZMLcArZni/xhjfbSHPJV7Vi25HXI0tylIZKdkQ0LPIBseujNCm3dezGiIi7z nTQ8JMtWCtlb+Y5V7oGf =vGd9 -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
30acd906b0
@ -836,6 +836,8 @@ static struct {
|
|||||||
{0x7063, 0x2000}, /* pcHDTV HD-2000 TV */
|
{0x7063, 0x2000}, /* pcHDTV HD-2000 TV */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct pci_driver driver;
|
||||||
|
|
||||||
/* return the id of the card, or a negative value if it's blacklisted */
|
/* return the id of the card, or a negative value if it's blacklisted */
|
||||||
static int snd_bt87x_detect_card(struct pci_dev *pci)
|
static int snd_bt87x_detect_card(struct pci_dev *pci)
|
||||||
{
|
{
|
||||||
@ -962,11 +964,24 @@ static DEFINE_PCI_DEVICE_TABLE(snd_bt87x_default_ids) = {
|
|||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct pci_driver bt87x_driver = {
|
static struct pci_driver driver = {
|
||||||
.name = KBUILD_MODNAME,
|
.name = KBUILD_MODNAME,
|
||||||
.id_table = snd_bt87x_ids,
|
.id_table = snd_bt87x_ids,
|
||||||
.probe = snd_bt87x_probe,
|
.probe = snd_bt87x_probe,
|
||||||
.remove = snd_bt87x_remove,
|
.remove = snd_bt87x_remove,
|
||||||
};
|
};
|
||||||
|
|
||||||
module_pci_driver(bt87x_driver);
|
static int __init alsa_card_bt87x_init(void)
|
||||||
|
{
|
||||||
|
if (load_all)
|
||||||
|
driver.id_table = snd_bt87x_default_ids;
|
||||||
|
return pci_register_driver(&driver);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void __exit alsa_card_bt87x_exit(void)
|
||||||
|
{
|
||||||
|
pci_unregister_driver(&driver);
|
||||||
|
}
|
||||||
|
|
||||||
|
module_init(alsa_card_bt87x_init)
|
||||||
|
module_exit(alsa_card_bt87x_exit)
|
||||||
|
@ -862,6 +862,12 @@ static int snd_emu10k1_emu1010_init(struct snd_emu10k1 *emu)
|
|||||||
filename, emu->firmware->size);
|
filename, emu->firmware->size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = snd_emu1010_load_firmware(emu);
|
||||||
|
if (err != 0) {
|
||||||
|
snd_printk(KERN_INFO "emu1010: Loading Firmware failed\n");
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
/* ID, should read & 0x7f = 0x55 when FPGA programmed. */
|
/* ID, should read & 0x7f = 0x55 when FPGA programmed. */
|
||||||
snd_emu1010_fpga_read(emu, EMU_HANA_ID, ®);
|
snd_emu1010_fpga_read(emu, EMU_HANA_ID, ®);
|
||||||
if ((reg & 0x3f) != 0x15) {
|
if ((reg & 0x3f) != 0x15) {
|
||||||
|
@ -1127,7 +1127,7 @@ static int snd_emu10k1_playback_open(struct snd_pcm_substream *substream)
|
|||||||
struct snd_emu10k1_pcm *epcm;
|
struct snd_emu10k1_pcm *epcm;
|
||||||
struct snd_emu10k1_pcm_mixer *mix;
|
struct snd_emu10k1_pcm_mixer *mix;
|
||||||
struct snd_pcm_runtime *runtime = substream->runtime;
|
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||||
int i, err;
|
int i, err, sample_rate;
|
||||||
|
|
||||||
epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
|
epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
|
||||||
if (epcm == NULL)
|
if (epcm == NULL)
|
||||||
@ -1146,7 +1146,11 @@ static int snd_emu10k1_playback_open(struct snd_pcm_substream *substream)
|
|||||||
kfree(epcm);
|
kfree(epcm);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
err = snd_pcm_hw_rule_noresample(runtime, 48000);
|
if (emu->card_capabilities->emu_model && emu->emu1010.internal_clock == 0)
|
||||||
|
sample_rate = 44100;
|
||||||
|
else
|
||||||
|
sample_rate = 48000;
|
||||||
|
err = snd_pcm_hw_rule_noresample(runtime, sample_rate);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
kfree(epcm);
|
kfree(epcm);
|
||||||
return err;
|
return err;
|
||||||
|
@ -1640,6 +1640,9 @@ static int generic_hdmi_build_jack(struct hda_codec *codec, int pin_idx)
|
|||||||
|
|
||||||
if (pcmdev > 0)
|
if (pcmdev > 0)
|
||||||
sprintf(hdmi_str + strlen(hdmi_str), ",pcm=%d", pcmdev);
|
sprintf(hdmi_str + strlen(hdmi_str), ",pcm=%d", pcmdev);
|
||||||
|
if (!is_jack_detectable(codec, per_pin->pin_nid))
|
||||||
|
strncat(hdmi_str, " Phantom",
|
||||||
|
sizeof(hdmi_str) - strlen(hdmi_str) - 1);
|
||||||
|
|
||||||
return snd_hda_jack_add_kctl(codec, per_pin->pin_nid, hdmi_str, 0);
|
return snd_hda_jack_add_kctl(codec, per_pin->pin_nid, hdmi_str, 0);
|
||||||
}
|
}
|
||||||
|
@ -928,6 +928,7 @@ static int alc_codec_rename_from_preset(struct hda_codec *codec)
|
|||||||
static const struct snd_pci_quirk beep_white_list[] = {
|
static const struct snd_pci_quirk beep_white_list[] = {
|
||||||
SND_PCI_QUIRK(0x1043, 0x103c, "ASUS", 1),
|
SND_PCI_QUIRK(0x1043, 0x103c, "ASUS", 1),
|
||||||
SND_PCI_QUIRK(0x1043, 0x829f, "ASUS", 1),
|
SND_PCI_QUIRK(0x1043, 0x829f, "ASUS", 1),
|
||||||
|
SND_PCI_QUIRK(0x1043, 0x8376, "EeePC", 1),
|
||||||
SND_PCI_QUIRK(0x1043, 0x83ce, "EeePC", 1),
|
SND_PCI_QUIRK(0x1043, 0x83ce, "EeePC", 1),
|
||||||
SND_PCI_QUIRK(0x1043, 0x831a, "EeePC", 1),
|
SND_PCI_QUIRK(0x1043, 0x831a, "EeePC", 1),
|
||||||
SND_PCI_QUIRK(0x1043, 0x834a, "EeePC", 1),
|
SND_PCI_QUIRK(0x1043, 0x834a, "EeePC", 1),
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
struct revo51_spec {
|
struct revo51_spec {
|
||||||
struct snd_i2c_device *dev;
|
struct snd_i2c_device *dev;
|
||||||
struct snd_pt2258 *pt2258;
|
struct snd_pt2258 *pt2258;
|
||||||
|
struct ak4114 *ak4114;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void revo_i2s_mclk_changed(struct snd_ice1712 *ice)
|
static void revo_i2s_mclk_changed(struct snd_ice1712 *ice)
|
||||||
@ -359,9 +360,9 @@ static struct snd_ak4xxx_private akm_ap192_priv = {
|
|||||||
.cif = 0,
|
.cif = 0,
|
||||||
.data_mask = VT1724_REVO_CDOUT,
|
.data_mask = VT1724_REVO_CDOUT,
|
||||||
.clk_mask = VT1724_REVO_CCLK,
|
.clk_mask = VT1724_REVO_CCLK,
|
||||||
.cs_mask = VT1724_REVO_CS0 | VT1724_REVO_CS1,
|
.cs_mask = VT1724_REVO_CS0 | VT1724_REVO_CS3,
|
||||||
.cs_addr = VT1724_REVO_CS1,
|
.cs_addr = VT1724_REVO_CS3,
|
||||||
.cs_none = VT1724_REVO_CS0 | VT1724_REVO_CS1,
|
.cs_none = VT1724_REVO_CS0 | VT1724_REVO_CS3,
|
||||||
.add_flags = VT1724_REVO_CCLK, /* high at init */
|
.add_flags = VT1724_REVO_CCLK, /* high at init */
|
||||||
.mask_flags = 0,
|
.mask_flags = 0,
|
||||||
};
|
};
|
||||||
@ -372,7 +373,7 @@ static struct snd_ak4xxx_private akm_ap192_priv = {
|
|||||||
* CCLK (pin 34) -- GPIO1 pin 51 (shared with AK4358)
|
* CCLK (pin 34) -- GPIO1 pin 51 (shared with AK4358)
|
||||||
* CSN (pin 35) -- GPIO7 pin 59
|
* CSN (pin 35) -- GPIO7 pin 59
|
||||||
*/
|
*/
|
||||||
#define AK4114_ADDR 0x02
|
#define AK4114_ADDR 0x00
|
||||||
|
|
||||||
static void write_data(struct snd_ice1712 *ice, unsigned int gpio,
|
static void write_data(struct snd_ice1712 *ice, unsigned int gpio,
|
||||||
unsigned int data, int idx)
|
unsigned int data, int idx)
|
||||||
@ -426,7 +427,7 @@ static unsigned int ap192_4wire_start(struct snd_ice1712 *ice)
|
|||||||
tmp = snd_ice1712_gpio_read(ice);
|
tmp = snd_ice1712_gpio_read(ice);
|
||||||
tmp |= VT1724_REVO_CCLK; /* high at init */
|
tmp |= VT1724_REVO_CCLK; /* high at init */
|
||||||
tmp |= VT1724_REVO_CS0;
|
tmp |= VT1724_REVO_CS0;
|
||||||
tmp &= ~VT1724_REVO_CS1;
|
tmp &= ~VT1724_REVO_CS3;
|
||||||
snd_ice1712_gpio_write(ice, tmp);
|
snd_ice1712_gpio_write(ice, tmp);
|
||||||
udelay(1);
|
udelay(1);
|
||||||
return tmp;
|
return tmp;
|
||||||
@ -434,7 +435,7 @@ static unsigned int ap192_4wire_start(struct snd_ice1712 *ice)
|
|||||||
|
|
||||||
static void ap192_4wire_finish(struct snd_ice1712 *ice, unsigned int tmp)
|
static void ap192_4wire_finish(struct snd_ice1712 *ice, unsigned int tmp)
|
||||||
{
|
{
|
||||||
tmp |= VT1724_REVO_CS1;
|
tmp |= VT1724_REVO_CS3;
|
||||||
tmp |= VT1724_REVO_CS0;
|
tmp |= VT1724_REVO_CS0;
|
||||||
snd_ice1712_gpio_write(ice, tmp);
|
snd_ice1712_gpio_write(ice, tmp);
|
||||||
udelay(1);
|
udelay(1);
|
||||||
@ -470,27 +471,32 @@ static unsigned char ap192_ak4114_read(void *private_data, unsigned char addr)
|
|||||||
static int ap192_ak4114_init(struct snd_ice1712 *ice)
|
static int ap192_ak4114_init(struct snd_ice1712 *ice)
|
||||||
{
|
{
|
||||||
static const unsigned char ak4114_init_vals[] = {
|
static const unsigned char ak4114_init_vals[] = {
|
||||||
AK4114_RST | AK4114_PWN | AK4114_OCKS0 | AK4114_OCKS1,
|
AK4114_RST | AK4114_PWN | AK4114_OCKS0,
|
||||||
AK4114_DIF_I24I2S,
|
AK4114_DIF_I24I2S,
|
||||||
AK4114_TX1E,
|
AK4114_TX1E,
|
||||||
AK4114_EFH_1024 | AK4114_DIT | AK4114_IPS(1),
|
AK4114_EFH_1024 | AK4114_DIT | AK4114_IPS(0),
|
||||||
0,
|
0,
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
static const unsigned char ak4114_init_txcsb[] = {
|
static const unsigned char ak4114_init_txcsb[] = {
|
||||||
0x41, 0x02, 0x2c, 0x00, 0x00
|
0x41, 0x02, 0x2c, 0x00, 0x00
|
||||||
};
|
};
|
||||||
struct ak4114 *ak;
|
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
|
struct revo51_spec *spec;
|
||||||
|
spec = kzalloc(sizeof(*spec), GFP_KERNEL);
|
||||||
|
if (!spec)
|
||||||
|
return -ENOMEM;
|
||||||
|
ice->spec = spec;
|
||||||
|
|
||||||
err = snd_ak4114_create(ice->card,
|
err = snd_ak4114_create(ice->card,
|
||||||
ap192_ak4114_read,
|
ap192_ak4114_read,
|
||||||
ap192_ak4114_write,
|
ap192_ak4114_write,
|
||||||
ak4114_init_vals, ak4114_init_txcsb,
|
ak4114_init_vals, ak4114_init_txcsb,
|
||||||
ice, &ak);
|
ice, &spec->ak4114);
|
||||||
/* AK4114 in Revo cannot detect external rate correctly.
|
/* AK4114 in Revo cannot detect external rate correctly.
|
||||||
* No reason to stop capture stream due to incorrect checks */
|
* No reason to stop capture stream due to incorrect checks */
|
||||||
ak->check_flags = AK4114_CHECK_NO_RATE;
|
spec->ak4114->check_flags = AK4114_CHECK_NO_RATE;
|
||||||
|
|
||||||
return 0; /* error ignored; it's no fatal error */
|
return 0; /* error ignored; it's no fatal error */
|
||||||
}
|
}
|
||||||
@ -562,6 +568,9 @@ static int revo_init(struct snd_ice1712 *ice)
|
|||||||
ice);
|
ice);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
err = ap192_ak4114_init(ice);
|
||||||
|
if (err < 0)
|
||||||
|
return err;
|
||||||
|
|
||||||
/* unmute all codecs */
|
/* unmute all codecs */
|
||||||
snd_ice1712_gpio_write_bits(ice, VT1724_REVO_MUTE,
|
snd_ice1712_gpio_write_bits(ice, VT1724_REVO_MUTE,
|
||||||
@ -575,7 +584,7 @@ static int revo_init(struct snd_ice1712 *ice)
|
|||||||
|
|
||||||
static int revo_add_controls(struct snd_ice1712 *ice)
|
static int revo_add_controls(struct snd_ice1712 *ice)
|
||||||
{
|
{
|
||||||
struct revo51_spec *spec;
|
struct revo51_spec *spec = ice->spec;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
switch (ice->eeprom.subvendor) {
|
switch (ice->eeprom.subvendor) {
|
||||||
@ -597,7 +606,9 @@ static int revo_add_controls(struct snd_ice1712 *ice)
|
|||||||
err = snd_ice1712_akm4xxx_build_controls(ice);
|
err = snd_ice1712_akm4xxx_build_controls(ice);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
err = ap192_ak4114_init(ice);
|
/* only capture SPDIF over AK4114 */
|
||||||
|
err = snd_ak4114_build(spec->ak4114, NULL,
|
||||||
|
ice->pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user