Endianness problem with snd-usb-audio on powerpc / quick and dirty patch
Hello jackd developers,
sorry about the uncommented patches earlier, I don't know what my mailer
did with my text, which not follows:
first of all: *don't apply these patches, just read them!*
They did fix my problem, but they are destructive and render jackd
unusable on little-endian machines. I did it this way simply because I'm
not into jack development and I don't know the proper way to solve this
issue. I hope one of you does.
*My problem:* Using jackd on a powerpc linux machine (G4 Cube) with a
USB interface (M-Audio MobilePre) worked with OSS emulation (for some
reason, in the latest release, it doesn't anymore), but always failed in
ALSA mode with "unsupported audio format".
The first patch shows why: 16bit is mapped to the machine's native
signed 16 Bit format (SND_PCM_FORMAT_S16 is defined as
SND_PCM_FORMAT_S16_LE or SND_PCM_FORMAT_S16_BE depending on CPU
architecture). Sadly, the USB device doesn't (or can't) necessarily
follow the CPU architecture.
*My (stupid) solution: *In my (very underinformed) view this means that
byte swapping needs to be done by the jack server. Hence the second
patch, which adds byte swapping to some (not all!) of the memops. I am
perfectly aware of the brute-force-and-ignorance character that this
approach has. I post these patches only to give a clearer view of the
nature of the problem.
If anyone knows how to fix this issue properly, I would greatly
appreciate your help. You can also point me in the right direction, and
I'll do the dirty work (implementing and testing) and re-submit some
more useful patches. If my approach seems vaguely right, and you want me
to make a cleaner (switchable) patch, please notify.
Thanks for an awesome and very useful software package! Jack and the zoo
of applications around it are really the biggest reason for my new
interest in digital music making. Keep up the good work!
Greetings from Germany,
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
Register for a JBoss Training Course. Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
<a href="http://ads.osdn.com/?ad_idv28&alloc_id845&op=click">http://ads.osdn.com/?ad_idv28&alloc_id845&op=click _______________________________________________
Jackit-devel mailing list
[hidden email] https://lists.sourceforge.net/lists/listinfo/jackit-devel