Re: [alsa-devel] Driver for MOTU devices
Hi,
On Fri, 8 Feb 2019, Peter Sjöberg wrote:
Hello!
I'm contacting you as the developer of the kernel driver for MOTU firewire devices.
First I want to thank you for your time and effort to develop the driver - I have the Audio Express which was unusable in Linux for a long time so this was a really nice surprise!
I want to ask you a question about the code, if it's the wrong place to ask please redirect me. In the file amdtp-motu.c line 139 the code thas converts 24 to 32 bits reads: *dst = (byte[0] << 24) | (byte[1] << 16) | byte[2]; ..however I am puzzled by the conversion of the third byte here. In my mind it should be: *dst = (byte[0] << 24) | (byte[1] << 16) | (byte[2] << 8);
The conversion in the other direction is written like this (line 167-169): byte[0] = (*src >> 24) & 0xff; byte[1] = (*src >> 16) & 0xff; byte[2] = (*src >> 8) & 0xff; I just want to help out so please inform me if I'm wrong and why :)
Oops. It's a bug since v4.12 or later, indeed.
Unfortunately, I'm on vacation. I'll post the patch to fix it in next week after testing it with MOTU models I own. Thanks for your report ;)
By the way, I guess that you see many kernel messages with 'unsolicited response' from firewire-core driver, like.
fireire_core 0000:03:00.0: unsolicited response (source ffc0, tlabel 1f)
As long as I know, AudioExpress often transfers invalid response code for any asynchronous transaction[1]. This brings failures of read/write transaction and ALSA MOTU driver sometimes fails to handle the device.
For your information.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/commit/sound...
Regards
Takashi Sakamoto
participants (1)
-
Takashi Sakamoto