summaryrefslogtreecommitdiff
path: root/sound/pci/ymfpci/ymfpci.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/ymfpci/ymfpci.c')
-rw-r--r--sound/pci/ymfpci/ymfpci.c49
1 files changed, 27 insertions, 22 deletions
diff --git a/sound/pci/ymfpci/ymfpci.c b/sound/pci/ymfpci/ymfpci.c
index d013237205d8..dab9b8310341 100644
--- a/sound/pci/ymfpci/ymfpci.c
+++ b/sound/pci/ymfpci/ymfpci.c
@@ -31,7 +31,7 @@
#include <sound/initval.h>
MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
-MODULE_DESCRIPTION("Yamaha DS-XG PCI");
+MODULE_DESCRIPTION("Yamaha DS-1 PCI");
MODULE_LICENSE("GPL");
MODULE_SUPPORTED_DEVICE("{{Yamaha,YMF724},"
"{Yamaha,YMF724F},"
@@ -51,11 +51,11 @@ static long joystick_port[SNDRV_CARDS];
static int rear_switch[SNDRV_CARDS];
module_param_array(index, int, NULL, 0444);
-MODULE_PARM_DESC(index, "Index value for the Yamaha DS-XG PCI soundcard.");
+MODULE_PARM_DESC(index, "Index value for the Yamaha DS-1 PCI soundcard.");
module_param_array(id, charp, NULL, 0444);
-MODULE_PARM_DESC(id, "ID string for the Yamaha DS-XG PCI soundcard.");
+MODULE_PARM_DESC(id, "ID string for the Yamaha DS-1 PCI soundcard.");
module_param_array(enable, bool, NULL, 0444);
-MODULE_PARM_DESC(enable, "Enable Yamaha DS-XG soundcard.");
+MODULE_PARM_DESC(enable, "Enable Yamaha DS-1 soundcard.");
module_param_array(mpu_port, long, NULL, 0444);
MODULE_PARM_DESC(mpu_port, "MPU-401 Port.");
module_param_array(fm_port, long, NULL, 0444);
@@ -80,7 +80,7 @@ static struct pci_device_id snd_ymfpci_ids[] = {
MODULE_DEVICE_TABLE(pci, snd_ymfpci_ids);
#ifdef SUPPORT_JOYSTICK
-static int __devinit snd_ymfpci_create_gameport(ymfpci_t *chip, int dev,
+static int __devinit snd_ymfpci_create_gameport(struct snd_ymfpci *chip, int dev,
int legacy_ctrl, int legacy_ctrl2)
{
struct gameport *gp;
@@ -152,7 +152,7 @@ static int __devinit snd_ymfpci_create_gameport(ymfpci_t *chip, int dev,
return 0;
}
-void snd_ymfpci_free_gameport(ymfpci_t *chip)
+void snd_ymfpci_free_gameport(struct snd_ymfpci *chip)
{
if (chip->gameport) {
struct resource *r = gameport_get_port_data(chip->gameport);
@@ -164,20 +164,20 @@ void snd_ymfpci_free_gameport(ymfpci_t *chip)
}
}
#else
-static inline int snd_ymfpci_create_gameport(ymfpci_t *chip, int dev, int l, int l2) { return -ENOSYS; }
-void snd_ymfpci_free_gameport(ymfpci_t *chip) { }
+static inline int snd_ymfpci_create_gameport(struct snd_ymfpci *chip, int dev, int l, int l2) { return -ENOSYS; }
+void snd_ymfpci_free_gameport(struct snd_ymfpci *chip) { }
#endif /* SUPPORT_JOYSTICK */
static int __devinit snd_card_ymfpci_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
{
static int dev;
- snd_card_t *card;
+ struct snd_card *card;
struct resource *fm_res = NULL;
struct resource *mpu_res = NULL;
- ymfpci_t *chip;
- opl3_t *opl3;
- char *str;
+ struct snd_ymfpci *chip;
+ struct snd_opl3 *opl3;
+ const char *str, *model;
int err;
u16 legacy_ctrl, legacy_ctrl2, old_legacy_ctrl;
@@ -193,13 +193,13 @@ static int __devinit snd_card_ymfpci_probe(struct pci_dev *pci,
return -ENOMEM;
switch (pci_id->device) {
- case 0x0004: str = "YMF724"; break;
- case 0x000d: str = "YMF724F"; break;
- case 0x000a: str = "YMF740"; break;
- case 0x000c: str = "YMF740C"; break;
- case 0x0010: str = "YMF744"; break;
- case 0x0012: str = "YMF754"; break;
- default: str = "???"; break;
+ case 0x0004: str = "YMF724"; model = "DS-1"; break;
+ case 0x000d: str = "YMF724F"; model = "DS-1"; break;
+ case 0x000a: str = "YMF740"; model = "DS-1L"; break;
+ case 0x000c: str = "YMF740C"; model = "DS-1L"; break;
+ case 0x0010: str = "YMF744"; model = "DS-1S"; break;
+ case 0x0012: str = "YMF754"; model = "DS-1E"; break;
+ default: model = str = "???"; break;
}
legacy_ctrl = 0;
@@ -271,8 +271,10 @@ static int __devinit snd_card_ymfpci_probe(struct pci_dev *pci,
}
chip->fm_res = fm_res;
chip->mpu_res = mpu_res;
+ card->private_data = chip;
+
strcpy(card->driver, str);
- sprintf(card->shortname, "Yamaha DS-XG (%s)", str);
+ sprintf(card->shortname, "Yamaha %s (%s)", model, str);
sprintf(card->longname, "%s at 0x%lx, irq %i",
card->shortname,
chip->reg_area_phys,
@@ -343,11 +345,14 @@ static void __devexit snd_card_ymfpci_remove(struct pci_dev *pci)
}
static struct pci_driver driver = {
- .name = "Yamaha DS-XG PCI",
+ .name = "Yamaha DS-1 PCI",
.id_table = snd_ymfpci_ids,
.probe = snd_card_ymfpci_probe,
.remove = __devexit_p(snd_card_ymfpci_remove),
- SND_PCI_PM_CALLBACKS
+#ifdef CONFIG_PM
+ .suspend = snd_ymfpci_suspend,
+ .resume = snd_ymfpci_resume,
+#endif
};
static int __init alsa_card_ymfpci_init(void)