Krzysztof Helt wrote:
"Clemens Ladisch" cladisch@fastmail.net wrote:
Krzysztof Helt wrote:
This patch adds additional check for OPL3 device. I found that PNP region returned by the card is 0x380 - 0x38f but the OPL3 device is located at 0x388 (standard FM device address).
On cards with an OPL4, it would use the entire range, where that last eight bytes are the OPL3-compatible registers.
Ok. I haven't touched the size of the range or the range itself. I just added a fallback to check range +8 (which is 0x388) after failure to find the OPL3 at the 0x380.
My card doesn't have PnP, but I guess the OPL4 detection wouldn't work on 92x either for the same reason.
Should the OPL4 detection has the same fallback or just all Opti cards should search the FM chip at the range + 8 address?
It appears a fallback shoudn't be needed because the chip always returns a range suitable for an OPL4.
Since an OPL3 range is never larger than 8 bytes, and OPL4 needs 16 bytes, we could add 8 to get the FM address _if_ the range is at least 16 bytes; thus we are safe even if a chip publishes an OPL3-only range.
Regards, Clemens