On 07/28/11 23:56, Adrian Knoth wrote:
>> After reading the kernel source, I think the code in hdsp.c is wrong:
>>
>> if (hdsp_fifo_wait(hdsp, 0, HDSP_SHORT_WAIT)) {
>> hdsp_write(hdsp, HDSP_control2Reg, HDSP_VERSION_BIT);
>> hdsp_write(hdsp, HDSP_control2Reg, HDSP_S_LOAD);
>> if (hdsp_fifo_wait(hdsp, 0, HDSP_SHORT_WAIT))
>> hdsp->io_type = RPM;
>> else
>> hdsp->io_type = Multiface;
>> } else {
>> hdsp->io_type = Digiface;
>> }
>>
>> What's wrong with the code above? I think all occurrences of
>> HDSP_control2Reg in hdsp_check_for_iobox need to be changed to
>> HDSP_controlRegister and the second hdsp_fifo_wait needs to be inverted.
Nope, it was correct. I got confused by bytes-vs-4byte-offsets to the
iobase.
So, control2Reg is right, the logic is right, too.
Only HDSP_VERSION_BIT seems wrong here, try
HDSP_VERSION_BIT | HDSP_S_LOAD
instead. Or change
#define HDSP_VERSION_BIT 0x100
to
#define HDSP_VERSION_BIT (0x100 | HDSP_S_LOAD)
Still pure guesswork.
Forget it, it was stupid. Removed from the web.
Cheers