Tuner

add -v and -s to all decoders - check cro flacc feed still works

add a reply button
	allows you to do like/don't like to train
	pandora and the like.

update mad to the latest code

radio
	needs to pre-open next stream before current one finishes.

	needs to refresh the playlist in the background

HLS
	http://www.flashls.org/

	select from multiple bitrates
	do a background connect to each service in the background - one per 5 secs maybe,
	to keep dns fresh and allow us to indicate "off air" and maybe even current song
	and show.

	BBC R&D sample HLS streams

buttons:
	home
	tune
	make knob browse history (press and rotate?)
	like [email me] (current displayed title)
	show (scrollable) technical info on stream
	select airplay from iphone
	browse NAS server ??!?!

web page
	current playing info
	uptime and network stats since uptime
	network dropouts since uptime

should really do assembly speedup of MAD for 386 and arm, but works as it is.

qc: clipped samples, peak to mean ratio, cutoff freq, spectrogram blockiness measure

radio falls back to latin1 if the metadata is invalud utf-8.
definitely fails on czech radio which needs latin2 - intractable problem.

http://radio.irt.de/aida/frames.htm


icecast allows you to extract a rather badly formatted data without auth:
	hget -r 'user-agent: Mozilla' http://pplnettv.wnet.ua:8000/status2.xsl

	mountpoint,,name,num of listners,description,artist - track,url

	compare
		http://pplnettv.wnet.ua:8000/status2.xsl
	to
		http://pplnettv.wnet.ua:8000/status.xsl
 
shoutcast, extra info:
	history		hget 'http://192.99.4.210:3116/played?id=139378' | htmlfmt
	next		hget 'http://192.99.4.210:3116/nextsong?id=139378'
	current		hget 'http://192.99.4.210:3116/currentsong?id=139378'
	stats		hget 'http://192.99.4.210:3116/stats?id=139378' | htmlfmt

-------------------------

some NPR stations have a short advert on connect, this seems to contain/ be prefixed by
some unusal metadata:


	kexp		http://live-mp3-128.kexp.org:8000/listen.pls
	xxx			http://nis.stream.publicradio.org/nis.aac

	icy: 'adw_ad=true' unknown field
	icy: 'durationMilliseconds=14907' unknown field
	icy: 'insertionType=preroll' unknown field
	icy: 'metadata=adswizzContext=fHA6MTY2OA%3D%3D' unknown field

	seems its advertising, inserted by 'adswizz'

	I could strip it given I know exactly how long it is, but what would I
	
http://blog.koalo.de/2013/04/pcmpwm-clock-calculator.html
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=44&t=8496

bug in ac97 driver
	a second open of /dev/audio gives an allocation
	error, kill the first app who opened /dev/audio gives a kernel panic.

	try 9atom audio

	try 9front audio


per station gain matching info as not everyone obeys the -20/-18 dbFS standard.

http://www-mmsp.ece.mcgill.ca/Documents/Software/Packages/AFsp/AFsp.html

pre-open next channel to make GUI more responsive?

display previous song on GUI?

doctype for audio (audiotype / audtype)

maybe /bin/audio/ should become /bin/aud

metadat preload
	On powerup we could could fetch the metadata on the
	channels adjacent to the current one, moving outwards
	until we have the all. Maybe testing one channel everty 10 secs
	so we have metadata as soon as the knob is turned.
	Looks like this is not really necessary - we seem
	to get metadata withing a second or so.

Hardware
	"I like this" button

	PI pheriphals
		http://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf
		http://www.airspayce.com/mikem/bcm2835/

	get an Rotary encoder interfacing chip
	debug the rotary encoder to Rpi interface
		https://code.google.com/p/sixcode/source/browse/trunk/LS7366R.c?r=77
		http://www.usdigital.com/assets/datasheets/LFLS7366R-S_datasheet.pdf?k=635202085481038020

	GPIO interface expander
		Drive leds
		Scan keyboard
		vfd drive

	debug the VFD interface

	i2c to rotary encoder
		LSI interface chip?
		PIC chip?

	PSU
		5v
		12v
		3.3v needed?
	
	ethernet socket on back panel (square hole)

	ethernet drop cable to back pannel

	SPI driver
		https://projects.drogon.net/understanding-spi-on-the-raspberry-pi/


	mount VFD

	shim on shaft of rotary encoder, 6 to 6.25 mm

plan9
	boot into cpu kernel
	build new kernel and install it
	web interface with 1 page editor
	web access controlled by .httpaccess
	gpio driver
	i2c driver
	i2s driver
	
