My application should be able to run in two modes. In the "codec mode", I use the following DSP/BIOS objects:
- A mini-driver for the AIC23 codec (configured in the tcf-file)
- A DIO adapter (configured in the tcf-file)
- A stackable overlap driver (DOV) for the input stream (configured in the tcf-file)
- An input and an output stream, operating in the issue/reclaim mode (created dynamically)
- A task to copy data from the input stream to the output stream (configured in the tcf-file)
Whereas in the "host channel mode" I want to replace the mini-driver and the DIO adapter by two HST objects (configured in the tcf-file) and two DHL drivers (configured in the tcf-file), so that I can send and receive data with the computer (instead of using real data from the codec). I want to be able to switch between these two modes at runtime with a dip-switch. To switch I do the following steps:
- Reclaim all buffers from the streams
- Delete the streams
- Create the input stream with "/dovCodec16/dioCodec" (codec mode) or "/dovCodec16/dhlInput" (host channel mode)
- Create the output stream with "/dioCodec" (codec mode) or "/dhlOutput" (host channel mode)
- Issue all buffers to the new streams
It works quite well. I can switch from codec mode to host channel mode and back to codec mode. But if I want to switch back to host channel mode, SIO_create fails (SYS_error called: error id = 0x4), which means the the device driver is busy, according to the DSP/BIOS reference guide.
So my question is: How do I have to reinitialize the underlying HST and/or DHL object in order to create the stream successfully?
Thanks for your help!
Kind regards
Robert