Lines Matching defs:ins

32 	struct dsp_spos_instance * ins = chip->dsp_spos_instance;
33 int symbol_index = (int)(symbol - ins->symbol_table.symbols);
35 if (snd_BUG_ON(ins->symbol_table.nsymbols <= 0))
38 symbol_index >= ins->symbol_table.nsymbols))
41 ins->symbol_table.symbols[symbol_index].deleted = 1;
43 if (symbol_index < ins->symbol_table.highest_frag_index) {
44 ins->symbol_table.highest_frag_index = symbol_index;
47 if (symbol_index == ins->symbol_table.nsymbols - 1)
48 ins->symbol_table.nsymbols --;
50 if (ins->symbol_table.highest_frag_index > ins->symbol_table.nsymbols) {
51 ins->symbol_table.highest_frag_index = ins->symbol_table.nsymbols;
100 struct dsp_spos_instance * ins = chip->dsp_spos_instance;
110 if (scb->next_scb_ptr == ins->the_null_scb) {
114 if (scb->sub_list_ptr != ins->the_null_scb) {
117 scb->sub_list_ptr = ins->the_null_scb;
122 if (scb->next_scb_ptr != ins->the_null_scb) {
126 scb->next_scb_ptr = ins->the_null_scb;
131 if (scb->next_scb_ptr != ins->the_null_scb) {
135 scb->next_scb_ptr = ins->the_null_scb;
162 struct dsp_spos_instance * ins = chip->dsp_spos_instance;
167 scb->index >= ins->nscb ||
168 (ins->scbs + scb->index) != scb))
174 if (snd_BUG_ON(scb->sub_list_ptr != ins->the_null_scb ||
175 scb->next_scb_ptr != ins->the_null_scb))
188 ins->scbs[scb->index].deleted = 1;
190 kfree(ins->scbs[scb->index].data);
191 ins->scbs[scb->index].data = NULL;
194 if (scb->index < ins->scb_highest_frag_index)
195 ins->scb_highest_frag_index = scb->index;
197 if (scb->index == ins->nscb - 1) {
198 ins->nscb --;
201 if (ins->scb_highest_frag_index > ins->nscb) {
202 ins->scb_highest_frag_index = ins->nscb;
207 for(i = scb->index + 1;i < ins->nscb; ++i) {
208 ins->scbs[i - 1].index = i - 1;
235 struct dsp_spos_instance * ins = chip->dsp_spos_instance;
240 if (ins->snd_card != NULL && ins->proc_dsp_dir != NULL &&
243 entry = snd_info_create_card_entry(ins->snd_card, scb->scb_name,
244 ins->proc_dsp_dir);
270 struct dsp_spos_instance * ins = chip->dsp_spos_instance;
275 if (snd_BUG_ON(!ins->the_null_scb))
280 (ins->the_null_scb->address << 0x10) | ins->the_null_scb->address;
290 scb->sub_list_ptr = ins->the_null_scb;
291 scb->next_scb_ptr = ins->the_null_scb;
313 ins->the_null_scb))
320 ins->the_null_scb))
487 struct dsp_spos_instance * ins = chip->dsp_spos_instance;
564 if (ins->null_algorithm == NULL) {
565 ins->null_algorithm = cs46xx_dsp_lookup_symbol (chip,"NULLALGORITHM",
568 if (ins->null_algorithm == NULL) {
576 dest,ins->null_algorithm,parent_scb,
594 struct dsp_spos_instance * ins = chip->dsp_spos_instance;
649 0xffff - ins->dac_volume_right,0xffff - ins->dac_volume_left,
650 0xffff - ins->dac_volume_right,0xffff - ins->dac_volume_left
654 if (ins->s16_up == NULL) {
655 ins->s16_up = cs46xx_dsp_lookup_symbol (chip,"S16_UPSRC",
658 if (ins->s16_up == NULL) {
679 dest,ins->s16_up,parent_scb,
975 struct dsp_spos_instance * ins = chip->dsp_spos_instance;
1005 0xffff - ins->spdif_input_volume_right,0xffff - ins->spdif_input_volume_left,
1006 0xffff - ins->spdif_input_volume_right,0xffff - ins->spdif_input_volume_left,
1135 struct dsp_spos_instance * ins = chip->dsp_spos_instance;
1138 while (scb->next_scb_ptr != ins->the_null_scb) {
1223 struct dsp_spos_instance * ins = chip->dsp_spos_instance;
1234 mixer_scb = ins->master_mix_scb;
1237 mixer_scb = ins->rear_mix_scb;
1240 mixer_scb = ins->center_lfe_mix_scb;
1247 if (snd_BUG_ON(!ins->asynch_tx_scb))
1249 mixer_scb = ins->asynch_tx_scb;
1275 if (ins->pcm_channels[i].active) {
1277 ins->pcm_channels[i].sample_rate == sample_rate &&
1278 ins->pcm_channels[i].mixer_scb == mixer_scb) {
1279 src_scb = ins->pcm_channels[i].src_scb;
1280 ins->pcm_channels[i].src_scb->ref_count ++;
1281 src_index = ins->pcm_channels[i].src_slot;
1294 if (ins->nsrc_scb >= DSP_MAX_SRC_NR) {
1302 if (ins->src_scb_slots[i] == 0) {
1304 ins->src_scb_slots[i] = 1;
1312 if (mixer_scb->sub_list_ptr == ins->the_null_scb) {
1342 ins->nsrc_scb ++;
1368 ins->pcm_channels[pcm_index].sample_rate = sample_rate;
1369 ins->pcm_channels[pcm_index].pcm_reader_scb = pcm_scb;
1370 ins->pcm_channels[pcm_index].src_scb = src_scb;
1371 ins->pcm_channels[pcm_index].unlinked = 1;
1372 ins->pcm_channels[pcm_index].private_data = private_data;
1373 ins->pcm_channels[pcm_index].src_slot = src_index;
1374 ins->pcm_channels[pcm_index].active = 1;
1375 ins->pcm_channels[pcm_index].pcm_slot = pcm_index;
1376 ins->pcm_channels[pcm_index].mixer_scb = mixer_scb;
1377 ins->npcm_channels ++;
1380 return (ins->pcm_channels + pcm_index);
1465 struct dsp_spos_instance * ins = chip->dsp_spos_instance;
1469 ins->npcm_channels <= 0 ||
1478 ins->npcm_channels --;
1490 ins->src_scb_slots[pcm_channel->src_slot] = 0;
1491 ins->nsrc_scb --;
1521 struct dsp_spos_instance * ins = chip->dsp_spos_instance;
1535 if (src_scb->sub_list_ptr != ins->the_null_scb) {
1560 struct dsp_spos_instance * ins = chip->dsp_spos_instance;
1565 if (snd_BUG_ON(!ins->record_mixer_scb))
1568 if (ins->record_mixer_scb->sub_list_ptr != ins->the_null_scb) {
1569 parent = find_next_free_scb (chip,ins->record_mixer_scb->sub_list_ptr);
1572 parent = ins->record_mixer_scb;
1602 struct dsp_spos_instance * ins = chip->dsp_spos_instance;
1607 if (snd_BUG_ON(!ins->master_mix_scb))
1610 if (ins->master_mix_scb->sub_list_ptr != ins->the_null_scb) {
1611 parent_scb = find_next_free_scb (chip,ins->master_mix_scb->sub_list_ptr);
1614 parent_scb = ins->master_mix_scb;
1628 struct dsp_spos_instance * ins = chip->dsp_spos_instance;
1630 if ( ! (ins->spdif_status_out & DSP_SPDIF_STATUS_HW_ENABLED) ) {
1635 if ( ins->spdif_status_out & DSP_SPDIF_STATUS_PLAYBACK_OPEN) {
1639 ins->spdif_status_out |= DSP_SPDIF_STATUS_OUTPUT_ENABLED;
1644 if (snd_BUG_ON(ins->asynch_tx_scb))
1646 if (snd_BUG_ON(ins->master_mix_scb->next_scb_ptr !=
1647 ins->the_null_scb))
1651 snd_cs46xx_poke (chip, (ins->ref_snoop_scb->address + 2) << 2,
1655 ins->asynch_tx_scb = cs46xx_dsp_create_asynch_fg_tx_scb(chip,"AsynchFGTxSCB",ASYNCTX_SCB_ADDR,
1658 ins->master_mix_scb,
1660 if (!ins->asynch_tx_scb) return -ENOMEM;
1662 ins->spdif_pcm_input_scb = cs46xx_dsp_create_pcm_serial_input_scb(chip,"PCMSerialInput_II",
1664 ins->ref_snoop_scb,
1665 ins->asynch_tx_scb,
1669 if (!ins->spdif_pcm_input_scb) return -ENOMEM;
1672 ins->spdif_status_out |= DSP_SPDIF_STATUS_OUTPUT_ENABLED;
1679 struct dsp_spos_instance * ins = chip->dsp_spos_instance;
1682 if ( ins->spdif_status_out & DSP_SPDIF_STATUS_PLAYBACK_OPEN) {
1683 ins->spdif_status_out &= ~DSP_SPDIF_STATUS_OUTPUT_ENABLED;
1688 if (snd_BUG_ON(!ins->asynch_tx_scb))
1690 if (snd_BUG_ON(!ins->spdif_pcm_input_scb))
1692 if (snd_BUG_ON(ins->master_mix_scb->next_scb_ptr != ins->asynch_tx_scb))
1694 if (snd_BUG_ON(ins->asynch_tx_scb->parent_scb_ptr !=
1695 ins->master_mix_scb))
1698 cs46xx_dsp_remove_scb (chip,ins->spdif_pcm_input_scb);
1699 cs46xx_dsp_remove_scb (chip,ins->asynch_tx_scb);
1701 ins->spdif_pcm_input_scb = NULL;
1702 ins->asynch_tx_scb = NULL;
1708 ins->spdif_status_out &= ~DSP_SPDIF_STATUS_OUTPUT_ENABLED;
1716 struct dsp_spos_instance * ins = chip->dsp_spos_instance;
1718 if ( ins->spdif_status_out & DSP_SPDIF_STATUS_OUTPUT_ENABLED ) {
1723 ins->spdif_status_out |= DSP_SPDIF_STATUS_OUTPUT_ENABLED;
1727 if ( !(ins->spdif_status_out & DSP_SPDIF_STATUS_HW_ENABLED) ) {
1732 ins->asynch_tx_scb = cs46xx_dsp_create_asynch_fg_tx_scb(chip,"AsynchFGTxSCB",ASYNCTX_SCB_ADDR,
1735 ins->master_mix_scb,
1740 cs46xx_poke_via_dsp (chip,SP_SPDOUT_CSUV, ins->spdif_csuv_stream);
1742 ins->spdif_status_out |= DSP_SPDIF_STATUS_PLAYBACK_OPEN;
1749 struct dsp_spos_instance * ins = chip->dsp_spos_instance;
1751 if (snd_BUG_ON(!ins->asynch_tx_scb))
1754 ins->spdif_status_out &= ~DSP_SPDIF_STATUS_PLAYBACK_OPEN;
1757 cs46xx_poke_via_dsp (chip,SP_SPDOUT_CSUV, ins->spdif_csuv_default);
1760 if (ins->spdif_pcm_input_scb != NULL) {
1761 cs46xx_dsp_remove_scb (chip,ins->spdif_pcm_input_scb);
1762 ins->spdif_pcm_input_scb = NULL;
1765 cs46xx_dsp_remove_scb (chip,ins->asynch_tx_scb);
1766 ins->asynch_tx_scb = NULL;
1772 if ( ins->spdif_status_out & DSP_SPDIF_STATUS_OUTPUT_ENABLED ) {