[alsa-devel] [PATCH 1/7] ALSA: firewire-tascam: add skeleton for TASCAM FireWire series

Stefan Richter stefanr at s5r6.in-berlin.de
Sat Oct 3 12:54:02 CEST 2015


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().
-- 
Stefan Richter
-=====-===== =-=- ---==
http://arcgraph.de/sr/


More information about the Alsa-devel mailing list