As observed by [someone on one of these forums, but I can't find the page now], sound can be enabled with the help of the nvrm_gpu.ko kernel module and the nvrm_daemon command. The result is messy and unstable, but it's a start. As I'm still working it out, I'm not going to document every step thoroughly yet.

You'll need all the modules in “sound-modules.tgz” from the optional modules page (apart from the snd_usb_* ones), or to compile them with your own kernel: CONFIG_SOUND=m CONFIG_SND=m CONFIG_SND_TIMER=m CONFIG_SND_PCM=m CONFIG_SND_HWDEP=m CONFIG_SND_RAWMIDI=m CONFIG_SND_SEQUENCER=m CONFIG_SND_DRIVERS=y CONFIG_SND_ARM=y CONFIG_SND_SPI=y CONFIG_SND_SOC=m CONFIG_TEGRA_SND_SOC=m CONFIG_TEGRA_PCM=m CONFIG_TEGRA_I2S=m CONFIG_TEGRA_GENERIC_CODEC=m

You'll also need to copy nvrm_gpu.ko off the android partition. (This claims to be BSD/GPL dual licensed - dunno if that means the source should be available.) Finally, you need nvrm_daemon, also from the android partition. (The one included in linux4tegra requires another device, /dev/nvhost-ctrl, that doesn't seem to be created by the available kernel modules.) nvrm_daemon in turn requires a load more binaries from the android system partition. I'm working on whittling this down to the necessary ones, but for now, I've just created a chroot directory containing copied everything from /lib, everything starting with “nv” from /bin, and the linker.

After insmodding nvrm_gpu.ko, you'll have to bind the /proc , /dev and /sys filesystems into the chroot , and start nvrm_daemon inside that chroot.

At this point, nvrm_daemon will take a lot of the CPU, and the /proc filesystem appears to become corrupted, breaking lots of tools like ps, kill, top… It prints a few messages as it initializes:

HDMI –> nvdispmgr_hotplug.c : test by wing HDMI –> nvdispmgr_hotplug.c : NvDispMgrPrivInitializeGpioHotplug() HDMI –> nvdispmgr_hotplug.c : HotPlugDebounceThread(), thread start HDMI –> nvdispmgr_hotplug.c : NvDispMgrHotPlugReadPins() HDMI –> nvdispmgr_hotplug.c : NvDispMgrHotPlugReadPins(), Pin State is Low HDMI –> nvdispmgr_hotplug.c : NvDispMgrPrivInitializeGpioHotplug() 0 Set Speaker Mute On. Set Speaker Mute On.

insmod all the sound modules (or if they've been registered with depmod, then “modprobe tegra_soc_audio” should load all the others automatically). If you're running udev, this should have created some new devices under /dev/snd. alsamixer doesn't seem able to find any volume controls, but aplay or mplayer should be able to send sound to device 0.0 . When the sound begins, you'll notice that nvrm_daemon outputs a new message:

Set Speaker Mute Off.

Once the sound playing quits (or pauses), we get another two “Mute On” messages. Presumably the daemon's turning the soundcard off when unused in order to save power. For now, I wish I could get the soundcard on by default and only turn it off when attempting powersaving (along with all the other powersaving features we don't yet have working).

Watch this space (or even better, contribute :-) ).

Log In