[alsa-devel] [PATCH 1/7] ALSA: firewire-tascam: add skeleton for TASCAM FireWire series
Takashi Sakamoto
o-takashi at sakamocchi.jp
Sun Oct 4 13:54:44 CEST 2015
Hi Stefan,
On Oct 03 2015 19:54, Stefan Richter wrote:
> On Oct 03 Takashi Sakamoto wrote:
>> On 2015年10月03日 18:14, Clemens Ladisch wrote:
>>> Most data in the actual configuration ROM is organized as big-endian 32-
>>> bit values, so the FireWire core converts _all_ words from big endian to
>>> CPU endian. The words that are not actually 32-bit values but strings
>>> have to be converted back; the correct function for this is cpu_to_be32().
>>
>> Yes. And I forgot a pair of cpu_to_be32/be32_to_cpu is symmetric each other!
>> (I'm really a stupid guy, sigh...)
>
> Nah, it's easy to miss that struct fw_device.config_rom ist not identical
> with the on-the-wire format (on little endian hosts, that is). This has
> irritated others before. I think this CPU-endian ROM buffer caters to
> simpler ROM parsing code in the overall picture. Text leaf parsing seems
> to be the only exception where a big-endian buffer would be preferable,
> but before your TASCAM driver all of the text leaf parsing was
> concentrated in core-device.c::textual_leaf_to_string().
Yep. I didn't consider about the pair of macros are preprocessed
according to CPU-endianness.
Anyway this driver require enough implementation to parse the string.
Thanks
Takashi Sakamoto
More information about the Alsa-devel
mailing list