[ALSA] PM support for cs5535audio
Appended is my patch adding PM support to the cs5535audio driver. I also added the ac97 quirk but it's not yet confirmed which boards need to be in the quirk list. The patch also includes some Kconfig and misc cleanup. Signed-off-by: Jaya Kumar <jayakumar.alsa@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:

committed by
Jaroslav Kysela

szülő
5e1b1518a5
commit
9ac25594e6
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Driver for audio on multifunction CS5535 companion device
|
||||
* Driver for audio on multifunction CS5535/6 companion device
|
||||
* Copyright (C) Jaya Kumar
|
||||
*
|
||||
* Based on Jaroslav Kysela and Takashi Iwai's examples.
|
||||
@@ -40,16 +40,29 @@
|
||||
|
||||
#define DRIVER_NAME "cs5535audio"
|
||||
|
||||
static char *ac97_quirk;
|
||||
module_param(ac97_quirk, charp, 0444);
|
||||
MODULE_PARM_DESC(ac97_quirk, "AC'97 board specific workarounds.");
|
||||
|
||||
static struct ac97_quirk ac97_quirks[] __devinitdata = {
|
||||
#if 0 /* Not yet confirmed if all 5536 boards are HP only */
|
||||
{
|
||||
.subvendor = PCI_VENDOR_ID_AMD,
|
||||
.subdevice = PCI_DEVICE_ID_AMD_CS5536_AUDIO,
|
||||
.name = "AMD RDK",
|
||||
.type = AC97_TUNE_HP_ONLY
|
||||
},
|
||||
#endif
|
||||
{}
|
||||
};
|
||||
|
||||
static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
|
||||
static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;
|
||||
static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
|
||||
|
||||
static struct pci_device_id snd_cs5535audio_ids[] __devinitdata = {
|
||||
{ PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_CS5535_AUDIO,
|
||||
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },
|
||||
{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_AUDIO,
|
||||
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_CS5535_AUDIO) },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_AUDIO) },
|
||||
{}
|
||||
};
|
||||
|
||||
@@ -148,6 +161,8 @@ static int snd_cs5535audio_mixer(struct cs5535audio *cs5535au)
|
||||
return err;
|
||||
}
|
||||
|
||||
snd_ac97_tune_hardware(cs5535au->ac97, ac97_quirks, ac97_quirk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -347,6 +362,8 @@ static int __devinit snd_cs5535audio_probe(struct pci_dev *pci,
|
||||
if ((err = snd_cs5535audio_create(card, pci, &cs5535au)) < 0)
|
||||
goto probefail_out;
|
||||
|
||||
card->private_data = cs5535au;
|
||||
|
||||
if ((err = snd_cs5535audio_mixer(cs5535au)) < 0)
|
||||
goto probefail_out;
|
||||
|
||||
@@ -383,6 +400,10 @@ static struct pci_driver driver = {
|
||||
.id_table = snd_cs5535audio_ids,
|
||||
.probe = snd_cs5535audio_probe,
|
||||
.remove = __devexit_p(snd_cs5535audio_remove),
|
||||
#ifdef CONFIG_PM
|
||||
.suspend = snd_cs5535audio_suspend,
|
||||
.resume = snd_cs5535audio_resume,
|
||||
#endif
|
||||
};
|
||||
|
||||
static int __init alsa_card_cs5535audio_init(void)
|
||||
|
Reference in New Issue
Block a user