Skip to content

Instantly share code, notes, and snippets.

@benosteen
benosteen / gist:2468609
Created April 23, 2012 03:08
Partial PoVRay benchmark - RaspberryPi, stock image, povray compiled with softfp and other recommended tunings
$ CFLAGS="-mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=softfp -marm" ./configure COMPILED_BY="BenO <@benosteen>"
$ make
$ povray +I ./scenes/advanced/benchmark.ini ./scenes/advanced/benchmark.pov
povray: cannot open the user configuration file /home/pi/.povray/3.6/povray.conf: No such file or directory
Persistence of Vision(tm) Ray Tracer Version 3.6.1 (g++ 4.4.5 @
armv6l-unknown-linux-gnu)
This is an unofficial version compiled by:
BenO <@benosteen>
@benosteen
benosteen / ao_alsa.c
Created April 22, 2012 18:11
Mplayer ao_alsa.c plugin
/*
* ALSA 0.9.x-1.x audio output driver
*
* Copyright (C) 2004 Alex Beregszaszi
*
* modified for real ALSA 0.9.0 support by Zsolt Barat <joy@streamminister.de>
* additional AC-3 passthrough support by Andy Lo A Foe <andy@alsaplayer.org>
* 08/22/2002 iec958-init rewritten and merged with common init, zsolt
* 04/13/2004 merged with ao_alsa1.x, fixes provided by Jindrich Makovicka
* 04/25/2004 printfs converted to mp_msg, Zsolt.
@benosteen
benosteen / povray.console
Created April 22, 2012 16:05
RasPi Povray benchmark - soft float and on armel
~/povray-3.6.1$ povray +I ./scenes/advanced/benchmark.ini ./scenes/advanced/benchmark.pov
povray: cannot open the user configuration file /home/pi/.povray/3.6/povray.conf: No such file or directory
Persistence of Vision(tm) Ray Tracer Version 3.6.1 (g++ 4.4.5 @
armv6l-unknown-linux-gnu)
This is an unofficial version compiled by:
goo
The POV-Ray Team(tm) is not responsible for supporting this version.
POV-Ray is based on DKBTrace 2.12 by David K. Buck & Aaron A. Collins
Copyright 1991-2003 Persistence of Vision Team
Copyright 2003-2004 Persistence of Vision Raytracer Pty. Ltd.
@benosteen
benosteen / hello_alsa.c
Created April 17, 2012 12:07
Hello world ALSA
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <alsa/asoundlib.h>
/* code from http://www.suse.de/~mana/alsa090_howto.html */
/* Link it with -lasound */
/* Needs pkg 'libasound2-dev' installed */
/* Handle for the PCM device */
@benosteen
benosteen / gist:2405590
Created April 17, 2012 12:06
strace of hello world alsa-style on RPi
pi@raspberrypi:/opt/vc/src/hello_pi/hello_alsa$ strace ./hello_alsa.bin plughw:0,0
execve("./hello_alsa.bin", ["./hello_alsa.bin", "plughw:0,0"], [/* 16 vars */]) = 0
brk(0) = 0xe5b000
uname({sys="Linux", node="raspberrypi", ...}) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x400dc000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=38932, ...}) = 0
mmap2(NULL, 38932, PROT_READ, MAP_PRIVATE, 3, 0) = 0x401be000
@benosteen
benosteen / sounddebug
Created April 16, 2012 23:17
sound debug
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Jan 1 00:00:27 1970
pi@raspberrypi:~$ mkdir Music
pi@raspberrypi:~$ cd Music/
pi@raspberrypi:~/Music$ wget http://archive.org/download/BeethovenPianoConcertoNo.5emperormoiseivitch/1.I.Allegro.ogg
--2012-04-16 23:08:28-- http://archive.org/download/BeethovenPianoConcertoNo.5emperormoiseivitch/1.I.Allegro.ogg
Resolving archive.org... 207.241.224.2
Connecting to archive.org|207.241.224.2|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
@benosteen
benosteen / aplay.log
Created April 16, 2012 19:17
console fail from aplay
Correct the date and time using e.g: sudo date --set="2012-04-16 19:15"
pi@raspberrypi:~$ sudo -s
root@raspberrypi:/home/pi# modprobe snd_bcm2835
root@raspberrypi:/home/pi# aplay < /dev/urandom
aplay: main:654: audio open error: Operation not permitted
root@raspberrypi:/home/pi# aplay < /dev/urandom
Message from syslogd@raspberrypi at Apr 16 19:15:21 ...
kernel:Internal error: Oops: 805 [#1]
@benosteen
benosteen / syslog
Created April 16, 2012 17:55
syslog of kernel oops
Apr 16 17:34:46 raspberrypi kernel: ### snd_bcm2835_alsa_probe c039e448 ############### PROBING FOR bcm2835 ALSA device (0):(1) ###############
Apr 16 17:34:46 raspberrypi kernel: Creating card...
Apr 16 17:34:46 raspberrypi kernel: Creating device/chip ..
Apr 16 17:34:46 raspberrypi kernel: Adding controls ..
Apr 16 17:34:46 raspberrypi kernel: Registering card ....
Apr 16 17:34:46 raspberrypi kernel: bcm2835 ALSA CARD CREATED!
Apr 16 17:34:46 raspberrypi kernel: ### BCM2835 ALSA driver init OK ###
Apr 16 17:35:02 raspberrypi kernel: snd_bcm2835_playback_open:97 Alsa open (0)
Apr 16 17:35:02 raspberrypi kernel: vcos: [1041]: vc_vchi_audio_init:258 vc_vchi_audio_init: failed to open VCHI service connection (status=-1)
Apr 16 17:35:02 raspberrypi kernel: vcos: [1041]: bcm2835_audio_open_connection:374 bcm2835_audio_open_connection: failed to initialize audio service
@benosteen
benosteen / console.log
Created April 16, 2012 17:54
console log of snd_bcm2835 error
root@raspberrypi:/opt/vc/src/hello_pi/hello_audio# modprobe snd_bcm2835
root@raspberrypi:/opt/vc/src/hello_pi/hello_audio# mplayer /home/pi/mp3/
8-Bit Ninjas - Occam's Disco Razor.mp3 8-Bit Ninjas - Shiny Spaceship.mp3 Pokemon Face.mp3 sound.log
root@raspberrypi:/opt/vc/src/hello_pi/hello_audio# mplayer /home/pi/mp3/Pokemon\ Face.mp3
MPlayer 1.0rc3-4.4.4 (C) 2000-2009 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Playing /home/pi/mp3/Pokemon Face.mp3.
@benosteen
benosteen / kern.log
Created April 16, 2012 14:42
RaspberryPi kern.log
This file has been truncated, but you can view the full file.
Feb 5 06:25:58 25pi-pauld kernel: DEBUG:timer_callback:: Timer hc timer callback
Feb 5 06:25:58 25pi-pauld kernel: WARN::hc_xfer_timeout:1740: hc_xfer_timeout: timeout on channel 7
Feb 5 06:25:58 25pi-pauld kernel:
Feb 5 06:25:58 25pi-pauld kernel: WARN::hc_xfer_timeout:1742: start_hcchar_val 0x00d88a00
Feb 5 06:25:58 25pi-pauld kernel:
Feb 5 06:26:58 25pi-pauld kernel: DEBUG:timer_callback:: Timer hc timer callback
Feb 5 06:26:58 25pi-pauld kernel: WARN::hc_xfer_timeout:1740: hc_xfer_timeout: timeout on channel 5
Feb 5 06:26:58 25pi-pauld kernel:
Feb 5 06:26:58 25pi-pauld kernel: WARN::hc_xfer_timeout:1742: start_hcchar_val 0x00d88a00
Feb 5 06:26:58 25pi-pauld kernel: