You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/perex/alsa
* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/perex/alsa: [ALSA] hda-intel - Add check of MSI availabity [ALSA] version 1.0.13 [ALSA] Fix addition of user-defined boolean controls [ALSA] Fix AC97 power-saving mode [ALSA] Fix re-use of va_list [ALSA] hda_intel: add ATI RS690 HDMI audio support [ALSA] hda-codec - Add model entry for ASUS U5F laptop [ALSA] Fix dependency of snd-adlib driver in Kconfig [ALSA] Various fixes for suspend/resume of ALSA PCI drivers [ALSA] hda-codec - Fix assignment of PCM devices for Realtek codecs [ALSA] sound/isa/opti9xx/opti92x-ad1848.c: check kmalloc() return value [ALSA] sound/isa/ad1816a/ad1816a.c: check kmalloc() return value [ALSA] sound/isa/cmi8330.c: check kmalloc() return value [ALSA] sound/isa/gus/interwave.c: check kmalloc() return value
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
/* include/version.h. Generated by alsa/ksync script. */
|
||||
#define CONFIG_SND_VERSION "1.0.13"
|
||||
#define CONFIG_SND_DATE " (Fri Oct 06 18:28:19 2006 UTC)"
|
||||
#define CONFIG_SND_DATE " (Sun Oct 22 08:56:16 2006 UTC)"
|
||||
|
||||
@@ -1018,10 +1018,6 @@ static int snd_ctl_elem_add(struct snd_ctl_file *file,
|
||||
}
|
||||
switch (info->type) {
|
||||
case SNDRV_CTL_ELEM_TYPE_BOOLEAN:
|
||||
private_size = sizeof(char);
|
||||
if (info->count > 128)
|
||||
return -EINVAL;
|
||||
break;
|
||||
case SNDRV_CTL_ELEM_TYPE_INTEGER:
|
||||
private_size = sizeof(long);
|
||||
if (info->count > 128)
|
||||
|
||||
+4
-1
@@ -120,7 +120,10 @@ int snd_iprintf(struct snd_info_buffer *buffer, char *fmt,...)
|
||||
len = buffer->len - buffer->size;
|
||||
va_start(args, fmt);
|
||||
for (;;) {
|
||||
res = vsnprintf(buffer->buffer + buffer->curr, len, fmt, args);
|
||||
va_list ap;
|
||||
va_copy(ap, args);
|
||||
res = vsnprintf(buffer->buffer + buffer->curr, len, fmt, ap);
|
||||
va_end(ap);
|
||||
if (res < len)
|
||||
break;
|
||||
err = resize_info_buffer(buffer, buffer->len + PAGE_SIZE);
|
||||
|
||||
@@ -13,6 +13,7 @@ config SND_CS4231_LIB
|
||||
|
||||
config SND_ADLIB
|
||||
tristate "AdLib FM card"
|
||||
depends on SND
|
||||
select SND_OPL3_LIB
|
||||
help
|
||||
Say Y here to include support for AdLib FM cards.
|
||||
|
||||
@@ -120,6 +120,8 @@ static int __devinit snd_card_ad1816a_pnp(int dev, struct snd_card_ad1816a *acar
|
||||
struct pnp_resource_table *cfg = kmalloc(sizeof(*cfg), GFP_KERNEL);
|
||||
int err;
|
||||
|
||||
if (!cfg)
|
||||
return -ENOMEM;
|
||||
acard->dev = pnp_request_card_device(card, id->devs[0].id, NULL);
|
||||
if (acard->dev == NULL) {
|
||||
kfree(cfg);
|
||||
|
||||
@@ -289,6 +289,8 @@ static int __devinit snd_cmi8330_pnp(int dev, struct snd_cmi8330 *acard,
|
||||
struct pnp_resource_table * cfg = kmalloc(sizeof(struct pnp_resource_table), GFP_KERNEL);
|
||||
int err;
|
||||
|
||||
if (!cfg)
|
||||
return -ENOMEM;
|
||||
acard->cap = pnp_request_card_device(card, id->devs[0].id, NULL);
|
||||
if (acard->cap == NULL) {
|
||||
kfree(cfg);
|
||||
|
||||
@@ -564,6 +564,8 @@ static int __devinit snd_interwave_pnp(int dev, struct snd_interwave *iwcard,
|
||||
struct pnp_resource_table * cfg = kmalloc(sizeof(struct pnp_resource_table), GFP_KERNEL);
|
||||
int err;
|
||||
|
||||
if (!cfg)
|
||||
return -ENOMEM;
|
||||
iwcard->dev = pnp_request_card_device(card, id->devs[0].id, NULL);
|
||||
if (iwcard->dev == NULL) {
|
||||
kfree(cfg);
|
||||
|
||||
@@ -1683,6 +1683,8 @@ static int __init snd_card_opti9xx_pnp(struct snd_opti9xx *chip, struct pnp_card
|
||||
struct pnp_resource_table *cfg = kmalloc(sizeof(*cfg), GFP_KERNEL);
|
||||
int err;
|
||||
|
||||
if (!cfg)
|
||||
return -ENOMEM;
|
||||
chip->dev = pnp_request_card_device(card, pid->devs[0].id, NULL);
|
||||
if (chip->dev == NULL) {
|
||||
kfree(cfg);
|
||||
|
||||
@@ -570,8 +570,7 @@ int snd_ac97_put_volsw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value
|
||||
ac97->power_up &= ~(1 << (reg>>1));
|
||||
else
|
||||
ac97->power_up |= 1 << (reg>>1);
|
||||
if (power_save)
|
||||
update_power_regs(ac97);
|
||||
update_power_regs(ac97);
|
||||
}
|
||||
#endif
|
||||
return err;
|
||||
@@ -2337,10 +2336,7 @@ int snd_ac97_update_power(struct snd_ac97 *ac97, int reg, int powerup)
|
||||
}
|
||||
}
|
||||
|
||||
if (! power_save)
|
||||
return 0;
|
||||
|
||||
if (! powerup && ac97->power_workq)
|
||||
if (power_save && !powerup && ac97->power_workq)
|
||||
/* adjust power-down bits after two seconds delay
|
||||
* (for avoiding loud click noises for many (OSS) apps
|
||||
* that open/close frequently)
|
||||
|
||||
@@ -2032,8 +2032,10 @@ static int ali_suspend(struct pci_dev *pci, pm_message_t state)
|
||||
outl(0xffffffff, ALI_REG(chip, ALI_STOP));
|
||||
|
||||
spin_unlock_irq(&chip->reg_lock);
|
||||
|
||||
pci_disable_device(pci);
|
||||
pci_save_state(pci);
|
||||
pci_set_power_state(pci, pci_choose_state(pci, state));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2048,8 +2050,15 @@ static int ali_resume(struct pci_dev *pci)
|
||||
if (! im)
|
||||
return 0;
|
||||
|
||||
pci_set_power_state(pci, PCI_D0);
|
||||
pci_restore_state(pci);
|
||||
pci_enable_device(pci);
|
||||
if (pci_enable_device(pci) < 0) {
|
||||
printk(KERN_ERR "ali5451: pci_enable_device failed, "
|
||||
"disabling device\n");
|
||||
snd_card_disconnect(card);
|
||||
return -EIO;
|
||||
}
|
||||
pci_set_master(pci);
|
||||
|
||||
spin_lock_irq(&chip->reg_lock);
|
||||
|
||||
|
||||
+8
-3
@@ -768,9 +768,9 @@ static int snd_als300_suspend(struct pci_dev *pci, pm_message_t state)
|
||||
snd_pcm_suspend_all(chip->pcm);
|
||||
snd_ac97_suspend(chip->ac97);
|
||||
|
||||
pci_set_power_state(pci, PCI_D3hot);
|
||||
pci_disable_device(pci);
|
||||
pci_save_state(pci);
|
||||
pci_set_power_state(pci, pci_choose_state(pci, state));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -779,9 +779,14 @@ static int snd_als300_resume(struct pci_dev *pci)
|
||||
struct snd_card *card = pci_get_drvdata(pci);
|
||||
struct snd_als300 *chip = card->private_data;
|
||||
|
||||
pci_restore_state(pci);
|
||||
pci_enable_device(pci);
|
||||
pci_set_power_state(pci, PCI_D0);
|
||||
pci_restore_state(pci);
|
||||
if (pci_enable_device(pci) < 0) {
|
||||
printk(KERN_ERR "als300: pci_enable_device failed, "
|
||||
"disabling device\n");
|
||||
snd_card_disconnect(card);
|
||||
return -EIO;
|
||||
}
|
||||
pci_set_master(pci);
|
||||
|
||||
snd_als300_init(chip);
|
||||
|
||||
+8
-3
@@ -804,9 +804,9 @@ static int snd_als4000_suspend(struct pci_dev *pci, pm_message_t state)
|
||||
snd_pcm_suspend_all(chip->pcm);
|
||||
snd_sbmixer_suspend(chip);
|
||||
|
||||
pci_set_power_state(pci, PCI_D3hot);
|
||||
pci_disable_device(pci);
|
||||
pci_save_state(pci);
|
||||
pci_set_power_state(pci, pci_choose_state(pci, state));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -816,9 +816,14 @@ static int snd_als4000_resume(struct pci_dev *pci)
|
||||
struct snd_card_als4000 *acard = card->private_data;
|
||||
struct snd_sb *chip = acard->chip;
|
||||
|
||||
pci_restore_state(pci);
|
||||
pci_enable_device(pci);
|
||||
pci_set_power_state(pci, PCI_D0);
|
||||
pci_restore_state(pci);
|
||||
if (pci_enable_device(pci) < 0) {
|
||||
printk(KERN_ERR "als4000: pci_enable_device failed, "
|
||||
"disabling device\n");
|
||||
snd_card_disconnect(card);
|
||||
return -EIO;
|
||||
}
|
||||
pci_set_master(pci);
|
||||
|
||||
snd_als4000_configure(chip);
|
||||
|
||||
+8
-3
@@ -1442,9 +1442,9 @@ static int snd_atiixp_suspend(struct pci_dev *pci, pm_message_t state)
|
||||
snd_atiixp_aclink_down(chip);
|
||||
snd_atiixp_chip_stop(chip);
|
||||
|
||||
pci_set_power_state(pci, PCI_D3hot);
|
||||
pci_disable_device(pci);
|
||||
pci_save_state(pci);
|
||||
pci_set_power_state(pci, pci_choose_state(pci, state));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1454,9 +1454,14 @@ static int snd_atiixp_resume(struct pci_dev *pci)
|
||||
struct atiixp *chip = card->private_data;
|
||||
int i;
|
||||
|
||||
pci_restore_state(pci);
|
||||
pci_enable_device(pci);
|
||||
pci_set_power_state(pci, PCI_D0);
|
||||
pci_restore_state(pci);
|
||||
if (pci_enable_device(pci) < 0) {
|
||||
printk(KERN_ERR "atiixp: pci_enable_device failed, "
|
||||
"disabling device\n");
|
||||
snd_card_disconnect(card);
|
||||
return -EIO;
|
||||
}
|
||||
pci_set_master(pci);
|
||||
|
||||
snd_atiixp_aclink_reset(chip);
|
||||
|
||||
@@ -1128,9 +1128,9 @@ static int snd_atiixp_suspend(struct pci_dev *pci, pm_message_t state)
|
||||
snd_atiixp_aclink_down(chip);
|
||||
snd_atiixp_chip_stop(chip);
|
||||
|
||||
pci_set_power_state(pci, PCI_D3hot);
|
||||
pci_disable_device(pci);
|
||||
pci_save_state(pci);
|
||||
pci_set_power_state(pci, pci_choose_state(pci, state));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1140,9 +1140,14 @@ static int snd_atiixp_resume(struct pci_dev *pci)
|
||||
struct atiixp_modem *chip = card->private_data;
|
||||
int i;
|
||||
|
||||
pci_restore_state(pci);
|
||||
pci_enable_device(pci);
|
||||
pci_set_power_state(pci, PCI_D0);
|
||||
pci_restore_state(pci);
|
||||
if (pci_enable_device(pci) < 0) {
|
||||
printk(KERN_ERR "atiixp-modem: pci_enable_device failed, "
|
||||
"disabling device\n");
|
||||
snd_card_disconnect(card);
|
||||
return -EIO;
|
||||
}
|
||||
pci_set_master(pci);
|
||||
|
||||
snd_atiixp_aclink_reset(chip);
|
||||
|
||||
+8
-3
@@ -1903,9 +1903,9 @@ snd_azf3328_suspend(struct pci_dev *pci, pm_message_t state)
|
||||
for (reg = 0; reg < AZF_IO_SIZE_SYNTH_PM / 2; reg++)
|
||||
chip->saved_regs_synth[reg] = inw(chip->synth_port + reg * 2);
|
||||
|
||||
pci_set_power_state(pci, PCI_D3hot);
|
||||
pci_disable_device(pci);
|
||||
pci_save_state(pci);
|
||||
pci_set_power_state(pci, pci_choose_state(pci, state));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1916,9 +1916,14 @@ snd_azf3328_resume(struct pci_dev *pci)
|
||||
struct snd_azf3328 *chip = card->private_data;
|
||||
int reg;
|
||||
|
||||
pci_restore_state(pci);
|
||||
pci_enable_device(pci);
|
||||
pci_set_power_state(pci, PCI_D0);
|
||||
pci_restore_state(pci);
|
||||
if (pci_enable_device(pci) < 0) {
|
||||
printk(KERN_ERR "azt3328: pci_enable_device failed, "
|
||||
"disabling device\n");
|
||||
snd_card_disconnect(card);
|
||||
return -EIO;
|
||||
}
|
||||
pci_set_master(pci);
|
||||
|
||||
for (reg = 0; reg < AZF_IO_SIZE_IO2_PM / 2; reg++)
|
||||
|
||||
+8
-3
@@ -3122,9 +3122,9 @@ static int snd_cmipci_suspend(struct pci_dev *pci, pm_message_t state)
|
||||
/* disable ints */
|
||||
snd_cmipci_write(cm, CM_REG_INT_HLDCLR, 0);
|
||||
|
||||
pci_set_power_state(pci, PCI_D3hot);
|
||||
pci_disable_device(pci);
|
||||
pci_save_state(pci);
|
||||
pci_set_power_state(pci, pci_choose_state(pci, state));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -3134,9 +3134,14 @@ static int snd_cmipci_resume(struct pci_dev *pci)
|
||||
struct cmipci *cm = card->private_data;
|
||||
int i;
|
||||
|
||||
pci_restore_state(pci);
|
||||
pci_enable_device(pci);
|
||||
pci_set_power_state(pci, PCI_D0);
|
||||
pci_restore_state(pci);
|
||||
if (pci_enable_device(pci) < 0) {
|
||||
printk(KERN_ERR "cmipci: pci_enable_device failed, "
|
||||
"disabling device\n");
|
||||
snd_card_disconnect(card);
|
||||
return -EIO;
|
||||
}
|
||||
pci_set_master(pci);
|
||||
|
||||
/* reset / initialize to a sane state */
|
||||
|
||||
+8
-1
@@ -2050,6 +2050,7 @@ static int cs4281_suspend(struct pci_dev *pci, pm_message_t state)
|
||||
|
||||
pci_disable_device(pci);
|
||||
pci_save_state(pci);
|
||||
pci_set_power_state(pci, pci_choose_state(pci, state));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2060,8 +2061,14 @@ static int cs4281_resume(struct pci_dev *pci)
|
||||
unsigned int i;
|
||||
u32 ulCLK;
|
||||
|
||||
pci_set_power_state(pci, PCI_D0);
|
||||
pci_restore_state(pci);
|
||||
pci_enable_device(pci);
|
||||
if (pci_enable_device(pci) < 0) {
|
||||
printk(KERN_ERR "cs4281: pci_enable_device failed, "
|
||||
"disabling device\n");
|
||||
snd_card_disconnect(card);
|
||||
return -EIO;
|
||||
}
|
||||
pci_set_master(pci);
|
||||
|
||||
ulCLK = snd_cs4281_peekBA0(chip, BA0_CLKCR1);
|
||||
|
||||
@@ -3687,8 +3687,10 @@ int snd_cs46xx_suspend(struct pci_dev *pci, pm_message_t state)
|
||||
/* disable CLKRUN */
|
||||
chip->active_ctrl(chip, -chip->amplifier);
|
||||
chip->amplifier = amp_saved; /* restore the status */
|
||||
|
||||
pci_disable_device(pci);
|
||||
pci_save_state(pci);
|
||||
pci_set_power_state(pci, pci_choose_state(pci, state));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -3698,9 +3700,16 @@ int snd_cs46xx_resume(struct pci_dev *pci)
|
||||
struct snd_cs46xx *chip = card->private_data;
|
||||
int amp_saved;
|
||||
|
||||
pci_set_power_state(pci, PCI_D0);
|
||||
pci_restore_state(pci);
|
||||
pci_enable_device(pci);
|
||||
if (pci_enable_device(pci) < 0) {
|
||||
printk(KERN_ERR "cs46xx: pci_enable_device failed, "
|
||||
"disabling device\n");
|
||||
snd_card_disconnect(card);
|
||||
return -EIO;
|
||||
}
|
||||
pci_set_master(pci);
|
||||
|
||||
amp_saved = chip->amplifier;
|
||||
chip->amplifier = 0;
|
||||
chip->active_ctrl(chip, 1); /* force to on */
|
||||
|
||||
@@ -73,9 +73,10 @@ int snd_cs5535audio_suspend(struct pci_dev *pci, pm_message_t state)
|
||||
snd_ac97_suspend(cs5535au->ac97);
|
||||
/* save important regs, then disable aclink in hw */
|
||||
snd_cs5535audio_stop_hardware(cs5535au);
|
||||
|
||||
pci_disable_device(pci);
|
||||
pci_save_state(pci);
|
||||
|
||||
pci_set_power_state(pci, pci_choose_state(pci, state));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -87,8 +88,14 @@ int snd_cs5535audio_resume(struct pci_dev *pci)
|
||||
int timeout;
|
||||
int i;
|
||||
|
||||
pci_set_power_state(pci, PCI_D0);
|
||||
pci_restore_state(pci);
|
||||
pci_enable_device(pci);
|
||||
if (pci_enable_device(pci) < 0) {
|
||||
printk(KERN_ERR "cs5535audio: pci_enable_device failed, "
|
||||
"disabling device\n");
|
||||
snd_card_disconnect(card);
|
||||
return -EIO;
|
||||
}
|
||||
pci_set_master(pci);
|
||||
|
||||
/* set LNK_WRM_RST to reset AC link */
|
||||
|
||||
@@ -226,9 +226,9 @@ static int snd_emu10k1_suspend(struct pci_dev *pci, pm_message_t state)
|
||||
|
||||
snd_emu10k1_done(emu);
|
||||
|
||||
pci_set_power_state(pci, PCI_D3hot);
|
||||
pci_disable_device(pci);
|
||||
pci_save_state(pci);
|
||||
pci_set_power_state(pci, pci_choose_state(pci, state));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -237,11 +237,16 @@ static int snd_emu10k1_resume(struct pci_dev *pci)
|
||||
struct snd_card *card = pci_get_drvdata(pci);
|
||||
struct snd_emu10k1 *emu = card->private_data;
|
||||
|
||||
pci_restore_state(pci);
|
||||
pci_enable_device(pci);
|
||||
pci_set_power_state(pci, PCI_D0);
|
||||
pci_restore_state(pci);
|
||||
if (pci_enable_device(pci) < 0) {
|
||||
printk(KERN_ERR "emu10k1: pci_enable_device failed, "
|
||||
"disabling device\n");
|
||||
snd_card_disconnect(card);
|
||||
return -EIO;
|
||||
}
|
||||
pci_set_master(pci);
|
||||
|
||||
|
||||
snd_emu10k1_resume_init(emu);
|
||||
snd_emu10k1_efx_resume(emu);
|
||||
snd_ac97_resume(emu->ac97);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user