[Isisalsa-devel] isis es1968.h,NONE,1.1 sam9707.c,1.4,1.5 es1968.c,1.42,1.43
Status: Inactive
Brought to you by:
jeanseb
|
From: Jean-Sébastien V. <je...@us...> - 2005-12-31 16:10:40
|
Update of /cvsroot/isisalsa/isis In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9966 Modified Files: sam9707.c es1968.c Added Files: es1968.h Log Message: adding some pci init stuff. May need some more. still fighting withh mmt table read/write Index: sam9707.c =================================================================== RCS file: /cvsroot/isisalsa/isis/sam9707.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** sam9707.c 31 Dec 2005 15:00:51 -0000 1.4 --- sam9707.c 31 Dec 2005 16:10:32 -0000 1.5 *************** *** 7,10 **** --- 7,11 ---- #include <linux/types.h> #include <linux/delay.h> + #include <linux/pci.h> #include <asm/io.h> *************** *** 15,21 **** #include <sound/pcm.h> #include "isis.h" - static u16 samBoot[]={ 0xD0CE,0x0111,0xD0CE,0x01D5,0x0001,0x0003,0x0004,0x0006, --- 16,22 ---- #include <sound/pcm.h> + #include "es1968.h" #include "isis.h" static u16 samBoot[]={ 0xD0CE,0x0111,0xD0CE,0x01D5,0x0001,0x0003,0x0004,0x0006, *************** *** 735,739 **** snd_isis_write_data8(chip, 0); ! snd_printk("unluting channlels\n"); outw(0x07ff,chip->io_port + 0x64); // set GPIO mask tmp = inw(chip->io_port + 0x60 ); //read the GPIO --- 736,740 ---- snd_isis_write_data8(chip, 0); ! snd_printk("unmuting channlels\n"); outw(0x07ff,chip->io_port + 0x64); // set GPIO mask tmp = inw(chip->io_port + 0x60 ); //read the GPIO *************** *** 1116,1131 **** entry->mode = S_IFCHR | S_IWUSR; chip->firm = 1; ! // tmp = inw(chip->io_port + 0x18) & ~SAM_INTERRUPT; ! // outw(tmp, chip->io_port + 0x18); ! // snd_isis_write_control(chip->sam9707_chip, 0x70); ! // snd_isis_write_data8(chip->sam9707_chip, 0x11); ! // mdelay(100); ! // if((tmp = snd_isis_read_data8(chip->sam9707_chip)) != 0x00) ! // printk("warning GENINT fail %x\n",tmp); ! // else ! // printk("Isis detection OK\n"); ! // tmp = inw(chip->io_port + 0x18) | SAM_INTERRUPT; ! // outw(tmp, chip->io_port + 0x18); snd_printk("Creating SAM CHIP\n"); --- 1117,1132 ---- entry->mode = S_IFCHR | S_IWUSR; chip->firm = 1; ! tmp = inw(chip->io_port + 0x18) & ~SAM_INTERRUPT; ! 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) ! printk("warning GENINT fail %x\n",tmp); ! else ! printk("Isis detection OK\n"); ! tmp = inw(chip->io_port + 0x18) | SAM_INTERRUPT; ! outw(tmp, chip->io_port + 0x18); snd_printk("Creating SAM CHIP\n"); *************** *** 1148,1155 **** * Enabling MPU-401 */ ! // pci_read_config_word(chip->parent->pci, 0x50, &w); ! // w |= 0x18; ! // pci_write_config_word(chip->parent->pci, 0x50, w); ! // snd_printk("MPU 401 Enabled\n"); /* * Setting up clock source --- 1149,1156 ---- * Enabling MPU-401 */ ! pci_read_config_word(chip->parent->pci, 0x50, &w); ! w |= 0x18; ! pci_write_config_word(chip->parent->pci, 0x50, w); ! snd_printk("MPU 401 Enabled\n"); /* * Setting up clock source Index: es1968.c =================================================================== RCS file: /cvsroot/isisalsa/isis/es1968.c,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** es1968.c 6 Jul 2005 18:38:04 -0000 1.42 --- es1968.c 31 Dec 2005 16:10:32 -0000 1.43 *************** *** 2004,2008 **** 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); --- 2004,2008 ---- 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); --- NEW FILE: es1968.h --- /* * Driver for ESS Maestro 1/2/2E Sound Card (started 21.8.99) * Guillemot Maxi isis version. * Copyright (c) by Matze Braun <Mat...@gm...>. * Takashi Iwai <ti...@su...> * Valette Jean-sebastien * * Most of the driver code comes from Zach Brown(za...@re...) * Alan Cox OSS Driver * Rewritted from card-es1938.c source. * */ #ifndef ES1968_H #include <sound/ac97_codec.h> #define NR_APUS 64 #define NR_APU_REGS 16 struct snd_es1968 { /* Module Config */ int total_bufsize; /* in bytes */ int playback_streams, capture_streams; unsigned int clock; /* clock */ /* for clock measurement */ unsigned int in_measurement: 1; unsigned int measure_apu; unsigned int measure_lastpos; unsigned int measure_count; /* buffer */ struct snd_dma_buffer dma; /* Resources... */ int irq; unsigned long io_port; int type; struct pci_dev *pci; snd_card_t *card; snd_pcm_t *pcm; int do_pm; /* power-management enabled */ /* DMA memory block */ struct list_head buf_list; /* 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 */ u16 maestro_map[32]; int bobclient; /* active timer instancs */ int bob_freq; /* timer frequency */ struct semaphore memory_mutex; /* memory lock */ /* APU states */ unsigned char apu[NR_APUS]; /* active substreams */ struct list_head substream_list; spinlock_t substream_lock; #ifdef CONFIG_PM u16 apu_map[NR_APUS][NR_APU_REGS]; #endif #ifdef SUPPORT_JOYSTICK struct gameport gameport; struct resource *res_joystick; #endif #ifdef SND_ISIS struct isis_sam9707_chip *sam9707_chip; #endif }; #endif |