• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/src/linux/linux-2.6/sound/pci/pcxhr/

Lines Matching defs:mgr

49 static int pcxhr_init_board(struct pcxhr_mgr *mgr)
56 if (mgr->mono_capture)
57 card_streams = mgr->capture_chips * 2;
59 card_streams = mgr->capture_chips;
60 card_streams += mgr->playback_chips * PCXHR_PLAYBACK_STREAMS;
63 pcxhr_enable_dsp(mgr);
66 err = pcxhr_send_msg(mgr, &rmh);
70 snd_assert((rmh.stat[0] & MASK_FIRST_FIELD) == mgr->playback_chips*2,
74 mgr->capture_chips * 2, return -EINVAL);
82 rmh.cmd[0] |= mgr->firmware_num;
86 err = pcxhr_send_msg(mgr, &rmh);
91 mgr->dsp_version = rmh.stat[0];
98 err = pcxhr_send_msg(mgr, &rmh);
103 mgr->board_has_analog = 1; /* analog addon board available */
109 err = pcxhr_write_io_num_reg_cont(mgr, REG_CONT_UNMUTE_INPUTS,
116 err = pcxhr_send_msg(mgr, &rmh);
120 void pcxhr_reset_board(struct pcxhr_mgr *mgr)
124 if (mgr->dsp_loaded & (1 << PCXHR_FIRMWARE_DSP_MAIN_INDEX)) {
129 pcxhr_send_msg(mgr, &rmh);
131 pcxhr_write_io_num_reg_cont(mgr, REG_CONT_UNMUTE_INPUTS, 0, NULL);
134 if (mgr->dsp_loaded & ( 1 << PCXHR_FIRMWARE_DSP_EPRM_INDEX))
135 pcxhr_reset_dsp(mgr);
137 if (mgr->dsp_loaded & ( 1 << PCXHR_FIRMWARE_XLX_COM_INDEX))
138 pcxhr_reset_xilinx_com(mgr);
146 static int pcxhr_dsp_allocate_pipe( struct pcxhr_mgr *mgr, struct pcxhr_pipe *pipe,
155 if (mgr->mono_capture)
169 err = pcxhr_send_msg(mgr, &rmh);
184 static int pcxhr_config_pipes(struct pcxhr_mgr *mgr)
191 for (i = 0; i < mgr->num_cards; i++) {
192 chip = mgr->chip[i];
195 err = pcxhr_dsp_allocate_pipe( mgr, pipe, 0, i*2);
203 err = pcxhr_dsp_allocate_pipe(mgr, pipe, 1, i*2 + j);
212 static int pcxhr_start_pipes(struct pcxhr_mgr *mgr)
220 for (i = 0; i < mgr->num_cards; i++) {
221 chip = mgr->chip[i];
227 return pcxhr_set_pipe_state(mgr, playback_mask, capture_mask, 1);
231 static int pcxhr_dsp_load(struct pcxhr_mgr *mgr, int index, const struct firmware *dsp)
239 pcxhr_reset_xilinx_com(mgr);
240 return pcxhr_load_xilinx_binary(mgr, dsp, 0);
243 pcxhr_reset_xilinx_com(mgr);
244 return pcxhr_load_xilinx_binary(mgr, dsp, 1);
247 pcxhr_reset_dsp(mgr);
248 return pcxhr_load_eeprom_binary(mgr, dsp);
251 return pcxhr_load_boot_binary(mgr, dsp);
254 err = pcxhr_load_dsp_binary(mgr, dsp);
264 err = pcxhr_init_board(mgr);
269 err = pcxhr_config_pipes(mgr);
275 for (card_index = 0; card_index < mgr->num_cards; card_index++) {
276 struct snd_pcxhr *chip = mgr->chip[card_index];
282 if ((err = pcxhr_create_mixer(chip->mgr)) < 0)
288 err = pcxhr_start_pipes(mgr);
303 int pcxhr_setup_firmware(struct pcxhr_mgr *mgr)
319 if (request_firmware(&fw_entry, path, &mgr->pci->dev)) {
324 err = pcxhr_dsp_load(mgr, i, fw_entry);
328 mgr->dsp_loaded |= 1 << i;
361 struct pcxhr_mgr *mgr = hw->private_data;
376 err = pcxhr_dsp_load(mgr, dsp->index, &fw);
380 mgr->dsp_loaded |= 1 << dsp->index;
394 int pcxhr_setup_firmware(struct pcxhr_mgr *mgr)
400 if ((err = snd_hwdep_new(mgr->chip[0]->card, PCXHR_HWDEP_ID, 0, &hw)) < 0)
404 hw->private_data = mgr;
410 mgr->dsp_loaded = 0;
413 if ((err = snd_card_register(mgr->chip[0]->card)) < 0)