Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
sound/i2c/i2c.c
int snd_i2c_device_free(struct snd_i2c_device *device) { if (device->bus) list_del(&device->list); if (device->private_free) device->private_free(device); kfree(device); return 0; }
[ 0, 0 ]
Linux Kernel
sound/i2c/i2c.c
int snd_i2c_sendbytes(struct snd_i2c_device *device, unsigned char *bytes, int count) { return device->bus->ops->sendbytes(device, bytes, count); }
[ 0, 0 ]
Linux Kernel
sound/i2c/i2c.c
int snd_i2c_readbytes(struct snd_i2c_device *device, unsigned char *bytes, int count) { return device->bus->ops->readbytes(device, bytes, count); }
[ 0, 0 ]
Linux Kernel
sound/i2c/i2c.c
static inline void snd_i2c_bit_hw_stop(struct snd_i2c_bus *bus) { if (bus->hw_ops.bit->stop) bus->hw_ops.bit->stop(bus); }
[ 0, 0 ]
Linux Kernel
sound/i2c/i2c.c
static void snd_i2c_bit_stop(struct snd_i2c_bus *bus) { snd_i2c_bit_set(bus, 0, 0); snd_i2c_bit_set(bus, 1, 0); snd_i2c_bit_set(bus, 1, 1); snd_i2c_bit_hw_stop(bus); }
[ 0, 0 ]
Linux Kernel
sound/i2c/i2c.c
static void snd_i2c_bit_send(struct snd_i2c_bus *bus, int data) { snd_i2c_bit_set(bus, 0, data); snd_i2c_bit_set(bus, 1, data); snd_i2c_bit_set(bus, 0, data); }
[ 0, 0 ]
Linux Kernel
sound/i2c/i2c.c
static int snd_i2c_bit_readbyte(struct snd_i2c_bus *bus, int last) { int i; unsigned char data = 0; snd_i2c_bit_set(bus, 0, 1); snd_i2c_bit_direction(bus, 1, 0); for (i = 7; i >= 0; i--) { snd_i2c_bit_set(bus, 1, 1); if (snd_i2c_bit_data(bus, 0)) data |= (1 << i); snd_i2c_bit_set(bus, 0, 1)...
[ 1, 0 ]
Linux Kernel
sound/i2c/i2c.c
static int snd_i2c_bit_sendbytes(struct snd_i2c_device *device, unsigned char *bytes, int count) { struct snd_i2c_bus *bus = device->bus; int err, res = 0; if (device->flags & SND_I2C_DEVICE_ADDRTEN) return -EIO; snd_i2c_bit_start(bus); err = snd_i2c_bit_sendbyte(bus, dev...
[ 0, 0 ]
Linux Kernel
sound/i2c/i2c.c
static int snd_i2c_bit_readbytes(struct snd_i2c_device *device, unsigned char *bytes, int count) { struct snd_i2c_bus *bus = device->bus; int err, res = 0; if (device->flags & SND_I2C_DEVICE_ADDRTEN) return -EIO; snd_i2c_bit_start(bus); err = snd_i2c_bit_sendbyte(bus, (de...
[ 0, 0 ]
Linux Kernel
sound/i2c/other/ak4113.c
static inline unsigned char reg_read(struct ak4113 *ak4113, unsigned char reg) { return ak4113->read(ak4113->private_data, reg); }
[ 0, 0 ]
Linux Kernel
sound/i2c/other/ak4113.c
static int snd_ak4113_dev_free(struct snd_device *device) { struct ak4113 *chip = device->device_data; snd_ak4113_free(chip); return 0; }
[ 0, 0 ]
Linux Kernel
sound/i2c/other/ak4113.c
void snd_ak4113_reg_write(struct ak4113 *chip, unsigned char reg, unsigned char mask, unsigned char val) { if (reg >= AK4113_WRITABLE_REGS) return; reg_write(chip, reg, (chip->regmap[reg] & ~mask) | val); }
[ 0, 0 ]
Linux Kernel
sound/i2c/other/ak4113.c
static void ak4113_init_regs(struct ak4113 *chip) { unsigned char old = chip->regmap[AK4113_REG_PWRDN], reg; reg_write(chip, AK4113_REG_PWRDN, old & ~(AK4113_RST | AK4113_PWN)); udelay(200); /* release reset, but leave powerdown */ reg_write(chip, AK4113_REG_PWRDN, (old | AK4113_RST) & ~AK4113_PWN); udelay...
[ 1, 0 ]
Linux Kernel
sound/i2c/other/ak4113.c
static int snd_ak4113_in_bit_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct ak4113 *chip = snd_kcontrol_chip(kcontrol); unsigned char reg = kcontrol->private_value & 0xff; unsigned char bit = (kcontrol->private_value >> 8) & 0xff; unsigned char...
[ 1, 0 ]
Linux Kernel
sound/i2c/other/ak4113.c
static int snd_ak4113_rx_info(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 = 5; return 0; }
[ 0, 0 ]
Linux Kernel
sound/i2c/other/ak4113.c
static int snd_ak4113_rx_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct ak4113 *chip = snd_kcontrol_chip(kcontrol); ucontrol->value.integer.value[0] = (AK4113_IPS(chip->regmap[AK4113_REG_IO1])); return 0; }
[ 0, 0 ]
Linux Kernel
sound/i2c/other/ak4113.c
static int snd_ak4113_rate_info(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 = 192000; return 0; }
[ 0, 0 ]
Linux Kernel
sound/i2c/other/ak4113.c
static int snd_ak4113_spdif_pinfo(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->value.integer.min = 0; uinfo->value.integer.max = 0xffff; uinfo->count = 4; return 0; }
[ 1, 0 ]
Linux Kernel
sound/i2c/other/ak4113.c
static void snd_ak4113_proc_init(struct ak4113 *ak4113) { snd_card_ro_proc_new(ak4113->card, "ak4113", ak4113, snd_ak4113_proc_regs_read); }
[ 0, 0 ]
Linux Kernel
sound/i2c/other/ak4114.c
static void reg_write(struct ak4114 *ak4114, unsigned char reg, unsigned char val) { ak4114->write(ak4114->private_data, reg, val); if (reg <= AK4114_REG_INT1_MASK) ak4114->regmap[reg] = val; else if (reg >= AK4114_REG_TXCSB0 && reg <= AK4114_REG_TXCSB4) ak4114->txcsb[reg - AK4114_R...
[ 1, 0 ]
Linux Kernel
sound/i2c/other/ak4114.c
static void snd_ak4114_free(struct ak4114 *chip) { atomic_inc(&chip->wq_processing); cancel_delayed_work_sync(&chip->work); kfree(chip); }
[ 0, 0 ]
Linux Kernel
sound/i2c/other/ak4114.c
static void ak4114_init_regs(struct ak4114 *chip) { unsigned char old = chip->regmap[AK4114_REG_PWRDN], reg; reg_write(chip, AK4114_REG_PWRDN, old & ~(AK4114_RST | AK4114_PWN)); udelay(200); /* release reset, but leave powerdown */ reg_write(chip, AK4114_REG_PWRDN, (old | AK4114_RST) & ~AK4114_PWN); udelay...
[ 1, 0 ]
Linux Kernel
sound/i2c/other/ak4114.c
static int snd_ak4114_in_error_info(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 = LONG_MAX; return 0; }
[ 0, 0 ]
Linux Kernel
sound/i2c/other/ak4114.c
static int snd_ak4114_rate_info(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 = 192000; return 0; }
[ 0, 0 ]
Linux Kernel
sound/i2c/other/ak4114.c
static int snd_ak4114_rate_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct ak4114 *chip = snd_kcontrol_chip(kcontrol); ucontrol->value.integer.value[0] = external_rate(reg_read(chip, AK4114_REG_RCS1)); return 0; }
[ 0, 0 ]
Linux Kernel
sound/i2c/other/ak4114.c
static int snd_ak4114_spdif_pinfo(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->value.integer.min = 0; uinfo->value.integer.max = 0xffff; uinfo->count = 4; return 0; }
[ 1, 0 ]
Linux Kernel
sound/i2c/other/ak4114.c
static int snd_ak4114_spdif_qget(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct ak4114 *chip = snd_kcontrol_chip(kcontrol); unsigned i; for (i = 0; i < AK4114_REG_QSUB_SIZE; i++) ucontrol->value.bytes.data[i] = reg_read(chip, AK4114_REG_QSUB_ADD...
[ 0, 0 ]
Linux Kernel
sound/i2c/other/ak4114.c
static void snd_ak4114_proc_regs_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { struct ak4114 *ak4114 = entry->private_data; int reg, val; for (reg = 0; reg < 0x20; reg++) { val = reg_read(ak4114, reg); snd_iprintf(buffer, "0x%02x = 0x%02x\n", r...
[ 1, 0 ]
Linux Kernel
sound/i2c/other/ak4117.c
static void reg_write(struct ak4117 *ak4117, unsigned char reg, unsigned char val) { ak4117->write(ak4117->private_data, reg, val); if (reg < sizeof(ak4117->regmap)) ak4117->regmap[reg] = val; }
[ 1, 0 ]
Linux Kernel
sound/i2c/other/ak4117.c
static inline unsigned char reg_read(struct ak4117 *ak4117, unsigned char reg) { return ak4117->read(ak4117->private_data, reg); } #if 0 static void reg_dump(struct ak4117 *ak4117) { int i; printk(KERN_DEBUG "AK4117 REG DUMP:\n"); for (i = 0; i < 0x1b; i++) printk(KERN_DEBUG "reg[%02x] = %02x (%02x)\n", i, re...
[ 1, 0 ]
Linux Kernel
sound/i2c/other/ak4117.c
static int snd_ak4117_dev_free(struct snd_device *device) { struct ak4117 *chip = device->device_data; snd_ak4117_free(chip); return 0; }
[ 0, 0 ]
Linux Kernel
sound/i2c/other/ak4117.c
static int snd_ak4117_in_error_info(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 = LONG_MAX; return 0; }
[ 0, 0 ]
Linux Kernel
sound/i2c/other/ak4117.c
static int snd_ak4117_in_error_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct ak4117 *chip = snd_kcontrol_chip(kcontrol); spin_lock_irq(&chip->lock); ucontrol->value.integer.value[0] = chip->errors[kcontrol->private_value]; chip->errors[kcon...
[ 0, 0 ]
Linux Kernel
sound/i2c/other/ak4117.c
static int snd_ak4117_rate_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct ak4117 *chip = snd_kcontrol_chip(kcontrol); ucontrol->value.integer.value[0] = external_rate(reg_read(chip, AK4117_REG_RCS1)); return 0; }
[ 0, 0 ]
Linux Kernel
sound/i2c/other/ak4117.c
static int snd_ak4117_spdif_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/i2c/other/ak4117.c
static int snd_ak4117_spdif_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct ak4117 *chip = snd_kcontrol_chip(kcontrol); unsigned i; for (i = 0; i < AK4117_REG_RXCSB_SIZE; i++) ucontrol->value.iec958.status[i] = reg_read(chip, AK4117_REG_RXCSB0...
[ 0, 0 ]
Linux Kernel
sound/i2c/other/ak4117.c
static int snd_ak4117_spdif_mask_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { memset(ucontrol->value.iec958.status, 0xff, AK4117_REG_RXCSB_SIZE); return 0; }
[ 1, 0 ]
Linux Kernel
sound/i2c/other/ak4117.c
static int snd_ak4117_spdif_pget(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct ak4117 *chip = snd_kcontrol_chip(kcontrol); unsigned short tmp; ucontrol->value.integer.value[0] = 0xf8f2; ucontrol->value.integer.value[1] = 0x4e1f; tmp = reg_read(...
[ 1, 0 ]
Linux Kernel
sound/i2c/other/ak4117.c
int snd_ak4117_external_rate(struct ak4117 *ak4117) { unsigned char rcs1; rcs1 = reg_read(ak4117, AK4117_REG_RCS1); return external_rate(rcs1); }
[ 0, 0 ]
Linux Kernel
sound/i2c/other/ak4xxx-adda.c
static void ak4524_reset(struct snd_akm4xxx *ak, int state) { unsigned int chip; unsigned char reg; for (chip = 0; chip < ak->num_dacs / 2; chip++) { snd_akm4xxx_write(ak, chip, 0x01, state ? 0x00 : 0x03); if (state) continue; for (reg = 0x04; reg < ak->total_regs; reg++) snd_akm4xxx_wri...
[ 1, 0 ]
Linux Kernel
sound/i2c/other/ak4xxx-adda.c
static void ak4381_reset(struct snd_akm4xxx *ak, int state) { unsigned int chip; unsigned char reg; for (chip = 0; chip < ak->num_dacs / 2; chip++) { snd_akm4xxx_write(ak, chip, 0x00, state ? 0x0c : 0x0f); if (state) continue; for (reg = 0x01; reg < ak->total_regs; reg++) snd_akm4xxx_write...
[ 1, 0 ]
Linux Kernel
sound/i2c/other/ak4xxx-adda.c
static int put_ak_reg(struct snd_kcontrol *kcontrol, int addr, unsigned char nval) { struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol); unsigned int mask = AK_GET_MASK(kcontrol->private_value); int chip = AK_GET_CHIP(kcontrol->private_value); if (snd_akm4xxx_get_vol(ak, chip, addr) == ...
[ 1, 0 ]
Linux Kernel
sound/i2c/other/ak4xxx-adda.c
static int snd_akm4xxx_volume_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { unsigned int mask = AK_GET_MASK(kcontrol->private_value); unsigned int val = ucontrol->value.integer.value[0]; if (val > mask) return -EINVAL; return put_ak_reg(kcontrol...
[ 1, 0 ]
Linux Kernel
sound/i2c/other/ak4xxx-adda.c
static int snd_akm4xxx_deemphasis_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol); int chip = AK_GET_CHIP(kcontrol->private_value); int addr = AK_GET_ADDR(kcontrol->private_value); int shift = A...
[ 1, 0 ]
Linux Kernel
sound/i2c/other/ak4xxx-adda.c
static int ak4xxx_switch_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol); int chip = AK_GET_CHIP(kcontrol->private_value); int addr = AK_GET_ADDR(kcontrol->private_value); int shift = AK_GET_SHIFT(kcontro...
[ 1, 0 ]
Linux Kernel
sound/i2c/other/ak4xxx-adda.c
static int ak4xxx_switch_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol); int chip = AK_GET_CHIP(kcontrol->private_value); int addr = AK_GET_ADDR(kcontrol->private_value); int shift = AK_GET_SHIFT(kcontr...
[ 0, 0 ]
Linux Kernel
sound/i2c/other/ak4xxx-adda.c
static int ak4xxx_capture_source_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol); int mixer_ch = AK_GET_SHIFT(kcontrol->private_value); int chip = AK_GET_CHIP(kcontrol->private_value); int addr =...
[ 0, 0 ]
Linux Kernel
sound/i2c/other/pt2258.c
static int pt2258_switch_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_pt2258 *pt = kcontrol->private_data; unsigned char bytes[2]; int val; val = !ucontrol->value.integer.value[0]; if (pt->mute == val) return 0; pt->mute = val; by...
[ 0, 0 ]
Linux Kernel
sound/i2c/tea6330t.c
static int snd_tea6330t_info_master_volume(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 = 43; return 0; }
[ 0, 0 ]
Linux Kernel
sound/i2c/tea6330t.c
static int snd_tea6330t_get_master_volume(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct tea6330t *tea = snd_kcontrol_chip(kcontrol); snd_i2c_lock(tea->bus); ucontrol->value.integer.value[0] = tea->mleft - 0x14; ucontrol->value.integer.va...
[ 1, 0 ]
Linux Kernel
sound/i2c/tea6330t.c
static int snd_tea6330t_put_master_volume(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct tea6330t *tea = snd_kcontrol_chip(kcontrol); int change, count, err; unsigned char bytes[3]; unsigned char val1, val2; val1 = (ucontrol->value.inte...
[ 1, 0 ]
Linux Kernel
sound/i2c/tea6330t.c
static int snd_tea6330t_get_bass(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct tea6330t *tea = snd_kcontrol_chip(kcontrol); ucontrol->value.integer.value[0] = tea->bass; return 0; }
[ 0, 0 ]
Linux Kernel
sound/i2c/tea6330t.c
static int snd_tea6330t_put_bass(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct tea6330t *tea = snd_kcontrol_chip(kcontrol); int change, err; unsigned char bytes[2]; unsigned char val1; val1 = ucontrol->value.integer.value[0] % (tea->max_bass + ...
[ 0, 0 ]
Linux Kernel
sound/i2c/tea6330t.c
static int snd_tea6330t_info_treble(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { struct tea6330t *tea = snd_kcontrol_chip(kcontrol); uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 1; uinfo->value.integer.min = 0; uinfo->value.integer.max = ...
[ 0, 0 ]
Linux Kernel
sound/i2c/tea6330t.c
static int snd_tea6330t_put_treble(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct tea6330t *tea = snd_kcontrol_chip(kcontrol); int change, err; unsigned char bytes[2]; unsigned char val1; val1 = ucontrol->value.integer.value[0] % (tea->max_tre...
[ 0, 0 ]
Linux Kernel
sound/isa/ad1816a/ad1816a.c
static int snd_card_ad1816a_pnp(int dev, struct pnp_card_link *card, const struct pnp_card_device_id *id) { struct pnp_dev *pdev; int err; pdev = pnp_request_card_device(card, id->devs[0].id, NULL); if (pdev == NULL) return -EBUSY; err = pnp_activate_dev(pdev); if (er...
[ 0, 0 ]
Linux Kernel
sound/isa/ad1816a/ad1816a.c
static int snd_ad1816a_pnp_suspend(struct pnp_card_link *pcard, pm_message_t state) { struct snd_card *card = pnp_get_card_drvdata(pcard); snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); snd_ad1816a_suspend(card->private_data); return 0; }
[ 0, 0 ]
Linux Kernel
sound/isa/ad1816a/ad1816a_lib.c
static inline void snd_ad1816a_out_mask(struct snd_ad1816a *chip, unsigned char reg, unsigned char mask, unsigned char value) { snd_ad1816a_out(chip, reg, (value & mask) | (snd_ad1816a_in(chip, reg) & ~mask)); }
[ 0, 0 ]
Linux Kernel
sound/isa/ad1816a/ad1816a_lib.c
static void snd_ad1816a_close(struct snd_ad1816a *chip, unsigned int mode) { unsigned long flags; spin_lock_irqsave(&chip->lock, flags); switch ((mode &= AD1816A_MODE_OPEN)) { case AD1816A_MODE_PLAYBACK: snd_ad1816a_out_mask(chip, AD1816A_INTERRUPT_STATUS, AD1816A_PLAYBACK_IRQ_PE...
[ 1, 0 ]
Linux Kernel
sound/isa/ad1816a/ad1816a_lib.c
static int snd_ad1816a_capture_trigger(struct snd_pcm_substream *substream, int cmd) { struct snd_ad1816a *chip = snd_pcm_substream_chip(substream); return snd_ad1816a_trigger(chip, AD1816A_CAPTURE_ENABLE, SNDRV_PCM_STREAM_CAPTURE, cmd, 1); }
[ 0, 0 ]
Linux Kernel
sound/isa/ad1816a/ad1816a_lib.c
static int snd_ad1816a_capture_open(struct snd_pcm_substream *substream) { struct snd_ad1816a *chip = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; int error; error = snd_ad1816a_open(chip, AD1816A_MODE_CAPTURE); if (error < 0) return error; runtime->hw = snd...
[ 0, 0 ]
Linux Kernel
sound/isa/ad1816a/ad1816a_lib.c
static int snd_ad1816a_capture_close(struct snd_pcm_substream *substream) { struct snd_ad1816a *chip = snd_pcm_substream_chip(substream); chip->capture_substream = NULL; snd_ad1816a_close(chip, AD1816A_MODE_CAPTURE); return 0; }
[ 0, 0 ]
Linux Kernel
sound/isa/ad1816a/ad1816a_lib.c
void snd_ad1816a_suspend(struct snd_ad1816a *chip) { int reg; unsigned long flags; spin_lock_irqsave(&chip->lock, flags); for (reg = 0; reg < 48; reg++) chip->image[reg] = snd_ad1816a_read(chip, reg); spin_unlock_irqrestore(&chip->lock, flags); }
[ 0, 0 ]
Linux Kernel
sound/isa/ad1816a/ad1816a_lib.c
static const char *snd_ad1816a_chip_id(struct snd_ad1816a *chip) { switch (chip->hardware) { case AD1816A_HW_AD1816A: return "AD1816A"; case AD1816A_HW_AD1815: return "AD1815"; case AD1816A_HW_AD18MAX10: return "AD18max10"; default: snd_printk(KERN_WARNING "Unknown chip version %d:%d.\n", chi...
[ 0, 0 ]
Linux Kernel
sound/isa/ad1816a/ad1816a_lib.c
int snd_ad1816a_pcm(struct snd_ad1816a *chip, int device) { int error; struct snd_pcm *pcm; error = snd_pcm_new(chip->card, "AD1816A", device, 1, 1, &pcm); if (error) return error; snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_ad1816a_playback_ops); snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTUR...
[ 1, 0 ]
Linux Kernel
sound/isa/ad1816a/ad1816a_lib.c
static int snd_ad1816a_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { int mask = (kcontrol->private_value >> 16) & 0xff; uinfo->type = mask == 1 ? SNDRV_CTL_ELEM_TYPE_BOOLEAN : SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 2; uinfo->value.i...
[ 1, 0 ]
Linux Kernel
sound/isa/ad1816a/ad1816a_lib.c
static int snd_ad1816a_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ad1816a *chip = snd_kcontrol_chip(kcontrol); unsigned long flags; int reg = kcontrol->private_value & 0xff; int shift_left = (kcontrol->private_value >> 8) & 0x0f...
[ 1, 0 ]
Linux Kernel
sound/isa/ad1848/ad1848.c
static int snd_ad1848_probe(struct device *dev, unsigned int n) { struct snd_card *card; struct snd_wss *chip; int error; error = snd_devm_card_new(dev, index[n], id[n], THIS_MODULE, 0, &card); if (error < 0) return error; error = snd_wss_create(card, port[n], -1, irq[n], dma1[n], -1, ...
[ 1, 0 ]
Linux Kernel
sound/isa/adlib.c
static int snd_adlib_probe(struct device *dev, unsigned int n) { struct snd_card *card; struct snd_opl3 *opl3; int error; error = snd_devm_card_new(dev, index[n], id[n], THIS_MODULE, 0, &card); if (error < 0) { dev_err(dev, "could not create card\n"); return error; } card->private_data = devm_r...
[ 1, 0 ]
Linux Kernel
sound/isa/azt2320.c
static int snd_card_azt2320_command(unsigned long port, unsigned char val) { int i; unsigned long limit; limit = jiffies + HZ / 10; for (i = 50000; i && time_after(limit, jiffies); i--) if (!(inb(port + 0x0c) & 0x80)) { outb(val, port + 0x0c); return 0; } return -EBUSY; }
[ 0, 0 ]
Linux Kernel
sound/isa/azt2320.c
static int __init alsa_card_azt2320_init(void) { int err; err = pnp_register_card_driver(&azt2320_pnpc_driver); if (err) return err; if (!azt2320_devices) { pnp_unregister_card_driver(&azt2320_pnpc_driver); #ifdef MODULE snd_printk(KERN_ERR "no AZT2320 based soundcards found\n"); #endif retur...
[ 0, 0 ]
Linux Kernel
sound/isa/cmi8328.c
static int array_find(const int array[], int item) { int i; for (i = 0; array[i] != -1; i++) if (array[i] == item) return i; return -1; }
[ 1, 0 ]
Linux Kernel
sound/isa/cmi8328.c
static void snd_cmi8328_remove(struct device *pdev, unsigned int dev) { struct snd_card *card = dev_get_drvdata(pdev); struct snd_cmi8328 *cmi = card->private_data; #ifdef SUPPORT_JOYSTICK if (cmi->gameport) gameport_unregister_port(cmi->gameport); #endif snd_cmi8328_cfg_write(cmi->port, CFG1, CFG1_SB_DIS...
[ 0, 0 ]
Linux Kernel
sound/isa/cmi8328.c
static int snd_cmi8328_suspend(struct device *pdev, unsigned int n, pm_message_t state) { struct snd_card *card = dev_get_drvdata(pdev); struct snd_cmi8328 *cmi; if (!card) return 0; cmi = card->private_data; snd_cmi8328_cfg_save(cmi->port, cmi->cfg); snd_power_change_sta...
[ 0, 0 ]
Linux Kernel
sound/isa/cmi8330.c
static int cmi8330_add_sb_mixers(struct snd_sb *chip) { int idx, err; unsigned long flags; spin_lock_irqsave(&chip->mixer_lock, flags); snd_sbmixer_write(chip, 0x00, 0x00); spin_unlock_irqrestore(&chip->mixer_lock, flags); /* mute and zero volume channels */ for (idx = 0; idx < ARRAY_SIZE(cmi8330_sb_ini...
[ 0, 0 ]
Linux Kernel
sound/isa/cmi8330.c
static int snd_cmi8330_mixer(struct snd_card *card, struct snd_cmi8330 *acard) { unsigned int idx; int err; strcpy(card->mixername, (acard->type == CMI8329) ? "CMI8329" : "CMI8330/C3D"); for (idx = 0; idx < ARRAY_SIZE(snd_cmi8330_controls); idx++) { err = snd_ctl_add(card, snd_ctl_new1(&snd_cmi83...
[ 1, 0 ]
Linux Kernel
sound/isa/cmi8330.c
static int snd_cmi8330_playback_open(struct snd_pcm_substream *substream) { struct snd_cmi8330 *chip = snd_pcm_substream_chip(substream); substream->private_data = chip->streams[SNDRV_PCM_STREAM_PLAYBACK].private_data; return chip->streams[SNDRV_PCM_STREAM_PLAYBACK].open(substream); }
[ 0, 0 ]
Linux Kernel
sound/isa/cmi8330.c
static int snd_cmi8330_pnp_detect(struct pnp_card_link *pcard, const struct pnp_card_device_id *pid) { static int dev; struct snd_card *card; int res; for (; dev < SNDRV_CARDS; dev++) { if (enable[dev] && isapnp[dev]) break; } if (dev >= SNDRV_CARDS) return -...
[ 0, 0 ]
Linux Kernel
sound/isa/cmi8330.c
static int snd_cmi8330_pnp_suspend(struct pnp_card_link *pcard, pm_message_t state) { return snd_cmi8330_suspend(pnp_get_card_drvdata(pcard)); }
[ 0, 0 ]
Linux Kernel
sound/isa/cmi8330.c
static void __exit alsa_card_cmi8330_exit(void) { #ifdef CONFIG_PNP if (pnp_registered) pnp_unregister_card_driver(&cmi8330_pnpc_driver); if (isa_registered) #endif isa_unregister_driver(&snd_cmi8330_driver); }
[ 0, 0 ]
Linux Kernel
sound/isa/cs423x/cs4236.c
static int snd_cs423x_pnp_init_ctrl(int dev, struct pnp_dev *pdev) { if (pnp_activate_dev(pdev) < 0) { printk(KERN_ERR IDENT " CTRL PnP configure failed for WSS (out of resources?)\n"); return -EBUSY; } cport[dev] = pnp_port_start(pdev, 0); snd_printdd("isapnp CTRL: control port=0x%lx\n", cpo...
[ 0, 0 ]
Linux Kernel
sound/isa/cs423x/cs4236.c
static int snd_card_cs423x_pnp(int dev, struct snd_card_cs4236 *acard, struct pnp_dev *pdev, struct pnp_dev *cdev) { acard->wss = pdev; if (snd_cs423x_pnp_init_wss(dev, acard->wss) < 0) return -EBUSY; if (cdev) cport[dev] = pnp_port_start(cdev, 0); else cport[dev] = -...
[ 0, 0 ]
Linux Kernel
sound/isa/cs423x/cs4236.c
static int snd_cs423x_suspend(struct snd_card *card) { struct snd_card_cs4236 *acard = card->private_data; snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); acard->chip->suspend(acard->chip); return 0; }
[ 0, 0 ]
Linux Kernel
sound/isa/cs423x/cs4236_lib.c
static void snd_cs4236_ctrl_out(struct snd_wss *chip, unsigned char reg, unsigned char val) { outb(reg, chip->cport + 3); outb(chip->cimage[reg] = val, chip->cport + 4); }
[ 1, 0 ]
Linux Kernel
sound/isa/cs423x/cs4236_lib.c
static void snd_cs4236_playback_format(struct snd_wss *chip, struct snd_pcm_hw_params *params, unsigned char pdfr) { unsigned long flags; unsigned char rate = divisor_to_rate_register(params->rate_den); spin_lock_irqsave(&chip->reg_loc...
[ 1, 0 ]
Linux Kernel
sound/isa/cs423x/cs4236_lib.c
int snd_cs4236_pcm(struct snd_wss *chip, int device) { int err; err = snd_wss_pcm(chip, device); if (err < 0) return err; chip->pcm->info_flags &= ~SNDRV_PCM_INFO_JOINT_DUPLEX; return 0; } #define CS4236_SINGLE(xname, xindex, reg, shift, mask, invert) \ {.iface = SNDRV_CTL_ELEM_IFACE_M...
[ 1, 0 ]
Linux Kernel
sound/isa/cs423x/cs4236_lib.c
static int snd_cs4236_info_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { int mask = (kcontrol->private_value >> 16) & 0xff; uinfo->type = mask == 1 ? SNDRV_CTL_ELEM_TYPE_BOOLEAN : SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 1; uinfo->value.int...
[ 1, 0 ]
Linux Kernel
sound/isa/cs423x/cs4236_lib.c
static int snd_cs4236_get_singlec(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_wss *chip = snd_kcontrol_chip(kcontrol); unsigned long flags; int reg = kcontrol->private_value & 0xff; int shift = (kcontrol->private_value >> 8) & 0xff; int m...
[ 1, 0 ]
Linux Kernel
sound/isa/cs423x/cs4236_lib.c
static int snd_cs4236_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { int mask = (kcontrol->private_value >> 24) & 0xff; uinfo->type = mask == 1 ? SNDRV_CTL_ELEM_TYPE_BOOLEAN : SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 2; uinfo->value.int...
[ 1, 0 ]
Linux Kernel
sound/isa/cs423x/cs4236_lib.c
static int snd_cs4236_get_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_wss *chip = snd_kcontrol_chip(kcontrol); unsigned long flags; int left_reg = kcontrol->private_value & 0xff; int right_reg = (kcontrol->private_value >> 8) & 0xff; ...
[ 1, 0 ]
Linux Kernel
sound/isa/cs423x/cs4236_lib.c
static int snd_cs4236_get_double1(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_wss *chip = snd_kcontrol_chip(kcontrol); unsigned long flags; int left_reg = kcontrol->private_value & 0xff; int right_reg = (kcontrol->private_value >> 8) & 0xff...
[ 1, 0 ]
Linux Kernel
sound/isa/cs423x/cs4236_lib.c
static inline int snd_cs4236_mixer_master_digital_invert_volume(int vol) { return (vol < 64) ? 63 - vol : 64 + (71 - vol); }
[ 1, 0 ]
Linux Kernel
sound/isa/cs423x/cs4236_lib.c
static inline int snd_cs4235_mixer_output_accu_set_volume(int vol) { switch (vol & 3) { case 0: return 3 << 5; case 1: return 0 << 5; case 2: return 2 << 5; case 3: return 1 << 5; } return 1 << 5; }
[ 1, 0 ]
Linux Kernel
sound/isa/es1688/es1688.c
static int snd_es1688_probe(struct snd_card *card, unsigned int n) { struct snd_es1688 *chip = card->private_data; struct snd_opl3 *opl3; int error; error = snd_es1688_pcm(card, chip, 0); if (error < 0) return error; error = snd_es1688_mixer(card, chip); if (error < 0) return error; strscpy(c...
[ 1, 0 ]
Linux Kernel
sound/isa/es1688/es1688.c
static void snd_es968_pnp_remove(struct pnp_card_link *pcard) { snd_es968_pnp_is_probed = 0; }
[ 0, 0 ]
Linux Kernel
sound/isa/es1688/es1688_lib.c
static int snd_es1688_read(struct snd_es1688 *chip, unsigned char reg) { if (!snd_es1688_dsp_command(chip, 0xc0)) return -1; if (!snd_es1688_dsp_command(chip, reg)) return -1; return snd_es1688_dsp_get_byte(chip); }
[ 0, 0 ]
Linux Kernel
sound/isa/es1688/es1688_lib.c
static unsigned char snd_es1688_mixer_read(struct snd_es1688 *chip, unsigned char reg) { unsigned char result; outb(reg, ES1688P(chip, MIXER_ADDR)); udelay(10); result = inb(ES1688P(chip, MIXER_DATA)); udelay(10); return result; }
[ 0, 0 ]
Linux Kernel
sound/isa/es1688/es1688_lib.c
int snd_es1688_reset(struct snd_es1688 *chip) { int i; outb(3, ES1688P(chip, RESET)); udelay(10); outb(0, ES1688P(chip, RESET)); udelay(30); for (i = 0; i < 1000 && !(inb(ES1688P(chip, DATA_AVAIL)) & 0x80); i++) ; if (inb(ES1688P(chip, READ)) != 0xaa) { snd_printd("ess_reset at 0x%lx: failed!!!\n...
[ 0, 0 ]
Linux Kernel
sound/isa/es1688/es1688_lib.c
static void snd_es1688_set_rate(struct snd_es1688 *chip, struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; unsigned int bits, divider; if (runtime->rate_num == clocks[0].num) bits = 256 - runtime->rate_den; else bits = 128 - run...
[ 1, 0 ]
Linux Kernel
sound/isa/es1688/es1688_lib.c
static int snd_es1688_capture_trigger(struct snd_pcm_substream *substream, int cmd) { struct snd_es1688 *chip = snd_pcm_substream_chip(substream); return snd_es1688_trigger(chip, cmd, 0x0f); }
[ 0, 0 ]