[Isisalsa-devel] isis sam9707.c, 1.8, 1.9 isis.h, 1.14, 1.15 es1968.c, 1.45, 1.46 es1968.h, 1.2, 1.
Status: Inactive
Brought to you by:
jeanseb
|
From: Jean-Sébastien V. <je...@us...> - 2007-05-15 09:56:30
|
Update of /cvsroot/isisalsa/isis In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv28981 Modified Files: sam9707.c isis.h es1968.c es1968.h Log Message: Import of 2.6.21 es1968 change. Compiling, not tested Index: sam9707.c =================================================================== RCS file: /cvsroot/isisalsa/isis/sam9707.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** sam9707.c 24 Jul 2006 09:01:21 -0000 1.8 --- sam9707.c 15 May 2007 09:56:28 -0000 1.9 *************** *** 55,59 **** }; ! static snd_pcm_hardware_t snd_sam9407_play[2] = { { .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | --- 55,59 ---- }; ! static struct snd_pcm_hardware snd_sam9407_play[2] = { { .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | *************** *** 92,96 **** }; ! static snd_pcm_hardware_t snd_sam9407_rec[4] = { { .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | --- 92,96 ---- }; ! static struct snd_pcm_hardware snd_sam9407_rec[4] = { { .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | *************** *** 229,232 **** --- 229,260 ---- } + /* from old stuff to test */ + static inline int isis_dream_outb(struct isis_sam9707_chip *chip,u16 reg,int value) + { + int count=0; + int status; + + do + { + outw(1,chip->io_port + 0x44); /* select status register */ + status = inw(chip->io_port + 0x46) & 0xff; + outw(2,chip->io_port + 0x44); /* select back data16 register */ + } + while((count++ < 0x6000) && ((status & 0x40) != 0)); + printk("isis.o: outb = status %x, count %d\n", status, count); + /* SAM READY */ + if(count<= 0x6000) + { + outw(reg & 0xff, chip->io_port + 0x44); + outw(value & 0xff, chip->io_port + 0x46); + outw(2, chip->io_port + 0x44); + return 0; + } + else + return -EIO; + + } + + /* * Write a byte register on SAM 9707 *************** *** 337,342 **** ! int snd_isis_sam9707_playback_info(snd_kcontrol_t *kcontrol, ! snd_ctl_elem_info_t *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; --- 365,370 ---- ! int snd_isis_sam9707_playback_info(struct snd_kcontrol *kcontrol, ! struct snd_ctl_elem_info*uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; *************** *** 347,352 **** } ! int snd_isis_sam9707_playback_get(snd_kcontrol_t *kcontrol, ! snd_ctl_elem_value_t *ucontrol) { /* TODO : * Read and return volume value for selected playback channel --- 375,380 ---- } ! int snd_isis_sam9707_playback_get(struct snd_kcontrol*kcontrol, ! struct snd_ctl_elem_value *ucontrol) { /* TODO : * Read and return volume value for selected playback channel *************** *** 363,368 **** } ! int snd_isis_sam9707_playback_put(snd_kcontrol_t *kcontrol, ! snd_ctl_elem_value_t *ucontrol) { /* TODO : * Set volume value for selected playback channel --- 391,396 ---- } ! int snd_isis_sam9707_playback_put(struct snd_kcontrol*kcontrol, ! struct snd_ctl_elem_value *ucontrol) { /* TODO : * Set volume value for selected playback channel *************** *** 382,387 **** * RACK controls */ ! int snd_isis_sam9707_rack_info(snd_kcontrol_t *kcontrol, ! snd_ctl_elem_info_t *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; --- 410,415 ---- * RACK controls */ ! int snd_isis_sam9707_rack_info(struct snd_kcontrol *kcontrol, ! struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; *************** *** 392,397 **** } ! int snd_isis_sam9707_rack_get(snd_kcontrol_t *kcontrol, ! snd_ctl_elem_value_t *ucontrol) { /* TODO : * Read and return volume value for selected playback channel --- 420,425 ---- } ! int snd_isis_sam9707_rack_get(struct snd_kcontrol*kcontrol, ! struct snd_ctl_elem_value *ucontrol) { /* TODO : * Read and return volume value for selected playback channel *************** *** 405,410 **** } ! int snd_isis_sam9707_rack_put(snd_kcontrol_t *kcontrol, ! snd_ctl_elem_value_t *ucontrol) { /* TODO : * Set volume value for selected playback channel --- 433,438 ---- } ! int snd_isis_sam9707_rack_put(struct snd_kcontrol*kcontrol, ! struct snd_ctl_elem_value *ucontrol) { /* TODO : * Set volume value for selected playback channel *************** *** 432,436 **** * */ ! int snd_isis_firm_open (snd_info_entry_t *entry, unsigned short mode, void **file_private_data) { --- 460,464 ---- * */ ! int snd_isis_firm_open (struct snd_info_entry *entry, unsigned short mode, void **file_private_data) { *************** *** 459,463 **** return 0; } ! long snd_isis_firm_write(snd_info_entry_t *entry, void * file_private_data, struct file * file, const char *buf, unsigned long count, --- 487,491 ---- return 0; } ! long snd_isis_firm_write(struct snd_info_entry *entry, void * file_private_data, struct file * file, const char *buf, unsigned long count, *************** *** 482,486 **** return count; } ! int snd_isis_firm_release(snd_info_entry_t * entry, unsigned short mode, void *file_private_data) { --- 510,514 ---- return count; } ! int snd_isis_firm_release(struct snd_info_entry * entry, unsigned short mode, void *file_private_data) { *************** *** 500,503 **** --- 528,532 ---- * Reset the sam chip */ + /*snd_printk("Resetting the chip\n"); snd_isis_write_control(chip,SAM_CMD_HOT_RES); *************** *** 505,508 **** --- 534,538 ---- mdelay(50);*/ + /*loop = SAM_READ_LOOP_COUNTER; while((snd_isis_read(chip, SAM9707_STATUS) != 0xa0) & --loop) *************** *** 518,522 **** ! snd_isis_write_control(chip, SAM_RESET); snd_printk("read data8 : %2x\n",snd_isis_read(chip, SAM9707_DATA8)); --- 548,553 ---- ! // snd_isis_write_control(chip, SAM_RESET); ! isis_dream_outb(chip, SAM9707_CONTROL,SAM_RESET); snd_printk("read data8 : %2x\n",snd_isis_read(chip, SAM9707_DATA8)); *************** *** 753,757 **** ! int snd_isis_sam9707_play_open(snd_pcm_substream_t *subs) { struct isis_sam9707_chip *chip= snd_pcm_substream_chip(subs); --- 784,788 ---- ! int snd_isis_sam9707_play_open(struct snd_pcm_substream *subs) { struct isis_sam9707_chip *chip= snd_pcm_substream_chip(subs); *************** *** 766,770 **** }; ! int snd_isis_sam9707_play_close(snd_pcm_substream_t *subs) { struct isis_sam9707_chip *chip = snd_pcm_substream_chip(subs); --- 797,801 ---- }; ! int snd_isis_sam9707_play_close(struct snd_pcm_substream *subs) { struct isis_sam9707_chip *chip = snd_pcm_substream_chip(subs); *************** *** 773,777 **** }; ! int snd_isis_sam9707_rec_open(snd_pcm_substream_t *subs) { struct isis_sam9707_chip *chip= snd_pcm_substream_chip(subs); --- 804,808 ---- }; ! int snd_isis_sam9707_rec_open(struct snd_pcm_substream *subs) { struct isis_sam9707_chip *chip= snd_pcm_substream_chip(subs); *************** *** 786,790 **** }; ! static int snd_isis_sam9707_rec_close(snd_pcm_substream_t *subs) { struct isis_sam9707_chip *chip = snd_pcm_substream_chip(subs); --- 817,821 ---- }; ! static int snd_isis_sam9707_rec_close(struct snd_pcm_substream *subs) { struct isis_sam9707_chip *chip = snd_pcm_substream_chip(subs); *************** *** 807,812 **** }; ! int snd_isis_pcm_hw_params(snd_pcm_substream_t *substream, ! snd_pcm_hw_params_t *hw_params) { snd_printk("snd_isis_pcm_hw_params"); --- 838,843 ---- }; ! int snd_isis_pcm_hw_params(struct snd_pcm_substream *substream, ! struct snd_pcm_hw_params *hw_params) { snd_printk("snd_isis_pcm_hw_params"); *************** *** 815,827 **** }; ! int snd_isis_pcm_hw_free(snd_pcm_substream_t *substream) { return snd_pcm_lib_free_pages(substream); }; ! int snd_isis_pcm_prepare(snd_pcm_substream_t *substream) { struct isis_sam9707_chip *chip = snd_pcm_substream_chip(substream); ! snd_pcm_runtime_t *runtime = substream->runtime; u8 format; --- 846,858 ---- }; ! int snd_isis_pcm_hw_free(struct snd_pcm_substream *substream) { return snd_pcm_lib_free_pages(substream); }; ! int snd_isis_pcm_prepare(struct snd_pcm_substream *substream) { struct isis_sam9707_chip *chip = snd_pcm_substream_chip(substream); ! struct snd_pcm_runtime *runtime = substream->runtime; u8 format; *************** *** 846,853 **** }; ! int snd_isis_pcm_rec_prepare(snd_pcm_substream_t *substream) { struct isis_sam9707_chip *chip = snd_pcm_substream_chip(substream); ! snd_pcm_runtime_t *runtime = substream->runtime; u8 format; --- 877,884 ---- }; ! int snd_isis_pcm_rec_prepare(struct snd_pcm_substream *substream) { struct isis_sam9707_chip *chip = snd_pcm_substream_chip(substream); ! struct snd_pcm_runtime *runtime = substream->runtime; u8 format; *************** *** 871,875 **** }; ! int snd_isis_pcm_trigger(snd_pcm_substream_t *substream, int cmd) { struct isis_sam9707_chip *chip = snd_pcm_substream_chip(substream); --- 902,906 ---- }; ! int snd_isis_pcm_trigger(struct snd_pcm_substream *substream, int cmd) { struct isis_sam9707_chip *chip = snd_pcm_substream_chip(substream); *************** *** 892,902 **** }; ! snd_pcm_uframes_t snd_isis_pcm_rec_pointer( ! snd_pcm_substream_t *substream) { return 0; }; ! snd_pcm_uframes_t snd_isis_pcm_pointer(snd_pcm_substream_t *substream) { snd_printk("snd_isis_pcm_pointer"); --- 923,933 ---- }; ! struct snd_pcm_uframes *snd_isis_pcm_rec_pointer( ! struct snd_pcm_substream *substream) { return 0; }; ! struct snd_pcm_uframes *snd_isis_pcm_pointer(struct snd_pcm_substream *substream) { snd_printk("snd_isis_pcm_pointer"); *************** *** 907,911 **** ! void snd_isis_pcm_free(snd_pcm_t *pcm) { struct isis_sam9707_chip *chip = (struct isis_sam9707_chip *) pcm->private_data; --- 938,942 ---- ! void snd_isis_pcm_free(struct snd_pcm *pcm) { struct isis_sam9707_chip *chip = (struct isis_sam9707_chip *) pcm->private_data; *************** *** 942,946 **** }; ! static snd_kcontrol_new_t snd_isis_sam9707_ctl_vol[2] = { { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, --- 973,977 ---- }; ! static struct snd_kcontrol_new snd_isis_sam9707_ctl_vol[2] = { { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, *************** *** 965,969 **** }; ! static snd_kcontrol_new_t snd_isis_sam9707_rec_ctl_vol[4] = { { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, --- 996,1000 ---- }; ! static struct snd_kcontrol_new snd_isis_sam9707_rec_ctl_vol[4] = { { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, *************** *** 1008,1012 **** }; ! static snd_kcontrol_new_t snd_isis_rack_controls[2] = { { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, --- 1039,1043 ---- }; ! static struct snd_kcontrol_new snd_isis_rack_controls[2] = { { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, *************** *** 1030,1034 **** ! static snd_pcm_ops_t snd_isis_sam9707_pcm_play_ops = { .open = snd_isis_sam9707_play_open, .close = snd_isis_sam9707_play_close, --- 1061,1065 ---- ! static struct snd_pcm_ops snd_isis_sam9707_pcm_play_ops = { .open = snd_isis_sam9707_play_open, .close = snd_isis_sam9707_play_close, *************** *** 1042,1046 **** ! static snd_pcm_ops_t snd_isis_sam9707_pcm_rec_ops = { .open = snd_isis_sam9707_rec_open, .close = snd_isis_sam9707_rec_close, --- 1073,1077 ---- ! static struct snd_pcm_ops snd_isis_sam9707_pcm_rec_ops = { .open = snd_isis_sam9707_rec_open, .close = snd_isis_sam9707_rec_close, *************** *** 1055,1060 **** int __devinit snd_isis_new_pcm(struct isis_sam9707_chip *chip) { ! snd_pcm_t *pcmo; ! snd_pcm_t *pcmi; int err; int i; /* loop counter */ --- 1086,1091 ---- int __devinit snd_isis_new_pcm(struct isis_sam9707_chip *chip) { ! struct snd_pcm *pcmo; ! struct snd_pcm *pcmi; int err; int i; /* loop counter */ *************** *** 1105,1109 **** int loop, err, i; u16 value,tmp; ! snd_info_entry_t *entry; /* data for retreiving new snd_info_entry */ err = snd_card_proc_new(chip->card, "firmware", &entry); --- 1136,1140 ---- int loop, err, i; u16 value,tmp; ! struct snd_info_entry *entry; /* data for retreiving new snd_info_entry */ err = snd_card_proc_new(chip->card, "firmware", &entry); *************** *** 1121,1126 **** outw(tmp, chip->io_port + 0x18); ! snd_isis_write_control(chip, 0x70); ! snd_isis_write_data8(chip, 0x11); mdelay(100); if((tmp = snd_isis_read_data8(chip)) != 0x00) --- 1152,1159 ---- outw(tmp, chip->io_port + 0x18); ! // snd_isis_write_control(chip, 0x70); ! isis_dream_outb(chip, SAM9707_CONTROL, 0x70); ! // snd_isis_write_data8(chip, 0x11); ! isis_dream_outb(chip, SAM9707_DATA8, 0x11); mdelay(100); if((tmp = snd_isis_read_data8(chip)) != 0x00) Index: isis.h =================================================================== RCS file: /cvsroot/isisalsa/isis/isis.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** isis.h 29 Apr 2006 20:07:52 -0000 1.14 --- isis.h 15 May 2007 09:56:28 -0000 1.15 *************** *** 181,194 **** /* definition of the chip-specific record*/ struct isis_sam9707_chip { ! snd_card_t *card; ! struct snd_es1968 *parent; spinlock_t reg_lock; int firm; /* 0 card not ready, 1 firm file opend, 2 firm downloaded */ u8 *firmptr; long firmpos; ! snd_info_entry_t *entry; unsigned long io_port; /* hardware address */ ! snd_pcm_t *pcmi; ! snd_pcm_t *pcmo; u8 ivoices; /*! Flags each bit a sam input channel channel, value = isopend*/ struct isis_voice play_voice[2]; --- 181,194 ---- /* definition of the chip-specific record*/ struct isis_sam9707_chip { ! struct snd_card *card; ! struct es1968 *parent; spinlock_t reg_lock; int firm; /* 0 card not ready, 1 firm file opend, 2 firm downloaded */ u8 *firmptr; long firmpos; ! struct snd_info_entry *entry; unsigned long io_port; /* hardware address */ ! struct snd_pcm *pcmi; ! struct snd_pcm *pcmo; u8 ivoices; /*! Flags each bit a sam input channel channel, value = isopend*/ struct isis_voice play_voice[2]; Index: es1968.c =================================================================== RCS file: /cvsroot/isisalsa/isis/es1968.c,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** es1968.c 29 Apr 2006 20:07:52 -0000 1.45 --- es1968.c 15 May 2007 09:56:28 -0000 1.46 *************** *** 101,107 **** --- 101,110 ---- #include <linux/init.h> #include <linux/pci.h> + #include <linux/dma-mapping.h> #include <linux/slab.h> #include <linux/gameport.h> #include <linux/moduleparam.h> + #include <linux/mutex.h> + #include <sound/core.h> #include <sound/pcm.h> *************** *** 137,141 **** static int pcm_substreams_p[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 4 }; static int pcm_substreams_c[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1 }; ! static int clock[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; static int use_pm[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 2}; static int enable_mpu[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 2}; --- 140,144 ---- static int pcm_substreams_p[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 4 }; static int pcm_substreams_c[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1 }; ! static int clock[SNDRV_CARDS];/* = {[0 ... (SNDRV_CARDS - 1)] = 0};*/ static int use_pm[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 2}; static int enable_mpu[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 2}; *************** *** 445,488 **** #define ESM_MODE_CAPTURE 1 - /* acpi states */ - enum { - ACPI_D0=0, - ACPI_D1, - ACPI_D2, - ACPI_D3 - }; - - /* bits in the acpi masks */ - #define ACPI_12MHZ ( 1 << 15) - #define ACPI_24MHZ ( 1 << 14) - #define ACPI_978 ( 1 << 13) - #define ACPI_SPDIF ( 1 << 12) - #define ACPI_GLUE ( 1 << 11) - #define ACPI__10 ( 1 << 10) /* reserved */ - #define ACPI_PCIINT ( 1 << 9) - #define ACPI_HV ( 1 << 8) /* hardware volume */ - #define ACPI_GPIO ( 1 << 7) - #define ACPI_ASSP ( 1 << 6) - #define ACPI_SB ( 1 << 5) /* sb emul */ - #define ACPI_FM ( 1 << 4) /* fm emul */ - #define ACPI_RB ( 1 << 3) /* ringbus / aclink */ - #define ACPI_MIDI ( 1 << 2) - #define ACPI_GP ( 1 << 1) /* game port */ - #define ACPI_WP ( 1 << 0) /* wave processor */ - - #define ACPI_ALL (0xffff) - #define ACPI_SLEEP (~(ACPI_SPDIF|ACPI_ASSP|ACPI_SB|ACPI_FM| \ - ACPI_MIDI|ACPI_GP|ACPI_WP)) - #define ACPI_NONE (ACPI__10) - - /* these masks indicate which units we care about at - which states */ - static u16 acpi_state_mask[] = { - [ACPI_D0] = ACPI_ALL, - [ACPI_D1] = ACPI_SLEEP, - [ACPI_D2] = ACPI_SLEEP, - [ACPI_D3] = ACPI_NONE - }; - /* APU use in the driver */ --- 448,451 ---- *************** *** 585,589 **** int bobclient; /* active timer instancs */ int bob_freq; /* timer frequency */ ! struct semaphore memory_mutex; /* memory lock */ /* APU states */ --- 548,552 ---- int bobclient; /* active timer instancs */ int bob_freq; /* timer frequency */ ! struct mutex memory_mutex; /* memory lock */ /* APU states */ *************** *** 606,610 **** }; ! static irqreturn_t snd_es1968_interrupt(int irq, void *dev_id, struct pt_regs *regs); static struct pci_device_id snd_es1968_ids[] = { --- 569,573 ---- }; ! static irqreturn_t snd_es1968_interrupt(int irq, void *dev_id); static struct pci_device_id snd_es1968_ids[] = { *************** *** 632,636 **** } ! inline static void maestro_write(struct es1968 *chip, u16 reg, u16 data) { unsigned long flags; --- 595,599 ---- } ! static inline void maestro_write(struct es1968 *chip, u16 reg, u16 data) { unsigned long flags; *************** *** 650,654 **** } ! inline static u16 maestro_read(struct es1968 *chip, u16 reg) { unsigned long flags; --- 613,617 ---- } ! static inline u16 maestro_read(struct es1968 *chip, u16 reg) { unsigned long flags; *************** *** 684,688 **** --- 647,653 ---- spin_lock_irqsave(&chip->ac97_lock, flags); outw(val, chip->io_port + ESM_AC97_DATA); + /*msleep(1);*/ outb(reg, chip->io_port + ESM_AC97_INDEX); + /*msleep(1);*/ spin_unlock_irqrestore(&chip->ac97_lock, flags); } *************** *** 692,697 **** u16 data = 0; struct es1968 *chip = ac97->private_data; ! unsigned long flags; ! snd_es1968_ac97_wait(chip); --- 657,661 ---- u16 data = 0; struct es1968 *chip = ac97->private_data; ! unsigned long flags; snd_es1968_ac97_wait(chip); *************** *** 699,705 **** --- 663,671 ---- spin_lock_irqsave(&chip->ac97_lock, flags); outb(reg | 0x80, chip->io_port + ESM_AC97_INDEX); + /*msleep(1);*/ if (! snd_es1968_ac97_wait(chip)) { data = inw(chip->io_port + ESM_AC97_DATA); + /*msleep(1);*/ } spin_unlock_irqrestore(&chip->ac97_lock, flags); *************** *** 936,940 **** static u32 snd_es1968_compute_rate(struct es1968 *chip, u32 freq) { - u32 rate = (freq << 16) / chip->clock; #if 0 /* XXX: do we need this? */ --- 902,905 ---- *************** *** 946,950 **** /* get current pointer */ ! inline static unsigned int snd_es1968_get_dma_ptr(struct es1968 *chip, struct esschan *es) { --- 911,915 ---- /* get current pointer */ ! static inline unsigned int snd_es1968_get_dma_ptr(struct es1968 *chip, struct esschan *es) { *************** *** 1132,1136 **** ! static void init_capture_apu(struct es1968 *chip,struct esschan *es, int channel, unsigned int pa, unsigned int bsize, int mode, int route) --- 1097,1101 ---- ! static void init_capture_apu(struct es1968 *chip, struct esschan *es, int channel, unsigned int pa, unsigned int bsize, int mode, int route) *************** *** 1373,1377 **** int max_size = 0; ! down(&chip->memory_mutex); list_for_each(p, &chip->buf_list) { struct esm_memory *buf = list_entry(p, struct esm_memory, list); --- 1338,1342 ---- int max_size = 0; ! mutex_lock(&chip->memory_mutex); list_for_each(p, &chip->buf_list) { struct esm_memory *buf = list_entry(p, struct esm_memory, list); *************** *** 1379,1383 **** max_size = buf->buf.bytes; } ! up(&chip->memory_mutex); if (max_size >= 128*1024) max_size = 127*1024; --- 1344,1348 ---- max_size = buf->buf.bytes; } ! mutex_unlock(&chip->memory_mutex); if (max_size >= 128*1024) max_size = 127*1024; *************** *** 1391,1396 **** struct list_head *p; ! size = ((size + ESM_MEM_ALIGN - 1) / ESM_MEM_ALIGN) * ESM_MEM_ALIGN; ! down(&chip->memory_mutex); list_for_each(p, &chip->buf_list) { buf = list_entry(p, struct esm_memory, list); --- 1356,1361 ---- struct list_head *p; ! size = ALIGN(size, ESM_MEM_ALIGN); ! mutex_lock(&chip->memory_mutex); list_for_each(p, &chip->buf_list) { buf = list_entry(p, struct esm_memory, list); *************** *** 1398,1402 **** goto __found; } ! up(&chip->memory_mutex); return NULL; --- 1363,1367 ---- goto __found; } ! mutex_unlock(&chip->memory_mutex); return NULL; *************** *** 1405,1409 **** struct esm_memory *chunk = kmalloc(sizeof(*chunk), GFP_KERNEL); if (chunk == NULL) { ! up(&chip->memory_mutex); return NULL; } --- 1370,1374 ---- struct esm_memory *chunk = kmalloc(sizeof(*chunk), GFP_KERNEL); if (chunk == NULL) { ! mutex_unlock(&chip->memory_mutex); return NULL; } *************** *** 1417,1421 **** } buf->empty = 0; ! up(&chip->memory_mutex); return buf; } --- 1382,1386 ---- } buf->empty = 0; ! mutex_unlock(&chip->memory_mutex); return buf; } *************** *** 1426,1430 **** struct esm_memory *chunk; ! down(&chip->memory_mutex); buf->empty = 1; if (buf->list.prev != &chip->buf_list) { --- 1391,1395 ---- struct esm_memory *chunk; ! mutex_lock(&chip->memory_mutex); buf->empty = 1; if (buf->list.prev != &chip->buf_list) { *************** *** 1445,1449 **** } } ! up(&chip->memory_mutex); } --- 1410,1414 ---- } } ! mutex_unlock(&chip->memory_mutex); } *************** *** 1531,1535 **** /* remove dma areas if allocated */ ! static int snd_es1968_hw_free(struct snd_pcm_substream * substream) { struct es1968 *chip = snd_pcm_substream_chip(substream); --- 1496,1500 ---- /* remove dma areas if allocated */ ! static int snd_es1968_hw_free(struct snd_pcm_substream *substream) { struct es1968 *chip = snd_pcm_substream_chip(substream); *************** *** 1590,1594 **** return apu1; ! es = kzalloc(sizeof(*es), GFP_KERNEL); if (!es) { snd_es1968_free_apu_pair(chip, apu1); --- 1555,1559 ---- return apu1; ! es = kzalloc(sizeof(*es), GFP_KERNEL); if (!es) { snd_es1968_free_apu_pair(chip, apu1); *************** *** 1678,1682 **** } ! static int snd_es1968_playback_close(struct snd_pcm_substream * substream) { struct es1968 *chip = snd_pcm_substream_chip(substream); --- 1643,1647 ---- } ! static int snd_es1968_playback_close(struct snd_pcm_substream *substream) { struct es1968 *chip = snd_pcm_substream_chip(substream); *************** *** 1695,1699 **** } ! static int snd_es1968_capture_close(struct snd_pcm_substream * substream) { struct es1968 *chip = snd_pcm_substream_chip(substream); --- 1660,1664 ---- } ! static int snd_es1968_capture_close(struct snd_pcm_substream *substream) { struct es1968 *chip = snd_pcm_substream_chip(substream); *************** *** 1792,1797 **** chip->in_measurement = 1; chip->measure_apu = apu; - snd_es1968_bob_inc(chip, ESM_BOB_FREQ); spin_lock_irq(&chip->reg_lock); __apu_set_register(chip, apu, 5, pa & 0xffff); snd_es1968_trigger_apu(chip, apu, ESM_APU_16BITLINEAR); --- 1757,1762 ---- chip->in_measurement = 1; chip->measure_apu = apu; spin_lock_irq(&chip->reg_lock); + snd_es1968_bob_inc(chip, ESM_BOB_FREQ); __apu_set_register(chip, apu, 5, pa & 0xffff); snd_es1968_trigger_apu(chip, apu, ESM_APU_16BITLINEAR); *************** *** 1803,1809 **** do_gettimeofday(&stop_time); snd_es1968_trigger_apu(chip, apu, 0); /* stop */ - spin_unlock_irq(&chip->reg_lock); snd_es1968_bob_dec(chip); chip->in_measurement = 0; /* check the current position */ --- 1768,1774 ---- do_gettimeofday(&stop_time); snd_es1968_trigger_apu(chip, apu, 0); /* stop */ snd_es1968_bob_dec(chip); chip->in_measurement = 0; + spin_unlock_irq(&chip->reg_lock); /* check the current position */ *************** *** 1919,1923 **** based on differences from the default register values. */ ! x = inb(chip->io_port + 0x1c); /* Reset the volume control registers. */ outb(0x88, chip->io_port + 0x1c); --- 1884,1888 ---- based on differences from the default register values. */ ! x = inb(chip->io_port + 0x1c) & 0xee; /* Reset the volume control registers. */ outb(0x88, chip->io_port + 0x1c); *************** *** 1925,1930 **** outb(0x88, chip->io_port + 0x1e); outb(0x88, chip->io_port + 0x1f); ! ! if (chip->in_suspend) return; --- 1890,1895 ---- outb(0x88, chip->io_port + 0x1e); outb(0x88, chip->io_port + 0x1f); ! ! if (chip->in_suspend) return; *************** *** 1932,1967 **** return; ! /* FIXME: we can't call snd_ac97_* functions since here is in tasklet. */ spin_lock_irqsave(&chip->ac97_lock, flags); - val = chip->ac97->regs[AC97_MASTER]; ! if (x & 1) { /* mute */ val ^= 0x8000; ! chip->ac97->regs[AC97_MASTER] = val; outw(val, chip->io_port + ESM_AC97_DATA); outb(AC97_MASTER, chip->io_port + ESM_AC97_INDEX); snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE, &chip->master_switch->id); ! } else { ! val &= 0x7fff; ! if (((x>>1) & 7) > 4) { ! /* volume up */ ! if ((val & 0xff) > 0) ! val--; ! if ((val & 0xff00) > 0) ! val -= 0x0100; ! } else { ! /* volume down */ ! if ((val & 0xff) < 0x1f) ! val++; ! if ((val & 0xff00) < 0x1f00) ! val += 0x0100; ! } chip->ac97->regs[AC97_MASTER] = val; ! outw(val, chip->io_port + ESM_AC97_DATA); outb(AC97_MASTER, chip->io_port + ESM_AC97_INDEX); snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE, &chip->master_volume->id); } spin_unlock_irqrestore(&chip->ac97_lock, flags); --- 1897,1937 ---- return; ! /* FIXME: we can't call snd_ac97_* functions since here is in tasklet. */ spin_lock_irqsave(&chip->ac97_lock, flags); val = chip->ac97->regs[AC97_MASTER]; ! switch (x) { ! case 0x88: /* mute */ val ^= 0x8000; ! chip->ac97->regs[AC97_MASTER] = val; outw(val, chip->io_port + ESM_AC97_DATA); outb(AC97_MASTER, chip->io_port + ESM_AC97_INDEX); snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE, &chip->master_switch->id); ! break; ! case 0xaa: ! /* volume up */ ! if ((val & 0x7f) > 0) ! val--; ! if ((val & 0x7f00) > 0) ! val -= 0x0100; chip->ac97->regs[AC97_MASTER] = val; ! outw(val, chip->io_port + ESM_AC97_DATA); outb(AC97_MASTER, chip->io_port + ESM_AC97_INDEX); snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE, &chip->master_volume->id); + break; + case 0x66: + /* volume down */ + if ((val & 0x7f) < 0x1f) + val++; + if ((val & 0x7f00) < 0x1f00) + val += 0x0100; + chip->ac97->regs[AC97_MASTER] = val; + outw(val, chip->io_port + ESM_AC97_DATA); + outb(AC97_MASTER, chip->io_port + ESM_AC97_INDEX); + snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE, + &chip->master_volume->id); + break; } spin_unlock_irqrestore(&chip->ac97_lock, flags); *************** *** 1971,1983 **** * interrupt handler */ ! static irqreturn_t snd_es1968_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct es1968 *chip = dev_id; u32 event; - if (!(event = inb(chip->io_port + 0x1A))) return IRQ_NONE; - // snd_printk("Interrupt rised Event %2x \n", event); outw(inw(chip->io_port + 4) & 1, chip->io_port + 4); --- 1941,1951 ---- * interrupt handler */ ! static irqreturn_t snd_es1968_interrupt(int irq, void *dev_id) { struct es1968 *chip = dev_id; u32 event; if (!(event = inb(chip->io_port + 0x1A))) return IRQ_NONE; outw(inw(chip->io_port + 4) & 1, chip->io_port + 4); *************** *** 1990,1994 **** if ((event & ESM_MPU401_IRQ) && chip->rmidi) { ! snd_mpu401_uart_interrupt(irq, chip->rmidi->private_data, regs); } --- 1958,1962 ---- if ((event & ESM_MPU401_IRQ) && chip->rmidi) { ! snd_mpu401_uart_interrupt(irq, chip->rmidi->private_data); } *************** *** 2035,2038 **** --- 2003,2007 ---- if ((err = snd_ac97_bus(chip->card, 0, &ops, NULL, &pbus)) < 0) return err; + pbus->no_vra = 1; /* ES1968 doesn't need VRA */ memset(&ac97, 0, sizeof(ac97)); *************** *** 2040,2044 **** if ((err = snd_ac97_mixer(pbus, &ac97, &chip->ac97)) < 0) return err; - pbus->no_vra = 1; /* ES1968 doesn't need VRA */ /* attach master switch / volumes for h/w volume control */ --- 2009,2012 ---- *************** *** 2175,2193 **** /* - * power management - */ - static void snd_es1968_set_acpi(struct es1968 *chip, int state) - { - u16 active_mask = acpi_state_mask[state]; - - pci_set_power_state(chip->pci, state); - /* make sure the units we care about are on - XXX we might want to do this before state flipping? */ - pci_write_config_word(chip->pci, 0x54, ~ active_mask); - pci_write_config_word(chip->pci, 0x56, ~ active_mask); - } - - - /* * initialize maestro chip */ --- 2143,2146 ---- *************** *** 2211,2217 **** */ - /* do config work at full power */ - snd_es1968_set_acpi(chip, ACPI_D0); - /* Config Reg A */ pci_read_config_word(pci, ESM_CONFIG_A, &w); --- 2164,2167 ---- *************** *** 2408,2418 **** chip->in_suspend = 1; ! snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); snd_pcm_suspend_all(chip->pcm); snd_ac97_suspend(chip->ac97); snd_es1968_bob_stop(chip); ! snd_es1968_set_acpi(chip, ACPI_D3); ! pci_disable_device(pci); ! pci_save_state(pci); return 0; } --- 2358,2369 ---- chip->in_suspend = 1; ! snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); snd_pcm_suspend_all(chip->pcm); snd_ac97_suspend(chip->ac97); snd_es1968_bob_stop(chip); ! ! pci_disable_device(pci); ! pci_save_state(pci); ! pci_set_power_state(pci, pci_choose_state(pci, state)); return 0; } *************** *** 2420,2424 **** static int es1968_resume(struct pci_dev *pci) { ! struct snd_card *card = pci_get_drvdata(pci); struct es1968 *chip = card->private_data; struct list_head *p; --- 2371,2375 ---- static int es1968_resume(struct pci_dev *pci) { ! struct snd_card *card = pci_get_drvdata(pci); struct es1968 *chip = card->private_data; struct list_head *p; *************** *** 2428,2434 **** /* restore all our config */ pci_restore_state(pci); ! pci_enable_device(pci); pci_set_master(pci); snd_es1968_chip_init(chip); --- 2379,2392 ---- /* restore all our config */ + pci_set_power_state(pci, PCI_D0); pci_restore_state(pci); ! if (pci_enable_device(pci) < 0) { ! printk(KERN_ERR "es1968: pci_enable_device failed, " ! "disabling device\n"); ! snd_card_disconnect(card); ! return -EIO; ! } pci_set_master(pci); + snd_es1968_chip_init(chip); *************** *** 2443,2457 **** /* restore ac97 state */ snd_ac97_resume(chip->ac97); ! list_for_each(p, &chip->substream_list) { struct esschan *es = list_entry(p, struct esschan, list); ! switch (es->mode) { ! case ESM_MODE_PLAY: ! snd_es1968_playback_setup(chip, es, es->substream->runtime); ! break; ! case ESM_MODE_CAPTURE: ! snd_es1968_capture_setup(chip, es, es->substream->runtime); ! break; ! } ! } /* start timer again */ --- 2401,2416 ---- /* restore ac97 state */ snd_ac97_resume(chip->ac97); ! ! list_for_each(p, &chip->substream_list) { struct esschan *es = list_entry(p, struct esschan, list); ! switch (es->mode) { ! case ESM_MODE_PLAY: ! snd_es1968_playback_setup(chip, es, es->substream->runtime); ! break; ! case ESM_MODE_CAPTURE: ! snd_es1968_capture_setup(chip, es, es->substream->runtime); ! break; ! } ! } /* start timer again */ *************** *** 2465,2514 **** #endif /* CONFIG_PM */ - #ifdef SUPPORT_JOYSTICK ! #define JOYSTICK_ADDR 0x200 static int __devinit snd_es1968_create_gameport(struct es1968 *chip, int dev) { ! struct gameport *gp; ! struct resource *r; ! u16 val; ! if (!joystick[dev]) ! return -ENODEV; ! r = request_region(JOYSTICK_ADDR, 8, "ES1968 gameport"); ! if (!r) ! return -EBUSY; ! chip->gameport = gp = gameport_allocate_port(); ! if (!gp) { ! printk(KERN_ERR "es1968: cannot allocate memory for gameport\n"); ! release_and_free_resource(r); ! return -ENOMEM; ! } ! pci_read_config_word(chip->pci, ESM_LEGACY_AUDIO_CONTROL, &val); ! pci_write_config_word(chip->pci, ESM_LEGACY_AUDIO_CONTROL, val | 0x04); ! gameport_set_name(gp, "ES1968 Gameport"); ! gameport_set_phys(gp, "pci%s/gameport0", pci_name(chip->pci)); ! gameport_set_dev_parent(gp, &chip->pci->dev); ! gp->io = JOYSTICK_ADDR; ! gameport_set_port_data(gp, r); ! gameport_register_port(gp); ! return 0; } static void snd_es1968_free_gameport(struct es1968 *chip) { ! if (chip->gameport) { ! struct resource *r = gameport_get_port_data(chip->gameport); ! gameport_unregister_port(chip->gameport); ! chip->gameport = NULL; ! release_and_free_resource(r); ! } } #else --- 2424,2473 ---- #endif /* CONFIG_PM */ #ifdef SUPPORT_JOYSTICK ! #define JOYSTICK_ADDR 0x200 static int __devinit snd_es1968_create_gameport(struct es1968 *chip, int dev) { ! struct gameport *gp; ! struct resource *r; ! u16 val; ! if (!joystick[dev]) ! return -ENODEV; ! r = request_region(JOYSTICK_ADDR, 8, "ES1968 gameport"); ! if (!r) ! return -EBUSY; ! chip->gameport = gp = gameport_allocate_port(); ! if (!gp) { ! printk(KERN_ERR "es1968: cannot allocate memory for gameport\n"); ! release_and_free_resource(r); ! return -ENOMEM; ! } ! pci_read_config_word(chip->pci, ESM_LEGACY_AUDIO_CONTROL, &val); ! pci_write_config_word(chip->pci, ESM_LEGACY_AUDIO_CONTROL, val | 0x04); ! gameport_set_name(gp, "ES1968 Gameport"); ! gameport_set_phys(gp, "pci%s/gameport0", pci_name(chip->pci)); ! gameport_set_dev_parent(gp, &chip->pci->dev); ! gp->io = JOYSTICK_ADDR; ! gameport_set_port_data(gp, r); ! gameport_register_port(gp); ! return 0; } + static void snd_es1968_free_gameport(struct es1968 *chip) { ! if (chip->gameport) { ! struct resource *r = gameport_get_port_data(chip->gameport); ! gameport_unregister_port(chip->gameport); ! chip->gameport = NULL; ! release_and_free_resource(r); ! } } #else *************** *** 2519,2541 **** static int snd_es1968_free(struct es1968 *chip) { ! if (chip->io_port) { ! synchronize_irq(chip->irq); ! outw(1, chip->io_port + 0x04); /* clear WP interrupts */ ! outw(0, chip->io_port + ESM_PORT_HOST_IRQ); /* disable IRQ */ ! } ! if (chip->irq >= 0) ! free_irq(chip->irq, (void *)chip); ! snd_es1968_free_gameport(chip); ! snd_es1968_set_acpi(chip, ACPI_D3); ! chip->master_switch = NULL; ! chip->master_volume = NULL; ! pci_release_regions(chip->pci); ! pci_disable_device(chip->pci); ! kfree(chip); ! return 0; } - static int snd_es1968_dev_free(struct snd_device *device) { --- 2478,2498 ---- static int snd_es1968_free(struct es1968 *chip) { ! if (chip->io_port) { ! synchronize_irq(chip->irq); ! outw(1, chip->io_port + 0x04); /* clear WP interrupts */ ! outw(0, chip->io_port + ESM_PORT_HOST_IRQ); /* disable IRQ */ ! } ! if (chip->irq >= 0) ! free_irq(chip->irq, chip); ! snd_es1968_free_gameport(chip); ! chip->master_switch = NULL; ! chip->master_volume = NULL; ! pci_release_regions(chip->pci); ! pci_disable_device(chip->pci); ! kfree(chip); ! return 0; } static int snd_es1968_dev_free(struct snd_device *device) { *************** *** 2562,2566 **** }; ! static int __devinit snd_es1968_create(struct snd_card * card, struct pci_dev *pci, int total_bufsize, --- 2519,2523 ---- }; ! static int __devinit snd_es1968_create(struct snd_card *card, struct pci_dev *pci, int total_bufsize, *************** *** 2576,2580 **** struct es1968 *chip; int i, err; - *chip_ret = NULL; --- 2533,2536 ---- *************** *** 2584,2589 **** return err; /* check, if we can restrict PCI DMA transfers to 28 bits */ ! if (pci_set_dma_mask(pci, 0x0fffffff) < 0 || ! pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) { snd_printk(KERN_ERR "architecture does not support 28bit PCI busmaster DMA\n"); pci_disable_device(pci); --- 2540,2545 ---- return err; /* check, if we can restrict PCI DMA transfers to 28 bits */ ! if (pci_set_dma_mask(pci, DMA_28BIT_MASK) < 0 || ! pci_set_consistent_dma_mask(pci, DMA_28BIT_MASK) < 0) { snd_printk(KERN_ERR "architecture does not support 28bit PCI busmaster DMA\n"); pci_disable_device(pci); *************** *** 2591,2595 **** } ! chip = kzalloc(sizeof(*chip), GFP_KERNEL); if (! chip) { pci_disable_device(pci); --- 2547,2551 ---- } ! chip = kzalloc(sizeof(*chip), GFP_KERNEL); if (! chip) { pci_disable_device(pci); *************** *** 2604,2608 **** INIT_LIST_HEAD(&chip->substream_list); spin_lock_init(&chip->ac97_lock); ! init_MUTEX(&chip->memory_mutex); tasklet_init(&chip->hwvol_tq, es1968_update_hw_volume, (unsigned long)chip); chip->card = card; --- 2560,2564 ---- INIT_LIST_HEAD(&chip->substream_list); spin_lock_init(&chip->ac97_lock); ! mutex_init(&chip->memory_mutex); tasklet_init(&chip->hwvol_tq, es1968_update_hw_volume, (unsigned long)chip); chip->card = card; *************** *** 2619,2624 **** } chip->io_port = pci_resource_start(pci, 0); ! if (request_irq(pci->irq, snd_es1968_interrupt, SA_INTERRUPT|SA_SHIRQ, ! "ESS Maestro", (void*)chip)) { snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); snd_es1968_free(chip); --- 2575,2580 ---- } chip->io_port = pci_resource_start(pci, 0); ! if (request_irq(pci->irq, snd_es1968_interrupt, IRQF_SHARED, ! "ESS Maestro", chip)) { snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); snd_es1968_free(chip); *************** *** 2770,2787 **** } } ! }printk(KERN_ERR "test 4 \n"); if (enable_mpu[dev]) { if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, ! chip->io_port + ESM_MPU401_PORT, 1, chip->irq, 0, &chip->rmidi)) < 0) { printk(KERN_WARNING "es1968: skipping MPU-401 MIDI support..\n"); } } ! snd_es1968_create_gameport(chip, dev); ! printk(KERN_ERR "test 5 \n"); ! snd_es1968_start_irq(chip); ! printk(KERN_ERR "test 6 \n"); chip->clock = clock[dev]; if (! chip->clock) --- 2726,2743 ---- } } ! } if (enable_mpu[dev]) { if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, ! chip->io_port + ESM_MPU401_PORT, ! MPU401_INFO_INTEGRATED, chip->irq, 0, &chip->rmidi)) < 0) { printk(KERN_WARNING "es1968: skipping MPU-401 MIDI support..\n"); } } ! snd_es1968_create_gameport(chip, dev); ! snd_es1968_start_irq(chip); ! chip->clock = clock[dev]; if (! chip->clock) *************** *** 2793,2802 **** if ((err = snd_card_register(card)) < 0) { snd_card_free(card); - printk(KERN_ERR "error registering card : %d \n", err); return err; } pci_set_drvdata(pci, card); dev++; - printk(KERN_ERR "test 8 \n"); return 0; } --- 2749,2756 ---- *************** *** 2814,2821 **** .remove = __devexit_p(snd_es1968_remove), #ifdef CONFIG_PM ! .suspend = es1968_suspend, ! .resume = es1968_resume, #endif - }; --- 2768,2774 ---- .remove = __devexit_p(snd_es1968_remove), #ifdef CONFIG_PM ! .suspend = es1968_suspend, ! .resume = es1968_resume, #endif }; Index: es1968.h =================================================================== RCS file: /cvsroot/isisalsa/isis/es1968.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** es1968.h 17 Apr 2006 11:37:00 -0000 1.2 --- es1968.h 15 May 2007 09:56:28 -0000 1.3 *************** *** 15,23 **** #include <sound/ac97_codec.h> - #define NR_APUS 64 #define NR_APU_REGS 16 ! struct snd_es1968 { /* Module Config */ int total_bufsize; /* in bytes */ --- 15,22 ---- #include <sound/ac97_codec.h> #define NR_APUS 64 #define NR_APU_REGS 16 ! struct es1968 { /* Module Config */ int total_bufsize; /* in bytes */ *************** *** 40,45 **** int type; struct pci_dev *pci; ! snd_card_t *card; ! snd_pcm_t *pcm; int do_pm; /* power-management enabled */ --- 39,44 ---- int type; struct pci_dev *pci; ! struct snd_card *card; ! struct snd_pcm *pcm; int do_pm; /* power-management enabled */ *************** *** 48,60 **** /* ALSA Stuff */ ! ac97_t *ac97; ! snd_kcontrol_t *master_switch; /* for h/w volume control */ ! snd_kcontrol_t *master_volume; ! snd_rawmidi_t *rmidi; spinlock_t reg_lock; ! struct semaphore ac97_mutex; /* ac97 lock */ struct tasklet_struct hwvol_tq; /* Maestro Stuff */ --- 47,60 ---- /* ALSA Stuff */ ! struct snd_ac97 *ac97; ! struct snd_kcontrol *master_switch; /* for h/w volume control */ ! struct snd_kcontrol *master_volume; ! struct snd_rawmidi *rmidi; spinlock_t reg_lock; ! spinlock_t ac97_lock; struct tasklet_struct hwvol_tq; + unsigned int in_suspend; /* Maestro Stuff */ *************** *** 62,66 **** int bobclient; /* active timer instancs */ int bob_freq; /* timer frequency */ ! struct semaphore memory_mutex; /* memory lock */ /* APU states */ --- 62,66 ---- int bobclient; /* active timer instancs */ int bob_freq; /* timer frequency */ ! struct mutex memory_mutex; /* memory lock */ /* APU states */ *************** *** 76,81 **** #ifdef SUPPORT_JOYSTICK ! struct gameport gameport; ! struct resource *res_joystick; #endif #ifdef SND_ISIS --- 76,80 ---- #ifdef SUPPORT_JOYSTICK ! struct gameport *gameport; #endif #ifdef SND_ISIS *************** *** 83,85 **** #endif }; ! #endif \ No newline at end of file --- 82,84 ---- #endif }; ! #endif |