Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | sound/pci/cs4281.c |
static int __snd_cs4281_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id) {
static int dev;
struct snd_card *card;
struct cs4281 *chip;
struct snd_opl3 *opl3;
int err;
if (dev >= SNDRV_CARDS)
return -ENODEV;
if (!enable[dev]) {
dev++;
return -ENOENT... | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c | int snd_cs46xx_download(struct snd_cs46xx *chip, u32 *src, unsigned long offset,
unsigned long len) {
void __iomem *dst;
unsigned int bank = offset >> 16;
offset = offset & 0xffff;
if (snd_BUG_ON((offset & 3) || (len & 3)))
return -EINVAL;
dst = chip->region.idx[bank + 1].remap_ad... | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c |
static inline void memcpy_le32(void *dst, const void *src, unsigned int len) {
#ifdef __LITTLE_ENDIAN
memcpy(dst, src, len);
#else
u32 *_dst = dst;
const __le32 *_src = src;
len /= 4;
while (len-- > 0)
*_dst++ = le32_to_cpu(*_src++);
#endif
}
#ifdef CONFIG_SND_CS46XX_NEW_DSP | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c | int snd_cs46xx_download_image(struct snd_cs46xx *chip) {
int idx, err;
unsigned int offset = 0;
struct ba1_struct *ba1 = chip->ba1;
for (idx = 0; idx < BA1_MEMORY_COUNT; idx++) {
err = snd_cs46xx_download(chip, &ba1->map[offset], ba1->memory[idx].offset,
ba1->memory[idx].size)... | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c | static void snd_cs46xx_reset(struct snd_cs46xx *chip) {
int idx;
snd_cs46xx_poke(chip, BA1_SPCR, SPCR_RSTSP);
/*
* Write the control register.
*/
snd_cs46xx_poke(chip, BA1_SPCR, SPCR_DRQEN);
/*
* Clear the trap registers.
*/
for (idx = 0; idx < 8; idx++) {
snd_cs46xx_poke(chip, BA1_DREG... | [
0,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c | static int cs46xx_wait_for_fifo(struct snd_cs46xx *chip, int retry_timeout) {
u32 i, status = 0;
for (i = 0; i < 50; i++) {
status = snd_cs46xx_peekBA0(chip, BA0_SERBST);
if (!(status & SERBST_WBSY))
break;
mdelay(retry_timeout);
}
if (status & SERBST_WBSY) {
dev_err(chip->card->dev, "... | [
0,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c |
static int snd_cs46xx_playback_transfer(struct snd_pcm_substream *substream) {
struct snd_pcm_runtime *runtime = substream->runtime;
struct snd_cs46xx_pcm *cpcm = runtime->private_data;
return snd_pcm_indirect_playback_transfer(substream, &cpcm->pcm_rec,
snd_cs46xx_pb_... | [
0,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c |
static snd_pcm_uframes_t
snd_cs46xx_playback_direct_pointer(struct snd_pcm_substream *substream) {
struct snd_cs46xx *chip = snd_pcm_substream_chip(substream);
size_t ptr;
struct snd_cs46xx_pcm *cpcm = substream->runtime->private_data;
if (snd_BUG_ON(!cpcm->pcm_channel))
return -ENXIO;
#ifdef CONFIG_SND_... | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c |
static snd_pcm_uframes_t
snd_cs46xx_playback_indirect_pointer(struct snd_pcm_substream *substream) {
struct snd_cs46xx *chip = snd_pcm_substream_chip(substream);
size_t ptr;
struct snd_cs46xx_pcm *cpcm = substream->runtime->private_data;
#ifdef CONFIG_SND_CS46XX_NEW_DSP
if (snd_BUG_ON(!cpcm->pcm_channel))
... | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c |
static int snd_cs46xx_capture_trigger(struct snd_pcm_substream *substream,
int cmd) {
struct snd_cs46xx *chip = snd_pcm_substream_chip(substream);
unsigned int tmp;
int result = 0;
spin_lock(&chip->reg_lock);
switch (cmd) {
case SNDRV_PCM_TRIGGER_START:
case SNDRV_P... | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c | static int _cs46xx_playback_open_channel(struct snd_pcm_substream *substream,
int pcm_channel_id) {
struct snd_cs46xx *chip = snd_pcm_substream_chip(substream);
struct snd_cs46xx_pcm *cpcm;
struct snd_pcm_runtime *runtime = substream->runtime;
cpcm = kzalloc(sizeof(*cpc... | [
1,
1
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c | static int snd_cs46xx_playback_open_rear(struct snd_pcm_substream *substream) {
dev_dbg(substream->pcm->card->dev, "open rear channel\n");
return _cs46xx_playback_open_channel(substream, DSP_PCM_REAR_CHANNEL);
} | [
0,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c |
static int
snd_cs46xx_playback_open_iec958(struct snd_pcm_substream *substream) {
struct snd_cs46xx *chip = snd_pcm_substream_chip(substream);
dev_dbg(chip->card->dev, "open raw iec958 channel\n");
mutex_lock(&chip->spos_mutex);
cs46xx_iec958_pre_open(chip);
mutex_unlock(&chip->spos_mutex);
return _cs46... | [
0,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c |
static int
snd_cs46xx_playback_close_iec958(struct snd_pcm_substream *substream) {
int err;
struct snd_cs46xx *chip = snd_pcm_substream_chip(substream);
dev_dbg(chip->card->dev, "close raw iec958 channel\n");
err = snd_cs46xx_playback_close(substream);
mutex_lock(&chip->spos_mutex);
cs46xx_iec958_post_c... | [
0,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c | int snd_cs46xx_pcm_rear(struct snd_cs46xx *chip, int device) {
struct snd_pcm *pcm;
int err;
err = snd_pcm_new(chip->card, "CS46xx - Rear", device, MAX_PLAYBACK_CHANNELS,
0, &pcm);
if (err < 0)
return err;
pcm->private_data = chip;
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK,
... | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c | int snd_cs46xx_pcm_iec958(struct snd_cs46xx *chip, int device) {
struct snd_pcm *pcm;
int err;
err = snd_pcm_new(chip->card, "CS46xx - IEC958", device, 1, 0, &pcm);
if (err < 0)
return err;
pcm->private_data = chip;
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK,
&snd_cs46xx_playbac... | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c | static void snd_cs46xx_mixer_free_ac97(struct snd_ac97 *ac97) {
struct snd_cs46xx *chip = ac97->private_data;
if (snd_BUG_ON(ac97 != chip->ac97[CS46XX_PRIMARY_CODEC_INDEX] &&
ac97 != chip->ac97[CS46XX_SECONDARY_CODEC_INDEX]))
return;
if (ac97 == chip->ac97[CS46XX_PRIMARY_CODEC_INDEX]) {
... | [
0,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c |
static int snd_cs46xx_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 = 0x7fff;
return 0;
} | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c |
static int snd_cs46xx_vol_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
int reg = kcontrol->private_value;
unsigned int val = snd_cs46xx_peek(chip, reg);
ucontrol->value.integer.value[0] = 0xffff - ... | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c |
static int snd_cs46xx_vol_dac_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
ucontrol->value.integer.value[0] = chip->dsp_spos_instance->dac_volume_left;
ucontrol->value.integer.value[1] = chip->d... | [
0,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c |
static int snd_cs46xx_vol_dac_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
int change = 0;
if (chip->dsp_spos_instance->dac_volume_right !=
ucontrol->value.integer.value[0] ||
ch... | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c | static int snd_cs46xx_iec958_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
int change, res;
switch (kcontrol->private_value) {
case CS46XX_MIXER_SPDIF_OUTPUT_ELEMENT:
mutex_lock(&chip->spos_m... | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c |
static int snd_cs46xx_adc_capture_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
struct dsp_spos_instance *ins = chip->dsp_spos_instance;
int change = 0;
if (ucontrol->value.integer.value[0]... | [
0,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c |
static int snd_cs46xx_pcm_capture_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
struct dsp_spos_instance *ins = chip->dsp_spos_instance;
if (ins->pcm_input != NULL)
ucontrol->value.intege... | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c | static int snd_herc_spdif_select_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
int val1 = snd_cs46xx_peekBA0(chip, BA0_EGPIODR);
int val2 = snd_cs46xx_peekBA0(chip, BA0_EGPIOPTR);
if (ucontro... | [
0,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c |
static int snd_cs46xx_spdif_stream_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
struct dsp_spos_instance *ins = chip->dsp_spos_instance;
mutex_lock(&chip->spos_mutex);
ucontrol->value.iec... | [
0,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c | static int snd_cs46xx_spdif_stream_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
struct dsp_spos_instance *ins = chip->dsp_spos_instance;
unsigned int val;
int change;
mutex_lock(&chip->s... | [
0,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c | static int snd_cs46xx_front_dup_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
unsigned short val;
val = snd_ac97_read(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX], AC97_CSR_ACMODE);
ucontrol->value.i... | [
0,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c |
static int snd_cs46xx_front_dup_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
return snd_ac97_update_bits(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX],
AC97_CSR_ACMODE, 0x2... | [
0,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c |
static int cs46xx_detect_codec(struct snd_cs46xx *chip, int codec) {
int idx, err;
struct snd_ac97_template ac97;
memset(&ac97, 0, sizeof(ac97));
ac97.private_data = chip;
ac97.private_free = snd_cs46xx_mixer_free_ac97;
ac97.num = codec;
if (chip->amplifier_ctrl == amp_voyetra)
ac97.scaps = AC97_SCA... | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c |
static int
snd_cs46xx_midi_input_close(struct snd_rawmidi_substream *substream) {
struct snd_cs46xx *chip = substream->rmidi->private_data;
spin_lock_irq(&chip->reg_lock);
chip->midcr &= ~(MIDCR_RXE | MIDCR_RIE);
chip->midi_input = NULL;
if (!(chip->uartm & CS46XX_MODE_OUTPUT)) {
snd_cs46xx_midi_reset(c... | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c |
static int
snd_cs46xx_midi_output_open(struct snd_rawmidi_substream *substream) {
struct snd_cs46xx *chip = substream->rmidi->private_data;
chip->active_ctrl(chip, 1);
spin_lock_irq(&chip->reg_lock);
chip->uartm |= CS46XX_MODE_OUTPUT;
chip->midcr |= MIDCR_TXE;
chip->midi_output = substream;
if (!(chip-... | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c | static void
snd_cs46xx_midi_output_trigger(struct snd_rawmidi_substream *substream,
int up) {
unsigned long flags;
struct snd_cs46xx *chip = substream->rmidi->private_data;
unsigned char byte;
spin_lock_irqsave(&chip->reg_lock, flags);
if (up) {
if ((chip->midcr & MIDCR_TIE... | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c | static unsigned char snd_cs46xx_gameport_read(struct gameport *gameport) {
struct snd_cs46xx *chip = gameport_get_port_data(gameport);
if (snd_BUG_ON(!chip))
return 0;
return snd_cs46xx_peekBA0(chip, BA0_JSPT);
} | [
0,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c |
static inline void snd_cs46xx_remove_gameport(struct snd_cs46xx *chip) {
if (chip->gameport) {
gameport_unregister_port(chip->gameport);
chip->gameport = NULL;
}
}
#else | [
0,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c | int snd_cs46xx_gameport(struct snd_cs46xx *chip) { return -ENOSYS; } | [
0,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c |
static int snd_cs46xx_proc_init(struct snd_card *card,
struct snd_cs46xx *chip) {
struct snd_info_entry *entry;
int idx;
for (idx = 0; idx < 5; idx++) {
struct snd_cs46xx_region *region = &chip->region.idx[idx];
if (!snd_card_proc_new(card, region->name, &entry)) {
... | [
0,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c | static void snd_cs46xx_free(struct snd_card *card) {
struct snd_cs46xx *chip = card->private_data;
#ifdef CONFIG_SND_CS46XX_NEW_DSP
int idx;
#endif
if (chip->active_ctrl)
chip->active_ctrl(chip, 1);
snd_cs46xx_remove_gameport(chip);
if (chip->amplifier_ctrl)
chip->amplifier_ctrl(chip, -chip->amplif... | [
0,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c | static void cs46xx_enable_stream_irqs(struct snd_cs46xx *chip) {
unsigned int tmp;
snd_cs46xx_pokeBA0(chip, BA0_HICR, HICR_IEV | HICR_CHGM);
tmp = snd_cs46xx_peek(chip, BA1_PFIE);
tmp &= ~0x0000f03f;
snd_cs46xx_poke(chip, BA1_PFIE, tmp);
tmp = snd_cs46xx_peek(chip, BA1_CIE);
tmp &= ~0x0000003f;
tmp |... | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c | static void amp_voyetra(struct snd_cs46xx *chip, int change) {
#ifdef CONFIG_SND_CS46XX_NEW_DSP
int old = chip->amplifier;
#endif
int oval, val;
chip->amplifier += change;
oval =
snd_cs46xx_codec_read(chip, AC97_POWERDOWN, CS46XX_PRIMARY_CODEC_INDEX);
val = oval;
if (chip->amplifier) {
/* Turn t... | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/cs46xx_lib.c | static void clkrun_init(struct snd_cs46xx *chip) {
struct pci_dev *pdev;
u8 pp;
chip->acpi_port = 0;
pdev =
pci_get_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3, NULL);
if (pdev == NULL)
return;
/* Find the control port */
pci_read_config_byte(pdev, 0x41, &pp);
chip->acpi_port ... | [
0,
0
] |
Linux Kernel | sound/pci/cs46xx/dsp_spos.c |
static int find_free_symbol_index(struct dsp_spos_instance *ins) {
int index = ins->symbol_table.nsymbols, i;
for (i = ins->symbol_table.highest_frag_index; i < ins->symbol_table.nsymbols;
++i) {
if (ins->symbol_table.symbols[i].deleted) {
index = i;
break;
}
}
return index;
} | [
0,
0
] |
Linux Kernel | sound/pci/cs46xx/dsp_spos.c | static struct dsp_symbol_entry *
add_symbol(struct snd_cs46xx *chip, char *symbol_name, u32 address, int type) {
struct dsp_spos_instance *ins = chip->dsp_spos_instance;
struct dsp_symbol_entry *symbol = NULL;
int index;
if (ins->symbol_table.nsymbols == (DSP_MAX_SYMBOLS - 1)) {
dev_err(chip->card->dev, "d... | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/dsp_spos.c |
static int dsp_load_parameter(struct snd_cs46xx *chip,
struct dsp_segment_desc *parameter) {
u32 doffset, dsize;
if (!parameter) {
dev_dbg(chip->card->dev, "dsp_spos: module got no parameter segment\n");
return 0;
}
doffset = (parameter->offset * 4 + DSP_PARAMETER_BYTE_O... | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/dsp_spos.c |
struct dsp_symbol_entry *cs46xx_dsp_lookup_symbol(struct snd_cs46xx *chip,
char *symbol_name,
int symbol_type) {
int i;
struct dsp_spos_instance *ins = chip->dsp_spos_instance;
for (i = 0; i < ins->symbol_table.n... | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/dsp_spos.c |
static void cs46xx_dsp_proc_task_tree_read(struct snd_info_entry *entry,
struct snd_info_buffer *buffer) {
struct snd_cs46xx *chip = entry->private_data;
struct dsp_spos_instance *ins = chip->dsp_spos_instance;
int i, j, col;
void __iomem *dst =
chip->region.idx... | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/dsp_spos.c |
static int find_free_scb_index(struct dsp_spos_instance *ins) {
int index = ins->nscb, i;
for (i = ins->scb_highest_frag_index; i < ins->nscb; ++i) {
if (ins->scbs[i].deleted) {
index = i;
break;
}
}
return index;
} | [
0,
0
] |
Linux Kernel | sound/pci/cs46xx/dsp_spos.c | static struct dsp_task_descriptor *
_map_task_tree(struct snd_cs46xx *chip, char *name, u32 dest, u32 size) {
struct dsp_spos_instance *ins = chip->dsp_spos_instance;
struct dsp_task_descriptor *desc = NULL;
if (ins->ntask == DSP_MAX_TASK_DESC - 1) {
dev_err(chip->card->dev, "dsp_spos: got no place for other... | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/dsp_spos.c | int cs46xx_poke_via_dsp(struct snd_cs46xx *chip, u32 address, u32 data) {
u32 temp;
int i;
if (address < 0x8000 || address >= 0x9000)
return -EINVAL;
/* initialize the SP_IO_WRITE SCB with the data. */
temp = (address << 16) |
(address & 0x0000FFFF); /* offset 0 <-- address2 : address1 */
sn... | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/dsp_spos.h | static inline u8 _wrap_all_bits(u8 val) {
u8 wrapped;
wrapped = ((val & 0x1) << 7) | ((val & 0x2) << 5) | ((val & 0x4) << 3) |
((val & 0x8) << 1) | ((val & 0x10) >> 1) | ((val & 0x20) >> 3) |
((val & 0x40) >> 5) | ((val & 0x80) >> 7);
return wrapped;
} | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/dsp_spos.h | static inline void cs46xx_dsp_spos_update_scb(struct snd_cs46xx *chip,
struct dsp_scb_descriptor *scb) {
snd_cs46xx_poke(chip, (scb->address + SCBsubListPtr) << 2,
(scb->sub_list_ptr->address << 0x10) |
(scb->next_scb_ptr->address)... | [
0,
0
] |
Linux Kernel | sound/pci/cs46xx/dsp_spos.h |
static inline void cs46xx_dsp_scb_set_volume(struct snd_cs46xx *chip,
struct dsp_scb_descriptor *scb,
u16 left, u16 right) {
unsigned int val = ((0xffff - left) << 16 | (0xffff - right));
snd_cs46xx_poke(chip, (scb->address ... | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/dsp_spos_scb_lib.c | static void cs46xx_dsp_proc_scb_info_read(struct snd_info_entry *entry,
struct snd_info_buffer *buffer) {
struct proc_scb_info *scb_info = entry->private_data;
struct dsp_scb_descriptor *scb = scb_info->scb_desc;
struct snd_cs46xx *chip = scb_info->chip;
int j, col;
v... | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/dsp_spos_scb_lib.c | static void _dsp_unlink_scb(struct snd_cs46xx *chip,
struct dsp_scb_descriptor *scb) {
struct dsp_spos_instance *ins = chip->dsp_spos_instance;
if (scb->parent_scb_ptr) {
if (snd_BUG_ON(scb->parent_scb_ptr->sub_list_ptr != scb &&
scb->parent_scb_ptr->next_scb_ptr... | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/dsp_spos_scb_lib.c |
static void _dsp_clear_sample_buffer(struct snd_cs46xx *chip,
u32 sample_buffer_addr, int dword_count) {
void __iomem *dst = chip->region.idx[2].remap_addr + sample_buffer_addr;
int i;
for (i = 0; i < dword_count; ++i) {
writel(0, dst);
dst += 4;
}
} | [
0,
0
] |
Linux Kernel | sound/pci/cs46xx/dsp_spos_scb_lib.c | void cs46xx_dsp_proc_free_scb_desc(struct dsp_scb_descriptor *scb) {
if (scb->proc_info) {
struct proc_scb_info *scb_info = scb->proc_info->private_data;
struct snd_cs46xx *chip = scb_info->chip;
dev_dbg(chip->card->dev, "cs46xx_dsp_proc_free_scb_desc: freeing %s\n",
scb->scb_name);
snd_... | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/dsp_spos_scb_lib.c | void cs46xx_dsp_proc_register_scb_desc(struct snd_cs46xx *chip,
struct dsp_scb_descriptor *scb) {
struct dsp_spos_instance *ins = chip->dsp_spos_instance;
struct snd_info_entry *entry;
struct proc_scb_info *scb_info;
if (ins->snd_card != NULL && ins->proc_dsp_dir != NULL ... | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/dsp_spos_scb_lib.c |
struct dsp_scb_descriptor *cs46xx_dsp_create_vari_decimate_scb(
struct snd_cs46xx *chip, char *scb_name, u16 vari_buffer_addr0,
u16 vari_buffer_addr1, u32 dest, struct dsp_scb_descriptor *parent_scb,
int scb_child_type) {
struct dsp_scb_descriptor *scb;
struct dsp_vari_decimate_scb vari_decimate_scb... | [
0,
0
] |
Linux Kernel | sound/pci/cs46xx/dsp_spos_scb_lib.c | struct dsp_scb_descriptor *cs46xx_dsp_create_spio_write_scb(
struct snd_cs46xx *chip, char *scb_name, u32 dest,
struct dsp_scb_descriptor *parent_scb, int scb_child_type) {
struct dsp_scb_descriptor *scb;
struct dsp_spio_write_scb spio_write_scb = {
0,
0,
0, /* SPIOWData1; */
0, /... | [
0,
0
] |
Linux Kernel | sound/pci/cs46xx/dsp_spos_scb_lib.c |
int cs46xx_dsp_pcm_channel_set_period(
struct snd_cs46xx *chip, struct dsp_pcm_channel_descriptor *pcm_channel,
int period_size) {
u32 temp = snd_cs46xx_peek(chip, pcm_channel->pcm_reader_scb->address << 2);
temp &= ~DMA_RQ_C1_SOURCE_SIZE_MASK;
switch (period_size) {
case 2048:
temp |= DMA_RQ_C1_S... | [
0,
0
] |
Linux Kernel | sound/pci/cs46xx/dsp_spos_scb_lib.c |
void cs46xx_dsp_destroy_pcm_channel(
struct snd_cs46xx *chip, struct dsp_pcm_channel_descriptor *pcm_channel) {
struct dsp_spos_instance *ins = chip->dsp_spos_instance;
unsigned long flags;
if (snd_BUG_ON(!pcm_channel->active || ins->npcm_channels <= 0 ||
pcm_channel->src_scb->ref_count <= ... | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/dsp_spos_scb_lib.c |
struct dsp_scb_descriptor *
cs46xx_add_record_source(struct snd_cs46xx *chip,
struct dsp_scb_descriptor *source, u16 addr,
char *scb_name) {
struct dsp_spos_instance *ins = chip->dsp_spos_instance;
struct dsp_scb_descriptor *parent;
struct dsp_scb_descriptor *pcm... | [
1,
0
] |
Linux Kernel | sound/pci/cs46xx/dsp_spos_scb_lib.c | int cs46xx_dsp_disable_spdif_out(struct snd_cs46xx *chip) {
struct dsp_spos_instance *ins = chip->dsp_spos_instance;
if (ins->spdif_status_out & DSP_SPDIF_STATUS_PLAYBACK_OPEN) {
ins->spdif_status_out &= ~DSP_SPDIF_STATUS_OUTPUT_ENABLED;
return -EBUSY;
}
/* check integrety */
if (snd_BUG_ON(!ins->as... | [
1,
0
] |
Linux Kernel | sound/pci/cs5535audio/cs5535audio.c |
static unsigned short snd_cs5535audio_ac97_codec_read(struct snd_ac97 *ac97,
unsigned short reg) {
struct cs5535audio *cs5535au = ac97->private_data;
return snd_cs5535audio_codec_read(cs5535au, reg);
} | [
0,
0
] |
Linux Kernel | sound/pci/cs5535audio/cs5535audio.c | static int snd_cs5535audio_mixer(struct cs5535audio *cs5535au) {
struct snd_card *card = cs5535au->card;
struct snd_ac97_bus *pbus;
struct snd_ac97_template ac97;
int err;
static const struct snd_ac97_bus_ops ops = {
.write = snd_cs5535audio_ac97_codec_write,
.read = snd_cs5535audio_ac97_codec_rea... | [
1,
0
] |
Linux Kernel | sound/pci/cs5535audio/cs5535audio.c |
static void process_bm1_irq(struct cs5535audio *cs5535au) {
u8 bm_stat;
spin_lock(&cs5535au->reg_lock);
bm_stat = cs_readb(cs5535au, ACC_BM1_STATUS);
spin_unlock(&cs5535au->reg_lock);
if (bm_stat & EOP)
snd_pcm_period_elapsed(cs5535au->capture_substream);
} | [
0,
0
] |
Linux Kernel | sound/pci/cs5535audio/cs5535audio.c |
static int snd_cs5535audio_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id) {
return snd_card_free_on_error(&pci->dev,
__snd_cs5535audio_probe(pci, pci_id));
} | [
0,
0
] |
Linux Kernel | sound/pci/cs5535audio/cs5535audio.h | static inline int olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97) {
return 0;
} | [
0,
0
] |
Linux Kernel | sound/pci/cs5535audio/cs5535audio.h | static inline void olpc_quirks_cleanup(void) {} | [
0,
0
] |
Linux Kernel | sound/pci/cs5535audio/cs5535audio.h | static inline void olpc_capture_open(struct snd_ac97 *ac97) {} | [
0,
0
] |
Linux Kernel | sound/pci/cs5535audio/cs5535audio_olpc.c |
static int olpc_mic_get(struct snd_kcontrol *kctl,
struct snd_ctl_elem_value *v) {
struct cs5535audio *cs5535au = snd_kcontrol_chip(kctl);
struct snd_ac97 *ac97 = cs5535au->ac97;
int i;
i = (snd_ac97_read(ac97, AC97_AD_MISC) >> AC97_AD_VREFD_SHIFT) & 0x1;
v->value.integer.value[0] = ... | [
1,
0
] |
Linux Kernel | sound/pci/cs5535audio/cs5535audio_olpc.c |
void olpc_quirks_cleanup(void) {
if (machine_is_olpc())
gpio_free(OLPC_GPIO_MIC_AC);
} | [
0,
0
] |
Linux Kernel | sound/pci/cs5535audio/cs5535audio_pcm.c |
static void cs5535audio_playback_disable_dma(struct cs5535audio *cs5535au) {
cs_writeb(cs5535au, ACC_BM0_CMD, 0);
} | [
0,
0
] |
Linux Kernel | sound/pci/cs5535audio/cs5535audio_pcm.c |
static void cs5535audio_playback_setup_prd(struct cs5535audio *cs5535au,
u32 prd_addr) {
cs_writel(cs5535au, ACC_BM0_PRD, prd_addr);
} | [
0,
0
] |
Linux Kernel | sound/pci/cs5535audio/cs5535audio_pcm.c |
static void cs5535audio_capture_pause_dma(struct cs5535audio *cs5535au) {
cs_writeb(cs5535au, ACC_BM1_CMD, BM_CTL_PAUSE);
} | [
0,
0
] |
Linux Kernel | sound/pci/cs5535audio/cs5535audio_pcm.c |
static u32 cs5535audio_capture_read_dma_pntr(struct cs5535audio *cs5535au) {
return cs_readl(cs5535au, ACC_BM1_PNTR);
} | [
0,
0
] |
Linux Kernel | sound/pci/cs5535audio/cs5535audio_pcm.c |
static int
snd_cs5535audio_playback_prepare(struct snd_pcm_substream *substream) {
struct cs5535audio *cs5535au = snd_pcm_substream_chip(substream);
return snd_ac97_set_rate(cs5535au->ac97, AC97_PCM_FRONT_DAC_RATE,
substream->runtime->rate);
} | [
0,
0
] |
Linux Kernel | sound/pci/cs5535audio/cs5535audio_pcm.c |
static int snd_cs5535audio_trigger(struct snd_pcm_substream *substream,
int cmd) {
struct cs5535audio *cs5535au = snd_pcm_substream_chip(substream);
struct cs5535audio_dma *dma = substream->runtime->private_data;
int err = 0;
spin_lock(&cs5535au->reg_lock);
switch (cmd) {
... | [
1,
0
] |
Linux Kernel | sound/pci/cs5535audio/cs5535audio_pcm.c |
static snd_pcm_uframes_t
snd_cs5535audio_pcm_pointer(struct snd_pcm_substream *substream) {
struct cs5535audio *cs5535au = snd_pcm_substream_chip(substream);
u32 curdma;
struct cs5535audio_dma *dma;
dma = substream->runtime->private_data;
curdma = dma->ops->read_dma_pntr(cs5535au);
if (curdma < dma->buf_a... | [
1,
0
] |
Linux Kernel | sound/pci/cs5535audio/cs5535audio_pcm.c |
static int snd_cs5535audio_capture_open(struct snd_pcm_substream *substream) {
int err;
struct cs5535audio *cs5535au = snd_pcm_substream_chip(substream);
struct snd_pcm_runtime *runtime = substream->runtime;
runtime->hw = snd_cs5535audio_capture;
runtime->hw.rates = cs5535au->ac97->rates[AC97_RATES_ADC];
... | [
0,
0
] |
Linux Kernel | sound/pci/cs5535audio/cs5535audio_pcm.c |
static int snd_cs5535audio_capture_close(struct snd_pcm_substream *substream) {
struct cs5535audio *cs5535au = snd_pcm_substream_chip(substream);
olpc_capture_close(cs5535au->ac97);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/pci/cs5535audio/cs5535audio_pcm.c |
static int
snd_cs5535audio_capture_prepare(struct snd_pcm_substream *substream) {
struct cs5535audio *cs5535au = snd_pcm_substream_chip(substream);
return snd_ac97_set_rate(cs5535au->ac97, AC97_PCM_LR_ADC_RATE,
substream->runtime->rate);
} | [
0,
0
] |
Linux Kernel | sound/pci/cs5535audio/cs5535audio_pm.c | static void snd_cs5535audio_stop_hardware(struct cs5535audio *cs5535au) {
/* set LNK_SHUTDOWN to shutdown AC link */
cs_writel(cs5535au, ACC_CODEC_CNTL, ACC_CODEC_CNTL_LNK_SHUTDOWN);
} | [
0,
0
] |
Linux Kernel | sound/pci/ctxfi/ctamixer.c |
static void amixer_next_conj(struct rsc *rsc) { rsc->conj++; } | [
0,
0
] |
Linux Kernel | sound/pci/ctxfi/ctamixer.c |
static int amixer_index(const struct rsc *rsc) {
return container_of(rsc, struct amixer, rsc)->idx[rsc->conj];
} | [
0,
0
] |
Linux Kernel | sound/pci/ctxfi/ctamixer.c |
static int amixer_set_invalid_squash(struct amixer *amixer, unsigned int iv) {
struct hw *hw;
hw = amixer->rsc.hw;
hw->amixer_set_iv(amixer->rsc.ctrl_blk, iv);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/pci/ctxfi/ctamixer.c | static int amixer_commit_write(struct amixer *amixer) {
struct hw *hw;
unsigned int index;
int i;
struct rsc *input;
struct sum *sum;
hw = amixer->rsc.hw;
input = amixer->input;
sum = amixer->sum;
amixer->rsc.ops->master(&amixer->rsc);
if (input)
input->ops->master(input);
if (sum)
sum-... | [
0,
0
] |
Linux Kernel | sound/pci/ctxfi/ctamixer.c |
static int amixer_setup(struct amixer *amixer, struct rsc *input,
unsigned int scale, struct sum *sum) {
amixer_set_input(amixer, input);
amixer_set_y(amixer, scale);
amixer_set_sum(amixer, sum);
amixer_commit_write(amixer);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/pci/ctxfi/ctamixer.c |
static int sum_index(const struct rsc *rsc) {
return container_of(rsc, struct sum, rsc)->idx[rsc->conj];
} | [
0,
0
] |
Linux Kernel | sound/pci/ctxfi/ctamixer.c |
static int sum_output_slot(const struct rsc *rsc) {
return (sum_index(rsc) << 4) + 0xc;
} | [
0,
0
] |
Linux Kernel | sound/pci/ctxfi/ctamixer.c |
static int sum_rsc_init(struct sum *sum, const struct sum_desc *desc,
struct sum_mgr *mgr) {
int err;
err = rsc_init(&sum->rsc, sum->idx[0], SUM, desc->msr, mgr->mgr.hw);
if (err)
return err;
sum->rsc.ops = &sum_basic_rsc_ops;
return 0;
} | [
0,
0
] |
Linux Kernel | sound/pci/ctxfi/ctamixer.c | static int get_sum_rsc(struct sum_mgr *mgr, const struct sum_desc *desc,
struct sum **rsum) {
int err, i;
unsigned int idx;
struct sum *sum;
unsigned long flags;
*rsum = NULL;
sum = kzalloc(sizeof(*sum), GFP_KERNEL);
if (!sum)
return -ENOMEM;
/* Check whether there are suff... | [
0,
0
] |
Linux Kernel | sound/pci/ctxfi/ctamixer.c |
static int put_sum_rsc(struct sum_mgr *mgr, struct sum *sum) {
unsigned long flags;
int i;
spin_lock_irqsave(&mgr->mgr_lock, flags);
for (i = 0; i < sum->rsc.msr; i++)
mgr_put_resource(&mgr->mgr, 1, sum->idx[i]);
spin_unlock_irqrestore(&mgr->mgr_lock, flags);
sum_rsc_uninit(sum);
kfree(sum);
ret... | [
0,
0
] |
Linux Kernel | sound/pci/ctxfi/ctatc.c | static int ct_map_audio_buffer(struct ct_atc *atc, struct ct_atc_pcm *apcm) {
struct snd_pcm_runtime *runtime;
struct ct_vm *vm;
if (!apcm->substream)
return 0;
runtime = apcm->substream->runtime;
vm = atc->vm;
apcm->vm_block = vm->map(vm, apcm->substream, runtime->dma_bytes);
if (!apcm->vm_block)... | [
1,
0
] |
Linux Kernel | sound/pci/ctxfi/ctatc.c |
static void ct_unmap_audio_buffer(struct ct_atc *atc, struct ct_atc_pcm *apcm) {
struct ct_vm *vm;
if (!apcm->vm_block)
return;
vm = atc->vm;
vm->unmap(vm, apcm->vm_block);
apcm->vm_block = NULL;
} | [
0,
0
] |
Linux Kernel | sound/pci/ctxfi/ctatc.c | static unsigned int atc_get_pitch(unsigned int input_rate,
unsigned int output_rate) {
unsigned int pitch;
int b;
pitch = (input_rate / output_rate) << 24;
input_rate %= output_rate;
input_rate /= 100;
output_rate /= 100;
for (b = 31; ((b >= 0) && !(input_rate >> b));)
... | [
1,
0
] |
Linux Kernel | sound/pci/ctxfi/ctatc.c |
static int atc_pcm_playback_position(struct ct_atc *atc,
struct ct_atc_pcm *apcm) {
struct src *src = apcm->src;
u32 size, max_cisz;
int position;
if (!src)
return 0;
position = src->ops->get_ca(src);
if (position < apcm->vm_block->addr) {
dev_dbg(atc->card->d... | [
1,
0
] |
Linux Kernel | sound/pci/ctxfi/ctatc.c | static void setup_src_node_conf(struct ct_atc *atc, struct ct_atc_pcm *apcm,
struct src_node_conf_t *conf, int *n_srcc) {
unsigned int pitch;
pitch = atc_get_pitch((atc->rsr * atc->msr), apcm->substream->runtime->rate);
*n_srcc = 0;
if (1 == atc->msr) { /* FIXME: do we really n... | [
1,
1
] |
Linux Kernel | sound/pci/ctxfi/ctatc.c |
static int atc_pll_init(struct ct_atc *atc, int rate) {
struct hw *hw = atc->hw;
int err;
err = hw->pll_init(hw, rate);
atc->pll_rate = err ? 0 : rate;
return err;
} | [
0,
0
] |
Linux Kernel | sound/pci/ctxfi/ctatc.c |
static int atc_select_mic_in(struct ct_atc *atc) {
struct hw *hw = atc->hw;
struct ct_mixer *mixer = atc->mixer;
struct src *src;
if (hw->is_adc_source_selected(hw, ADC_MICIN))
return 0;
mixer->set_input_left(mixer, MIX_LINE_IN, NULL);
mixer->set_input_right(mixer, MIX_LINE_IN, NULL);
hw->select_a... | [
0,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.