Subject: Re: iBook clamshell audio
To: None <ober@linbsd.org, ma-500@khaki.plala.or.jp>
From: Marco Trillo <marcotrillo@gmail.com>
List: port-macppc
Date: 11/30/2007 15:44:29
Hi,

Thanks for your replies! So I've uploaded a kernel image that can be used
to test in:
 http://www.telefonica.net/web2/marco2z/macppcrd1.bz2.0
 http://www.telefonica.net/web2/marco2z/macppcrd1.bz2.1

(Due to some nasty limit in the server I had to split the file; it can be
 reconstructed by simply:

  cat macppcrd1.bz2.0 macppcrd1.bz2.1 > macppcrd1.bz2

size is 3.2MB, MD5 = 83146e75468cf964e37bcf4171912d25)

It should be bunzipped first, because ofwboot.xcf does only gzip.

The image is ramdisk-based,  so it won't mess with any current
installation. The ramdisk includes the audioplay(1), audioctl(1) and
mixerctl(1) programs in addition to the usual /bin and /sbin stuff.

Since this image is based on NetBSD 4, it's probably good, to be on the safe
side, to boot it with an ofwboot.xcf file from NetBSD 4. You can download one
from:

ftp://ftp.netbsd.org/pub/NetBSD-daily/netbsd-4/[...]/macppc/installation/ofwboot.xcf

where [...] represents an snapshot date.

In the kernel boot, you should see the following devices being attached:
 i2s0 at obio0
 iic1 at ki2c1
 dac3550a0 at iic1
 codec0 at dac3550a0
 audio0 at i2s0

You should be able to mount any disk to, if everything works fine, play
WAV, AU or RAW files with audioplay(1) and set the volume vith mixerctl(1).

I recommend trying with the internal speaker first to verify that everything
works and the volume can be set to comfortable volumes (it should
default to low).
Plugging something in the headphones jack should made the device switch to it
automatically; you can also use mixerctl(1) for that.

It implements power saving mode: after 10 seconds of the audio device being
closed, the device will enter a low power state (it will print a message when it
happens).

I would be interested in the output of the following commands:
  dmesg
  mixerctl -v -a

Thank you very much!

Marco.