type
stringclasses
5 values
content
stringlengths
9
163k
defines
#define ODIE_DATA 5
defines
#define GA_INTSTAT_REG 0
defines
#define GA_INTENA_REG 1
defines
#define GA_DMAA_REG 2
defines
#define GA_DMAB_REG 3
defines
#define GA_INTCFG_REG 4
defines
#define GA_DMACFG_REG 5
defines
#define GA_CDCFG_REG 6
defines
#define GA_SMCFGA_REG 7
defines
#define GA_SMCFGB_REG 8
defines
#define GA_HMCTL_REG 9
defines
#define SSCAPE_DMA_A 0
defines
#define SSCAPE_DMA_B 1
defines
#define PORT(name) (devc->base+name)
defines
#define CMD_GEN_HOST_ACK 0x80
defines
#define CMD_GEN_MPU_ACK 0x81
defines
#define CMD_GET_BOARD_TYPE 0x82
defines
#define CMD_SET_CONTROL 0x88
defines
#define CMD_GET_CONTROL 0x89
defines
#define CTL_MASTER_VOL 0
defines
#define CTL_MIC_MODE 2
defines
#define CTL_SYNTH_VOL 4
defines
#define CTL_WAVE_VOL 7
defines
#define CMD_SET_MT32 0x96
defines
#define CMD_GET_MT32 0x97
defines
#define CMD_SET_EXTMIDI 0x9b
defines
#define CMD_GET_EXTMIDI 0x9c
defines
#define CMD_ACK 0x80
defines
#define SSCAPE_REGS { \
functions
char sscape_read (struct sscape_info *devc, int reg) { unsigned long flags; unsigned char val; save_flags (flags); cli (); outb (reg, PORT (ODIE_ADDR)); val = inb (PORT (ODIE_DATA)); restore_flags (flags); return val; }
functions
void sscape_write (struct sscape_info *devc, int reg, int data) { unsigned long flags; save_flags (flags); cli (); outb (reg, PORT (ODIE_ADDR)); outb (data, PORT (ODIE_DATA)); restore_flags (flags); }
functions
void host_open (struct sscape_info *devc) { outb (0x00, PORT (HOST_CTRL)); /* Put the board to the host mode */ }
functions
void host_close (struct sscape_info *devc) { outb (0x03, PORT (HOST_CTRL)); /* Put the board to the MIDI mode */ }
functions
int host_write (struct sscape_info *devc, unsigned char *data, int count) { unsigned long flags; int i, timeout_val; save_flags (flags); cli (); /* * Send the command and data bytes */ for (i = 0; i < count; i++) { for (timeout_val = 10000; timeout_val > 0; timeout_val--) ...
functions
int host_read (struct sscape_info *devc) { unsigned long flags; int timeout_val; unsigned char data; save_flags (flags); cli (); /* * Read a byte */ for (timeout_val = 10000; timeout_val > 0; timeout_val--) if (inb (PORT (HOST_CTRL)) & RX_READY) break; if (timeout_v...
functions
int host_command1 (struct sscape_info *devc, int cmd) { unsigned char buf[10]; buf[0] = (unsigned char) (cmd & 0xff); return host_write (devc, buf, 1); }
functions
int host_command2 (struct sscape_info *devc, int cmd, int parm1) { unsigned char buf[10]; buf[0] = (unsigned char) (cmd & 0xff); buf[1] = (unsigned char) (parm1 & 0xff); return host_write (devc, buf, 2); }
functions
int host_command3 (struct sscape_info *devc, int cmd, int parm1, int parm2) { unsigned char buf[10]; buf[0] = (unsigned char) (cmd & 0xff); buf[1] = (unsigned char) (parm1 & 0xff); buf[2] = (unsigned char) (parm2 & 0xff); return host_write (devc, buf, 3); }
functions
void set_mt32 (struct sscape_info *devc, int value) { host_open (devc); host_command2 (devc, CMD_SET_MT32, value ? 1 : 0); if (host_read (devc) != CMD_ACK) { /* printk ("SNDSCAPE: Setting MT32 mode failed\n"); */ }
functions
void set_control (struct sscape_info *devc, int ctrl, int value) { host_open (devc); host_command3 (devc, CMD_SET_CONTROL, ctrl, value); if (host_read (devc) != CMD_ACK) { /* printk ("SNDSCAPE: Setting control (%d) failed\n", ctrl); */ }
functions
int get_board_type (struct sscape_info *devc) { int tmp; host_open (devc); if (!host_command1 (devc, CMD_GET_BOARD_TYPE)) tmp = -1; else tmp = host_read (devc); host_close (devc); return tmp; }
functions
void sscapeintr (int irq, void *dev_id, struct pt_regs *dummy) { unsigned char bits, tmp; static int debug = 0; bits = sscape_read (devc, GA_INTSTAT_REG); if ((sscape_sleep_flag.flags & WK_SLEEP)) { { sscape_sleep_flag.flags = WK_WAKEUP; module_wake_up (&sscape_sleeper); }
functions
void do_dma (struct sscape_info *devc, int dma_chan, unsigned long buf, int blk_size, int mode) { unsigned char temp; if (dma_chan != SSCAPE_DMA_A) { printk ("SSCAPE: Tried to use DMA channel != A. Why?\n"); return; }
functions
int verify_mpu (struct sscape_info *devc) { /* * The SoundScape board could be in three modes (MPU, 8250 and host). * If the card is not in the MPU mode, enabling the MPU driver will * cause infinite loop (the driver believes that there is always some * received data in the buffer. * * D...
functions
int sscape_coproc_open (void *dev_info, int sub_device) { if (sub_device == COPR_MIDI) { set_mt32 (devc, 0); if (!verify_mpu (devc)) return -(EIO); }
functions
void sscape_coproc_close (void *dev_info, int sub_device) { struct sscape_info *devc = dev_info; unsigned long flags; save_flags (flags); cli (); if (devc->dma_allocated) { sscape_write (devc, GA_DMAA_REG, 0x20); /* DMA channel disabled */ devc->dma_allocated = 0; }
functions
void sscape_coproc_reset (void *dev_info) { }
functions
int sscape_download_boot (struct sscape_info *devc, unsigned char *block, int size, int flag) { unsigned long flags; unsigned char temp; int done, timeout_val; static unsigned char codec_dma_bits = 0; if (flag & CPF_FIRST) { /* * First block. Have to allocate DMA and to res...
functions
int download_boot_block (void *dev_info, copr_buffer * buf) { if (buf->len <= 0 || buf->len > sizeof (buf->data)) return -(EINVAL); if (!sscape_download_boot (devc, buf->data, buf->len, buf->flags)) { printk ("SSCAPE: Unable to load microcode block to the OBP.\n"); return -(EIO); }
functions
int sscape_coproc_ioctl (void *dev_info, unsigned int cmd, caddr_t arg, int local) { switch (cmd) { case SNDCTL_COPR_RESET: sscape_coproc_reset (dev_info); return 0; break; case SNDCTL_COPR_LOAD: { copr_buffer *buf; int err; buf = (copr_buffer *) vmalloc (sizeo...
functions
void attach_sscape (struct address_info *hw_config) { #ifndef SSCAPE_REGS /* * Config register values for Spea/V7 Media FX and Ensoniq S-2000. * These values are card * dependent. If you have another SoundScape based card, you have to * find the correct values. Do the following: * - Compile...
functions
int probe_sscape (struct address_info *hw_config) { unsigned char save; devc->failed = 1; devc->base = hw_config->io_base; devc->irq = hw_config->irq; devc->dma = hw_config->dma; devc->osp = hw_config->osp; if (sscape_detected != 0 && sscape_detected != hw_config->io_base) return 0; /* * F...
functions
int probe_ss_ms_sound (struct address_info *hw_config) { int i, irq_bits = 0xff; if (devc->failed) return 0; if (devc->ok == 0) { printk ("SoundScape: Invalid initialization order.\n"); return 0; }
functions
void attach_ss_ms_sound (struct address_info *hw_config) { /* * This routine configures the SoundScape card for use with the * Win Sound System driver. The AD1848 codec interface uses the CD-ROM * config registers of the "ODIE". */ int i, irq_bits = 0xff; int prev_devs ...
functions
void unload_sscape (struct address_info *hw_config) { #if defined(CONFIG_UART401) && defined(CONFIG_MIDI) unload_uart401 (hw_config); #endif snd_release_irq (hw_config->irq); }
functions
void unload_ss_ms_sound (struct address_info *hw_config) { ad1848_unload (hw_config->io_base, hw_config->irq, devc->dma, devc->dma, 0); }
includes
#include <webs.h>
includes
#include <uemf.h>
includes
#include <ej.h>
includes
#include <stdio.h>
includes
#include <stdlib.h>
includes
#include <string.h>
includes
#include <ctype.h>
includes
#include <errno.h>
includes
#include <unistd.h>
includes
#include <limits.h>
includes
#include <sys/types.h>
includes
#include <sys/stat.h>
includes
#include <sys/socket.h>
includes
#include <netinet/in.h>
includes
#include <arpa/inet.h>
includes
#include <assert.h>
includes
#include <httpd.h>
includes
#include <typedefs.h>
includes
#include <proto/ethernet.h>
includes
#include <bcmnvram.h>
includes
#include <bcmutils.h>
includes
#include <shutils.h>
includes
#include <wlutils.h>
includes
#include <linux/types.h>
includes
#include <shared.h>
includes
#include <wlscan.h>
includes
#include <sysinfo.h>
includes
#include <fcntl.h>
includes
#include <signal.h>
includes
#include <time.h>
includes
#include <sys/klog.h>
includes
#include <sys/wait.h>
includes
#include <sys/ioctl.h>
includes
#include <net/if.h>
includes
#include <linux/ethtool.h>
includes
#include <linux/sockios.h>
includes
#include <net/if_arp.h>
includes
#include <bcmendian.h>
includes
#include <bcmparams.h>
defines
#define EZC_FLAGS_READ 0x0001
defines
#define EZC_FLAGS_WRITE 0x0002
defines
#define EZC_FLAGS_CRYPT 0x0004
defines
#define EZC_CRYPT_KEY "620A83A6960E48d1B05D49B0288A2C1F"
defines
#define EZC_SUCCESS 0