Intel D945GCLF2 and Surround Sound on Gentoo

I while back I purchased an Intel D945GCLF2 motherboard to play with. This board features the dual core Atom 330 processor in a nice mini-ITX form factor. I’ve recently set this up as a media center PC, running Gentoo and XBMC. I’ve been quite happy with its performance in this role, but there was one thing that seemed missing… surround sound. The board only has the standard line in, line out, and mic jacks on the rear panel, but on Intel’s website, they claim it supports 5.1 surround sound. The snd-hda-intel kernel driver only provided 2 channel audio to my ALSA system. The user manual for the board was not much help either:

Intel Desktop Board D945GCLF2 has a 6-channel (5.1) onboard audio subsystem that includes a Realtek ALC662 audio codec.
The audio subsystem features:

  • Intel High Definition Audio interface
  • Advanced jack sense, for the back panel connectors, that enables the audio codec to recognize the device that is connected to an audio port and retask the connector via the audio driver.
  • Back panel audio connectors that are configurable through the audio device drivers:
    • Line in/retasking jack
    • Line out/retasking jack
    • Mic in/retasking jack

I’m not sure how this board behaves with the Windows driver, but needless to say, jack auto detection did not work in Linux. Some searching provided an answer: the kernel driver needs to be configured by ALSA to set the jacks to 6 channel mode. Adding this to the end of /etc/modprobe.d/alsa.conf did the trick:
options snd-hda-intel model=3stack-6ch-dig

With the driver now set, make sure that alsamixer is set to 6 channel audio. The last item in alsamixer for me switches between 2ch and 6ch, so be sure to set it accordingly.

This post on the Ubuntu forums led me to the solution: http://ubuntuforums.org/showthread.php?t=1072792

Deny Hosts and SSH Login Attempt Behavior

A few weeks ago I installed DenyHosts, a small deamon (can also be run as a cron job) that runs on my server to block IP’s that make brute force SSH login attempts.  The script has worked great, blocking over 500 hosts on the first day I used it (including myself a few times…).  One of the features of the script is the ability to send an email each time it blocks a host.  Although getting a few hundred emails at first was very annoying, setting up a few rules in gmail prevented me seeing them in my inbox (they go directly to a folder).  I did, however, start to look at the times when the various hosts get denyed.  They seem to come in large groups, so that there will be 50 or so hosts blocked in a rather short length of time, around 10 minutes or less.  The IP’s of the computers also come from all over the world, but most seem to come from Asia, South America, and Russia.  I think it would be interesting to do a more complete statistical analysis of the data in regards to the time and location of where the login attempts are coming from.  Maybe I’ll write something to do this later.