Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
sound/pci/aw2/aw2-saa7146.c
void snd_aw2_saa7146_pcm_trigger_stop_capture(struct snd_aw2_saa7146 *chip, int stream_number) { if (stream_number == 0) WRITEREG((TR_E_A1_IN << 16), MC1); }
[ 0, 0 ]
Linux Kernel
sound/pci/aw2/aw2-saa7146.c
irqreturn_t snd_aw2_saa7146_interrupt(int irq, void *dev_id) { unsigned int isr; __always_unused unsigned int iicsta; struct snd_aw2_saa7146 *chip = dev_id; isr = READREG(ISR); if (!isr) return IRQ_NONE; WRITEREG(isr, ISR); if (isr & (IIC_S | IIC_E)) { iicsta = READREG(IICSTA); WRITEREG(0x...
[ 0, 0 ]
Linux Kernel
sound/pci/aw2/aw2-saa7146.c
void snd_aw2_saa7146_use_digital_input(struct snd_aw2_saa7146 *chip, int use_digital) { /* FIXME: switch between analog and digital input does not always work. It can produce a kind of white noise. It seams that received data are inverted sometime (endian inversion). W...
[ 0, 1 ]
Linux Kernel
sound/pci/aw2/aw2-saa7146.c
static int snd_aw2_saa7146_get_limit(int size) { int limitsize = 32; int limit = 0; while (limitsize < size) { limitsize *= 2; limit++; } return limit; }
[ 0, 0 ]
Linux Kernel
sound/pci/azt3328.c
static inline u32 snd_azf3328_codec_inl(const struct snd_azf3328_codec_data *codec, unsigned reg) { return inl(codec->io_base + reg); }
[ 0, 0 ]
Linux Kernel
sound/pci/azt3328.c
static inline void snd_azf3328_ctrl_outb(const struct snd_azf3328 *chip, unsigned reg, u8 value) { outb(value, chip->ctrl_io + reg); }
[ 0, 0 ]
Linux Kernel
sound/pci/azt3328.c
static inline u8 snd_azf3328_ctrl_inb(const struct snd_azf3328 *chip, unsigned reg) { return inb(chip->ctrl_io + reg); }
[ 0, 0 ]
Linux Kernel
sound/pci/azt3328.c
static bool snd_azf3328_mixer_mute_control(const struct snd_azf3328 *chip, unsigned reg, bool do_mute) { unsigned long portbase = chip->mixer_io + reg + 1; bool updated; updated = snd_azf3328_io_reg_setb(portbase, AZF_MUTE_BIT, do_mute); /* indicate whether it was mu...
[ 1, 0 ]
Linux Kernel
sound/pci/azt3328.c
static inline void snd_azf3328_mixer_reset(const struct snd_azf3328 *chip) { snd_azf3328_mixer_mute_control_master(chip, 1); snd_azf3328_mixer_outw(chip, IDX_MIXER_RESET, 0x0000); } #ifdef AZF_USE_AC97_LAYER
[ 0, 0 ]
Linux Kernel
sound/pci/azt3328.c
static void snd_azf3328_mixer_ac97_write(struct snd_ac97 *ac97, unsigned short reg_ac97, unsigned short val) { const struct snd_azf3328 *chip = ac97->private_data; unsigned short reg_azf = snd_azf3328_mixer_ac97_map_reg_idx(reg_ac97);...
[ 1, 0 ]
Linux Kernel
sound/pci/azt3328.c
static void snd_azf3328_mixer_write_volume_gradually( const struct snd_azf3328 *chip, unsigned reg, unsigned char dst_vol_left, unsigned char dst_vol_right, int chan_sel, int delay) { unsigned long portbase = chip->mixer_io + reg; unsigned char curr_vol_left = 0, curr_vol_right = 0; int left_change = 0, r...
[ 1, 0 ]
Linux Kernel
sound/pci/azt3328.c
static int snd_azf3328_info_mixer(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { struct azf3328_mixer_reg reg; snd_azf3328_mixer_reg_decode(&reg, kcontrol->private_value); uinfo->type = reg.mask == 1 ? SNDRV_CTL_ELEM_TYPE_BOOLEAN : SNDRV_CTL_ELEM_TYPE_I...
[ 0, 0 ]
Linux Kernel
sound/pci/azt3328.c
static int snd_azf3328_get_mixer(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_azf3328 *chip = snd_kcontrol_chip(kcontrol); struct azf3328_mixer_reg reg; u16 oreg, val; snd_azf3328_mixer_reg_decode(&reg, kcontrol->private_value); oreg = sn...
[ 1, 0 ]
Linux Kernel
sound/pci/azt3328.c
static int snd_azf3328_put_mixer_enum(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_azf3328 *chip = snd_kcontrol_chip(kcontrol); struct azf3328_mixer_reg reg; u16 oreg, nreg, val; snd_azf3328_mixer_reg_decode(&reg, kcontrol->private_valu...
[ 1, 0 ]
Linux Kernel
sound/pci/azt3328.c
static inline void snd_azf3328_ctrl_enable_codecs(struct snd_azf3328 *chip, bool enable) { dev_dbg(chip->card->dev, "codec_enable %d\n", enable); snd_azf3328_ctrl_reg_6AH_update(chip, IO_6A_PAUSE_PLAYBACK_BIT8, enable); }
[ 1, 0 ]
Linux Kernel
sound/pci/azt3328.c
static void snd_azf3328_gameport_set_counter_frequency(struct snd_azf3328 *chip, unsigned int freq_cfg) { snd_azf3328_io_reg_setb(chip->game_io + IDX_GAME_HWCONFIG, 0x02, (freq_cfg & 1) != 0); snd_azf3328_io_reg_setb(chip->game_io + I...
[ 1, 0 ]
Linux Kernel
sound/pci/azt3328.c
static inline void snd_azf3328_gameport_axis_circuit_enable(struct snd_azf3328 *chip, bool enable) { snd_azf3328_ctrl_reg_6AH_update(chip, IO_6A_SOMETHING2_GAMEPORT, enable); }
[ 0, 0 ]
Linux Kernel
sound/pci/azt3328.c
static inline void snd_azf3328_gameport_free(struct snd_azf3328 *chip) {}
[ 0, 0 ]
Linux Kernel
sound/pci/azt3328.c
static inline void snd_azf3328_gameport_interrupt(struct snd_azf3328 *chip) { dev_warn(chip->card->dev, "huh, game port IRQ occurred!?\n"); } #endif
[ 1, 0 ]
Linux Kernel
sound/pci/azt3328.c
static inline void snd_azf3328_pcm_interrupt(struct snd_azf3328 *chip, const struct snd_azf3328_codec_data *first_codec, u8 status) { u8 which; enum snd_azf3328_codec_type codec_type; const struct snd_azf3328_codec_data *codec = first_codec; for (codec_type =...
[ 1, 0 ]
Linux Kernel
sound/pci/azt3328.c
static irqreturn_t snd_azf3328_interrupt(int irq, void *dev_id) { struct snd_azf3328 *chip = dev_id; u8 status; static unsigned long irq_count; status = snd_azf3328_ctrl_inb(chip, IDX_IO_IRQSTATUS); if (!(status & (IRQ_PLAYBACK | IRQ_RECORDING | IRQ_I2S_OUT | IRQ_GAMEPORT | IRQ_MPU401 | IR...
[ 0, 0 ]
Linux Kernel
sound/pci/azt3328.c
static int snd_azf3328_pcm_capture_open(struct snd_pcm_substream *substream) { return snd_azf3328_pcm_open(substream, AZF_CODEC_CAPTURE); }
[ 0, 0 ]
Linux Kernel
sound/pci/azt3328.c
static int snd_azf3328_pcm_i2s_out_open(struct snd_pcm_substream *substream) { return snd_azf3328_pcm_open(substream, AZF_CODEC_I2S_OUT); }
[ 0, 0 ]
Linux Kernel
sound/pci/azt3328.c
static int snd_azf3328_pcm_close(struct snd_pcm_substream *substream) { struct snd_azf3328_codec_data *codec = substream->runtime->private_data; codec->substream = NULL; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/azt3328.c
static int snd_azf3328_timer_precise_resolution(struct snd_timer *timer, unsigned long *num, unsigned long *den) { *num = 1; *den = 1024000 / seqtimer_scaling; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/azt3328.c
static int snd_azf3328_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) { return snd_card_free_on_error(&pci->dev, __snd_azf3328_probe(pci, pci_id)); } #ifdef CONFIG_PM_SLEEP
[ 0, 0 ]
Linux Kernel
sound/pci/azt3328.c
static inline void snd_azf3328_suspend_regs(const struct snd_azf3328 *chip, unsigned long io_addr, unsigned count, u32 *saved_regs) { unsigned reg; for (reg = 0; reg < count; ++reg) { *saved_regs = inl(io_addr); dev_dbg...
[ 1, 0 ]
Linux Kernel
sound/pci/azt3328.c
static inline void snd_azf3328_resume_regs(const struct snd_azf3328 *chip, const u32 *saved_regs, unsigned long io_addr, unsigned count) { unsigned reg; for (reg = 0; reg < count; ++reg...
[ 1, 0 ]
Linux Kernel
sound/pci/bt87x.c
static int snd_bt87x_set_analog_hw(struct snd_bt87x *chip, struct snd_pcm_runtime *runtime) { static const struct snd_ratnum analog_clock = {.num = ANALOG_CLOCK, .den_min = CLOCK_DIV_MIN, ...
[ 0, 0 ]
Linux Kernel
sound/pci/bt87x.c
static int snd_bt87x_trigger(struct snd_pcm_substream *substream, int cmd) { struct snd_bt87x *chip = snd_pcm_substream_chip(substream); switch (cmd) { case SNDRV_PCM_TRIGGER_START: return snd_bt87x_start(chip); case SNDRV_PCM_TRIGGER_STOP: return snd_bt87x_stop(chip); default: return -EINVAL; ...
[ 0, 0 ]
Linux Kernel
sound/pci/bt87x.c
static int snd_bt87x_capture_volume_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *info) { info->type = SNDRV_CTL_ELEM_TYPE_INTEGER; info->count = 1; info->value.integer.min = 0; info->value.integer.max = 15; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/bt87x.c
static int snd_bt87x_capture_volume_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *value) { struct snd_bt87x *chip = snd_kcontrol_chip(kcontrol); u32 old_control; int changed; spin_lock_irq(&chip->reg_lock); old_control = chip->reg_control; chip->reg_...
[ 0, 0 ]
Linux Kernel
sound/pci/bt87x.c
static int snd_bt87x_pcm(struct snd_bt87x *chip, int device, char *name) { int err; struct snd_pcm *pcm; err = snd_pcm_new(chip->card, name, device, 0, 1, &pcm); if (err < 0) return err; pcm->private_data = chip; strcpy(pcm->name, name); snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_bt87x_pcm_...
[ 1, 0 ]
Linux Kernel
sound/pci/ca0106/ca0106_main.c
int snd_ca0106_i2c_write(struct snd_ca0106 *emu, u32 reg, u32 value) { u32 tmp; int timeout = 0; int status; int retry; if ((reg > 0x7f) || (value > 0x1ff)) { dev_err(emu->card->dev, "i2c_write: invalid values.\n"); return -EINVAL; } tmp = reg << 25 | value << 16; /* Not sure what this I2C cha...
[ 1, 0 ]
Linux Kernel
sound/pci/ca0106/ca0106_main.c
static void restore_spdif_bits(struct snd_ca0106 *chip, int idx) { if (chip->spdif_str_bits[idx] != chip->spdif_bits[idx]) { chip->spdif_str_bits[idx] = chip->spdif_bits[idx]; snd_ca0106_ptr_write(chip, SPCS0 + idx, 0, chip->spdif_str_bits[idx]); } }
[ 0, 0 ]
Linux Kernel
sound/pci/ca0106/ca0106_main.c
static int snd_ca0106_pcm_open_3_capture(struct snd_pcm_substream *substream) { return snd_ca0106_pcm_open_capture_channel(substream, 3); }
[ 0, 0 ]
Linux Kernel
sound/pci/ca0106/ca0106_main.c
static int snd_ca0106_ac97(struct snd_ca0106 *chip) { struct snd_ac97_bus *pbus; struct snd_ac97_template ac97; int err; static const struct snd_ac97_bus_ops ops = { .write = snd_ca0106_ac97_write, .read = snd_ca0106_ac97_read, }; err = snd_ac97_bus(chip->card, 0, &ops, NULL, &pbus); if (err ...
[ 1, 0 ]
Linux Kernel
sound/pci/ca0106/ca0106_main.c
static void snd_ca0106_free(struct snd_card *card) { struct snd_ca0106 *chip = card->private_data; ca0106_stop_chip(chip); }
[ 0, 0 ]
Linux Kernel
sound/pci/ca0106/ca0106_main.c
static void ca0106_stop_chip(struct snd_ca0106 *chip) { snd_ca0106_ptr_write(chip, BASIC_INTERRUPT, 0, 0); outl(0, chip->port + CA0106_INTE); snd_ca0106_ptr_write(chip, EXTENDED_INT_MASK, 0, 0); udelay(1000); /* disable audio */ /* outl(HCFG_LOCKSOUNDCACHE, chip->port + HCFG); */ outl(0, chip->port + CA0...
[ 0, 1 ]
Linux Kernel
sound/pci/ca0106/ca0106_main.c
static void ca0106_midi_interrupt_enable(struct snd_ca_midi *midi, int intr) { snd_ca0106_intr_enable((struct snd_ca0106 *)(midi->dev_id), intr); }
[ 0, 0 ]
Linux Kernel
sound/pci/ca0106/ca0106_main.c
static int ca0106_dev_id_port(void *dev_id) { return ((struct snd_ca0106 *)dev_id)->port; }
[ 0, 0 ]
Linux Kernel
sound/pci/ca0106/ca0106_mixer.c
static void ca0106_set_capture_mic_line_in(struct snd_ca0106 *emu) { u32 tmp; if (emu->capture_mic_line_in) { /* Mute input */ tmp = inl(emu->port + CA0106_GPIO) & ~0x400; tmp = tmp | 0x400; outl(tmp, emu->port + CA0106_GPIO); /* snd_ca0106_i2c_write(emu, ADC_MUX, ADC_MUX_MIC); */ } else { ...
[ 1, 0 ]
Linux Kernel
sound/pci/ca0106/ca0106_mixer.c
static void ca0106_set_spdif_bits(struct snd_ca0106 *emu, int idx) { snd_ca0106_ptr_write(emu, SPCS0 + idx, 0, emu->spdif_str_bits[idx]); }
[ 0, 0 ]
Linux Kernel
sound/pci/ca0106/ca0106_mixer.c
static int snd_ca0106_i2c_capture_source_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol); ucontrol->value.enumerated.item[0] = emu->i2c_capture_source; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ca0106/ca0106_mixer.c
static int snd_ca0106_spdif_get_mask(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { ucontrol->value.iec958.status[0] = 0xff; ucontrol->value.iec958.status[1] = 0xff; ucontrol->value.iec958.status[2] = 0xff; ucontrol->value.iec958.status[3] = 0xff; r...
[ 1, 0 ]
Linux Kernel
sound/pci/ca0106/ca0106_mixer.c
static int snd_ca0106_spdif_put_default(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol); unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); unsigned int val; val = encode_spdif_bits(...
[ 1, 1 ]
Linux Kernel
sound/pci/ca0106/ca0106_mixer.c
static int snd_ca0106_volume_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 = 255; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ca0106/ca0106_mixer.c
static int snd_ca0106_i2c_volume_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol); int source_id; source_id = kcontrol->private_value; ucontrol->value.integer.value[0] = emu->i2c_capture_volume[...
[ 0, 0 ]
Linux Kernel
sound/pci/ca0106/ca0106_mixer.c
static int snd_ca0106_i2c_volume_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol); unsigned int ogain; unsigned int ngain; int source_id; int change = 0; source_id = kcontrol->private_value; ...
[ 0, 0 ]
Linux Kernel
sound/pci/ca0106/ca0106_mixer.c
static int spi_mute_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol); unsigned int reg = kcontrol->private_value >> SPI_REG_SHIFT; unsigned int bit = kcontrol->private_value & SPI_REG_MASK; int ret; ret = em...
[ 1, 0 ]
Linux Kernel
sound/pci/ca0106/ca0106_mixer.c
static struct snd_kcontrol_new snd_ca0106_volume_spi_dac_ctl(const struct snd_ca0106_details *details, int channel_id) { struct snd_kcontrol_new spi_switch = {0}; int reg, bit; int dac_id; spi_switch.iface = SNDRV_CTL_ELEM_IFACE_MIXER; spi_switch.access = SNDRV_CTL_ELEM_ACCESS_R...
[ 0, 0 ]
Linux Kernel
sound/pci/ca0106/ca0106_mixer.c
static void add_followers(struct snd_card *card, struct snd_kcontrol *master, const char *const *list) { for (; *list; list++) { struct snd_kcontrol *follower = ctl_find(card, *list); if (follower) snd_ctl_add_follower(master, follower); } }
[ 0, 0 ]
Linux Kernel
sound/pci/ca0106/ca0106_mixer.c
void snd_ca0106_mixer_suspend(struct snd_ca0106 *chip) { int i; for (i = 0; i < NUM_SAVED_VOLUMES; i++) chip->saved_vol[i] = snd_ca0106_ptr_read(chip, saved_volumes[i].reg, saved_volumes[i].channel_id); }
[ 0, 0 ]
Linux Kernel
sound/pci/ca0106/ca0106_proc.c
static void snd_ca0106_proc_reg_write32(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { struct snd_ca0106 *emu = entry->private_data; unsigned long flags; char line[64]; u32 reg, val; while (!snd_info_get_line(buffer, line, sizeof(line))) { if (ssca...
[ 1, 0 ]
Linux Kernel
sound/pci/ca0106/ca0106_proc.c
static void snd_ca0106_proc_reg_read32(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { struct snd_ca0106 *emu = entry->private_data; unsigned long value; unsigned long flags; int i; snd_iprintf(buffer, "Registers:\n\n"); for (i = 0; i < 0x20; i += 4) {...
[ 1, 0 ]
Linux Kernel
sound/pci/ca0106/ca0106_proc.c
static void snd_ca0106_proc_i2c_write(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { struct snd_ca0106 *emu = entry->private_data; char line[64]; unsigned int reg, val; while (!snd_info_get_line(buffer, line, sizeof(line))) { if (sscanf(line, "%x %x", ...
[ 1, 0 ]
Linux Kernel
sound/pci/ca0106/ca_midi.c
static void ca_midi_interrupt(struct snd_ca_midi *midi, unsigned int status) { unsigned char byte; if (midi->rmidi == NULL) { midi->interrupt_disable(midi, midi->tx_enable | midi->rx_enable); return; } spin_lock(&midi->input_lock); if ((status & midi->ipr_rx) && ca_midi_input_avail(midi)) { if ...
[ 1, 0 ]
Linux Kernel
sound/pci/ca0106/ca_midi.c
static void ca_midi_cmd(struct snd_ca_midi *midi, unsigned char cmd, int ack) { unsigned long flags; int timeout, ok; spin_lock_irqsave(&midi->input_lock, flags); ca_midi_write_data(midi, 0x00); ca_midi_write_cmd(midi, cmd); if (ack) { ok = 0; timeout = 10000; while (!ok && timeout-- > 0) { ...
[ 1, 0 ]
Linux Kernel
sound/pci/ca0106/ca_midi.c
static int ca_midi_input_open(struct snd_rawmidi_substream *substream) { struct snd_ca_midi *midi = substream->rmidi->private_data; unsigned long flags; if (snd_BUG_ON(!midi->dev_id)) return -ENXIO; spin_lock_irqsave(&midi->open_lock, flags); midi->midi_mode |= CA_MIDI_MODE_INPUT; midi->substream_inpu...
[ 1, 0 ]
Linux Kernel
sound/pci/ca0106/ca_midi.c
static int ca_midi_output_open(struct snd_rawmidi_substream *substream) { struct snd_ca_midi *midi = substream->rmidi->private_data; unsigned long flags; if (snd_BUG_ON(!midi->dev_id)) return -ENXIO; spin_lock_irqsave(&midi->open_lock, flags); midi->midi_mode |= CA_MIDI_MODE_OUTPUT; midi->substream_ou...
[ 1, 0 ]
Linux Kernel
sound/pci/cmipci.c
static inline void snd_cmipci_write(struct cmipci *cm, unsigned int cmd, unsigned int data) { outl(data, cm->iobase + cmd); }
[ 0, 0 ]
Linux Kernel
sound/pci/cmipci.c
static inline unsigned int snd_cmipci_read(struct cmipci *cm, unsigned int cmd) { return inl(cm->iobase + cmd); }
[ 0, 0 ]
Linux Kernel
sound/pci/cmipci.c
static int snd_cmipci_clear_bit_b(struct cmipci *cm, unsigned int cmd, unsigned char flag) { unsigned char val, oval; val = oval = inb(cm->iobase + cmd); val &= ~flag; if (val == oval) return 0; outb(val, cm->iobase + cmd); return 1; }
[ 0, 0 ]
Linux Kernel
sound/pci/cmipci.c
static int snd_cmipci_playback2_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *hw_params) { struct cmipci *cm = snd_pcm_substream_chip(substream); if (params_channels(hw_params) > 2) { mutex_lock(&cm->open_mutex); if (cm->opened[CM_CH_PLAY]...
[ 0, 0 ]
Linux Kernel
sound/pci/cmipci.c
static int snd_cmipci_playback_trigger(struct snd_pcm_substream *substream, int cmd) { struct cmipci *cm = snd_pcm_substream_chip(substream); return snd_cmipci_pcm_trigger(cm, &cm->channel[CM_CH_PLAY], cmd); }
[ 0, 0 ]
Linux Kernel
sound/pci/cmipci.c
static int snd_cmipci_spdif_default_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/cmipci.c
static int snd_cmipci_spdif_default_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct cmipci *chip = snd_kcontrol_chip(kcontrol); int i; spin_lock_irq(&chip->reg_lock); for (i = 0; i < 4; i++) ucontrol->value.iec958.status[i] = (chip->...
[ 1, 0 ]
Linux Kernel
sound/pci/cmipci.c
static int snd_cmipci_spdif_default_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct cmipci *chip = snd_kcontrol_chip(kcontrol); int i, change; unsigned int val; val = 0; spin_lock_irq(&chip->reg_lock); for (i = 0; i < 4; i++) val...
[ 0, 0 ]
Linux Kernel
sound/pci/cmipci.c
static int snd_cmipci_spdif_stream_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct cmipci *chip = snd_kcontrol_chip(kcontrol); int i, change; unsigned int val; val = 0; spin_lock_irq(&chip->reg_lock); for (i = 0; i < 4; i++) val |...
[ 0, 0 ]
Linux Kernel
sound/pci/cmipci.c
static void restore_mixer_state(struct cmipci *cm) { if (cm->mixer_insensitive) { struct snd_ctl_elem_value *val; unsigned int i; val = kmalloc(sizeof(*val), GFP_KERNEL); if (!val) return; cm->mixer_insensitive = 0; for (i = 0; i < CM_SAVED_MIXERS; i++) { struct snd_kcontrol *ctl ...
[ 1, 0 ]
Linux Kernel
sound/pci/cmipci.c
static int snd_cmipci_playback2_hw_free(struct snd_pcm_substream *substream) { struct cmipci *cm = snd_pcm_substream_chip(substream); snd_cmipci_silence_hack(cm, &cm->channel[1]); return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/cmipci.c
static int snd_cmipci_capture_open(struct snd_pcm_substream *substream) { struct cmipci *cm = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; int err; err = open_device_check(cm, CM_OPEN_CAPTURE, substream); if (err < 0) return err; runtime->hw = snd_cmipci_capt...
[ 0, 0 ]
Linux Kernel
sound/pci/cmipci.c
static int snd_cmipci_capture_spdif_open(struct snd_pcm_substream *substream) { struct cmipci *cm = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; int err; err = open_device_check(cm, CM_OPEN_SPDIF_CAPTURE, substream); if (err < 0) return err; runtime->hw = snd...
[ 0, 0 ]
Linux Kernel
sound/pci/cmipci.c
static int snd_cmipci_capture_spdif_close(struct snd_pcm_substream *substream) { struct cmipci *cm = snd_pcm_substream_chip(substream); close_device_check(cm, CM_OPEN_SPDIF_CAPTURE); return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/cmipci.c
static int snd_cmipci_pcm_spdif_new(struct cmipci *cm, int device) { struct snd_pcm *pcm; int err; err = snd_pcm_new(cm->card, cm->card->driver, device, 1, 1, &pcm); if (err < 0) return err; snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_cmipci_playback_spdif_ops); snd_pcm_set...
[ 1, 0 ]
Linux Kernel
sound/pci/cmipci.c
static void snd_cmipci_mixer_write(struct cmipci *s, unsigned char idx, unsigned char data) { outb(idx, s->iobase + CM_REG_SB16_ADDR); outb(data, s->iobase + CM_REG_SB16_DATA); }
[ 0, 0 ]
Linux Kernel
sound/pci/cmipci.c
static int snd_cmipci_info_volume(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { struct cmipci_sb_reg reg; cmipci_sb_reg_decode(&reg, kcontrol->private_value); uinfo->type = reg.mask == 1 ? SNDRV_CTL_ELEM_TYPE_BOOLEAN : SNDRV_CTL_ELEM_TYPE_INTEGER; ui...
[ 0, 0 ]
Linux Kernel
sound/pci/cmipci.c
static int snd_cmipci_info_input_sw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; uinfo->count = 4; uinfo->value.integer.min = 0; uinfo->value.integer.max = 1; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/cmipci.c
static int snd_cmipci_get_input_sw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct cmipci *cm = snd_kcontrol_chip(kcontrol); struct cmipci_sb_reg reg; int val1, val2; cmipci_sb_reg_decode(&reg, kcontrol->private_value); spin_lock_irq(&cm->reg_lo...
[ 0, 0 ]
Linux Kernel
sound/pci/cmipci.c
static int snd_cmipci_info_native_mixer(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { struct cmipci_sb_reg reg; cmipci_sb_reg_decode(&reg, kcontrol->private_value); uinfo->type = reg.mask == 1 ? SNDRV_CTL_ELEM_TYPE_BOOLEAN : SNDRV_CTL_ELEM_TYPE_I...
[ 0, 0 ]
Linux Kernel
sound/pci/cmipci.c
static int snd_cmipci_uswitch_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct cmipci_switch_args *args; args = (struct cmipci_switch_args *)kcontrol->private_value; if (snd_BUG_ON(!args)) return -EINVAL; return _snd_cmipci_uswitch_get(kcont...
[ 0, 0 ]
Linux Kernel
sound/pci/cmipci.c
static int _snd_cmipci_uswitch_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol, struct cmipci_switch_args *args) { unsigned int val; int change; struct cmipci *cm = snd_kcontrol_chip(kcontrol); spin_lock_irq(&cm->reg_l...
[ 1, 0 ]
Linux Kernel
sound/pci/cmipci.c
static int snd_cmipci_uswitch_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct cmipci_switch_args *args; args = (struct cmipci_switch_args *)kcontrol->private_value; if (snd_BUG_ON(!args)) return -EINVAL; return _snd_cmipci_uswitch_put(kcontr...
[ 0, 0 ]
Linux Kernel
sound/pci/cmipci.c
static int snd_cmipci_spdout_enable_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { int changed; changed = _snd_cmipci_uswitch_get(kcontrol, ucontrol, &cmipci_switch_arg_spdif_enable); changed |= _snd_cmipc...
[ 0, 0 ]
Linux Kernel
sound/pci/cmipci.c
static int snd_cmipci_line_in_mode_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { struct cmipci *cm = snd_kcontrol_chip(kcontrol); static const char *const texts[3] = {"Line-In", "Rear Output", "Bass Output"}; return snd_ctl_enum_info(uinfo, 1, cm...
[ 0, 0 ]
Linux Kernel
sound/pci/cmipci.c
static int snd_cmipci_mic_in_mode_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { static const char *const texts[2] = {"Mic-In", "Center/LFE Output"}; return snd_ctl_enum_info(uinfo, 1, 2, texts); }
[ 0, 0 ]
Linux Kernel
sound/pci/cmipci.c
static void snd_cmipci_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { struct cmipci *cm = entry->private_data; int i, v; snd_iprintf(buffer, "%s\n", cm->card->longname); for (i = 0; i < 0x94; i++) { if (i == 0x28) i = 0x90; v = inb(cm->i...
[ 1, 0 ]
Linux Kernel
sound/pci/cmipci.c
static int snd_cmipci_create_gameport(struct cmipci *cm, int dev) { static const int ports[] = {0x201, 0x200, 0}; /* FIXME: majority is 0x201? */ struct gameport *gp; struct resource *r = NULL; int i, io_port = 0; if (joystick_port[dev] == 0) return -ENODEV; if (joystick_port[dev] == 1) { /* auto-dete...
[ 0, 1 ]
Linux Kernel
sound/pci/cmipci.c
static int snd_cmipci_resume(struct device *dev) { struct snd_card *card = dev_get_drvdata(dev); struct cmipci *cm = card->private_data; int i; snd_cmipci_write(cm, CM_REG_INT_HLDCLR, 0); snd_cmipci_ch_reset(cm, CM_CH_PLAY); snd_cmipci_ch_reset(cm, CM_CH_CAPT); snd_cmipci_mixer_write(cm, 0, 0); /* res...
[ 0, 0 ]
Linux Kernel
sound/pci/cs4281.c
static void snd_cs4281_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short val) { struct cs4281 *chip = ac97->private_data; int count; /* * Setup the AC97 control registers on the CS461x to send the * appropriate command to the AC97 to perform the read....
[ 0, 0 ]
Linux Kernel
sound/pci/cs4281.c
static int snd_cs4281_playback_open(struct snd_pcm_substream *substream) { struct cs4281 *chip = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct cs4281_dma *dma; dma = &chip->dma[0]; dma->substream = substream; dma->left_slot = 0; dma->right_slot = 1; run...
[ 0, 0 ]
Linux Kernel
sound/pci/cs4281.c
static int snd_cs4281_playback_close(struct snd_pcm_substream *substream) { struct cs4281_dma *dma = substream->runtime->private_data; dma->substream = NULL; return 0; }
[ 1, 0 ]
Linux Kernel
sound/pci/cs4281.c
static int snd_cs4281_info_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 = CS_VOL_MASK; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/cs4281.c
static void snd_cs4281_mixer_free_ac97_bus(struct snd_ac97_bus *bus) { struct cs4281 *chip = bus->private_data; chip->ac97_bus = NULL; }
[ 0, 0 ]
Linux Kernel
sound/pci/cs4281.c
static void snd_cs4281_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { struct cs4281 *chip = entry->private_data; snd_iprintf(buffer, "Cirrus Logic CS4281\n\n"); snd_iprintf(buffer, "Spurious half IRQs : %u\n", chip->spurious_dhtc_irq); snd_iprintf(b...
[ 0, 0 ]
Linux Kernel
sound/pci/cs4281.c
static void snd_cs4281_proc_init(struct cs4281 *chip) { struct snd_info_entry *entry; snd_card_ro_proc_new(chip->card, "cs4281", chip, snd_cs4281_proc_read); if (!snd_card_proc_new(chip->card, "cs4281_BA0", &entry)) { entry->content = SNDRV_INFO_CONTENT_DATA; entry->private_data = chip; entry->c.ops ...
[ 0, 0 ]
Linux Kernel
sound/pci/cs4281.c
static int snd_cs4281_gameport_open(struct gameport *gameport, int mode) { switch (mode) { #ifdef COOKED_MODE case GAMEPORT_MODE_COOKED: return 0; #endif case GAMEPORT_MODE_RAW: return 0; default: return -1; } return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/cs4281.c
static void snd_cs4281_free_gameport(struct cs4281 *chip) { if (chip->gameport) { gameport_unregister_port(chip->gameport); chip->gameport = NULL; } }
[ 0, 0 ]
Linux Kernel
sound/pci/cs4281.c
static void snd_cs4281_free(struct snd_card *card) { struct cs4281 *chip = card->private_data; snd_cs4281_free_gameport(chip); snd_cs4281_pokeBA0(chip, BA0_HIMR, 0x7fffffff); /* Stop the DLL Clock logic. */ snd_cs4281_pokeBA0(chip, BA0_CLKCR1, 0); /* Sound System Power Management - Turn Everything OFF */ ...
[ 0, 0 ]
Linux Kernel
sound/pci/cs4281.c
static int snd_cs4281_midi_input_close(struct snd_rawmidi_substream *substream) { struct cs4281 *chip = substream->rmidi->private_data; spin_lock_irq(&chip->reg_lock); chip->midcr &= ~(BA0_MIDCR_RXE | BA0_MIDCR_RIE); chip->midi_input = NULL; if (!(chip->uartm & CS4281_MODE_OUTPUT)) { snd_cs4281_midi_res...
[ 1, 0 ]