Lines Matching +full:dsp +full:- +full:reset

1 // SPDX-License-Identifier: GPL-2.0-or-later
36 if (mgr->mono_capture) in pcxhr_init_board()
37 card_streams = mgr->capture_chips * 2; in pcxhr_init_board()
39 card_streams = mgr->capture_chips; in pcxhr_init_board()
40 card_streams += mgr->playback_chips * PCXHR_PLAYBACK_STREAMS; in pcxhr_init_board()
50 if ((rmh.stat[0] & MASK_FIRST_FIELD) < mgr->playback_chips * 2) in pcxhr_init_board()
51 return -EINVAL; in pcxhr_init_board()
54 mgr->capture_chips * 2) in pcxhr_init_board()
55 return -EINVAL; in pcxhr_init_board()
58 return -EINVAL; in pcxhr_init_board()
61 return -EINVAL; in pcxhr_init_board()
62 dev_dbg(&mgr->pci->dev, in pcxhr_init_board()
67 /* firmware num for DSP */ in pcxhr_init_board()
68 rmh.cmd[0] |= mgr->firmware_num; in pcxhr_init_board()
70 rmh.cmd[1] = (1<<23) + mgr->granularity; in pcxhr_init_board()
75 dev_dbg(&mgr->pci->dev, in pcxhr_init_board()
76 "PCXHR DSP version is %d.%d.%d\n", (rmh.stat[0]>>16)&0xff, in pcxhr_init_board()
78 mgr->dsp_version = rmh.stat[0]; in pcxhr_init_board()
80 if (mgr->is_hr_stereo) in pcxhr_init_board()
103 mgr->board_has_analog = 1; /* analog addon board found */ in pcxhr_sub_init()
125 if (mgr->dsp_loaded & (1 << PCXHR_FIRMWARE_DSP_MAIN_INDEX)) { in pcxhr_reset_board()
127 if (!mgr->is_hr_stereo) { in pcxhr_reset_board()
136 /* stereo cards mute with reset of dsp */ in pcxhr_reset_board()
138 /* reset pcxhr dsp */ in pcxhr_reset_board()
139 if (mgr->dsp_loaded & (1 << PCXHR_FIRMWARE_DSP_EPRM_INDEX)) in pcxhr_reset_board()
141 /* reset second xilinx */ in pcxhr_reset_board()
142 if (mgr->dsp_loaded & (1 << PCXHR_FIRMWARE_XLX_COM_INDEX)) { in pcxhr_reset_board()
144 mgr->dsp_loaded = 1; in pcxhr_reset_board()
163 if (mgr->mono_capture) in pcxhr_dsp_allocate_pipe()
171 dev_dbg(&mgr->pci->dev, "snd_add_ref_pipe pin(%d) pcm%c0\n", in pcxhr_dsp_allocate_pipe()
173 pipe->is_capture = is_capture; in pcxhr_dsp_allocate_pipe()
174 pipe->first_audio = pin; in pcxhr_dsp_allocate_pipe()
186 dev_err(&mgr->pci->dev, "error pipe allocation " in pcxhr_dsp_allocate_pipe()
190 pipe->status = PCXHR_PIPE_DEFINED; in pcxhr_dsp_allocate_pipe()
206 if (pipe->is_capture)
207 capture_mask = (1 << pipe->first_audio);
209 playback_mask = (1 << pipe->first_audio);
214 dev_err(&mgr->pci->dev, "error stopping pipe!\n");
217 pcxhr_set_pipe_cmd_params(&rmh, pipe->is_capture, pipe->first_audio,
221 dev_err(&mgr->pci->dev, "error pipe release "
223 pipe->status = PCXHR_PIPE_UNDEFINED;
235 /* allocate the pipes on the dsp */ in pcxhr_config_pipes()
236 for (i = 0; i < mgr->num_cards; i++) { in pcxhr_config_pipes()
237 chip = mgr->chip[i]; in pcxhr_config_pipes()
238 if (chip->nb_streams_play) { in pcxhr_config_pipes()
239 pipe = &chip->playback_pipe; in pcxhr_config_pipes()
243 for(j = 0; j < chip->nb_streams_play; j++) in pcxhr_config_pipes()
244 chip->playback_stream[j].pipe = pipe; in pcxhr_config_pipes()
246 for (j = 0; j < chip->nb_streams_capt; j++) { in pcxhr_config_pipes()
247 pipe = &chip->capture_pipe[j]; in pcxhr_config_pipes()
251 chip->capture_stream[j].pipe = pipe; in pcxhr_config_pipes()
264 /* start all the pipes on the dsp */ in pcxhr_start_pipes()
265 for (i = 0; i < mgr->num_cards; i++) { in pcxhr_start_pipes()
266 chip = mgr->chip[i]; in pcxhr_start_pipes()
267 if (chip->nb_streams_play) in pcxhr_start_pipes()
268 playback_mask |= 1 << chip->playback_pipe.first_audio; in pcxhr_start_pipes()
269 for (j = 0; j < chip->nb_streams_capt; j++) in pcxhr_start_pipes()
270 capture_mask |= 1 << chip->capture_pipe[j].first_audio; in pcxhr_start_pipes()
277 const struct firmware *dsp) in pcxhr_dsp_load() argument
281 dev_dbg(&mgr->pci->dev, in pcxhr_dsp_load()
282 "loading dsp [%d] size = %zd\n", index, dsp->size); in pcxhr_dsp_load()
287 return pcxhr_load_xilinx_binary(mgr, dsp, 0); in pcxhr_dsp_load()
291 return pcxhr_load_xilinx_binary(mgr, dsp, 1); in pcxhr_dsp_load()
295 return pcxhr_load_eeprom_binary(mgr, dsp); in pcxhr_dsp_load()
298 return pcxhr_load_boot_binary(mgr, dsp); in pcxhr_dsp_load()
301 err = pcxhr_load_dsp_binary(mgr, dsp); in pcxhr_dsp_load()
306 dev_err(&mgr->pci->dev, "wrong file index\n"); in pcxhr_dsp_load()
307 return -EFAULT; in pcxhr_dsp_load()
313 dev_err(&mgr->pci->dev, "pcxhr could not be set up\n"); in pcxhr_dsp_load()
318 dev_err(&mgr->pci->dev, "pcxhr pipes could not be set up\n"); in pcxhr_dsp_load()
322 for (card_index = 0; card_index < mgr->num_cards; card_index++) { in pcxhr_dsp_load()
323 struct snd_pcxhr *chip = mgr->chip[card_index]; in pcxhr_dsp_load()
330 err = pcxhr_create_mixer(chip->mgr); in pcxhr_dsp_load()
334 err = snd_card_register(chip->card); in pcxhr_dsp_load()
340 dev_err(&mgr->pci->dev, "pcxhr pipes could not be started\n"); in pcxhr_dsp_load()
343 dev_dbg(&mgr->pci->dev, in pcxhr_dsp_load()
372 int fw_set = mgr->fw_file_set; in pcxhr_setup_firmware()
378 if (request_firmware(&fw_entry, path, &mgr->pci->dev)) { in pcxhr_setup_firmware()
379 dev_err(&mgr->pci->dev, in pcxhr_setup_firmware()
382 return -ENOENT; in pcxhr_setup_firmware()
384 /* fake hwdep dsp record */ in pcxhr_setup_firmware()
389 mgr->dsp_loaded |= 1 << i; in pcxhr_setup_firmware()