• Home
  • About
  • Wacom Sketches
  • Photoshop Stuff
  • Bruce – The Gaywalker

alsa asound.conf 7.1 upmix debian lenny

Posted in Home Automation, nslu2, smarthome by christoph
Jul 17 2011
TrackBack Address.

So my plan was to use squeezeslave on a nslu2 slug with a terratec 7.1 usb soundcard and my old 5.1 soundsystem to play music in my bathroom (front left/right), the anteroom/hallway (rear left/right) and the toilette (center).

Now after fiddling a while and finding out that etch doesn't even have the surround51 preconfigs, I upgraded to debian lenny and FINALLY came up with an asound.conf which does what I want.

Only thing I might improve on is getting the mixing of left/right for the center channel to work, and possibly some filtering for the subwoofer – however I am not exactly sure if that's a good idea given the limited cpu power of the slug.

Anyways here's the asound.conf – note that squeezeslave refuses to work without a sample rate of 44100.

upmix output is outputting the stereo signal to all channels, the rest is for adressing/splitting between individual channels.

So i.e. you could run one application outputting to the frontspeakers and one to the rear.

Thanks to some guy on the internet (i am sorry I can't find the link anymore) for the asound.conf I based this on (it had everything apart from the combined upmix output)

pcm.dshare {
	type dmix
	ipc_key 2048
	ipc_key_add_uid false # let multiple users share
	ipc_perm 0660 # IPC permissions (octal, default 0600)
	ipc_gid audio
	slave {
		pcm "hw:0,0"
		rate 44100
		format S16_LE
		period_time 125000
		period_size 6000
		buffer_size 24006
		channels 8
	}
	bindings {
		0 0
		1 1
		2 2
		3 3
		4 4
		5 5
		6 6
		7 7
	}
}
 
pcm.upmix {
	type plug
	slave {
		pcm "dshare"
		channels 8
	}
	ttable.0.0 1
	ttable.1.1 1
	ttable.0.4 1
	ttable.1.5 1
 
	ttable.0.2 1
	ttable.1.3 1
 
	ttable.0.6 1
	ttable.1.7 1
}
 
pcm.frontx {
	type plug
	slave {
		pcm "dshare"
		channels 8
	}
	ttable.0.0 1
	ttable.1.1 1
}
 
pcm.centersub {
	type plug
	slave {
		pcm "dshare"
		channels 8
	}
	ttable.0.2 1
	ttable.1.3 1
}
pcm.rearx {
	type plug
	slave {
		pcm "dshare"
		channels 8
	}
	ttable.0.4 1
	ttable.1.5 1
}
 
pcm.sidex {
	type plug
	slave {
		pcm "dshare"
		channels 8
	}
	ttable.0.6 1
	ttable.1.7 1
}
No Comments yet »
Tagged as: debian, multiroom audio, nslu2, slug, smarthome, squeezeslave

Split media center into mediaplayer and homeserver

Posted in Home Automation, smarthome, xbmc by christoph
Jul 10 2011
TrackBack Address.

So after moving into my new apartment I had to restructure my network/infrastructure.

In my old apartment my whole media center/server setup was one pc. A Mini ITX Zotac ION Board with a few HDDs, an SSD and running 24/7.

My requirements were simple:

    1. Low power usage
    2. Room for 6 HDDs
    3. Small

Silent wasn't really a requirement since the server will run in a small cabinet/server room.

Due to the low power requirement a mini-itx atom based motherboard seemed like a good choice.

I found a pretty kickass board from Supermicro, offering all I could wish for including 6 sata ports integrated IPMI, KVM and 2x Gigabit ethernet ports.

I added 4 Gb of RAM an Antec EA-30D Green PSU (of course 80 plus certified) and bought a Mini-ITX LIAN LI PC-Q08B Case which fits 6x 3.5", 1x 5.25" and an additional 2.5".

http://www.lian-li.com/v2/en/product/product06.php?pr_index=480&cl_index=1&sc_index=25&ss_index=63&g=spec

So the list of stuff comes down to this:

  • Supermicro X7SPA-HF Motherboard ~170€
  • EA-380D Green PSU ~47 €
  • Lian Li PC-Q08 ~100€
  • 2x 2GB Ram DDR-2, 667 MHz, KINGSTON ~60€ for both

So thats 377€ for everything but the HDDs.

In terms of HDDs I am going to go with Western Digital Caviar Green 2000GB, 64MB Cache, SATA II for ~ 60 €  a piece.

I ripped all the HDDs out of the old mediacenter (1x 60 gb SSD, 1x 1 TB 3.5" and 1x 2 TB 3.5" plus another external 1.5 TB) and put them into the new server, a quick power consumption check showed ~ 35 Watt which is perfectly fine.

I might do some more accurate power consumption tests later on but the results so far look good.

Last but not least I got the original Zotac Board up and running again by:

  1. Having switched to a mysql DB backend for xbmc before removing the HDDs (see this guide)
  2. Installing XBMC live on an USB Stick and fixing up the settings to connect to the mysql DB of the homeserver.
  3. Setting up the xbmc live install so that all the media (which is now located on the home server) gets mounted at exactly the same spots they were before (using NFS)
  4. Make sure to also nfs mount the userdata/Thumbnails folder to avoid having to store/download artwort and stuff in case you want to add more pcs running xbmc.

Everything works pretty flawless so far, 1080 playback over WLAN is also 100%  smooth.

I might go back and edit this post to make it more detailed and clearer but it should be fine for now. Feel free to drop me an email if you have any questions.

No Comments yet »

Intertechno/Elro adapter controlled by lirc

Posted in Home Automation, How to by christoph
Jan 24 2011
TrackBack Address.

This is something I did a while ago, but too me a long time to figure out how to get working.

Basically I was trying to control those cheap RF units used for switching lights/power on and off via my media center pc. Of course there are 400€ solutions but I am running on a budget here.

Anyways my hardware looks like this:

  • Ubuntu Media Center Pc
  • usb-uirt IR Blaster
  • ELRO RF adapters (AB4440)
  • lirc (software for sending IR signals)
  • IR-RF-IR converter from conrad (not any converter working on the same 434mhz frequency should work) – in german slang they are called conrad eier

I got the codes converted from some intertechno pronto codes found on the web, but eventually the final problem turned out to be the frequency in the lircd.conf

Setting it to 20000 resolved everything, and I have to admit that I did figure it out by pure trial and error – shame on me but whatever works eh ?

So for anyone trying the same thing as I did heres my lirc conf file for controlling all this, mind you the names of the codes are related to the intertechno but I posted the translated  Elro style codes above them as a comment.

Hit the jump to check the code

(more…)

No Comments yet »
Tagged as: conrad eier, home automation, lirc, media center, ubuntu, usb-uirt

Recent Posts

  • Optimizing my sleep
  • August Doodle
  • Where is my mind?
  • Donnie Darko
  • Oldboy Sketch Frank Millerish

Other Projects

  • Nosferatu

Tags

bodyhacking conrad eier debian home automation How to linux lirc maverick media center multiroom audio nslu2 nvidia polyphasic problem sleep slug smarthome squeezeslave ubuntu upgrade usb-uirt zeo
Powered by WordPress