PS3 Success at last

A month or so ago Eric found a compiler bug that prevented swig and
python from playing together well on the PS3.

As Eric has told you, we have been working on the kernel and Eric almost
has the install down pat and documented sufficiently well to tell
everyone how. I have been steadily beating on this since my move to the
University of Maryland campus as I need it for my projects.

I have 2.6.23-rc8 running and alsa-audio working nicely except directly
in gnuradio. One needs to add the PS3.conf to /etc/alsa as instructed
by Lavan on his Cell addons disk and then configure the sound card and
the audio test works. We have some little gotcha in the alsa sink that
I have been unable to find, so I gave up for now.

I had hoped when I introduced portaudio that it would be useful to
windows and some of the “other” PC’s. It has again. I configured
portaudio to only support alsa and jack. I modified a few python audio
scripts to use the audio_portaudio sink and they work perfectly.

I am not cross compiling yet so it only took 3 hours for gnuradio to
compile from scratch (!!) on the PS3 but this is enough for me to plug
up the usrp later today and see what works.

I can see that we will be able to take off and work hard on the PS3 now.

A suggestion for those who are building and installing Lavan’s kernel.
The PS3 runs faster and the footprint is noticably smaller if you
disable kernel hacking/debug in

make menuconfig.

Lavan’s ps3_defconfig is for kernel hackers as they try to debug the
faults.

The latest has a fault in that we are back to ps3-boot-game-os and
reboot not completing resulting in the need to force power off/on to
reboot but this was sorted out before and worked nicely.

This is a work in progress but I can definitely see work is ready to
begin in earnest.

Bob


AMSAT Director and VP Engineering. Member: ARRL, AMSAT-DL,
TAPR, Packrats, NJQRP, QRP ARCI, QCWA, FRC. ARRL SDR WG Chair
“An optimist may see a light where there is none, but why
must the pessimist always run to blow it out?” Descartes

On Mon, Oct 08, 2007 at 03:42:18AM -0400, Robert McGwier wrote:

I have 2.6.23-rc8 running and alsa-audio working nicely except directly
in gnuradio. One needs to add the PS3.conf to /etc/alsa as instructed
by Lavan on his Cell addons disk and then configure the sound card and
the audio test works. We have some little gotcha in the alsa sink that
I have been unable to find, so I gave up for now.

After enabling a bit of diagnostic output, it turns out that the PS3
alsa interface won’t accept RW_INTERLEAVED stereo samples. This
shouldn’t be hard to work around. We’ll need to support the
RW_NONINTERLEAVED or MMAP_NONINTERLEAVED access type in addition to
RW_INTERLEAVED.

Volunteers?

[eb@ps3 audio]$ ./dial_tone.py
audio: using audio_alsa
PCM name: hw:0,0
Access types:
MMAP_INTERLEAVED NO
MMAP_NONINTERLEAVED YES
MMAP_COMPLEX NO
RW_INTERLEAVED NO
RW_NONINTERLEAVED YES
Formats:
S16_BE YES
S24_BE YES
Number of channels
min channels: 2
max channels: 2
2 channels YES
Sample Rates:
min rate: 44100 (dir = 0)
max rate: 96000 (dir = 0)
8000 NO
16000 NO
22050 NO
32000 NO
44100 YES
48000 YES
96000 YES
192000 NO
audio_alsa_sink[hw:0,0]: failed to set access mask: Invalid argument
Traceback (most recent call last):
File “./dial_tone.py”, line 55, in
my_top_block().run()
File “./dial_tone.py”, line 48, in init
dst = audio.sink (sample_rate, options.audio_output)
File “/usr/local/lib/python2.5/site-packages/gnuradio/audio_alsa.py”,
line 236, in sink
return _audio_alsa.sink(*args)
RuntimeError: audio_alsa_sink

I had hoped when I introduced portaudio that it would be useful to
windows and some of the “other” PC’s. It has again. I configured
portaudio to only support alsa and jack. I modified a few python audio
scripts to use the audio_portaudio sink and they work perfectly.

You can avoid modifying code by specifying the default audio
module in ~/.gnuradio/config.conf E.g.,

[audio]
verbose = True
#audio_module = audio_portaudio
#audio_module = audio_oss
audio_module = audio_alsa

I am not cross compiling yet so it only took 3 hours for gnuradio to
compile from scratch (!!) on the PS3 but this is enough for me to plug
up the usrp later today and see what works.

After I turned off all unnecessary services, and changed the
initdefault from 5 to 3 in /etc/inittab, it took under 1 hour :wink:

FYI, even when running in init mode 3 (no X login), you can still
start an X session from the text mode command line using

$ startx

Eric

On Mon, Oct 08, 2007 at 06:44:38PM -0700, Eric B. wrote:

shouldn’t be hard to work around. We’ll need to support the
RW_NONINTERLEAVED or MMAP_NONINTERLEAVED access type in addition to
RW_INTERLEAVED.

Volunteers?

FYI, I opened ticket:190 on this.

Eric