Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
sound/pci/rme9652/hdspm.c
static int hdspm_set_input_select(struct hdspm *hdspm, int out) { if (out) hdspm->control_register |= HDSPM_InputSelect0; else hdspm->control_register &= ~HDSPM_InputSelect0; hdspm_write(hdspm, HDSPM_controlRegister, hdspm->control_register); return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/rme9652/hdspm.c
static int hdspm_ds_wire(struct hdspm *hdspm) { return (hdspm->control_register & HDSPM_DS_DoubleWire) ? 1 : 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/rme9652/hdspm.c
static int snd_hdspm_info_ds_wire(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { static const char *const texts[] = {"Single", "Double"}; ENUMERATED_CTL_INFO(uinfo, texts); return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/rme9652/hdspm.c
static int snd_hdspm_info_qs_wire(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { static const char *const texts[] = {"Single", "Double", "Quad"}; ENUMERATED_CTL_INFO(uinfo, texts); return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/rme9652/hdspm.c
static int snd_hdspm_info_tristate(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { u32 regmask = kcontrol->private_value; static const char *const texts_spdif[] = {"Optical", "Coaxial", "Internal"}; static const char *const texts_levels[] = {"Hi Gain", "+4 dB...
[ 0, 0 ]
Linux Kernel
sound/pci/rme9652/hdspm.c
static int hdspm_madi_speedmode(struct hdspm *hdspm) { if (hdspm->control_register & HDSPM_QuadSpeed) return 2; if (hdspm->control_register & HDSPM_DoubleSpeed) return 1; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/rme9652/hdspm.c
static int snd_hdspm_put_madi_speedmode(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct hdspm *hdspm = snd_kcontrol_chip(kcontrol); int change; int val; if (!snd_hdspm_use_is_exclusive(hdspm)) return -EBUSY; val = ucontrol->value.integ...
[ 0, 0 ]
Linux Kernel
sound/pci/rme9652/hdspm.c
static int hdspm_madi_sync_check(struct hdspm *hdspm) { int status = hdspm_read(hdspm, HDSPM_statusRegister); if (status & HDSPM_madiLock) { if (status & HDSPM_madiSync) return 2; else return 1; } return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/rme9652/hdspm.c
static int hdspm_sync_in_sync_check(struct hdspm *hdspm) { int status, lock = 0, sync = 0; switch (hdspm->io_type) { case RayDAT: case AIO: status = hdspm_read(hdspm, HDSPM_RD_STATUS_3); lock = (status & 0x400) ? 1 : 0; sync = (status & 0x800) ? 1 : 0; break; case MADI: status = hdspm_...
[ 1, 0 ]
Linux Kernel
sound/pci/rme9652/hdspm.c
static int hdspm_aes_sync_check(struct hdspm *hdspm, int idx) { int status2, lock, sync; status2 = hdspm_read(hdspm, HDSPM_statusRegister2); lock = (status2 & (0x0080 >> idx)) ? 1 : 0; sync = (status2 & (0x8000 >> idx)) ? 1 : 0; if (sync) return 2; else if (lock) return 1; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/rme9652/hdspm.c
static int hdspm_tco_sync_check(struct hdspm *hdspm) { int status; if (hdspm->tco) { switch (hdspm->io_type) { case MADI: status = hdspm_read(hdspm, HDSPM_statusRegister); if (status & HDSPM_tcoLockMadi) { if (status & HDSPM_tcoSync) return 2; else return 1; ...
[ 0, 0 ]
Linux Kernel
sound/pci/rme9652/hdspm.c
static int snd_hdspm_get_tco_pull(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct hdspm *hdspm = snd_kcontrol_chip(kcontrol); ucontrol->value.enumerated.item[0] = hdspm->tco->pull; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/rme9652/hdspm.c
static int snd_hdspm_put_tco_word_term(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct hdspm *hdspm = snd_kcontrol_chip(kcontrol); if (hdspm->tco->term != ucontrol->value.integer.value[0]) { hdspm->tco->term = ucontrol->value.integer.value[0...
[ 1, 0 ]
Linux Kernel
sound/pci/rme9652/hdspm.c
static int hdspm_update_simple_mixer_controls(struct hdspm *hdspm) { int i; for (i = hdspm->ds_out_channels; i < hdspm->ss_out_channels; ++i) { if (hdspm->system_sample_rate > 48000) { hdspm->playback_mixer_ctls[i]->vd[0].access = SNDRV_CTL_ELEM_ACCESS_INACTIVE | SNDRV_CTL_ELEM_ACCESS_READ | ...
[ 1, 0 ]
Linux Kernel
sound/pci/rme9652/hdspm.c
static int snd_hdspm_ioctl(struct snd_pcm_substream *substream, unsigned int cmd, void *arg) { switch (cmd) { case SNDRV_PCM_IOCTL1_RESET: return snd_hdspm_reset(substream); case SNDRV_PCM_IOCTL1_CHANNEL_INFO: { struct snd_pcm_channel_info *info = arg; return snd_hdspm_ch...
[ 0, 0 ]
Linux Kernel
sound/pci/rme9652/hdspm.c
static inline int copy_u32_le(void __user *dest, void __iomem *src) { u32 val = readl(src); return copy_to_user(dest, &val, 4); }
[ 0, 0 ]
Linux Kernel
sound/pci/rme9652/hdspm.c
static int snd_hdspm_preallocate_memory(struct hdspm *hdspm) { struct snd_pcm *pcm; size_t wanted; pcm = hdspm->pcm; wanted = HDSPM_DMA_AREA_BYTES; snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, &hdspm->pci->dev, wanted, wanted); dev_dbg(hdspm->c...
[ 1, 0 ]
Linux Kernel
sound/pci/rme9652/hdspm.c
static int snd_hdspm_create_alsa_devices(struct snd_card *card, struct hdspm *hdspm) { int err, i; dev_dbg(card->dev, "Create card...\n"); err = snd_hdspm_create_pcm(card, hdspm); if (err < 0) return err; i = 0; while (i < hdspm->midiPorts) { err = snd_hds...
[ 0, 0 ]
Linux Kernel
sound/pci/rme9652/rme9652.c
static int rme9652_set_passthru(struct snd_rme9652 *rme9652, int onoff) { if (onoff) { rme9652_set_thru(rme9652, -1, 1); rme9652->control_register = RME9652_inp_0 | rme9652_encode_latency(7) | RME9652_start_bit; rme9652_reset_hw_pointer(rme9652); rme9652_write(rme9652, RME9652_control_regis...
[ 0, 0 ]
Linux Kernel
sound/pci/rme9652/rme9652.c
static void rme9652_spdif_write_byte(struct snd_rme9652 *rme9652, const int val) { long mask; long i; for (i = 0, mask = 0x80; i < 8; i++, mask >>= 1) { if (val & mask) rme9652_spdif_set_bit(rme9652, RME9652_SPDIF_WRITE, 1); else rme9652_spdif_set_bit(rme...
[ 1, 0 ]
Linux Kernel
sound/pci/rme9652/rme9652.c
static inline int rme9652_spdif_sample_rate(struct snd_rme9652 *s) { unsigned int rate_bits; if (rme9652_read(s, RME9652_status_register) & RME9652_ERF) { return -1; } if (s->hw_rev == 15) { int x, y, ret; x = rme9652_spdif_read_codec(s, 30); if (x != 0) y = 48000 * 64 / x; else ...
[ 1, 0 ]
Linux Kernel
sound/pci/rme9652/rme9652.c
static int snd_rme9652_control_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/pci/rme9652/rme9652.c
static int snd_rme9652_control_spdif_mask_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { ucontrol->value.iec958.status[0] = kcontrol->private_value; return 0; } #define RME9652_ADAT1_IN(xname, xindex) \ {.iface ...
[ 0, 0 ]
Linux Kernel
sound/pci/rme9652/rme9652.c
static int rme9652_set_adat1_input(struct snd_rme9652 *rme9652, int internal) { int restart = 0; if (internal) { rme9652->control_register |= RME9652_ADAT1_INTERNAL; } else { rme9652->control_register &= ~RME9652_ADAT1_INTERNAL; } /* XXX do we actually need to stop the card when we do this ? */ r...
[ 0, 1 ]
Linux Kernel
sound/pci/rme9652/rme9652.c
static int rme9652_spdif_out(struct snd_rme9652 *rme9652) { return (rme9652->control_register & RME9652_opt_out) ? 1 : 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/rme9652/rme9652.c
static int snd_rme9652_get_spdif_out(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_rme9652 *rme9652 = snd_kcontrol_chip(kcontrol); spin_lock_irq(&rme9652->lock); ucontrol->value.integer.value[0] = rme9652_spdif_out(rme9652); spin_unlock_i...
[ 0, 0 ]
Linux Kernel
sound/pci/rme9652/rme9652.c
static int rme9652_sync_mode(struct snd_rme9652 *rme9652) { if (rme9652->control_register & RME9652_wsel) { return 2; } else if (rme9652->control_register & RME9652_Master) { return 1; } else { return 0; } }
[ 0, 0 ]
Linux Kernel
sound/pci/rme9652/rme9652.c
static int snd_rme9652_info_sync_pref(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { static const char *const texts[4] = {"IEC958 In", "ADAT1 In", "ADAT2 In", "ADAT3 In"}; struct snd_rme9652 *rme9652 = snd_kcontrol_chip...
[ 0, 0 ]
Linux Kernel
sound/pci/rme9652/rme9652.c
static int snd_rme9652_get_thru(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_rme9652 *rme9652 = snd_kcontrol_chip(kcontrol); unsigned int k; u32 thru_bits = rme9652->thru_bits; for (k = 0; k < rme9652->ss_channels; ++k) { ucontrol->value....
[ 0, 0 ]
Linux Kernel
sound/pci/rme9652/rme9652.c
static int snd_rme9652_put_thru(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_rme9652 *rme9652 = snd_kcontrol_chip(kcontrol); int change; unsigned int chn; u32 thru_bits = 0; if (!snd_rme9652_use_is_exclusive(rme9652)) return -EBUSY; ...
[ 0, 0 ]
Linux Kernel
sound/pci/rme9652/rme9652.c
static int snd_rme9652_info_adat_sync(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { static const char *const texts[4] = {"No Lock", "Lock", "No Lock Sync", "Lock Sync"}; return snd_ctl_enum_info(uinfo, 1, 4, texts); }
[ 0, 0 ]
Linux Kernel
sound/pci/rme9652/rme9652.c
static int snd_rme9652_get_tc_value(void *private_data, snd_kswitch_t *kswitch, snd_switch_t *uswitch) { struct snd_rme9652 *s = (struct snd_rme9652 *)private_data; u32 value; int i; uswitch->type = SNDRV_SW_TYPE_DWORD; if ((rme9652_read(s, RME9652_status_register) & RME9...
[ 1, 1 ]
Linux Kernel
sound/pci/rme9652/rme9652.c
static int snd_rme9652_create_controls(struct snd_card *card, struct snd_rme9652 *rme9652) { unsigned int idx; int err; struct snd_kcontrol *kctl; for (idx = 0; idx < ARRAY_SIZE(snd_rme9652_controls); idx++) { kctl = snd_ctl_new1(&snd_rme9652_controls[idx], rme9652); ...
[ 1, 0 ]
Linux Kernel
sound/pci/rme9652/rme9652.c
static void snd_rme9652_card_free(struct snd_card *card) { struct snd_rme9652 *rme9652 = (struct snd_rme9652 *)card->private_data; if (rme9652->irq >= 0) rme9652_stop(rme9652); }
[ 0, 0 ]
Linux Kernel
sound/pci/rme9652/rme9652.c
static int snd_rme9652_playback_copy(struct snd_pcm_substream *substream, int channel, unsigned long pos, void __user *src, unsigned long count) { struct snd_rme9652 *rme9652 = snd_pcm_substream_chip(substream); signed char *channel_buf; ...
[ 0, 0 ]
Linux Kernel
sound/pci/rme9652/rme9652.c
static int snd_rme9652_playback_copy_kernel(struct snd_pcm_substream *substream, int channel, unsigned long pos, void *src, unsigned long count) { struct snd_rme9652 *rme9652 = snd_pcm_substream_chip(substream); signed char *ch...
[ 1, 0 ]
Linux Kernel
sound/pci/rme9652/rme9652.c
static int snd_rme9652_capture_copy_kernel(struct snd_pcm_substream *substream, int channel, unsigned long pos, void *dst, unsigned long count) { struct snd_rme9652 *rme9652 = snd_pcm_substream_chip(substream); signed char *chann...
[ 1, 0 ]
Linux Kernel
sound/pci/rme9652/rme9652.c
static int snd_rme9652_hw_rule_channels(struct snd_pcm_hw_params *params, struct snd_pcm_hw_rule *rule) { struct snd_rme9652 *rme9652 = rule->private; struct snd_interval *c = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); unsigned int list[2] = {rme9652->ds...
[ 1, 0 ]
Linux Kernel
sound/pci/rme9652/rme9652.c
static int snd_rme9652_capture_open(struct snd_pcm_substream *substream) { struct snd_rme9652 *rme9652 = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; spin_lock_irq(&rme9652->lock); snd_pcm_set_sync(substream); runtime->hw = snd_rme9652_capture_subinfo; snd_pc...
[ 0, 0 ]
Linux Kernel
sound/pci/sis7019.c
static void sis_update_sso(struct voice *voice, u16 period) { void __iomem *base = voice->ctrl_base; voice->sso += period; if (voice->sso >= voice->buffer_size) voice->sso -= voice->buffer_size; if (voice->sso < 8) voice->sso = 8; /* The SSO is in the upper 16 bits of the register. */ writew(voic...
[ 1, 0 ]
Linux Kernel
sound/pci/sis7019.c
static irqreturn_t sis_interrupt(int irq, void *dev) { struct sis7019 *sis = dev; unsigned long io = sis->ioport; struct voice *voice; u32 intr, status; intr = inl(io + SIS_GISR); intr &= SIS_GISR_AUDIO_PLAY_DMA_IRQ_STATUS | SIS_GISR_AUDIO_RECORD_DMA_IRQ_STATUS; if (!intr) return IRQ_NONE; d...
[ 1, 0 ]
Linux Kernel
sound/pci/sis7019.c
static int sis_capture_open(struct snd_pcm_substream *substream) { struct sis7019 *sis = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct voice *voice = &sis->capture_voice; unsigned long flags; /* FIXME: The driver only supports recording from one channel * ...
[ 0, 1 ]
Linux Kernel
sound/pci/sis7019.c
static int sis_capture_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *hw_params) { struct sis7019 *sis = snd_pcm_substream_chip(substream); int rc; rc = snd_ac97_set_rate(sis->ac97[0], AC97_PCM_LR_ADC_RATE, params_rate(hw_params...
[ 0, 0 ]
Linux Kernel
sound/pci/sis7019.c
static int sis_pcm_capture_prepare(struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; struct voice *voice = runtime->private_data; void __iomem *rec_base = voice->ctrl_base; u32 format, dma_addr, control; u16 leo; format = 0; if (snd_pcm_format_width(runtime->for...
[ 0, 0 ]
Linux Kernel
sound/pci/sis7019.c
static unsigned short sis_ac97_read(struct snd_ac97 *ac97, unsigned short reg) { static const u32 cmd[3] = { SIS_AC97_CMD_CODEC_READ, SIS_AC97_CMD_CODEC2_READ, SIS_AC97_CMD_CODEC3_READ, }; return sis_ac97_rw(ac97->private_data, ac97->num, (reg << 8) | cmd[ac97->num]); }
[ 0, 0 ]
Linux Kernel
sound/pci/sis7019.c
static int sis_suspend(struct device *dev) { struct snd_card *card = dev_get_drvdata(dev); struct sis7019 *sis = card->private_data; void __iomem *ioaddr = sis->ioaddr; int i; snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); if (sis->codecs_present & SIS_PRIMARY_CODEC_PRESENT) snd_ac97_suspend(sis-...
[ 0, 0 ]
Linux Kernel
sound/pci/sis7019.c
static int __snd_sis7019_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) { struct snd_card *card; struct sis7019 *sis; int rc; if (!enable) return -ENOENT; codecs &= SIS_PRIMARY_CODEC_PRESENT | SIS_SECONDARY_CODEC_PRESENT | SIS_TERTIARY_CODEC_PRE...
[ 1, 0 ]
Linux Kernel
sound/pci/sonicvibes.c
static inline void snd_sonicvibes_setdmaa(struct sonicvibes *sonic, unsigned int addr, unsigned int count) { count--; outl(addr, sonic->dmaa_port + SV_DMA_ADDR0); outl(count, sonic->dmaa_port + SV_DMA_COUNT0); outb(0x18, sonic->...
[ 1, 0 ]
Linux Kernel
sound/pci/sonicvibes.c
static inline unsigned int snd_sonicvibes_getdmac(struct sonicvibes *sonic) { return ((inl(sonic->dmac_port + SV_DMA_COUNT0) & 0xffffff) + 1) << 1; }
[ 0, 0 ]
Linux Kernel
sound/pci/sonicvibes.c
static void snd_sonicvibes_out1(struct sonicvibes *sonic, unsigned char reg, unsigned char value) { outb(reg, SV_REG(sonic, INDEX)); udelay(10); outb(value, SV_REG(sonic, DATA)); udelay(10); }
[ 0, 0 ]
Linux Kernel
sound/pci/sonicvibes.c
static int snd_sonicvibes_hw_constraint_dac_rate(struct snd_pcm_hw_params *params, struct snd_pcm_hw_rule *rule) { unsigned int rate, div, r, m, n; if (hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE)->min == hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE)->max) { ...
[ 0, 0 ]
Linux Kernel
sound/pci/sonicvibes.c
static int snd_sonicvibes_trigger(struct sonicvibes *sonic, int what, int cmd) { int result = 0; spin_lock(&sonic->reg_lock); if (cmd == SNDRV_PCM_TRIGGER_START) { if (!(sonic->enable & what)) { sonic->enable |= what; snd_sonicvibes_out1(sonic, SV_IREG_PC_ENABLE, sonic->enable); } } else i...
[ 0, 0 ]
Linux Kernel
sound/pci/sonicvibes.c
static snd_pcm_uframes_t snd_sonicvibes_capture_pointer(struct snd_pcm_substream *substream) { struct sonicvibes *sonic = snd_pcm_substream_chip(substream); size_t ptr; if (!(sonic->enable & 2)) return 0; ptr = sonic->c_dma_size - snd_sonicvibes_getdmac(sonic); return bytes_to_frames(substream->runtime, ...
[ 0, 0 ]
Linux Kernel
sound/pci/sonicvibes.c
static int snd_sonicvibes_get_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct sonicvibes *sonic = snd_kcontrol_chip(kcontrol); spin_lock_irq(&sonic->reg_lock); ucontrol->value.enumerated.item[0] = ((snd_sonicvibes_in1(sonic, SV_IREG_LEFT_A...
[ 0, 0 ]
Linux Kernel
sound/pci/sonicvibes.c
static int snd_sonicvibes_put_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct sonicvibes *sonic = snd_kcontrol_chip(kcontrol); unsigned short left, right, oval1, oval2; int change; if (ucontrol->value.enumerated.item[0] >= 7 || ucontrol-...
[ 1, 0 ]
Linux Kernel
sound/pci/sonicvibes.c
static int snd_sonicvibes_mixer(struct sonicvibes *sonic) { struct snd_card *card; struct snd_kcontrol *kctl; unsigned int idx; int err; if (snd_BUG_ON(!sonic || !sonic->card)) return -EINVAL; card = sonic->card; strcpy(card->mixername, "S3 SonicVibes"); for (idx = 0; idx < ARRAY_SIZE(snd_sonicvi...
[ 1, 0 ]
Linux Kernel
sound/pci/sonicvibes.c
static inline int snd_sonicvibes_create_gameport(struct sonicvibes *sonic) { return -ENOSYS; }
[ 0, 0 ]
Linux Kernel
sound/pci/trident/trident_main.c
static void snd_trident_disable_eso(struct snd_trident *trident) { unsigned int tmp; tmp = inl(TRID_REG(trident, T4D_LFO_GC_CIR)); tmp &= ~ENDLP_IE; tmp &= ~MIDLP_IE; outl(tmp, TRID_REG(trident, T4D_LFO_GC_CIR)); }
[ 0, 0 ]
Linux Kernel
sound/pci/trident/trident_main.c
static int snd_trident_allocate_pcm_channel(struct snd_trident *trident) { int idx; if (trident->ChanPCMcnt >= trident->ChanPCM) return -1; for (idx = 31; idx >= 0; idx--) { if (!(trident->ChanMap[T4D_BANK_B] & (1 << idx))) { trident->ChanMap[T4D_BANK_B] |= 1 << idx; trident->ChanPCMcnt++; ...
[ 0, 0 ]
Linux Kernel
sound/pci/trident/trident_main.c
static void snd_trident_free_synth_channel(struct snd_trident *trident, int channel) { if (channel < 0 || channel > 31) return; channel &= 0x1f; if (trident->ChanMap[T4D_BANK_A] & (1 << channel)) { trident->ChanMap[T4D_BANK_A] &= ~(1 << channel); trident->syn...
[ 1, 0 ]
Linux Kernel
sound/pci/trident/trident_main.c
static void snd_trident_write_pan_reg(struct snd_trident *trident, struct snd_trident_voice *voice, unsigned int Pan) { voice->Pan = Pan; outb(voice->number, TRID_REG(trident, T4D_LFO_GC_CIR)); outb(((voice->GVSel & 0x01) << 7) | (voice->...
[ 0, 0 ]
Linux Kernel
sound/pci/trident/trident_main.c
static void snd_trident_write_cvol_reg(struct snd_trident *trident, struct snd_trident_voice *voice, unsigned int CVol) { voice->CVol = CVol; outb(voice->number, TRID_REG(trident, T4D_LFO_GC_CIR)); outw(((voice->FMC & 0x0003) << 14) | (...
[ 1, 0 ]
Linux Kernel
sound/pci/trident/trident_main.c
static int snd_trident_playback_open(struct snd_pcm_substream *substream) { struct snd_trident *trident = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct snd_trident_voice *voice; voice = snd_trident_alloc_voice(trident, SNDRV_TRIDENT_VOICE_TYPE_PCM, 0, 0); if...
[ 0, 0 ]
Linux Kernel
sound/pci/trident/trident_main.c
static int snd_trident_playback_close(struct snd_pcm_substream *substream) { struct snd_trident *trident = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct snd_trident_voice *voice = runtime->private_data; snd_trident_pcm_mixer_free(trident, voice, substream); r...
[ 0, 0 ]
Linux Kernel
sound/pci/trident/trident_main.c
static int snd_trident_spdif_close(struct snd_pcm_substream *substream) { struct snd_trident *trident = snd_pcm_substream_chip(substream); unsigned int temp; spin_lock_irq(&trident->reg_lock); if (trident->device != TRIDENT_DEVICE_ID_SI7018) { outb(trident->spdif_ctrl, TRID_REG(trident, NX_SPCTRL_SPCSO + ...
[ 1, 0 ]
Linux Kernel
sound/pci/trident/trident_main.c
static int snd_trident_capture_close(struct snd_pcm_substream *substream) { return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/trident/trident_main.c
int snd_trident_pcm(struct snd_trident *trident, int device) { struct snd_pcm *pcm; int err; err = snd_pcm_new(trident->card, "trident_dx_nx", device, trident->ChanPCM, 1, &pcm); if (err < 0) return err; pcm->private_data = trident; if (trident->tlb.entries) { snd_pcm_set_ops(...
[ 1, 0 ]
Linux Kernel
sound/pci/trident/trident_main.c
int snd_trident_foldback_pcm(struct snd_trident *trident, int device) { struct snd_pcm *foldback; int err; int num_chan = 3; struct snd_pcm_substream *substream; if (trident->device == TRIDENT_DEVICE_ID_NX) num_chan = 4; err = snd_pcm_new(trident->card, "trident_dx_nx", device, 0, num_chan, ...
[ 1, 0 ]
Linux Kernel
sound/pci/trident/trident_main.c
static int snd_trident_spdif_control_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_trident *trident = snd_kcontrol_chip(kcontrol); unsigned char val; spin_lock_irq(&trident->reg_lock); val = trident->spdif_ctrl; ucontrol->value....
[ 0, 0 ]
Linux Kernel
sound/pci/trident/trident_main.c
static int snd_trident_spdif_mask_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/trident/trident_main.c
static int snd_trident_vol_control_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/trident/trident_main.c
static int snd_trident_vol_control_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_trident *trident = snd_kcontrol_chip(kcontrol); unsigned int val; int change = 0; spin_lock_irq(&trident->reg_lock); val = trident->musicvol_wavevol;...
[ 0, 0 ]
Linux Kernel
sound/pci/trident/trident_main.c
static int snd_trident_pcm_rvol_control_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 = 127; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/trident/trident_main.c
static int snd_trident_pcm_cvol_control_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_trident *trident = snd_kcontrol_chip(kcontrol); struct snd_trident_pcm_mixer *mix = &trident->pcm_mixer[snd_ctl_get_ioffnum(kcontrol, &ucontrol->id)]; ...
[ 0, 0 ]
Linux Kernel
sound/pci/trident/trident_main.c
static int snd_trident_pcm_cvol_control_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_trident *trident = snd_kcontrol_chip(kcontrol); struct snd_trident_pcm_mixer *mix = &trident->pcm_mixer[snd_ctl_get_ioffnum(kcontrol, &ucontrol->id)]; ...
[ 0, 0 ]
Linux Kernel
sound/pci/trident/trident_main.c
static void snd_trident_notify_pcm_change1(struct snd_card *card, struct snd_kcontrol *kctl, int num, int activate) { struct snd_ctl_elem_id id; if (!kctl) return; if (activate) kctl->vd[num].access &= ~SNDRV_CTL_ELEM_...
[ 0, 0 ]
Linux Kernel
sound/pci/trident/trident_main.c
static int snd_trident_pcm_mixer_free(struct snd_trident *trident, struct snd_trident_voice *voice, struct snd_pcm_substream *substream) { struct snd_trident_pcm_mixer *tmix; if (snd_BUG_ON(!trident || !substream)) return -EINVAL; t...
[ 0, 0 ]
Linux Kernel
sound/pci/trident/trident_main.c
static unsigned char snd_trident_gameport_read(struct gameport *gameport) { struct snd_trident *chip = gameport_get_port_data(gameport); if (snd_BUG_ON(!chip)) return 0; return inb(TRID_REG(chip, GAMEPORT_LEGACY)); }
[ 0, 0 ]
Linux Kernel
sound/pci/trident/trident_main.c
int snd_trident_create_gameport(struct snd_trident *chip) { struct gameport *gp; chip->gameport = gp = gameport_allocate_port(); if (!gp) { dev_err(chip->card->dev, "cannot allocate memory for gameport\n"); return -ENOMEM; } gameport_set_name(gp, "Trident 4DWave"); gameport_set_phys(gp, "pci%s/ga...
[ 0, 0 ]
Linux Kernel
sound/pci/trident/trident_main.c
static inline void snd_trident_free_gameport(struct snd_trident *chip) { if (chip->gameport) { gameport_unregister_port(chip->gameport); chip->gameport = NULL; } } #else
[ 0, 0 ]
Linux Kernel
sound/pci/trident/trident_main.c
static int snd_trident_4d_dx_init(struct snd_trident *trident) { struct pci_dev *pci = trident->pci; unsigned long end_time; pci_write_config_dword(pci, 0x40, 0); /* DDMA */ pci_write_config_byte(pci, 0x44, 0); /* ports */ pci_write_config_byte(pci, 0x45, 0); /* Legacy DMA */ pci_write_config_byte(pci, 0...
[ 1, 0 ]
Linux Kernel
sound/pci/trident/trident_main.c
void snd_trident_free_voice(struct snd_trident *trident, struct snd_trident_voice *voice) { unsigned long flags; void (*private_free)(struct snd_trident_voice *); if (voice == NULL || !voice->use) return; snd_trident_clear_voices(trident, voice->number, voice->number); spin_l...
[ 1, 0 ]
Linux Kernel
sound/pci/trident/trident_memory.c
int snd_trident_free_pages(struct snd_trident *trident, struct snd_util_memblk *blk) { struct snd_util_memhdr *hdr; int page; if (snd_BUG_ON(!trident || !blk)) return -EINVAL; hdr = trident->tlb.memhdr; mutex_lock(&hdr->block_mutex); for (page = firstpg(blk); page <= lastpg...
[ 0, 0 ]
Linux Kernel
sound/pci/via82xx.c
static int clean_via_table(struct viadev *dev, struct snd_pcm_substream *substream, struct pci_dev *pci) { if (dev->table.area) { snd_dma_free_pages(&dev->table); dev->table.area = NULL; } kfree(dev->idx_table); dev->idx_table = NULL; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/via82xx.c
static inline unsigned int snd_via82xx_codec_xread(struct via82xx *chip) { return inl(VIAREG(chip, AC97)); }
[ 0, 0 ]
Linux Kernel
sound/pci/via82xx.c
static irqreturn_t snd_via686_interrupt(int irq, void *dev_id) { struct via82xx *chip = dev_id; unsigned int status; unsigned int i; status = inl(VIAREG(chip, SGD_SHADOW)); if (!(status & chip->intr_mask)) { if (chip->rmidi) return snd_mpu401_uart_interrupt(irq, chip->rmidi->private_data); ret...
[ 1, 0 ]
Linux Kernel
sound/pci/via82xx.c
static snd_pcm_uframes_t snd_via686_pcm_pointer(struct snd_pcm_substream *substream) { struct via82xx *chip = snd_pcm_substream_chip(substream); struct viadev *viadev = substream->runtime->private_data; unsigned int idx, ptr, count, res; if (snd_BUG_ON(!viadev->tbl_entries)) return 0; if (!(inb(VIADEV_RE...
[ 1, 0 ]
Linux Kernel
sound/pci/via82xx.c
static snd_pcm_uframes_t snd_via8233_pcm_pointer(struct snd_pcm_substream *substream) { struct via82xx *chip = snd_pcm_substream_chip(substream); struct viadev *viadev = substream->runtime->private_data; unsigned int idx, count, res; int status; if (snd_BUG_ON(!viadev->tbl_entries)) return 0; spin_loc...
[ 1, 0 ]
Linux Kernel
sound/pci/via82xx.c
static int via_lock_rate(struct via_rate_lock *rec, int rate) { int changed = 0; spin_lock_irq(&rec->lock); if (rec->rate != rate) { if (rec->rate && rec->used > 1) changed = -EINVAL; else { rec->rate = rate; changed = 1; } } spin_unlock_irq(&rec->lock); return changed; }
[ 1, 0 ]
Linux Kernel
sound/pci/via82xx.c
static int snd_via8233_multi_open(struct snd_pcm_substream *substream) { struct via82xx *chip = snd_pcm_substream_chip(substream); struct viadev *viadev = &chip->devs[chip->multi_devno]; int err; static const unsigned int channels[] = {1, 2, 4, 6}; static const struct snd_pcm_hw_constraint_list hw_constraint...
[ 1, 0 ]
Linux Kernel
sound/pci/via82xx.c
static int snd_via686_pcm_new(struct via82xx *chip) { struct snd_pcm *pcm; int err; chip->playback_devno = 0; chip->capture_devno = 1; chip->num_devs = 2; chip->intr_mask = 0x77; err = snd_pcm_new(chip->card, chip->card->shortname, 0, 1, 1, &pcm); if (err < 0) return err; snd_pcm_set_ops(pcm, SN...
[ 1, 0 ]
Linux Kernel
sound/pci/via82xx.c
static int snd_via8233_dxs_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 = VIA_DXS_MAX_VOLUME; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/via82xx.c
static int snd_via8233_pcmdxs_volume_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct via82xx *chip = snd_kcontrol_chip(kcontrol); unsigned int idx; unsigned char val; int i, change = 0; for (i = 0; i < 2; i++) { val = ucontrol->va...
[ 1, 0 ]
Linux Kernel
sound/pci/via82xx.c
static int snd_via82xx_mixer_new(struct via82xx *chip, const char *quirk_override) { struct snd_ac97_template ac97; int err; static const struct snd_ac97_bus_ops ops = { .write = snd_via82xx_codec_write, .read = snd_via82xx_codec_read, .wait = snd_via82xx_codec_w...
[ 1, 0 ]
Linux Kernel
sound/pci/via82xx.c
static inline int snd_via686_create_gameport(struct via82xx *chip, unsigned char *legacy) { return -ENOSYS; }
[ 0, 0 ]
Linux Kernel
sound/pci/via82xx.c
static void snd_via82xx_free(struct snd_card *card) { struct via82xx *chip = card->private_data; unsigned int i; for (i = 0; i < chip->num_devs; i++) snd_via82xx_channel_reset(chip, &chip->devs[i]); if (chip->chip_type == TYPE_VIA686) { snd_via686_free_gameport(chip); pci_write_config_byte(chip->p...
[ 0, 0 ]
Linux Kernel
sound/pci/via82xx.c
static int check_dxs_list(struct pci_dev *pci, int revision) { const struct snd_pci_quirk *w; w = snd_pci_quirk_lookup(pci, dxs_allowlist); if (w) { dev_dbg(&pci->dev, "DXS allow list for %s found\n", snd_pci_quirk_name(w)); return w->value; } if (revision >= VIA_REV_8235) return VIA_DXS_SRC; ...
[ 0, 0 ]
Linux Kernel
sound/pci/via82xx_modem.c
static inline unsigned int snd_via82xx_codec_xread(struct via82xx_modem *chip) { return inl(VIAREG(chip, AC97)); }
[ 0, 0 ]
Linux Kernel
sound/pci/via82xx_modem.c
static void snd_via82xx_codec_wait(struct snd_ac97 *ac97) { struct via82xx_modem *chip = ac97->private_data; __always_unused int err; err = snd_via82xx_codec_ready(chip, ac97->num); msleep(500); }
[ 0, 0 ]
Linux Kernel
sound/pci/via82xx_modem.c
static int snd_via82xx_modem_pcm_open(struct via82xx_modem *chip, struct viadev *viadev, struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; int err; static const unsigned int rates[] = {8000, 9600...
[ 1, 0 ]