Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
sound/pci/via82xx_modem.c
static int snd_via686_pcm_new(struct via82xx_modem *chip) { struct snd_pcm *pcm; int err; chip->playback_devno = 0; chip->capture_devno = 1; chip->num_devs = 2; chip->intr_mask = 0x330000; err = snd_pcm_new(chip->card, chip->card->shortname, 0, 1, 1, &pcm); if (err < 0) return err; snd_pcm_set_o...
[ 1, 0 ]
Linux Kernel
sound/pci/via82xx_modem.c
static void snd_via82xx_mixer_free_ac97_bus(struct snd_ac97_bus *bus) { struct via82xx_modem *chip = bus->private_data; chip->ac97_bus = NULL; }
[ 0, 0 ]
Linux Kernel
sound/pci/via82xx_modem.c
static void snd_via82xx_mixer_free_ac97(struct snd_ac97 *ac97) { struct via82xx_modem *chip = ac97->private_data; chip->ac97 = NULL; }
[ 0, 0 ]
Linux Kernel
sound/pci/via82xx_modem.c
static void snd_via82xx_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { struct via82xx_modem *chip = entry->private_data; int i; snd_iprintf(buffer, "%s\n\n", chip->card->longname); for (i = 0; i < 0xa0; i += 4) { snd_iprintf(buffer, "%02x: %08x\n...
[ 1, 0 ]
Linux Kernel
sound/pci/via82xx_modem.c
static int snd_via82xx_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) { return snd_card_free_on_error(&pci->dev, __snd_via82xx_probe(pci, pci_id)); }
[ 0, 0 ]
Linux Kernel
sound/pci/vx222/vx222.c
static int snd_vx222_create(struct snd_card *card, struct pci_dev *pci, const struct snd_vx_hardware *hw, struct snd_vx222 **rchip) { struct vx_core *chip; struct snd_vx222 *vx; int i, err; const struct snd_vx_ops *vx_ops; err = pcim_enable_device(pci);...
[ 1, 0 ]
Linux Kernel
sound/pci/vx222/vx222.c
static int snd_vx222_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) { static int dev; struct snd_card *card; const struct snd_vx_hardware *hw; struct snd_vx222 *vx; int err; if (dev >= SNDRV_CARDS) return -ENODEV; if (!enable[dev]) { dev++; return ...
[ 1, 0 ]
Linux Kernel
sound/pci/vx222/vx222_ops.c
static void vx2_outb(struct vx_core *chip, int offset, unsigned char val) { outb(val, vx2_reg_addr(chip, offset)); }
[ 0, 0 ]
Linux Kernel
sound/pci/vx222/vx222_ops.c
static unsigned int vx2_inl(struct vx_core *chip, int offset) { return inl(vx2_reg_addr(chip, offset)); }
[ 0, 0 ]
Linux Kernel
sound/pci/vx222/vx222_ops.c
static void vx2_setup_pseudo_dma(struct vx_core *chip, int do_write) { vx_outl(chip, ICR, do_write ? ICR_TREQ : ICR_RREQ); /* Reset the pseudo-dma register (in case of the use of the * pseudo-dma facility). */ vx_outl(chip, RESET_DMA, 0); }
[ 0, 0 ]
Linux Kernel
sound/pci/vx222/vx222_ops.c
static int vx2_load_dsp(struct vx_core *vx, int index, const struct firmware *dsp) { int err; switch (index) { case 1: err = vx2_load_xilinx_binary(vx, dsp); if (err < 0) return err; err = vx2_test_xilinx(vx); if (err < 0) return err; return 0; case 2: ...
[ 0, 0 ]
Linux Kernel
sound/pci/vx222/vx222_ops.c
static void vx2_write_akm(struct vx_core *chip, int reg, unsigned int data) { unsigned int val; if (reg == XX_CODEC_DAC_CONTROL_REGISTER) { vx2_write_codec_reg(chip, data ? AKM_CODEC_MUTE_CMD : AKM_CODEC_UNMUTE_CMD); return; } if (snd_BUG_ON(data >= sizeof(vx2_akm_gains_lut))) return; switch (r...
[ 1, 0 ]
Linux Kernel
sound/pci/vx222/vx222_ops.c
static void vx2_old_write_codec_bit(struct vx_core *chip, int codec, unsigned int data) { int i; vx_inl(chip, HIFREQ); for (i = 0; i < 24; i++, data <<= 1) vx_outl(chip, DATA, ((data & 0x800000) ? VX_DATA_CODEC_MASK : 0)); /* Terminate access to codec registers */ vx...
[ 1, 0 ]
Linux Kernel
sound/pci/vx222/vx222_ops.c
static void vx2_reset_codec(struct vx_core *_chip) { struct snd_vx222 *chip = to_vx222(_chip); vx_outl(chip, CDSP, chip->regCDSP & ~VX_CDSP_CODEC_RESET_MASK); vx_inl(chip, CDSP); msleep(10); /* Set the reset CODEC bit to 1. */ chip->regCDSP |= VX_CDSP_CODEC_RESET_MASK; vx_outl(chip, CDSP, chip->regCDSP);...
[ 0, 0 ]
Linux Kernel
sound/pci/ymfpci/ymfpci.c
void snd_ymfpci_free_gameport(struct snd_ymfpci *chip) { if (chip->gameport) { gameport_unregister_port(chip->gameport); chip->gameport = NULL; } }
[ 0, 0 ]
Linux Kernel
sound/pci/ymfpci/ymfpci_main.c
static inline u8 snd_ymfpci_readb(struct snd_ymfpci *chip, u32 offset) { return readb(chip->reg_area_virt + offset); }
[ 0, 0 ]
Linux Kernel
sound/pci/ymfpci/ymfpci_main.c
static inline u16 snd_ymfpci_readw(struct snd_ymfpci *chip, u32 offset) { return readw(chip->reg_area_virt + offset); }
[ 0, 0 ]
Linux Kernel
sound/pci/ymfpci/ymfpci_main.c
static void snd_ymfpci_hw_stop(struct snd_ymfpci *chip) { unsigned long flags; long timeout = 1000; spin_lock_irqsave(&chip->reg_lock, flags); if (--chip->start_count > 0) goto __end; snd_ymfpci_writel(chip, YDSXGR_MODE, snd_ymfpci_readl(chip, YDSXGR_MODE) & ~3); while (timeout-- >...
[ 1, 0 ]
Linux Kernel
sound/pci/ymfpci/ymfpci_main.c
static int snd_ymfpci_voice_alloc(struct snd_ymfpci *chip, enum snd_ymfpci_voice_type type, int pair, struct snd_ymfpci_voice **rvoice) { unsigned long flags; int result; if (snd_BUG_ON(!rvoice)) return -EINVAL; if (snd_BUG_ON(pair && type...
[ 1, 1 ]
Linux Kernel
sound/pci/ymfpci/ymfpci_main.c
static void snd_ymfpci_pcm_interrupt(struct snd_ymfpci *chip, struct snd_ymfpci_voice *voice) { struct snd_ymfpci_pcm *ypcm; u32 pos, delta; ypcm = voice->ypcm; if (!ypcm) return; if (ypcm->substream == NULL) return; spin_lock(&chip->reg_lock); if (ypcm->runni...
[ 1, 0 ]
Linux Kernel
sound/pci/ymfpci/ymfpci_main.c
static void snd_ymfpci_pcm_capture_interrupt(struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; struct snd_ymfpci_pcm *ypcm = runtime->private_data; struct snd_ymfpci *chip = ypcm->chip; u32 pos, delta; spin_lock(&chip->reg_lock); if (ypcm->running) { pos = le3...
[ 1, 0 ]
Linux Kernel
sound/pci/ymfpci/ymfpci_main.c
static int snd_ymfpci_pcm_voice_alloc(struct snd_ymfpci_pcm *ypcm, int voices) { int err; if (ypcm->voices[1] != NULL && voices < 2) { snd_ymfpci_voice_free(ypcm->chip, ypcm->voices[1]); ypcm->voices[1] = NULL; } if (voices == 1 && ypcm->voices[0] != NULL) return 0; if (voices == 2 && ypcm->voice...
[ 1, 0 ]
Linux Kernel
sound/pci/ymfpci/ymfpci_main.c
static int snd_ymfpci_ac3_init(struct snd_ymfpci *chip) { if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &chip->pci->dev, 4096, &chip->ac3_tmp_base) < 0) return -ENOMEM; chip->bank_effect[3][0]->base = chip->bank_effect[3][1]->base = cpu_to_le32(chip->ac3_tmp_base.addr); chip->b...
[ 0, 0 ]
Linux Kernel
sound/pci/ymfpci/ymfpci_main.c
static int snd_ymfpci_ac3_done(struct snd_ymfpci *chip) { spin_lock_irq(&chip->reg_lock); snd_ymfpci_writel(chip, YDSXGR_MAPOFEFFECT, snd_ymfpci_readl(chip, YDSXGR_MAPOFEFFECT) & ~(3 << 3)); spin_unlock_irq(&chip->reg_lock); if (chip->ac3_tmp_base.area) { snd_dma_free_pages(&chip->ac3_t...
[ 0, 0 ]
Linux Kernel
sound/pci/ymfpci/ymfpci_main.c
static int snd_ymfpci_playback_open_1(struct snd_pcm_substream *substream) { struct snd_ymfpci *chip = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct snd_ymfpci_pcm *ypcm; int err; runtime->hw = snd_ymfpci_playback; /* FIXME? True value is 256/48 = 5.33333 m...
[ 0, 1 ]
Linux Kernel
sound/pci/ymfpci/ymfpci_main.c
static int snd_ymfpci_playback_open(struct snd_pcm_substream *substream) { struct snd_ymfpci *chip = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct snd_ymfpci_pcm *ypcm; int err; err = snd_ymfpci_playback_open_1(substream); if (err < 0) return err; yp...
[ 0, 0 ]
Linux Kernel
sound/pci/ymfpci/ymfpci_main.c
static int snd_ymfpci_capture_rec_open(struct snd_pcm_substream *substream) { return snd_ymfpci_capture_open(substream, 0); }
[ 0, 0 ]
Linux Kernel
sound/pci/ymfpci/ymfpci_main.c
static int snd_ymfpci_playback_close(struct snd_pcm_substream *substream) { struct snd_ymfpci *chip = snd_pcm_substream_chip(substream); struct snd_ymfpci_pcm *ypcm = substream->runtime->private_data; spin_lock_irq(&chip->reg_lock); if (ypcm->output_rear && chip->rear_opened > 0) { chip->rear_opened--; ...
[ 1, 0 ]
Linux Kernel
sound/pci/ymfpci/ymfpci_main.c
static int snd_ymfpci_capture_close(struct snd_pcm_substream *substream) { struct snd_ymfpci *chip = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct snd_ymfpci_pcm *ypcm = runtime->private_data; if (ypcm != NULL) { chip->capture_substream[ypcm->capture_bank_...
[ 0, 0 ]
Linux Kernel
sound/pci/ymfpci/ymfpci_main.c
int snd_ymfpci_pcm(struct snd_ymfpci *chip, int device) { struct snd_pcm *pcm; int err; err = snd_pcm_new(chip->card, "YMFPCI", device, 32, 1, &pcm); if (err < 0) return err; pcm->private_data = chip; snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_ymfpci_playback_ops); snd_pcm_set_ops(pcm, SND...
[ 1, 0 ]
Linux Kernel
sound/pci/ymfpci/ymfpci_main.c
static int snd_ymfpci_spdif_default_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ymfpci *chip = snd_kcontrol_chip(kcontrol); unsigned int val; int change; val = ((ucontrol->value.iec958.status[0] & 0x3e) << 0) | (ucontrol-...
[ 0, 0 ]
Linux Kernel
sound/pci/ymfpci/ymfpci_main.c
static int snd_ymfpci_spdif_mask_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ymfpci *chip = snd_kcontrol_chip(kcontrol); spin_lock_irq(&chip->reg_lock); ucontrol->value.iec958.status[0] = 0x3e; ucontrol->value.iec958.status[1] = 0xf...
[ 1, 0 ]
Linux Kernel
sound/pci/ymfpci/ymfpci_main.c
static int snd_ymfpci_spdif_stream_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; uinfo->count = 1; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ymfpci/ymfpci_main.c
static int snd_ymfpci_put_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ymfpci *chip = snd_kcontrol_chip(kcontrol); int reg = kcontrol->private_value & 0xffff; unsigned int shift = (kcontrol->private_value >> 16) & 0xff; unsigned int ma...
[ 1, 0 ]
Linux Kernel
sound/pci/ymfpci/ymfpci_main.c
static int snd_ymfpci_get_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ymfpci *chip = snd_kcontrol_chip(kcontrol); unsigned int reg = kcontrol->private_value; unsigned int shift_left = 0, shift_right = 16, mask = 16383; unsigned int va...
[ 1, 0 ]
Linux Kernel
sound/pci/ymfpci/ymfpci_main.c
static int snd_ymfpci_pcm_vol_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 2; uinfo->value.integer.min = 0; uinfo->value.integer.max = 0x8000; return 0; }
[ 1, 0 ]
Linux Kernel
sound/pci/ymfpci/ymfpci_main.c
static int snd_ymfpci_pcm_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ymfpci *chip = snd_kcontrol_chip(kcontrol); unsigned int subs = kcontrol->id.subdevice; ucontrol->value.integer.value[0] = chip->pcm_mixer[subs].left; ucontrol->...
[ 1, 0 ]
Linux Kernel
sound/pci/ymfpci/ymfpci_main.c
static void snd_ymfpci_aclink_reset(struct pci_dev *pci) { u8 cmd; pci_read_config_byte(pci, PCIR_DSXG_CTRL, &cmd); #if 0 if (cmd & 0x03) { #endif pci_write_config_byte(pci, PCIR_DSXG_CTRL, cmd & 0xfc); pci_write_config_byte(pci, PCIR_DSXG_CTRL, cmd | 0x03); pci_write_config_byte(pci, PCIR_DSXG_CTRL, cmd &...
[ 0, 0 ]
Linux Kernel
sound/pci/ymfpci/ymfpci_main.c
static void snd_ymfpci_enable_dsp(struct snd_ymfpci *chip) { snd_ymfpci_writel(chip, YDSXGR_CONFIG, 0x00000001); }
[ 0, 0 ]
Linux Kernel
sound/pci/ymfpci/ymfpci_main.c
static int snd_ymfpci_request_firmware(struct snd_ymfpci *chip) { int err, is_1e; const char *name; err = request_firmware(&chip->dsp_microcode, "yamaha/ds1_dsp.fw", &chip->pci->dev); if (err >= 0) { if (chip->dsp_microcode->size != YDSXG_DSPLENGTH) { dev_err(chip->card->dev...
[ 1, 0 ]
Linux Kernel
sound/pci/ymfpci/ymfpci_main.c
static void snd_ymfpci_free(struct snd_card *card) { struct snd_ymfpci *chip = card->private_data; u16 ctrl; snd_ymfpci_writel(chip, YDSXGR_NATIVEDACOUTVOL, 0); snd_ymfpci_writel(chip, YDSXGR_BUF441OUTVOL, 0); snd_ymfpci_writel(chip, YDSXGR_LEGACYOUTVOL, 0); snd_ymfpci_writel(chip, YDSXGR_STATUS, ~0); s...
[ 0, 0 ]
Linux Kernel
sound/pci/ymfpci/ymfpci_main.c
static int snd_ymfpci_suspend(struct device *dev) { struct snd_card *card = dev_get_drvdata(dev); struct snd_ymfpci *chip = card->private_data; unsigned int i; snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); snd_ac97_suspend(chip->ac97); for (i = 0; i < YDSXGR_NUM_SAVED_REGS; i++) chip->saved_reg...
[ 0, 0 ]
Linux Kernel
sound/pcmcia/pdaudiocf/pdaudiocf.c
static int snd_pdacf_probe(struct pcmcia_device *link) { int i, err; struct snd_pdacf *pdacf; struct snd_card *card; static const struct snd_device_ops ops = { .dev_free = snd_pdacf_dev_free, }; snd_printdd(KERN_DEBUG "pdacf_attach called\n"); for (i = 0; i < SNDRV_CARDS; i++) { if (!card_list...
[ 1, 0 ]
Linux Kernel
sound/pcmcia/pdaudiocf/pdaudiocf.c
static void snd_pdacf_detach(struct pcmcia_device *link) { struct snd_pdacf *chip = link->priv; snd_printdd(KERN_DEBUG "pdacf_detach called\n"); if (chip->chip_status & PDAUDIOCF_STAT_IS_CONFIGURED) snd_pdacf_powerdown(chip); chip->chip_status |= PDAUDIOCF_STAT_IS_STALE; snd_card_disconnect(chip->card);...
[ 0, 0 ]
Linux Kernel
sound/pcmcia/pdaudiocf/pdaudiocf.c
static int pdacf_suspend(struct pcmcia_device *link) { struct snd_pdacf *chip = link->priv; snd_printdd(KERN_DEBUG "SUSPEND\n"); if (chip) { snd_printdd(KERN_DEBUG "snd_pdacf_suspend calling\n"); snd_pdacf_suspend(chip); } return 0; }
[ 0, 0 ]
Linux Kernel
sound/pcmcia/pdaudiocf/pdaudiocf.h
static inline void pdacf_reg_write(struct snd_pdacf *chip, unsigned char reg, unsigned short val) { outw(chip->regmap[reg >> 1] = val, chip->port + reg); }
[ 1, 0 ]
Linux Kernel
sound/pcmcia/pdaudiocf/pdaudiocf.h
static inline unsigned short pdacf_reg_read(struct snd_pdacf *chip, unsigned char reg) { return inw(chip->port + reg); }
[ 0, 0 ]
Linux Kernel
sound/pcmcia/pdaudiocf/pdaudiocf_core.c
static void pdacf_ak4117_write(void *private_data, unsigned char reg, unsigned char val) { struct snd_pdacf *chip = private_data; unsigned long timeout; unsigned long flags; spin_lock_irqsave(&chip->ak4117_lock, flags); timeout = 1000; while (inw(chip->port + PDAUDIOCF_REG_S...
[ 1, 0 ]
Linux Kernel
sound/pcmcia/pdaudiocf/pdaudiocf_core.c
static int pdacf_reset(struct snd_pdacf *chip, int powerdown) { u16 val; val = pdacf_reg_read(chip, PDAUDIOCF_REG_SCR); val |= PDAUDIOCF_PDN; val &= ~PDAUDIOCF_RECORD; pdacf_reg_write(chip, PDAUDIOCF_REG_SCR, val); udelay(5); val |= PDAUDIOCF_RST; pdacf_reg_write(chip, PDAUDIOCF_REG_SCR, val); udelay...
[ 0, 0 ]
Linux Kernel
sound/pcmcia/pdaudiocf/pdaudiocf_core.c
static void pdacf_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { struct snd_pdacf *chip = entry->private_data; u16 tmp; snd_iprintf(buffer, "PDAudioCF\n\n"); tmp = pdacf_reg_read(chip, PDAUDIOCF_REG_SCR); snd_iprintf(buffer, "FPGA revision : 0x%x\n...
[ 0, 0 ]
Linux Kernel
sound/pcmcia/pdaudiocf/pdaudiocf_core.c
static void pdacf_proc_init(struct snd_pdacf *chip) { snd_card_ro_proc_new(chip->card, "pdaudiocf", chip, pdacf_proc_read); }
[ 0, 0 ]
Linux Kernel
sound/pcmcia/pdaudiocf/pdaudiocf_core.c
static void snd_pdacf_ak4117_change(struct ak4117 *ak4117, unsigned char c0, unsigned char c1) { struct snd_pdacf *chip = ak4117->change_callback_private; u16 val; if (!(c0 & AK4117_UNLCK)) return; mutex_lock(&chip->reg_lock); val = chip->regmap[PDAUDIOCF_REG_SCR >> 1...
[ 0, 0 ]
Linux Kernel
sound/pcmcia/pdaudiocf/pdaudiocf_core.c
static inline int check_signal(struct snd_pdacf *chip) { return (chip->ak4117->rcs0 & AK4117_UNLCK) == 0; }
[ 1, 0 ]
Linux Kernel
sound/pcmcia/pdaudiocf/pdaudiocf_irq.c
irqreturn_t pdacf_interrupt(int irq, void *dev) { struct snd_pdacf *chip = dev; unsigned short stat; bool wake_thread = false; if ((chip->chip_status & (PDAUDIOCF_STAT_IS_STALE | PDAUDIOCF_STAT_IS_CONFIGURED | PDAUDIOCF_STAT_IS_SUSPENDED)) != PDAUDIOCF_STAT_IS_CONFIGURED) return IRQ_HANDLED;...
[ 1, 0 ]
Linux Kernel
sound/pcmcia/pdaudiocf/pdaudiocf_irq.c
static inline void pdacf_transfer_mono32(u32 *dst, u32 xor, unsigned int size, unsigned long rdp_port) { register u16 val1, val2; while (size-- > 0) { val1 = inw(rdp_port); val2 = inw(rdp_port); inw(rdp_port); *dst++ = ((((u32)val2 & 0xff) << 24) | ((u32)va...
[ 0, 0 ]
Linux Kernel
sound/pcmcia/pdaudiocf/pdaudiocf_irq.c
static inline void pdacf_transfer_stereo32(u32 *dst, u32 xor, unsigned int size, unsigned long rdp_port) { register u16 val1, val2, val3; while (size-- > 0) { val1 = inw(rdp_port); val2 = inw(rdp_port); val3 = inw(rdp_port); *dst++ = ((((u32)val2 & 0xff) ...
[ 0, 0 ]
Linux Kernel
sound/pcmcia/pdaudiocf/pdaudiocf_irq.c
static inline void pdacf_transfer_stereo32sw(u32 *dst, u32 xor, unsigned int size, unsigned long rdp_port) { register u16 val1, val2, val3; while (size-- > 0) { val1 = inw(rdp_port); val2 = inw(rdp_port); val3 = ...
[ 0, 0 ]
Linux Kernel
sound/pcmcia/pdaudiocf/pdaudiocf_irq.c
static inline void pdacf_transfer_mono24le(u8 *dst, u16 xor, unsigned int size, unsigned long rdp_port) { register u16 val1, val2; register u32 xval1; while (size-- > 0) { val1 = inw(rdp_port); val2 = inw(rdp_port); inw(rdp_port); xval1 = (((val2 & 0xff...
[ 1, 0 ]
Linux Kernel
sound/pcmcia/pdaudiocf/pdaudiocf_irq.c
static inline void pdacf_transfer_stereo24le(u8 *dst, u32 xor, unsigned int size, unsigned long rdp_port) { register u16 val1, val2, val3; register u32 xval1, xval2; while (size-- > 0) { val1 = inw(rdp_port); val2 ...
[ 1, 0 ]
Linux Kernel
sound/pcmcia/pdaudiocf/pdaudiocf_irq.c
static inline void pdacf_transfer_stereo24be(u8 *dst, u32 xor, unsigned int size, unsigned long rdp_port) { register u16 val1, val2, val3; register u32 xval1, xval2; while (size-- > 0) { val1 = inw(rdp_port); val2 ...
[ 1, 0 ]
Linux Kernel
sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c
static int pdacf_pcm_clear_sram(struct snd_pdacf *chip) { int max_loop = 64 * 1024; while (inw(chip->port + PDAUDIOCF_REG_RDP) != inw(chip->port + PDAUDIOCF_REG_WDP)) { if (max_loop-- < 0) return -EIO; inw(chip->port + PDAUDIOCF_REG_MD); } return 0; }
[ 1, 0 ]
Linux Kernel
sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c
static int pdacf_pcm_trigger(struct snd_pcm_substream *subs, int cmd) { struct snd_pdacf *chip = snd_pcm_substream_chip(subs); struct snd_pcm_runtime *runtime = subs->runtime; int inc, ret = 0, rate; unsigned short mask, val, tmp; if (chip->chip_status & PDAUDIOCF_STAT_IS_STALE) return -EBUSY; switch ...
[ 1, 0 ]
Linux Kernel
sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c
static int pdacf_pcm_capture_close(struct snd_pcm_substream *subs) { struct snd_pdacf *chip = snd_pcm_substream_chip(subs); if (!chip) return -EINVAL; pdacf_reinit(chip, 0); chip->pcm_substream = NULL; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pcmcia/vx/vxpocket.c
static void vxpocket_release(struct pcmcia_device *link) { free_irq(link->irq, link->priv); pcmcia_disable_device(link); }
[ 0, 0 ]
Linux Kernel
sound/pcmcia/vx/vxpocket.c
static int snd_vxpocket_assign_resources(struct vx_core *chip, int port, int irq) { int err; struct snd_card *card = chip->card; struct snd_vxpocket *vxp = to_vxpocket(chip); snd_printdd(KERN_DEBUG "vxpocket assign resources: port = 0x%x, irq = %d\n", port...
[ 1, 0 ]
Linux Kernel
sound/pcmcia/vx/vxpocket.c
static int vxpocket_config(struct pcmcia_device *link) { struct vx_core *chip = link->priv; int ret; snd_printdd(KERN_DEBUG "vxpocket_config called\n"); if (!strcmp(link->prod_id[1], "VX-POCKET")) { snd_printdd("VX-pocket is detected\n"); } else { snd_printdd("VX-pocket 440 is detected\n"); /* o...
[ 1, 0 ]
Linux Kernel
sound/pcmcia/vx/vxpocket.c
static int vxp_resume(struct pcmcia_device *link) { struct vx_core *chip = link->priv; snd_printdd(KERN_DEBUG "RESUME\n"); if (pcmcia_dev_present(link)) { if (chip) { snd_printdd(KERN_DEBUG "calling snd_vx_resume\n"); snd_vx_resume(chip); } } snd_printdd(KERN_DEBUG "resume done!\n"); ...
[ 0, 0 ]
Linux Kernel
sound/pcmcia/vx/vxp_mixer.c
static int vx_mic_level_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct vx_core *_chip = snd_kcontrol_chip(kcontrol); struct snd_vxpocket *chip = to_vxpocket(_chip); ucontrol->value.integer.value[0] = chip->mic_level; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pcmcia/vx/vxp_ops.c
static void vx_setup_pseudo_dma(struct vx_core *_chip, int do_write) { struct snd_vxpocket *chip = to_vxpocket(_chip); vx_outb(chip, ICR, do_write ? ICR_TREQ : ICR_RREQ); /* Reset the pseudo-dma register */ vx_inb(chip, ISR); vx_outb(chip, ISR, 0); /* Select DMA in read/write transfer mode and in 16-bit a...
[ 0, 0 ]
Linux Kernel
sound/pcmcia/vx/vxp_ops.c
static void vxp_dma_write(struct vx_core *chip, struct snd_pcm_runtime *runtime, struct vx_pipe *pipe, int count) { long port = vxp_reg_addr(chip, VX_DMA); int offset = pipe->hw_ptr; unsigned short *addr = (unsigned short *)(runtime->dma_area + offset); vx_setup_pseudo_dma(chip, 1); ...
[ 1, 0 ]
Linux Kernel
sound/pcmcia/vx/vxp_ops.c
static void vxp_change_audio_source(struct vx_core *_chip, int src) { struct snd_vxpocket *chip = to_vxpocket(_chip); switch (src) { case VX_AUDIO_SRC_DIGITAL: chip->regCDSP |= VXP_CDSP_DATAIN_SEL_MASK; vx_outb(chip, CDSP, chip->regCDSP); break; case VX_AUDIO_SRC_LINE: chip->regCDSP &= ~VXP_CDS...
[ 1, 0 ]
Linux Kernel
sound/pcmcia/vx/vxp_ops.c
static void vxp_set_clock_source(struct vx_core *_chip, int source) { struct snd_vxpocket *chip = to_vxpocket(_chip); if (source == INTERNAL_QUARTZ) chip->regCDSP &= ~VXP_CDSP_CLOCKIN_SEL_MASK; else chip->regCDSP |= VXP_CDSP_CLOCKIN_SEL_MASK; vx_outb(chip, CDSP, chip->regCDSP); }
[ 0, 0 ]
Linux Kernel
sound/ppc/awacs.c
static int snd_pmac_awacs_get_volume(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); int reg = kcontrol->private_value & 0xff; int lshift = (kcontrol->private_value >> 8) & 0xff; int inverted = (kcon...
[ 1, 0 ]
Linux Kernel
sound/ppc/awacs.c
static void awacs_amp_set_tone(struct awacs_amp *amp, int bass, int treble) { amp->amp_tone[0] = bass; amp->amp_tone[1] = treble; if (bass > 7) bass = (14 - bass) + 8; if (treble > 7) treble = (14 - treble) + 8; awacs_set_cuda(2, (bass << 4) | treble); }
[ 0, 0 ]
Linux Kernel
sound/ppc/awacs.c
static int snd_pmac_awacs_put_volume_amp(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); int index = kcontrol->private_value; int vol[2]; struct awacs_amp *amp = chip->mixer_data; vol[0] = (31...
[ 0, 0 ]
Linux Kernel
sound/ppc/awacs.c
static int snd_pmac_awacs_info_master_amp(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 1; uinfo->value.integer.min = 0; uinfo->value.integer.max = 99; return 0; }
[ 0, 0 ]
Linux Kernel
sound/ppc/awacs.c
static int snd_pmac_screamer_mic_boost_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); int val = 0; unsigned long flags; spin_lock_irqsave(&chip->reg_lock, flags); if (chip->awacs_reg[6] & MASK_MIC...
[ 0, 0 ]
Linux Kernel
sound/ppc/awacs.c
static int build_mixers(struct snd_pmac *chip, int nums, const struct snd_kcontrol_new *mixers) { int i, err; for (i = 0; i < nums; i++) { err = snd_ctl_add(chip->card, snd_ctl_new1(&mixers[i], chip)); if (err < 0) return err; } return 0; }
[ 0, 0 ]
Linux Kernel
sound/ppc/beep.c
static int snd_pmac_info_beep(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 1; uinfo->value.integer.min = 0; uinfo->value.integer.max = 100; return 0; }
[ 0, 0 ]
Linux Kernel
sound/ppc/beep.c
void snd_pmac_detach_beep(struct snd_pmac *chip) { if (chip->beep) { input_unregister_device(chip->beep->dev); dma_free_coherent(&chip->pdev->dev, BEEP_BUFLEN * 4, chip->beep->buf, chip->beep->addr); kfree(chip->beep); chip->beep = NULL; } }
[ 1, 0 ]
Linux Kernel
sound/ppc/burgundy.c
static int snd_pmac_burgundy_get_volume(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); unsigned int addr = BASE2ADDR(kcontrol->private_value & 0xff); int shift = (kcontrol->private_value >> 8) & 0x...
[ 1, 0 ]
Linux Kernel
sound/ppc/burgundy.c
static void snd_pmac_burgundy_read_volume_2b(struct snd_pmac *chip, unsigned int address, long *volume, int off) { volume[0] = snd_pmac_burgundy_rcb(chip, address + off); if (volume[0] >= BURGUNDY_VOLUME_OFFSET) volume[0]...
[ 0, 0 ]
Linux Kernel
sound/ppc/burgundy.c
static int snd_pmac_burgundy_info_volume_2b(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 2; uinfo->value.integer.min = 0; uinfo->value.integer.max = 100; return 0; }
[ 0, 0 ]
Linux Kernel
sound/ppc/burgundy.c
static int snd_pmac_burgundy_get_volume_2b(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); unsigned int addr = BASE2ADDR(kcontrol->private_value & 0xff); int off = kcontrol->private_value & 0x300; snd_pma...
[ 1, 0 ]
Linux Kernel
sound/ppc/burgundy.c
static int snd_pmac_burgundy_info_switch_b(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { int stereo = (kcontrol->private_value >> 24) & 1; uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; uinfo->count = stereo + 1; uinfo->value.integer.min = 0; uinfo->v...
[ 0, 0 ]
Linux Kernel
sound/ppc/daca.c
static int daca_put_volume(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); struct pmac_daca *mix; unsigned int vol[2]; int change; mix = chip->mixer_data; if (!mix) return -ENODEV; vol[0] = ucontrol-...
[ 1, 0 ]
Linux Kernel
sound/ppc/daca.c
static void daca_resume(struct snd_pmac *chip) { struct pmac_daca *mix = chip->mixer_data; i2c_smbus_write_byte_data(mix->i2c.client, DACA_REG_SR, 0x08); i2c_smbus_write_byte_data(mix->i2c.client, DACA_REG_GCFG, mix->amp_on ? 0x05 : 0x04); daca_set_volume(mix); }
[ 0, 0 ]
Linux Kernel
sound/ppc/keywest.c
static int keywest_probe(struct i2c_client *client) { keywest_probed = true; if (!keywest_ctx->client) keywest_ctx->client = client; i2c_set_clientdata(client, keywest_ctx); return 0; }
[ 0, 0 ]
Linux Kernel
sound/ppc/keywest.c
static int keywest_attach_adapter(struct i2c_adapter *adapter) { struct i2c_board_info info; struct i2c_client *client; if (!keywest_ctx) return -EINVAL; if (strncmp(adapter->name, "mac-io", 6)) return -EINVAL; memset(&info, 0, sizeof(struct i2c_board_info)); strscpy(info.type, "keywest", I2C_NAM...
[ 1, 1 ]
Linux Kernel
sound/ppc/keywest.c
void snd_pmac_keywest_cleanup(struct pmac_keywest *i2c) { if (keywest_ctx && keywest_ctx == i2c) { i2c_del_driver(&keywest_driver); keywest_ctx = NULL; } }
[ 0, 0 ]
Linux Kernel
sound/ppc/pmac.c
static inline int another_stream(int stream) { return (stream == SNDRV_PCM_STREAM_PLAYBACK) ? SNDRV_PCM_STREAM_CAPTURE : SNDRV_PCM_STREAM_PLAYBACK; }
[ 0, 0 ]
Linux Kernel
sound/ppc/pmac.c
static struct pmac_stream *snd_pmac_get_stream(struct snd_pmac *chip, int stream) { switch (stream) { case SNDRV_PCM_STREAM_PLAYBACK: return &chip->playback; case SNDRV_PCM_STREAM_CAPTURE: return &chip->capture; default: snd_BUG(); return NULL; } ...
[ 0, 0 ]
Linux Kernel
sound/ppc/pmac.c
static void snd_pmac_pcm_set_format(struct snd_pmac *chip) { out_le32(&chip->awacs->control, chip->control_mask | (chip->rate_index << 8)); out_le32(&chip->awacs->byteswap, chip->format == SNDRV_PCM_FORMAT_S16_LE ? 1 : 0); if (chip->set_format) chip->set_format(chip); }
[ 0, 0 ]
Linux Kernel
sound/ppc/pmac.c
static int snd_pmac_pcm_trigger(struct snd_pmac *chip, struct pmac_stream *rec, struct snd_pcm_substream *subs, int cmd) { volatile struct dbdma_cmd __iomem *cp; int i, command; switch (cmd) { case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_RESUME: if (rec->running) ...
[ 0, 0 ]
Linux Kernel
sound/ppc/pmac.c
static snd_pcm_uframes_t snd_pmac_playback_pointer(struct snd_pcm_substream *subs) { struct snd_pmac *chip = snd_pcm_substream_chip(subs); return snd_pmac_pcm_pointer(chip, &chip->playback, subs); }
[ 0, 0 ]
Linux Kernel
sound/ppc/pmac.c
static int snd_pmac_pcm_open(struct snd_pmac *chip, struct pmac_stream *rec, struct snd_pcm_substream *subs) { struct snd_pcm_runtime *runtime = subs->runtime; int i; runtime->hw.rates = 0; for (i = 0; i < chip->num_freqs; i++) if (chip->freqs_ok & (1 << i)) runtime->hw.r...
[ 1, 1 ]
Linux Kernel
sound/ppc/pmac.c
static int snd_pmac_capture_open(struct snd_pcm_substream *subs) { struct snd_pmac *chip = snd_pcm_substream_chip(subs); subs->runtime->hw = snd_pmac_capture; return snd_pmac_pcm_open(chip, &chip->capture, subs); }
[ 0, 0 ]
Linux Kernel
sound/ppc/pmac.c
static int snd_pmac_playback_close(struct snd_pcm_substream *subs) { struct snd_pmac *chip = snd_pcm_substream_chip(subs); return snd_pmac_pcm_close(chip, &chip->playback, subs); }
[ 0, 0 ]
Linux Kernel
sound/ppc/pmac.c
int snd_pmac_pcm_new(struct snd_pmac *chip) { struct snd_pcm *pcm; int err; int num_captures = 1; if (!chip->can_capture) num_captures = 0; err = snd_pcm_new(chip->card, chip->card->driver, 0, 1, num_captures, &pcm); if (err < 0) return err; snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_p...
[ 1, 0 ]
Linux Kernel
sound/ppc/pmac.c
void snd_pmac_beep_dma_stop(struct snd_pmac *chip) { snd_pmac_dma_stop(&chip->playback); chip->extra_dma.cmds->command = cpu_to_le16(DBDMA_STOP); snd_pmac_pcm_set_format(chip); }
[ 0, 0 ]