[PD] Familiar + PDa on h5550: audio/hardware details

derek holzer derek at x-i.net
Fri Mar 18 23:20:43 CET 2005


This mail sums up the hardware research I've been doing on the IPAQ 
5550's audio/hardware capabilities using Linux over the last two weeks 
as part of a short residency at STEIM in Amsterdam. The aim was to set 
up PDa as a sound processing platform on the IPAQ:
http://gige.xdv.org/pda/


__CONTENTS___________
* BASIC INSTALLATION NOTES
* GETTING THE FIRST BOOT
* SETTING UP POWER MANGEMENT
* AUDIO CONFIGURATION NOTES
* REMOTE X11 OVER SSH
* BLUETOOTH GPS
* PDa NOTES
* panDEV PROJECT PAGE
_____________________


* BASIC INSTALLATION NOTES:

In general, the Familiar 0.8.1 distribution of Linux runs pretty well 
with the HP IPAQ 5xxx series. I am using the GPE version, but an OPIE 
version and a "barebones" developer version are also available.

A few tricks are employed to get it booting at first, power management 
needs to be properly set up and the audio needs some tweaking, but once 
everything has been done, you can use the Compact Flash slot, audio 
line-in, audio line-out, WIFI, Bluetooth and many external "jackets" 
without much difficulty.

Here are some older but helpful install notes:
http://umbrella.sourceforge.net/article.php?story=20040311042139896

But make sure to get the latest installer files from here:
http://handhelds.org/download/distributions/familiar/releases/v0.8.1/install/

Please read the release notes and installation instructions here 
completely before beginning as well!

It might be a good idea to take a few moments and learn how to run your 
terminal emulator [minicom, etc] before starting if you've never used 
one before, as the key commands can be tricky. Also make sure you have 
Ymodem installed, it's usually part of the "lrzsz" package (Debian, 
Gentoo, etc) and may not be installed by default with your terminal 
emulator package. You will get nothing but "upload failed" messages 
without this package!


* GETTING THE FIRST BOOT:

You may have to wait a long time for the first boot without knowing 
what's going on inside the IPAQ, so you might want to monitor progress 
with the following command in your terminal emulator after the "load 
root" command finishes installing the 0.8.1 image:

set linuxargs "mem=128M root=/dev/mtdblock1 init=/linuxrc noinitrd 
console=ttyS0"

Then type "boot" at the prompt. It may hang the first time on modprobing 
h5400_asic, but it should go through the next boot after that. Use the 
same command on the second boot as well to monitor progress.


* SETTING UP POWER MANGEMENT:

The first thing you will want to do after installing is set up the power 
management, otherwise the ipaq-sleep module will shut the IPAQ down 
every time you unplug from the charger! First do a "killall ipaq-sleep" 
as root, then disconnect from power and let the battery run itself out.

Then reboot with the power plugged in and don't unplug it until it's 
fully charged. This puts the IPAQ in Learning Mode, which will teach the 
power management how much time is in the battery. After this, you should 
be able to use the IPAQ normally.

The command "cat /proc/asic/battery" will give better battery info than 
the GUI if you need it. Battery "jackets", such as the Pitech MemPlug, 
appear to be plug-and-play, but make sure to leave them off when using 
Learning Mode. I use a USB Sych/Charge cable to recharge the IPAQ, as 
the cradle it came with doesn't seem to work at all for this purpose!


* AUDIO CONFIGURATION NOTES:

Out of the box with Familiar, the 5550 wants to play sound from the 
crappy built-in speaker, and record from the crappy built-in microphone.

The following binary executable switches to headphone-out and line-in:

http://hovland.org/familiar/hpswitch

Once it's downloaded, do a "chmod 755 hpswitch" as root and run it as 
"./hpswitch" to change the routing of the audio in and out. After this, 
all audio out will go the headphone jack and it will listen to the audio 
coming from line-in instead of the built-in mike. Other IPAQs may or may 
not have this speaker/jack routing problem, I think it's pretty specific 
to this model.

Sources of this app are available on the [h5400-port] list if anyone's 
interested:

http://article.gmane.org/gmane.comp.handhelds.linux.h5400/16

To use the mike jack, you will need to build the following audio adaptor:

http://web.it.kth.se/~maguire/iPAQ-photos/iPAQ-audio-adapter.html

Output is stereo, but input is mono due to the hardware. You won't get 
stereo input without an external card such as Core-Sound's PDAudio unit, 
which accepts digital sound from an outboard AD converter and can handle 
up to 24 bit 96 KHz stereo audio:

http://www.core-sound.com/HighResRecorderNews.html

In case any IPAQ 5xxx-series owners are *really* curious, there's a 
spec-sheet for the soundchip here:

http://www.handhelds.org/platforms/hp/ipaq-h5xxx/AK4535-MS0135-E-01-03-2002.pdf

Note that "hpswitch" is used with the OSS drivers in Familiar 0.8.x for 
the h5xxx series. ALSA users have the alsamixer app which should do the 
switching for them fine. ALSA is not on the map for Familiar 0.8.2 yet 
AFAIK, only for the 2.6 kernel currently under development, but you can 
compile it from the Familiar CVS if you really want to use it. (Familiar 
people feel free to correct me here if I'm mistaken!)


* REMOTE X11 OVER SSH:

Patching in PDa with the IPAQ stylus is a real pain in the wazoo. I've 
been using a remote X11 session over SSH for this purpose in the 
following way:

First, edit the /etc/ssh/ssh_config file on the Host computer [i.e. your 
lap/desktop, not the IPAQ] and add the following line:

ForwardX11Trusted yes

I believe everything else should be commented out.

Then open a new SSH session from the Host to the Remote computer [i.e. 
IPAQ, webserver, etc] with the following command:

ssh -2 -X -C user at IP.address.of.Remote

Once you have a prompt inside the Remote computer, you can start X11 
applications by command line:

pandev at h3900:~$ pd

Et voilà! The application's GUI will appear in the display of your Host 
computer, but it will be physically running on the Remote computer. YMMV 
as to how responsive the GUI is, as this is a function of available 
bandwidth IIRC.


* BLUETOOTH GPS:

When I first started working on this platform last year, one of my first 
questions was how to get GPS data into PDa. Have a look at the following 
link if you have a Bluetooth GPS to see how it can be read as serial 
device by GPSd in the IPAQ:

http://gpsd.berlios.de/bt.html

I'll be making a webpage on www.umatic.nl for all this info later, as 
Pall Thayer gave me some interesting PERL tips for GPS, and we'll be 
developing some Python GPS stuff as well as some WIFI tools here in 
Holland in the next few months.


* PDa NOTES:

A substantial bug report and comments list on the latest test version of 
PDa has already been submitted to Guenter Geiger and the PD-list earlier 
this evening, and can be viewed here:
http://iem.at/mailinglists/pd-list/2005-03/026700.html
I'll try running some of the objects I tested locally instead of over 
SSH later on and see if performance improves from what is noted already.

Perhaps this mail will be another chapter for the PDa FAQ?:
http://gige.xdv.org/pda/faq.php

I'm very happy to be able to help Guenter develop PDa and to see it come 
further along so we all can use it. Big thanks go to STEIM for giving me 
the hardware, time and space to play around with! Thanks also to Jaap @ 
ASCII and Marc Boon for continuing programming support for the next 
phase of this project, and Koen Kooi and Rene Wagner on the Familiar 
list for expert help in a pinch.


* panDEV PROJECT PAGE:

This report was prepared as part of the development cycle of the panDEV 
project, a locative sound-gathering application for artists, 
cartographers and phonographers. More information on panDEV can be found 
here:

http://www.umatic.nl/projects_pandev.html

-- 
derek holzer ::: http://www.umatic.nl
---Oblique Strategy # 122:
"Not building a wall but making a brick"




More information about the Pd-list mailing list