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